CVS commit: src/sys/uvm

2020-03-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Mar  3 07:51:26 UTC 2020

Modified Files:
src/sys/uvm: uvm_page.c

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/sys/uvm/uvm_page.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2020-03-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Mar  3 07:51:26 UTC 2020

Modified Files:
src/sys/uvm: uvm_page.c

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/sys/uvm/uvm_page.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.228 src/sys/uvm/uvm_page.c:1.229
--- src/sys/uvm/uvm_page.c:1.228	Thu Feb 27 22:12:54 2020
+++ src/sys/uvm/uvm_page.c	Tue Mar  3 07:51:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.228 2020/02/27 22:12:54 ad Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.229 2020/03/03 07:51:26 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.228 2020/02/27 22:12:54 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.229 2020/03/03 07:51:26 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvm.h"
@@ -1532,7 +1532,7 @@ uvm_pagefree(struct vm_page *pg)
 		rw_write_held(pg->uanon->an_lock));
 
 	/*
-	 * remove the page from the object's tree beore acquiring any page
+	 * remove the page from the object's tree before acquiring any page
 	 * interlocks: this can acquire locks to free radixtree nodes.
 	 */
 	if (pg->uobject != NULL) {



Re: CVS commit: src/sys/dev

2020-03-02 Thread Martin Husemann
On Tue, Mar 03, 2020 at 03:26:47PM +1100, matthew green wrote:
> without really understanding, it seems that there should be
> a uhid ioctl to enable this mode, and then your userland code
> sets it, instead of this hack.

Or make uhid not attach at all on FIDO devices and instead use ugen from
userland?

Or solve the long standing "every usb devices should be able to eject
its driver and be used as ugen instead" problem, see also the various
JTAG devices showing up as dual uftdi and you need to override in your
kernel config like:

# GuruPlug JTAG debug interface
ugenif* at uhub? vendor 0x9e88 product 0x9e8f interface 0 flags 1


Most devices go via uhid to make userland access easy on windows, but for us
it makes no real difference.

Martin


CVS commit: src/external/cddl/osnet/sys/kern

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar  3 06:44:38 UTC 2020

Modified Files:
src/external/cddl/osnet/sys/kern: printf.c

Log Message:
Use vpanic, not vprintf and then panic.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/kern/printf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/sys/kern/printf.c
diff -u src/external/cddl/osnet/sys/kern/printf.c:1.2 src/external/cddl/osnet/sys/kern/printf.c:1.3
--- src/external/cddl/osnet/sys/kern/printf.c:1.2	Mon May 28 21:05:09 2018
+++ src/external/cddl/osnet/sys/kern/printf.c	Tue Mar  3 06:44:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: printf.c,v 1.2 2018/05/28 21:05:09 chs Exp $	*/
+/*	$NetBSD: printf.c,v 1.3 2020/03/03 06:44:38 riastradh Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -41,10 +41,8 @@ vcmn_err(int ce, const char *fmt, va_lis
 	char buf[256];
 	size_t len;
 
-	if (ce == CE_PANIC) {
-		vprintf(fmt, adx);
-		panic("panic");
-	}
+	if (ce == CE_PANIC)
+		vpanic(fmt, adx);
 
 	if ((uint_t)ce < CE_IGNORE) {
 		strcpy(buf, ce_prefix[ce]);



CVS commit: src/external/cddl/osnet/sys/kern

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar  3 06:44:38 UTC 2020

Modified Files:
src/external/cddl/osnet/sys/kern: printf.c

Log Message:
Use vpanic, not vprintf and then panic.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/kern/printf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2020-03-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Mar  3 05:41:36 UTC 2020

Modified Files:
src/sys/dev/pci: if_ti.c

Log Message:
Don't clear CFI and priority bit to pass them to the upper layer.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/pci/if_ti.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ti.c
diff -u src/sys/dev/pci/if_ti.c:1.115 src/sys/dev/pci/if_ti.c:1.116
--- src/sys/dev/pci/if_ti.c:1.115	Sat Feb 29 18:49:53 2020
+++ src/sys/dev/pci/if_ti.c	Tue Mar  3 05:41:36 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.115 2020/02/29 18:49:53 thorpej Exp $ */
+/* $NetBSD: if_ti.c,v 1.116 2020/03/03 05:41:36 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.115 2020/02/29 18:49:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.116 2020/03/03 05:41:36 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -2032,10 +2032,8 @@ ti_rxeof(struct ti_softc *sc)
 			break;
 		}
 
-		if (cur_rx->ti_flags & TI_BDFLAG_VLAN_TAG) {
-			/* ti_vlan_tag also has the priority, trim it */
-			vlan_set_tag(m, cur_rx->ti_vlan_tag & 0x0fff);
-		}
+		if (cur_rx->ti_flags & TI_BDFLAG_VLAN_TAG)
+			vlan_set_tag(m, cur_rx->ti_vlan_tag);
 
 		if_percpuq_enqueue(ifp->if_percpuq, m);
 	}



CVS commit: src/sys/dev/pci

2020-03-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Mar  3 05:41:36 UTC 2020

Modified Files:
src/sys/dev/pci: if_ti.c

Log Message:
Don't clear CFI and priority bit to pass them to the upper layer.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/pci/if_ti.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:55:46 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Send packets even if link state is not up

ixl(4) has not the limitation that it must not send packet when
link is down. And most of the other NIC drivers do not refer to it
when sending packets.

reviewed by knakahara@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.59 src/sys/dev/pci/if_ixl.c:1.60
--- src/sys/dev/pci/if_ixl.c:1.59	Tue Mar  3 04:34:45 2020
+++ src/sys/dev/pci/if_ixl.c	Tue Mar  3 04:55:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.59 2020/03/03 04:34:45 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.60 2020/03/03 04:55:46 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.59 2020/03/03 04:34:45 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.60 2020/03/03 04:55:46 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2733,8 +2733,7 @@ ixl_tx_common_locked(struct ifnet *ifp, 
 
 	KASSERT(mutex_owned(>txr_lock));
 
-	if (ifp->if_link_state != LINK_STATE_UP
-	|| !ISSET(ifp->if_flags, IFF_RUNNING)
+	if (!ISSET(ifp->if_flags, IFF_RUNNING)
 	|| (!is_transmit && ISSET(ifp->if_flags, IFF_OACTIVE))) {
 		if (!is_transmit)
 			IFQ_PURGE(>if_snd);



CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:55:46 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Send packets even if link state is not up

ixl(4) has not the limitation that it must not send packet when
link is down. And most of the other NIC drivers do not refer to it
when sending packets.

reviewed by knakahara@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:34:45 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Use ixl_atq_exec for waiting the Get link status response of ixl(4)
not to send the same command at once

reviewed by knakahara@n.o., thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.58 src/sys/dev/pci/if_ixl.c:1.59
--- src/sys/dev/pci/if_ixl.c:1.58	Tue Mar  3 04:22:45 2020
+++ src/sys/dev/pci/if_ixl.c	Tue Mar  3 04:34:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.58 2020/03/03 04:22:45 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.59 2020/03/03 04:34:45 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.58 2020/03/03 04:22:45 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.59 2020/03/03 04:34:45 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -778,6 +778,7 @@ static void	ixl_atq_set(struct ixl_atq *
 static int	ixl_atq_post_locked(struct ixl_softc *, struct ixl_atq *);
 static void	ixl_atq_done(struct ixl_softc *);
 static int	ixl_atq_exec(struct ixl_softc *, struct ixl_atq *);
+static int	ixl_atq_exec_locked(struct ixl_softc *, struct ixl_atq *);
 static int	ixl_get_version(struct ixl_softc *);
 static int	ixl_get_nvm_version(struct ixl_softc *);
 static int	ixl_get_hw_capabilities(struct ixl_softc *);
@@ -3660,6 +3661,7 @@ ixl_get_link_status(void *xsc)
 	struct ixl_softc *sc = xsc;
 	struct ixl_aq_desc *iaq;
 	struct ixl_aq_link_param *param;
+	int error;
 
 	mutex_enter(>sc_atq_lock);
 
@@ -3669,7 +3671,13 @@ ixl_get_link_status(void *xsc)
 	param = (struct ixl_aq_link_param *)iaq->iaq_param;
 	param->notify = IXL_AQ_LINK_NOTIFY;
 
-	(void)ixl_atq_post_locked(sc, >sc_link_state_atq);
+	error = ixl_atq_exec_locked(sc, >sc_link_state_atq);
+	if (error == 0) {
+		ixl_get_link_status_done(sc, iaq);
+	}
+
+	ixl_atq_set(>sc_link_state_atq, ixl_get_link_status_done);
+
 	mutex_exit(>sc_atq_lock);
 }
 
@@ -3894,20 +3902,29 @@ ixl_atq_exec(struct ixl_softc *sc, struc
 {
 	int error;
 
+	mutex_enter(>sc_atq_lock);
+	error = ixl_atq_exec_locked(sc, iatq);
+	mutex_exit(>sc_atq_lock);
+
+	return error;
+}
+
+static int
+ixl_atq_exec_locked(struct ixl_softc *sc, struct ixl_atq *iatq)
+{
+	int error;
+
+	KASSERT(mutex_owned(>sc_atq_lock));
 	KASSERT(iatq->iatq_desc.iaq_cookie == 0);
 
 	ixl_atq_set(iatq, ixl_wakeup);
 
-	mutex_enter(>sc_atq_lock);
 	error = ixl_atq_post_locked(sc, iatq);
-	if (error) {
-		mutex_exit(>sc_atq_lock);
+	if (error)
 		return error;
-	}
 
 	error = cv_timedwait(>sc_atq_cv, >sc_atq_lock,
 	IXL_ATQ_EXEC_TIMEOUT);
-	mutex_exit(>sc_atq_lock);
 
 	return error;
 }



CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:34:45 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Use ixl_atq_exec for waiting the Get link status response of ixl(4)
not to send the same command at once

reviewed by knakahara@n.o., thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



re: CVS commit: src/sys/dev

2020-03-02 Thread matthew green
"Christos Zoulas" writes:
> Module Name:  src
> Committed By: christos
> Date: Mon Mar  2 18:15:29 UTC 2020
> 
> Modified Files:
>   src/sys/dev/hid: hid.h
>   src/sys/dev/usb: uhid.c
> 
> Log Message:
> Add fido constants, and turn hid "raw" mode for fido devices.

this is gross.

please don't put device specific stuff into uhid like this.

without really understanding, it seems that there should be
a uhid ioctl to enable this mode, and then your userland code
sets it, instead of this hack.

also, please actually explain what this "raw" mode means.  is
there perhaps a way to avoid this entirely?  what's the real
underlying need here..?


.mrg.


CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:22:45 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Added KASSERT


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.57 src/sys/dev/pci/if_ixl.c:1.58
--- src/sys/dev/pci/if_ixl.c:1.57	Tue Mar  3 04:19:20 2020
+++ src/sys/dev/pci/if_ixl.c	Tue Mar  3 04:22:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.57 2020/03/03 04:19:20 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.58 2020/03/03 04:22:45 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.57 2020/03/03 04:19:20 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.58 2020/03/03 04:22:45 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -3807,6 +3807,7 @@ ixl_atq_post_locked(struct ixl_softc *sc
 	bus_dmamap_sync(sc->sc_dmat, IXL_DMA_MAP(>sc_atq),
 	0, IXL_DMA_LEN(>sc_atq), BUS_DMASYNC_POSTWRITE);
 
+	KASSERT(iatq->iatq_fn != NULL);
 	*slot = iatq->iatq_desc;
 	slot->iaq_cookie = (uint64_t)((intptr_t)iatq);
 



CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:22:45 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Added KASSERT


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar  3 04:20:50 UTC 2020

Modified Files:
src/lib: Makefile

Log Message:
Remove unfinished hack I accidentally committed in 2017.

This caused make to unconditionally take ages running useless
submakes in every subdirectory.  Accidentally committed during the
MKCRYPTO option removal when I was presumably experimenting with
automating library dependency generation in lib.

Should shave a few seconds at least off every build!


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.275 src/lib/Makefile:1.276
--- src/lib/Makefile:1.275	Tue Mar  3 00:37:05 2020
+++ src/lib/Makefile	Tue Mar  3 04:20:50 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.275 2020/03/03 00:37:05 christos Exp $
+#	$NetBSD: Makefile,v 1.276 2020/03/03 04:20:50 riastradh Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -298,21 +298,5 @@ SUBDIR+=	lua
 # Needed by rump and rescue which are outside the smbfs tree
 SUBDIR+=	../external/bsd/smbfs/lib
 
-.for S in ${SUBDIR}
-.if ${S} != ".WAIT"
-SUBLIB_${S}!=	cd ${S} && ${MAKE} -V LIB
-SUBDEP_${S}!=	cd ${S} && ${MAKE} -V LIBDPLIBS
-.endif
-.endfor
-
-showdeps:
-.for S in ${SUBDIR}
-.if ${S} != ".WAIT"
-.for DL DD in ${SUBDEP_${S}}
-	@echo ${S} ${SUBLIB_${S}} ${DL} ${DD:C,^${.CURDIR}/,,}
-.endfor
-.endif
-.endfor
-
 .include 
 .include 



CVS commit: src/lib

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar  3 04:20:50 UTC 2020

Modified Files:
src/lib: Makefile

Log Message:
Remove unfinished hack I accidentally committed in 2017.

This caused make to unconditionally take ages running useless
submakes in every subdirectory.  Accidentally committed during the
MKCRYPTO option removal when I was presumably experimenting with
automating library dependency generation in lib.

Should shave a few seconds at least off every build!


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:19:20 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Fix the crash when ixl(4) sends Get link status command
and receives Get link status response in parallel

sc->sc_link_state_atq.iatq_fn is used in ixl_atq_done_locked()
with sc->sc_atq_lock, but it was cleared in ixl_get_link_status()
without the lock.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2020-03-02 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Mar  3 04:19:20 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Fix the crash when ixl(4) sends Get link status command
and receives Get link status response in parallel

sc->sc_link_state_atq.iatq_fn is used in ixl_atq_done_locked()
with sc->sc_atq_lock, but it was cleared in ixl_get_link_status()
without the lock.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.56 src/sys/dev/pci/if_ixl.c:1.57
--- src/sys/dev/pci/if_ixl.c:1.56	Tue Feb 25 08:05:24 2020
+++ src/sys/dev/pci/if_ixl.c	Tue Mar  3 04:19:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.56 2020/02/25 08:05:24 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.57 2020/03/03 04:19:20 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.56 2020/02/25 08:05:24 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.57 2020/03/03 04:19:20 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -775,7 +775,6 @@ static int	ixl_atq_poll(struct ixl_softc
 		unsigned int);
 static void	ixl_atq_set(struct ixl_atq *,
 		void (*)(struct ixl_softc *, const struct ixl_aq_desc *));
-static int	ixl_atq_post(struct ixl_softc *, struct ixl_atq *);
 static int	ixl_atq_post_locked(struct ixl_softc *, struct ixl_atq *);
 static void	ixl_atq_done(struct ixl_softc *);
 static int	ixl_atq_exec(struct ixl_softc *, struct ixl_atq *);
@@ -798,6 +797,8 @@ static int	ixl_set_vsi(struct ixl_softc 
 static void	ixl_set_filter_control(struct ixl_softc *);
 static void	ixl_get_link_status(void *);
 static int	ixl_get_link_status_poll(struct ixl_softc *, int *);
+static void	ixl_get_link_status_done(struct ixl_softc *,
+		const struct ixl_aq_desc *);
 static int	ixl_set_link_status(struct ixl_softc *,
 		const struct ixl_aq_desc *);
 static uint64_t	ixl_search_link_speed(uint8_t);
@@ -1412,6 +1413,7 @@ ixl_attach(device_t parent, device_t sel
 		link = LINK_STATE_UNKNOWN;
 	if_link_state_change(ifp, link);
 
+	ixl_atq_set(>sc_link_state_atq, ixl_get_link_status_done);
 	ixl_work_set(>sc_link_state_task, ixl_get_link_status, sc);
 
 	ixl_config_other_intr(sc);
@@ -3659,14 +3661,16 @@ ixl_get_link_status(void *xsc)
 	struct ixl_aq_desc *iaq;
 	struct ixl_aq_link_param *param;
 
-	memset(>sc_link_state_atq, 0, sizeof(sc->sc_link_state_atq));
+	mutex_enter(>sc_atq_lock);
+
 	iaq = >sc_link_state_atq.iatq_desc;
+	memset(iaq, 0, sizeof(*iaq));
 	iaq->iaq_opcode = htole16(IXL_AQ_OP_PHY_LINK_STATUS);
 	param = (struct ixl_aq_link_param *)iaq->iaq_param;
 	param->notify = IXL_AQ_LINK_NOTIFY;
 
-	ixl_atq_set(>sc_link_state_atq, ixl_get_link_status_done);
-	(void)ixl_atq_post(sc, >sc_link_state_atq);
+	(void)ixl_atq_post_locked(sc, >sc_link_state_atq);
+	mutex_exit(>sc_atq_lock);
 }
 
 static void
@@ -3818,18 +3822,6 @@ ixl_atq_post_locked(struct ixl_softc *sc
 	return 0;
 }
 
-static int
-ixl_atq_post(struct ixl_softc *sc, struct ixl_atq *iatq)
-{
-	int rv;
-
-	mutex_enter(>sc_atq_lock);
-	rv = ixl_atq_post_locked(sc, iatq);
-	mutex_exit(>sc_atq_lock);
-
-	return rv;
-}
-
 static void
 ixl_atq_done_locked(struct ixl_softc *sc)
 {



Re: CVS commit: src/sys/kern

2020-03-02 Thread Taylor R Campbell
> Date: Tue, 3 Mar 2020 12:41:32 +0900
> From: Rin Okuyama 
> 
> On 2020/03/03 1:00, Taylor R Campbell wrote:
> > Include kern_crashme.c in non-DEBUG kernels.
> > 
> > This is useful for simulating crashes in production to test failover.
> 
> I like this.
> 
> Could you please send pullup request to netbsd-9, or can I?

Go for it!


Re: CVS commit: src/sys/kern

2020-03-02 Thread Rin Okuyama

Hi,

On 2020/03/03 1:00, Taylor R Campbell wrote:

Module Name:src
Committed By:   riastradh
Date:   Mon Mar  2 16:00:54 UTC 2020

Modified Files:
src/sys/kern: files.kern

Log Message:
Include kern_crashme.c in non-DEBUG kernels.

This is useful for simulating crashes in production to test failover.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/files.kern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


I like this.

Could you please send pullup request to netbsd-9, or can I?

Thanks,
rin


CVS commit: src/external/bsd/pam-u2f/bin/pamu2fcfg

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 03:10:32 UTC 2020

Added Files:
src/external/bsd/pam-u2f/bin/pamu2fcfg: Makefile cmdline.c cmdline.h

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/bin/pamu2fcfg/Makefile \
src/external/bsd/pam-u2f/bin/pamu2fcfg/cmdline.c \
src/external/bsd/pam-u2f/bin/pamu2fcfg/cmdline.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/pam-u2f/bin/pamu2fcfg/Makefile
diff -u /dev/null src/external/bsd/pam-u2f/bin/pamu2fcfg/Makefile:1.1
--- /dev/null	Mon Mar  2 22:10:32 2020
+++ src/external/bsd/pam-u2f/bin/pamu2fcfg/Makefile	Mon Mar  2 22:10:32 2020
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 03:10:32 christos Exp $
+
+NOMAN=
+
+.include 
+
+DIST=${NETBSDSRCDIR}/external/bsd/pam-u2f/dist
+
+.PATH: ${DIST} ${DIST}/pamu2fcfg
+
+CFFILE=${DIST}/configure.ac
+PACKAGE!= ${TOOL_SED} -ne 's/AC_INIT(\[\([a-zA-Z0-9_-]*\)\].*/\1/p' ${CFFILE}
+VERSION!= ${TOOL_SED} -ne 's/AC_INIT(\[[a-zA-Z0-9_-]*\], \[\([0-9.]*\)\].*/\1/p' ${CFFILE}
+
+CPPFLAGS+= -I${DIST} -I${.CURDIR}
+CPPFLAGS+= -DPACKAGE='"${PACKAGE}"' -DVERSION='"${VERSION}"'
+CPPFLAGS+= -DHAVE_UNISTD_H
+
+BINDIR=/usr/bin
+PROG=pamu2fcfg
+SRCS=pamu2fcfg.c cmdline.c b64.c readpassphrase.c explicit_bzero.c util.c
+COPTS.util.c += -Wno-error=stack-protector
+
+LDADD+=-lpam -lfido2 -lcbor -lusbhid -lcrypto
+DPADD+=${LIBPAM} ${LIBFIDO2} ${LIBCBOR} ${LIBUSBHID} ${LIBCRYPTO}
+
+.include 
Index: src/external/bsd/pam-u2f/bin/pamu2fcfg/cmdline.c
diff -u /dev/null src/external/bsd/pam-u2f/bin/pamu2fcfg/cmdline.c:1.1
--- /dev/null	Mon Mar  2 22:10:32 2020
+++ src/external/bsd/pam-u2f/bin/pamu2fcfg/cmdline.c	Mon Mar  2 22:10:32 2020
@@ -0,0 +1,731 @@
+/*
+  File autogenerated by gengetopt version 2.22.6
+  generated with the following command:
+  gengetopt --no-handle-help --input cmdline.ggo Makefile.am 
+
+  The developers of gengetopt consider the fixed text that goes in all
+  gengetopt output files to be in the public domain:
+  we make no copyright claims on it.
+*/
+
+/* If we use autoconf.  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+
+#ifndef FIX_UNUSED
+#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */
+#endif
+
+#include 
+
+#include "cmdline.h"
+
+const char *gengetopt_args_info_purpose = "Perform a U2F registration operation and print a configuration line that can be\nused with the pam_u2f module.";
+
+const char *gengetopt_args_info_usage = "Usage: " CMDLINE_PARSER_PACKAGE " [OPTIONS]...";
+
+const char *gengetopt_args_info_versiontext = "";
+
+const char *gengetopt_args_info_description = "";
+
+const char *gengetopt_args_info_help[] = {
+  "  -h, --help   Print help and exit",
+  "  --versionPrint version and exit",
+  "  -o, --origin=STRING  Origin URL to use during registration. Defaults to\n pam://hostname",
+  "  -i, --appid=STRING   Application ID to use during registration. Defaults\n to pam://hostname",
+  "  -t, --type=STRINGCOSE type to use during registration (ES256 or\n RS256). Defaults to ES256.",
+  "  -r, --resident   Generate a resident credential  (default=off)",
+  "  -P, --no-user-presence   Allow the credential to be used without ensuring the\n user's presence  (default=off)",
+  "  -N, --pin-verification   Require PIN verification during authentication\n (default=off)",
+  "  -V, --user-verification  Require user verification during authentication\n (default=off)",
+  "  -d, --debug  Print debug information (highly verbose)\n (default=off)",
+  "  -v, --verbosePrint information about chosen origin and appid\n (default=off)",
+  "\n Group: user",
+  "  -u, --username=STRINGThe name of the user registering the device.\n Defaults to the current user name",
+  "  -n, --nouser Print only registration information (keyHandle and\n public key). Useful for appending",
+0
+};
+
+typedef enum {ARG_NO
+  , ARG_FLAG
+  , ARG_STRING
+} cmdline_parser_arg_type;
+
+static
+void clear_given (struct gengetopt_args_info *args_info);
+static
+void clear_args (struct gengetopt_args_info *args_info);
+
+static int
+cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
+struct cmdline_parser_params *params, const char *additional_error);
+
+
+static char *
+gengetopt_strdup (const char *s);
+
+static
+void clear_given (struct gengetopt_args_info *args_info)
+{
+  args_info->help_given = 0 ;
+  args_info->version_given = 0 ;
+ 

CVS commit: src/external/bsd/pam-u2f/bin/pamu2fcfg

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 03:10:32 UTC 2020

Added Files:
src/external/bsd/pam-u2f/bin/pamu2fcfg: Makefile cmdline.c cmdline.h

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/bin/pamu2fcfg/Makefile \
src/external/bsd/pam-u2f/bin/pamu2fcfg/cmdline.c \
src/external/bsd/pam-u2f/bin/pamu2fcfg/cmdline.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 02:25:03 UTC 2020

Modified Files:
src/share/mk: bsd.README bsd.prog.mk

Log Message:
Add fido and cbor


To generate a diff of this commit:
cvs rdiff -u -r1.397 -r1.398 src/share/mk/bsd.README
cvs rdiff -u -r1.324 -r1.325 src/share/mk/bsd.prog.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.397 src/share/mk/bsd.README:1.398
--- src/share/mk/bsd.README:1.397	Fri Nov 22 08:30:19 2019
+++ src/share/mk/bsd.README	Mon Mar  2 21:25:03 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.397 2019/11/22 13:30:19 martin Exp $
+#	$NetBSD: bsd.README,v 1.398 2020/03/03 02:25:03 christos Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1657,6 +1657,7 @@ DPADD		Additional dependencies for the p
 		LIBBZ2?=		${DESTDIR}/usr/lib/libbz2.a
 		LIBC?=			${DESTDIR}/usr/lib/libc.a
 		LIBC_PIC?=		${DESTDIR}/usr/lib/libc_pic.a
+		LIBCBOR?=		${DESTDIR}/usr/lib/libcbor.a
 		LIBCOMPAT?=		${DESTDIR}/usr/lib/libcompat.a
 		LIBCOM_ERR?=		${DESTDIR}/usr/lib/libcom_err.a
 		LIBCRYPT?=		${DESTDIR}/usr/lib/libcrypt.a
@@ -1672,6 +1673,7 @@ DPADD		Additional dependencies for the p
 		LIBEXECINFO?=		${DESTDIR}/usr/lib/libexecinfo.a
 		LIBEXPAT?=		${DESTDIR}/usr/lib/libexpat.a
 		LIBFETCH?=		${DESTDIR}/usr/lib/libfetch.a
+		LIBFIDO2?=		${DESTDIR}/usr/lib/libfido2.a
 		LIBFL?=			${DESTDIR}/usr/lib/libfl.a
 		LIBFORM?=		${DESTDIR}/usr/lib/libform.a
 		LIBGCC?=		${DESTDIR}/usr/lib/libgcc.a

Index: src/share/mk/bsd.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.324 src/share/mk/bsd.prog.mk:1.325
--- src/share/mk/bsd.prog.mk:1.324	Mon Nov 18 11:09:21 2019
+++ src/share/mk/bsd.prog.mk	Mon Mar  2 21:25:03 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.324 2019/11/18 16:09:21 christos Exp $
+#	$NetBSD: bsd.prog.mk,v 1.325 2020/03/03 02:25:03 christos Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -117,6 +117,7 @@ _LIBLIST=\
 	bz2 \
 	c \
 	c_pic \
+	cbor \
 	com_err \
 	compat \
 	crypt \
@@ -133,6 +134,7 @@ _LIBLIST=\
 	expat \
 	fetch \
 	fl \
+	fido2 \
 	form \
 	gcc \
 	gnumalloc \



CVS commit: src/share/mk

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 02:25:03 UTC 2020

Modified Files:
src/share/mk: bsd.README bsd.prog.mk

Log Message:
Add fido and cbor


To generate a diff of this commit:
cvs rdiff -u -r1.397 -r1.398 src/share/mk/bsd.README
cvs rdiff -u -r1.324 -r1.325 src/share/mk/bsd.prog.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/pam.d

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:47:33 UTC 2020

Modified Files:
src/etc/pam.d: su

Log Message:
Add a commented out entry for pam_u2f.so


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/pam.d/su

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/pam.d/su
diff -u src/etc/pam.d/su:1.7 src/etc/pam.d/su:1.8
--- src/etc/pam.d/su:1.7	Wed Mar 26 07:31:17 2008
+++ src/etc/pam.d/su	Mon Mar  2 19:47:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: su,v 1.7 2008/03/26 11:31:17 lukem Exp $
+# $NetBSD: su,v 1.8 2020/03/03 00:47:33 christos Exp $
 #
 # PAM configuration for the "su" service
 #
@@ -7,6 +7,7 @@
 auth		sufficient	pam_rootok.so		no_warn
 auth		sufficient	pam_self.so		no_warn
 auth		sufficient	pam_skey.so		no_warn try_first_pass
+#auth		sufficient	pam_u2f.so		authfile=/etc/u2f_mappings cue
 auth		sufficient	pam_ksu.so		no_warn try_first_pass
 #auth		sufficient	pam_group.so		no_warn group=rootauth root_only authenticate
 auth		requisite	pam_group.so		no_warn group=wheel root_only fail_safe



CVS commit: src/etc/pam.d

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:47:33 UTC 2020

Modified Files:
src/etc/pam.d: su

Log Message:
Add a commented out entry for pam_u2f.so


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/pam.d/su

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libpam/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:46:06 UTC 2020

Modified Files:
src/lib/libpam/libpam: Makefile

Log Message:
Add debugging commented out.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libpam/libpam/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libpam/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:46:06 UTC 2020

Modified Files:
src/lib/libpam/libpam: Makefile

Log Message:
Add debugging commented out.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libpam/libpam/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpam/libpam/Makefile
diff -u src/lib/libpam/libpam/Makefile:1.22 src/lib/libpam/libpam/Makefile:1.23
--- src/lib/libpam/libpam/Makefile:1.22	Sun Oct 13 17:24:37 2019
+++ src/lib/libpam/libpam/Makefile	Mon Mar  2 19:46:06 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2019/10/13 21:24:37 mrg Exp $
+# $NetBSD: Makefile,v 1.23 2020/03/03 00:46:06 christos Exp $
 #-
 # Copyright (c) 1998 Juniper Networks, Inc.
 # All rights reserved.
@@ -43,12 +43,15 @@ NOPROFILE=	# Don't build a profiling lib
 DIST=   ${NETBSDSRCDIR}/external/bsd/openpam/dist
 LIB=	pam
 NOPROFILE=
+# XXX: returns no value
+#LINTFLAGS+= -X 217 -X 284
 
 WARNS=	6
 # 233: Struct/union never defined
 LINTFLAGS+= -Sw -X 233
 
 CPPFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR} -DHAVE_CONFIG_H -I${.CURDIR}
+#CPPFLAGS+= -DOPENPAM_DEBUG
 
 SRCS=	openpam_borrow_cred.c \
 	openpam_check_owner_perms.c \



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:45:21 UTC 2020

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: openpam_borrow_cred.c

Log Message:
the uid is not a pam item!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c
diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c:1.4
--- src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c:1.3	Sat May  6 15:50:09 2017
+++ src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c	Mon Mar  2 19:45:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam_borrow_cred.c,v 1.3 2017/05/06 19:50:09 christos Exp $	*/
+/*	$NetBSD: openpam_borrow_cred.c,v 1.4 2020/03/03 00:45:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -42,7 +42,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: openpam_borrow_cred.c,v 1.3 2017/05/06 19:50:09 christos Exp $");
+__RCSID("$NetBSD: openpam_borrow_cred.c,v 1.4 2020/03/03 00:45:21 christos Exp $");
 
 #include 
 
@@ -71,7 +71,7 @@ openpam_borrow_cred(pam_handle_t *pamh,
 	const void *scredp;
 	int r;
 
-	ENTERI(pwd->pw_uid);
+	ENTERN(pwd->pw_uid);
 	r = pam_get_data(pamh, PAM_SAVED_CRED, );
 	if (r == PAM_SUCCESS && scredp != NULL) {
 		openpam_log(PAM_LOG_LIBDEBUG,



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:45:38 UTC 2020

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: openpam_debug.h

Log Message:
print the widest int


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:45:21 UTC 2020

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: openpam_borrow_cred.c

Log Message:
the uid is not a pam item!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:45:38 UTC 2020

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: openpam_debug.h

Log Message:
print the widest int


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h
diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h:1.4
--- src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h:1.3	Sat May  6 15:50:09 2017
+++ src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h	Mon Mar  2 19:45:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam_debug.h,v 1.3 2017/05/06 19:50:09 christos Exp $	*/
+/*	$NetBSD: openpam_debug.h,v 1.4 2020/03/03 00:45:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
@@ -50,8 +50,8 @@
 		openpam_log(PAM_LOG_LIBDEBUG, "entering: %d", i_); \
 } while (/*CONSTCOND*/0)
 #define ENTERN(n) do { \
-	int n_ = (n); \
-	openpam_log(PAM_LOG_LIBDEBUG, "entering: %d", n_); \
+	intmax_t n_ = (n); \
+	openpam_log(PAM_LOG_LIBDEBUG, "entering: %jd", n_); \
 } while (/*CONSTCOND*/0)
 #define ENTERS(s) do { \
 	const char *s_ = (s); \



CVS commit: src/external/bsd/pam-u2f/lib/security/pam-u2f

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:44:12 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/lib/security/pam-u2f: Makefile

Log Message:
Disable debugging


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile
diff -u src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile:1.1 src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile:1.2
--- src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile:1.1	Mon Mar  2 19:28:51 2020
+++ src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile	Mon Mar  2 19:44:12 2020
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.1 2020/03/03 00:28:51 christos Exp $
+# $NetBSD: Makefile,v 1.2 2020/03/03 00:44:12 christos Exp $
 
 NOMAN=
 .include 
 .PATH: ${NETBSDSRCDIR}/external/bsd/pam-u2f/dist
 
 CPPFLAGS+= -DHAVE_SECURITY_PAM_APPL_H #-DHAVE_SECURITY_PAM_MODULES_H
-CPPFLAGS+= -DPAM_DEBUG -DDEBUG_PAM
+#CPPFLAGS+= -DPAM_DEBUG -DDEBUG_PAM
 
 LIB=	pam_u2f
 SRCS=	pam-u2f.c drop_privs.c util.c b64.c explicit_bzero.c



CVS commit: src/external/bsd/pam-u2f/lib/security/pam-u2f

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:44:12 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/lib/security/pam-u2f: Makefile

Log Message:
Disable debugging


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/openssh

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:43:21 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh: Makefile
src/crypto/external/bsd/openssh/libexec/ssh-sk-helper: Makefile

Log Message:
Enable ssh-sk-helper


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssh/libexec/ssh-sk-helper/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/Makefile
diff -u src/crypto/external/bsd/openssh/Makefile:1.2 src/crypto/external/bsd/openssh/Makefile:1.3
--- src/crypto/external/bsd/openssh/Makefile:1.2	Wed Feb 26 19:24:38 2020
+++ src/crypto/external/bsd/openssh/Makefile	Mon Mar  2 19:43:20 2020
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile,v 1.2 2020/02/27 00:24:38 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2020/03/03 00:43:20 christos Exp $
 
-SUBDIR=		lib .WAIT bin # libexec
+SUBDIR=		lib .WAIT bin libexec
 
 .include 

Index: src/crypto/external/bsd/openssh/libexec/ssh-sk-helper/Makefile
diff -u src/crypto/external/bsd/openssh/libexec/ssh-sk-helper/Makefile:1.1 src/crypto/external/bsd/openssh/libexec/ssh-sk-helper/Makefile:1.2
--- src/crypto/external/bsd/openssh/libexec/ssh-sk-helper/Makefile:1.1	Wed Feb 26 19:24:41 2020
+++ src/crypto/external/bsd/openssh/libexec/ssh-sk-helper/Makefile	Mon Mar  2 19:43:20 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2020/02/27 00:24:41 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2020/03/03 00:43:20 christos Exp $
 
 BINDIR=	/usr/libexec
 
@@ -6,7 +6,7 @@ PROG=	ssh-sk-helper
 SRCS=	ssh-sk-helper.c ssh-sk.c sk-usbhid.c
 MAN=	ssh-sk-helper.8
 
-LDADD+=-lfido2 -lusbhid
-DPADD+=${LIBFIDO2} ${LIBUSBHID}
+LDADD+=-lfido2 -lcbor -lusbhid
+DPADD+=${LIBFIDO2} ${LIBCBOR} ${LIBUSBHID}
 
 .include 



CVS commit: src/crypto/external/bsd/openssh

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:43:21 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh: Makefile
src/crypto/external/bsd/openssh/libexec/ssh-sk-helper: Makefile

Log Message:
Enable ssh-sk-helper


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssh/libexec/ssh-sk-helper/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/mtree

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:42:33 UTC 2020

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Extra directories for fido and cbor


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/etc/mtree/NetBSD.dist.base

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.210 src/etc/mtree/NetBSD.dist.base:1.211
--- src/etc/mtree/NetBSD.dist.base:1.210	Fri Feb  7 13:48:58 2020
+++ src/etc/mtree/NetBSD.dist.base	Mon Mar  2 19:42:33 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.210 2020/02/07 18:48:58 kamil Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.211 2020/03/03 00:42:33 christos Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -111,6 +111,7 @@
 ./usr/include/c++
 ./usr/include/c++/experimental
 ./usr/include/c++/ext
+./usr/include/cbor
 ./usr/include/clang-9.0
 ./usr/include/crypto
 ./usr/include/dev
@@ -147,6 +148,7 @@
 ./usr/include/dev/vme
 ./usr/include/dev/wscons
 ./usr/include/event2
+./usr/include/fido
 ./usr/include/filecorefs
 ./usr/include/fs
 ./usr/include/fs/autofs



CVS commit: src/etc/mtree

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:42:33 UTC 2020

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Extra directories for fido and cbor


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/etc/mtree/NetBSD.dist.base

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:41:43 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Add libcbor, libfido2, pam-u2f


To generate a diff of this commit:
cvs rdiff -u -r1.1694 -r1.1695 src/doc/3RDPARTY
cvs rdiff -u -r1.2655 -r1.2656 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1694 src/doc/3RDPARTY:1.1695
--- src/doc/3RDPARTY:1.1694	Wed Feb 26 19:29:17 2020
+++ src/doc/3RDPARTY	Mon Mar  2 19:41:42 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1694 2020/02/27 00:29:17 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1695 2020/03/03 00:41:42 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -2180,7 +2180,6 @@ Notes:
 
 Package:	terminfo
 Version:	20190609
-
 Current Vers:	20190609
 Maintainer:	Thomas Dickey (ncurses)
 Archive Site:	ftp://ftp.invisible-island.net/ncurses/current
@@ -2192,3 +2191,42 @@ License:	none
 Location:	sys/external/bsd/ena-com
 Notes:
 Use the import script in /usr/src/share/terminfo
+
+Package:	libcbor
+Version:	20200302
+Current Vers:	20200302
+Maintainer:	Pavel Kalvoda
+Archive Site:	https://github.com/PJK/libcbor.git
+Home Page:	
+Date:		2020-03-02
+Mailing List:	christos
+Responsible:
+License:	mit
+Location:	sys/external/mit/libcbor
+Notes:
+
+Package:	pam-u2f
+Version:	1.0.8
+Current Vers:	1.0.8
+Maintainer:	Yubico
+Archive Site:	https://github.com/Yubico/pam-u2f.git
+Home Page:	https://developers.yubico.com/pam-u2f/
+Date:		2020-03-02
+Mailing List:	christos
+Responsible:
+License:	bsd
+Location:	sys/external/bsd/pam-u2f
+Notes:
+
+Package:	libfido2
+Version:	0.5.0
+Current Vers:	0.5.0
+Maintainer:	Yubico
+Archive Site:	https://github.com/Yubico/libfido2.git
+Home Page:	https://developers.yubico.com/libfido2/Manuals/
+Date:		2020-03-02
+Mailing List:	christos
+Responsible:
+License:	bsd
+Location:	sys/external/bsd/libfido2
+Notes:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2655 src/doc/CHANGES:1.2656
--- src/doc/CHANGES:1.2655	Mon Mar  2 15:04:42 2020
+++ src/doc/CHANGES	Mon Mar  2 19:41:42 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2655 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2656 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -149,3 +149,6 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	OpenSSH: Import 8.2. [christos 20200226]
 	ld.elf_so(1): Implement DT_GNU_HASH [kamil 20200229]
 	amiga: Fix word accesses on Gayle (A1200) pcmcia. [is 20200302]
+	libcbor: Import for libfido2 support [christos 20200302]
+	libfido2: Import for pam-u2f support [christos 20200302]
+	pam-u2f: Import token authenticator [christos 20200302]



CVS commit: src/doc

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:41:43 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Add libcbor, libfido2, pam-u2f


To generate a diff of this commit:
cvs rdiff -u -r1.1694 -r1.1695 src/doc/3RDPARTY
cvs rdiff -u -r1.2655 -r1.2656 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:38:13 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi shl.mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/debug: mi shl.mi
src/distrib/sets/lists/man: mi

Log Message:
add libfido2, libcbor, pam-u2f, sort


To generate a diff of this commit:
cvs rdiff -u -r1.1229 -r1.1230 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.877 -r1.878 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2311 -r1.2312 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.326 -r1.327 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.294 -r1.295 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.236 -r1.237 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.1682 -r1.1683 src/distrib/sets/lists/man/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:38:13 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi shl.mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/debug: mi shl.mi
src/distrib/sets/lists/man: mi

Log Message:
add libfido2, libcbor, pam-u2f, sort


To generate a diff of this commit:
cvs rdiff -u -r1.1229 -r1.1230 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.877 -r1.878 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2311 -r1.2312 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.326 -r1.327 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.294 -r1.295 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.236 -r1.237 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.1682 -r1.1683 src/distrib/sets/lists/man/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1229 src/distrib/sets/lists/base/mi:1.1230
--- src/distrib/sets/lists/base/mi:1.1229	Tue Feb 11 06:36:52 2020
+++ src/distrib/sets/lists/base/mi	Mon Mar  2 19:38:12 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1229 2020/02/11 11:36:52 uki Exp $
+# $NetBSD: mi,v 1.1230 2020/03/03 00:38:12 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -147,9 +147,9 @@
 ./libdata/firmware/if_bwfm/brcmfmac43143.bin	base-firmware-root	firmware
 ./libdata/firmware/if_bwfm/brcmfmac43236b.bin	base-firmware-root	firmware
 ./libdata/firmware/if_bwfm/brcmfmac43242a.bin	base-firmware-root	firmware
-./libdata/firmware/if_bwfm/brcmfmac43569.bin	base-firmware-root	firmware
 ./libdata/firmware/if_bwfm/brcmfmac4350-pcie.bin	base-firmware-root	firmware
 ./libdata/firmware/if_bwfm/brcmfmac4350c2-pcie.bin	base-firmware-root	firmware
+./libdata/firmware/if_bwfm/brcmfmac43569.bin	base-firmware-root	firmware
 ./libdata/firmware/if_bwfm/brcmfmac43602-pcie.bin	base-firmware-root	firmware
 ./libdata/firmware/if_ipw			base-firmware-root
 ./libdata/firmware/if_ipw/LICENSE		base-firmware-root	firmware
@@ -254,6 +254,14 @@
 ./libdata/firmware/if_wpi/README.iwlwifi-3945-ucode	base-firmware-root	firmware
 ./libdata/firmware/if_wpi/ipw3945.ucode		base-obsolete	obsolete	firmware
 ./libdata/firmware/if_wpi/iwlwifi-3945.ucode		base-firmware-root	firmware
+./libdata/firmware/nouveau			base-firmware-usr
+./libdata/firmware/nouveau/nvidia			base-firmware-usr
+./libdata/firmware/nouveau/nvidia/LICENCE.nvidia	base-firmware-usr	nouveaufirmware
+./libdata/firmware/nouveau/nvidia/gm206			base-firmware-usr
+./libdata/firmware/nouveau/nvidia/gm206/fecs_data.bin	base-firmware-usr	nouveaufirmware
+./libdata/firmware/nouveau/nvidia/gm206/fecs_inst.bin	base-firmware-usr	nouveaufirmware
+./libdata/firmware/nouveau/nvidia/gm206/gpccs_data.bin	base-firmware-usr	nouveaufirmware
+./libdata/firmware/nouveau/nvidia/gm206/gpccs_inst.bin	base-firmware-usr	nouveaufirmware
 ./libdata/firmware/nvidia			base-firmware-root
 ./libdata/firmware/nvidia/tegra124		base-firmware-root
 ./libdata/firmware/nvidia/tegra124/LICENCE.nvidia	base-firmware-root	tegrafirmware
@@ -261,14 +269,6 @@
 ./libdata/firmware/nvidia/tegra210		base-firmware-root
 ./libdata/firmware/nvidia/tegra210/LICENCE.nvidia	base-firmware-root	tegrafirmware
 ./libdata/firmware/nvidia/tegra210/xusb.bin	base-firmware-root	tegrafirmware
-./libdata/firmware/nouveau			base-firmware-usr
-./libdata/firmware/nouveau/nvidia			base-firmware-usr
-./libdata/firmware/nouveau/nvidia/LICENCE.nvidia	base-firmware-usr	nouveaufirmware
-./libdata/firmware/nouveau/nvidia/gm206			base-firmware-usr
-./libdata/firmware/nouveau/nvidia/gm206/fecs_inst.bin	base-firmware-usr	nouveaufirmware
-./libdata/firmware/nouveau/nvidia/gm206/gpccs_inst.bin	base-firmware-usr	nouveaufirmware
-./libdata/firmware/nouveau/nvidia/gm206/fecs_data.bin	base-firmware-usr	nouveaufirmware
-./libdata/firmware/nouveau/nvidia/gm206/gpccs_data.bin	base-firmware-usr	nouveaufirmware
 ./libdata/firmware/qatbase-firmware-root
 ./libdata/firmware/qat/mmp_firmware_c2xxx.bin	base-firmware-root	firmware
 ./libdata/firmware/qat/mof_firmware_c2xxx.bin	base-firmware-root	firmware
@@ -742,6 +742,9 @@
 ./usr/bin/expandbase-util-bin
 ./usr/bin/false	base-util-bin
 ./usr/bin/fgrep	base-util-bin
+./usr/bin/fido2-assertbase-util-bin
+./usr/bin/fido2-credbase-util-bin
+./usr/bin/fido2-tokenbase-util-bin
 ./usr/bin/file	base-util-bin
 ./usr/bin/fincorebase-util-bin
 ./usr/bin/find	base-util-bin
@@ -891,6 +894,7 @@
 ./usr/bin/opensslbase-crypto-bin
 ./usr/bin/page	base-util-bin
 ./usr/bin/pagesizebase-util-bin
+./usr/bin/pamu2fcfgbase-util-bin
 ./usr/bin/passwdbase-util-bin
 ./usr/bin/paste	base-util-bin
 ./usr/bin/patch	base-util-bin
@@ -1630,6 +1634,7 @@
 ./usr/libexec/spellprogbase-util-bin
 ./usr/libexec/ssh-keysign			base-secsh-bin
 

CVS commit: src/lib

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:37:05 UTC 2020

Modified Files:
src/lib: Makefile

Log Message:
Add libcbor, libfido2


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 src/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:37:05 UTC 2020

Modified Files:
src/lib: Makefile

Log Message:
Add libcbor, libfido2


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 src/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.274 src/lib/Makefile:1.275
--- src/lib/Makefile:1.274	Tue Dec 17 21:46:21 2019
+++ src/lib/Makefile	Mon Mar  2 19:37:05 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.274 2019/12/18 02:46:21 christos Exp $
+#	$NetBSD: Makefile,v 1.275 2020/03/03 00:37:05 christos Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -173,6 +173,7 @@ SUBDIR+=	../external/gpl3/${EXTERNAL_GCC
 SUBDIR+=	../external/apache2/llvm/include
 .endif
 
+SUBDIR+=	../external/mit/libcbor/lib
 # 2nd library dependency barrier 
 SUBDIR+=	.WAIT
 
@@ -217,7 +218,7 @@ SUBDIR+=	../crypto/external/bsd/heimdal/
 			# libedit, libterminfo,
 .endif
 
-SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
+SUBDIR+=	../external/bsd/libfido2/lib	# depends on libcbor
 SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
 SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
 .if ${MKDTRACE} != "no"
@@ -238,6 +239,8 @@ SUBDIR+= 	../libexec/httpd/libbozohttpd 
 # 3rd library dependency barrier 
 SUBDIR+=	.WAIT
 
+SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz,
+		   # libfido2
 SUBDIR+=	../crypto/external/bsd/netpgp/bindings/lua  # depends on netpgp/lib
 SUBDIR+=	../external/mpl/bind/lib	# depends on heimdal, libcrypto
 .if ${MKUNBOUND} != "no"
@@ -256,6 +259,7 @@ SUBDIR+=	librumpvfs	# depends on librump
 
 .if (${MKPAM} != "no")
 SUBDIR+=	libpam		# depends on heimdal
+SUBDIR+=	../external/bsd/pam-u2f/lib
 .endif
 
 SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl



CVS commit: src/external/mit

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:36:29 UTC 2020

Modified Files:
src/external/mit: Makefile

Log Message:
Add libcbor


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mit/libcbor

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:36:18 UTC 2020

Added Files:
src/external/mit/libcbor: Makefile
src/external/mit/libcbor/lib: Makefile

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/mit/libcbor/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mit/libcbor/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/mit/libcbor/Makefile
diff -u /dev/null src/external/mit/libcbor/Makefile:1.1
--- /dev/null	Mon Mar  2 19:36:18 2020
+++ src/external/mit/libcbor/Makefile	Mon Mar  2 19:36:18 2020
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2020/03/03 00:36:18 christos Exp $
+
+SUBDIR+=	lib
+
+.include 

Index: src/external/mit/libcbor/lib/Makefile
diff -u /dev/null src/external/mit/libcbor/lib/Makefile:1.1
--- /dev/null	Mon Mar  2 19:36:18 2020
+++ src/external/mit/libcbor/lib/Makefile	Mon Mar  2 19:36:18 2020
@@ -0,0 +1,103 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:36:18 christos Exp $
+
+NOLINT=
+NOMAN=
+.include 
+
+DIST = ${.CURDIR}/../dist
+
+.PATH: ${DIST}/src ${DIST}/src/cbor ${DIST}/src/cbor/internal
+
+CPPFLAGS+= -I${DIST}/src -DHAVE_ENDIAN_H -I. -DEIGHT_BYTE_SIZE_T
+
+LIB=cbor
+
+SRCS+=   cbor.c
+
+VERS_FILE=${DIST}/CMakeLists.txt
+
+.for i in MAJOR MINOR PATCH
+CBOR_VERSION_${i} != \
+${TOOL_SED} -ne '/CBOR_VERSION_${i}/s/.*"\([0-9]*\)")$$/\1/p' ${VERS_FILE}
+.endfor
+
+CBOR_VERSION = ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}.${CBOR_VERSION_PATCH}
+
+# cbor/
+SRCS+= \
+arrays.c \
+bytestrings.c \
+callbacks.c \
+common.c \
+encoding.c \
+floats_ctrls.c \
+ints.c \
+maps.c \
+serialization.c \
+streaming.c \
+strings.c \
+tags.c
+
+# cbor/internal
+SRCS+= \
+builder_callbacks.c \
+encoders.c \
+loaders.c \
+memory_utils.c \
+stack.c \
+unicode.c
+
+INCS+= \
+cbor.h \
+cbor/arrays.h \
+cbor/bytestrings.h \
+cbor/callbacks.h \
+cbor/common.h \
+cbor/configuration.h \
+cbor/data.h \
+cbor/encoding.h \
+cbor/floats_ctrls.h \
+cbor/ints.h \
+cbor/maps.h \
+cbor/serialization.h \
+cbor/streaming.h \
+cbor/strings.h \
+cbor/tags.h
+
+INCSDIR=/usr/include
+
+PKGCONFIG=libcbor
+
+.SUFFIXES: .in
+
+.in:
+	${TOOL_SED} \
+	-e s@CMAKE_INSTALL_PREFIX@/usr@ \
+	-e s@CMAKE_INSTALL_LIBDIR@/lib@ \
+	-e s@PROJECT_NAME@libcbor@ \
+	-e s@CBOR_VERSION@${CBOR_VERSION}@ ${.ALLSRC} > ${.TARGET}
+
+libcbor.pc: libcbor.pc.in
+
+SHLIB_MAJOR=0
+SHLIB_MINOR=5
+
+.include 
+
+${OBJS}: cbor/configuration.h
+
+cbor/configuration.h: ${VERS_FILE}
+	@mkdir -p cbor && ( \
+	echo	'#define CBOR_MAJOR_VERSION ${CBOR_VERSION_MAJOR}' && \
+	echo	'#define CBOR_MINOR_VERSION ${CBOR_VERSION_MINOR}' && \
+	echo	'#define CBOR_PATCH_VERSION ${CBOR_VERSION_PATCH}' && \
+	echo	'#define CBOR_CUSTOM_ALLOC 0' && \
+	echo	'#define CBOR_BUFFER_GROWTH 2' && \
+	echo	'#define CBOR_PRETTY_PRINTER 1' && \
+	echo	'#define CBOR_RESTRICT_SPECIFIER restrict' && \
+	echo	'#define CBOR_INLINE_SPECIFIER ') > ${.TARGET}
+
+CLEANFILES+= cbor/configuration.h cbor
+
+.BEGIN:
+



CVS commit: src/external/mit

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:36:29 UTC 2020

Modified Files:
src/external/mit: Makefile

Log Message:
Add libcbor


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/Makefile
diff -u src/external/mit/Makefile:1.5 src/external/mit/Makefile:1.6
--- src/external/mit/Makefile:1.5	Thu Sep  3 18:24:02 2015
+++ src/external/mit/Makefile	Mon Mar  2 19:36:29 2020
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.5 2015/09/03 22:24:02 youri Exp $
+#	$NetBSD: Makefile,v 1.6 2020/03/03 00:36:29 christos Exp $
 
 .include 
 
-SUBDIR+=	expat lua
+SUBDIR+=	expat lua libcbor
 
 .if ${MKX11} != "no"
 SUBDIR+=	xorg



CVS commit: src/external/mit/libcbor

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:36:18 UTC 2020

Added Files:
src/external/mit/libcbor: Makefile
src/external/mit/libcbor/lib: Makefile

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/mit/libcbor/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mit/libcbor/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS import: src/external/mit/libcbor/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:34:32 UTC 2020

Update of /cvsroot/src/external/mit/libcbor/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13367

Log Message:
Import libcbor from: https://github.com/PJK/libcbor.git

Status:

Vendor Tag: PJK
Release Tags:   libcbor-3b41770ab0ca408d242041dddb3b75811345573f

N src/external/mit/libcbor/dist/.clang-format
N src/external/mit/libcbor/dist/.travis-qemu.sh
N src/external/mit/libcbor/dist/.travis.yml
N src/external/mit/libcbor/dist/CHANGELOG.md
N src/external/mit/libcbor/dist/CMakeLists.txt
N src/external/mit/libcbor/dist/CNAME
N src/external/mit/libcbor/dist/Doxyfile
N src/external/mit/libcbor/dist/LICENSE.md
N src/external/mit/libcbor/dist/README.md
N src/external/mit/libcbor/dist/appveyor.yml
N src/external/mit/libcbor/dist/clang-format.sh
N src/external/mit/libcbor/dist/cppcheck_suppressions.txt
N src/external/mit/libcbor/dist/refresh_templates.sh
N src/external/mit/libcbor/dist/release.sh
N src/external/mit/libcbor/dist/demo/hello_cbor.c
N src/external/mit/libcbor/dist/doc/Makefile
N src/external/mit/libcbor/dist/doc/doxy_frontpage.md
N src/external/mit/libcbor/dist/doc/make.bat
N src/external/mit/libcbor/dist/doc/source/api.rst
N src/external/mit/libcbor/dist/doc/source/changelog.rst
N src/external/mit/libcbor/dist/doc/source/conf.py
N src/external/mit/libcbor/dist/doc/source/development.rst
N src/external/mit/libcbor/dist/doc/source/getting_started.rst
N src/external/mit/libcbor/dist/doc/source/index.rst
N src/external/mit/libcbor/dist/doc/source/internal.rst
N src/external/mit/libcbor/dist/doc/source/requirements.txt
N src/external/mit/libcbor/dist/doc/source/rfc_conformance.rst
N src/external/mit/libcbor/dist/doc/source/streaming.rst
N src/external/mit/libcbor/dist/doc/source/tests.rst
N src/external/mit/libcbor/dist/doc/source/using.rst
N src/external/mit/libcbor/dist/doc/source/api/decoding.rst
N src/external/mit/libcbor/dist/doc/source/api/encoding.rst
N src/external/mit/libcbor/dist/doc/source/api/item_reference_counting.rst
N src/external/mit/libcbor/dist/doc/source/api/item_types.rst
N src/external/mit/libcbor/dist/doc/source/api/type_0_1.rst
N src/external/mit/libcbor/dist/doc/source/api/type_2.rst
N src/external/mit/libcbor/dist/doc/source/api/type_3.rst
N src/external/mit/libcbor/dist/doc/source/api/type_4.rst
N src/external/mit/libcbor/dist/doc/source/api/type_5.rst
N src/external/mit/libcbor/dist/doc/source/api/type_6.rst
N src/external/mit/libcbor/dist/doc/source/api/type_7.rst
N src/external/mit/libcbor/dist/doc/source/img/win_1.png
N src/external/mit/libcbor/dist/doc/source/img/win_2.png
N src/external/mit/libcbor/dist/doc/source/img/win_3.png
N src/external/mit/libcbor/dist/doc/source/img/win_4.png
N src/external/mit/libcbor/dist/doc/source/img/win_5.png
N src/external/mit/libcbor/dist/doc/source/img/win_6.png
N src/external/mit/libcbor/dist/doc/source/streaming/decoding.rst
N src/external/mit/libcbor/dist/doc/source/streaming/encoding.rst
N src/external/mit/libcbor/dist/docs/CNAME
N src/external/mit/libcbor/dist/docs/index.html
N src/external/mit/libcbor/dist/docs/index.html.erb
N src/external/mit/libcbor/dist/docs/params.json
N src/external/mit/libcbor/dist/docs/release_meta.rb
N src/external/mit/libcbor/dist/docs/doxygen/allocators_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/allocators_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/annotated.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/bc_s.png
N src/external/mit/libcbor/dist/docs/doxygen/bdwn.png
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/classes.html
N 

CVS import: src/external/mit/libcbor/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:34:32 UTC 2020

Update of /cvsroot/src/external/mit/libcbor/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13367

Log Message:
Import libcbor from: https://github.com/PJK/libcbor.git

Status:

Vendor Tag: PJK
Release Tags:   libcbor-3b41770ab0ca408d242041dddb3b75811345573f

N src/external/mit/libcbor/dist/.clang-format
N src/external/mit/libcbor/dist/.travis-qemu.sh
N src/external/mit/libcbor/dist/.travis.yml
N src/external/mit/libcbor/dist/CHANGELOG.md
N src/external/mit/libcbor/dist/CMakeLists.txt
N src/external/mit/libcbor/dist/CNAME
N src/external/mit/libcbor/dist/Doxyfile
N src/external/mit/libcbor/dist/LICENSE.md
N src/external/mit/libcbor/dist/README.md
N src/external/mit/libcbor/dist/appveyor.yml
N src/external/mit/libcbor/dist/clang-format.sh
N src/external/mit/libcbor/dist/cppcheck_suppressions.txt
N src/external/mit/libcbor/dist/refresh_templates.sh
N src/external/mit/libcbor/dist/release.sh
N src/external/mit/libcbor/dist/demo/hello_cbor.c
N src/external/mit/libcbor/dist/doc/Makefile
N src/external/mit/libcbor/dist/doc/doxy_frontpage.md
N src/external/mit/libcbor/dist/doc/make.bat
N src/external/mit/libcbor/dist/doc/source/api.rst
N src/external/mit/libcbor/dist/doc/source/changelog.rst
N src/external/mit/libcbor/dist/doc/source/conf.py
N src/external/mit/libcbor/dist/doc/source/development.rst
N src/external/mit/libcbor/dist/doc/source/getting_started.rst
N src/external/mit/libcbor/dist/doc/source/index.rst
N src/external/mit/libcbor/dist/doc/source/internal.rst
N src/external/mit/libcbor/dist/doc/source/requirements.txt
N src/external/mit/libcbor/dist/doc/source/rfc_conformance.rst
N src/external/mit/libcbor/dist/doc/source/streaming.rst
N src/external/mit/libcbor/dist/doc/source/tests.rst
N src/external/mit/libcbor/dist/doc/source/using.rst
N src/external/mit/libcbor/dist/doc/source/api/decoding.rst
N src/external/mit/libcbor/dist/doc/source/api/encoding.rst
N src/external/mit/libcbor/dist/doc/source/api/item_reference_counting.rst
N src/external/mit/libcbor/dist/doc/source/api/item_types.rst
N src/external/mit/libcbor/dist/doc/source/api/type_0_1.rst
N src/external/mit/libcbor/dist/doc/source/api/type_2.rst
N src/external/mit/libcbor/dist/doc/source/api/type_3.rst
N src/external/mit/libcbor/dist/doc/source/api/type_4.rst
N src/external/mit/libcbor/dist/doc/source/api/type_5.rst
N src/external/mit/libcbor/dist/doc/source/api/type_6.rst
N src/external/mit/libcbor/dist/doc/source/api/type_7.rst
N src/external/mit/libcbor/dist/doc/source/img/win_1.png
N src/external/mit/libcbor/dist/doc/source/img/win_2.png
N src/external/mit/libcbor/dist/doc/source/img/win_3.png
N src/external/mit/libcbor/dist/doc/source/img/win_4.png
N src/external/mit/libcbor/dist/doc/source/img/win_5.png
N src/external/mit/libcbor/dist/doc/source/img/win_6.png
N src/external/mit/libcbor/dist/doc/source/streaming/decoding.rst
N src/external/mit/libcbor/dist/doc/source/streaming/encoding.rst
N src/external/mit/libcbor/dist/docs/CNAME
N src/external/mit/libcbor/dist/docs/index.html
N src/external/mit/libcbor/dist/docs/index.html.erb
N src/external/mit/libcbor/dist/docs/params.json
N src/external/mit/libcbor/dist/docs/release_meta.rb
N src/external/mit/libcbor/dist/docs/doxygen/allocators_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/allocators_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/annotated.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/arrays_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/bc_s.png
N src/external/mit/libcbor/dist/docs/doxygen/bdwn.png
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/builder__callbacks_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/bytestrings_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8c.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/callbacks_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8c_source.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8h.html
N src/external/mit/libcbor/dist/docs/doxygen/cbor_8h_source.html
N src/external/mit/libcbor/dist/docs/doxygen/classes.html
N 

CVS commit: src/external/bsd

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:29:41 UTC 2020

Modified Files:
src/external/bsd: Makefile

Log Message:
Add libfido2 and pam-u2f


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/external/bsd/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/Makefile
diff -u src/external/bsd/Makefile:1.66 src/external/bsd/Makefile:1.67
--- src/external/bsd/Makefile:1.66	Mon Nov 11 17:45:25 2019
+++ src/external/bsd/Makefile	Mon Mar  2 19:29:41 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.66 2019/11/11 22:45:25 joerg Exp $
+#	$NetBSD: Makefile,v 1.67 2020/03/03 00:29:41 christos Exp $
 
 .include 
 
 SUBDIR=	acpica am-utils bc byacc cron dhcpcd ekermit elftosb \
 	fetch file flex jemalloc less \
-	libarchive libevent liblzf libpcap mdocml \
-	ntp openresolv tcpdump tmux top tre wpa
+	libarchive libevent libfido2 liblzf libpcap mdocml \
+	ntp pam-u2f openresolv tcpdump tmux top tre wpa
 
 .if (${MKATF} != "no")
 SUBDIR+= atf



CVS commit: src/external/bsd

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:29:41 UTC 2020

Modified Files:
src/external/bsd: Makefile

Log Message:
Add libfido2 and pam-u2f


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/external/bsd/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:28:51 UTC 2020

Added Files:
src/external/bsd/pam-u2f: Makefile
src/external/bsd/pam-u2f/bin: Makefile
src/external/bsd/pam-u2f/lib: Makefile
src/external/bsd/pam-u2f/lib/security: Makefile
src/external/bsd/pam-u2f/lib/security/pam-u2f: Makefile

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/bin/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/lib/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/lib/security/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/pam-u2f/Makefile
diff -u /dev/null src/external/bsd/pam-u2f/Makefile:1.1
--- /dev/null	Mon Mar  2 19:28:51 2020
+++ src/external/bsd/pam-u2f/Makefile	Mon Mar  2 19:28:50 2020
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:28:50 christos Exp $
+
+.include 
+
+SUBDIR= bin .WAIT lib
+
+.include 

Index: src/external/bsd/pam-u2f/bin/Makefile
diff -u /dev/null src/external/bsd/pam-u2f/bin/Makefile:1.1
--- /dev/null	Mon Mar  2 19:28:51 2020
+++ src/external/bsd/pam-u2f/bin/Makefile	Mon Mar  2 19:28:50 2020
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:28:50 christos Exp $
+
+.include 
+
+SUBDIR= pamu2fcfg
+
+.include 

Index: src/external/bsd/pam-u2f/lib/Makefile
diff -u /dev/null src/external/bsd/pam-u2f/lib/Makefile:1.1
--- /dev/null	Mon Mar  2 19:28:51 2020
+++ src/external/bsd/pam-u2f/lib/Makefile	Mon Mar  2 19:28:50 2020
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:28:50 christos Exp $
+
+.include 
+
+SUBDIR= security
+
+.include 

Index: src/external/bsd/pam-u2f/lib/security/Makefile
diff -u /dev/null src/external/bsd/pam-u2f/lib/security/Makefile:1.1
--- /dev/null	Mon Mar  2 19:28:51 2020
+++ src/external/bsd/pam-u2f/lib/security/Makefile	Mon Mar  2 19:28:51 2020
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:28:51 christos Exp $
+
+.include 
+
+SUBDIR= pam-u2f
+
+.include 

Index: src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile
diff -u /dev/null src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile:1.1
--- /dev/null	Mon Mar  2 19:28:51 2020
+++ src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile	Mon Mar  2 19:28:51 2020
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:28:51 christos Exp $
+
+NOMAN=
+.include 
+.PATH: ${NETBSDSRCDIR}/external/bsd/pam-u2f/dist
+
+CPPFLAGS+= -DHAVE_SECURITY_PAM_APPL_H #-DHAVE_SECURITY_PAM_MODULES_H
+CPPFLAGS+= -DPAM_DEBUG -DDEBUG_PAM
+
+LIB=	pam_u2f
+SRCS=	pam-u2f.c drop_privs.c util.c b64.c explicit_bzero.c
+#MAN=	pam_u2f.8
+
+COPTS.util.c += -Wno-error=stack-protector
+
+LIBDPLIBS+= \
+	fido2	${NETBSDSRCDIR}/external/bsd/libfido2/lib \
+	cbor	${NETBSDSRCDIR}/external/mit/libcbor/lib \
+	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
+
+.include "${NETBSDSRCDIR}/lib/libpam/modules/mod.mk"



CVS commit: src/external/bsd/pam-u2f

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:28:51 UTC 2020

Added Files:
src/external/bsd/pam-u2f: Makefile
src/external/bsd/pam-u2f/bin: Makefile
src/external/bsd/pam-u2f/lib: Makefile
src/external/bsd/pam-u2f/lib/security: Makefile
src/external/bsd/pam-u2f/lib/security/pam-u2f: Makefile

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/bin/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/lib/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/lib/security/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pam-u2f/lib/security/pam-u2f/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:27:08 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: drop_privs.h

Log Message:
add casts, change to multiline.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/drop_privs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pam-u2f/dist/drop_privs.h
diff -u src/external/bsd/pam-u2f/dist/drop_privs.h:1.1.1.1 src/external/bsd/pam-u2f/dist/drop_privs.h:1.2
--- src/external/bsd/pam-u2f/dist/drop_privs.h:1.1.1.1	Mon Mar  2 19:18:44 2020
+++ src/external/bsd/pam-u2f/dist/drop_privs.h	Mon Mar  2 19:27:08 2020
@@ -55,8 +55,13 @@ struct _ykpam_privs {
 
 #define PAM_MODUTIL_DEF_PRIVS(n)   \
   gid_t n##_saved_groups[SAVED_GROUPS_MAX_LEN];\
-  struct _ykpam_privs n = {-1, -1, n##_saved_groups, SAVED_GROUPS_MAX_LEN, \
-   cfg->debug_file}
+  struct _ykpam_privs n = { \
+  (uid_t)-1, \
+  (gid_t)-1, \
+  n##_saved_groups, \
+  SAVED_GROUPS_MAX_LEN, \
+  cfg->debug_file, \
+  }
 
 int pam_modutil_drop_priv(pam_handle_t *, struct _ykpam_privs *,
   struct passwd *);



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:27:31 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: b64.c

Log Message:
Add cast


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/b64.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pam-u2f/dist/b64.c
diff -u src/external/bsd/pam-u2f/dist/b64.c:1.1.1.1 src/external/bsd/pam-u2f/dist/b64.c:1.2
--- src/external/bsd/pam-u2f/dist/b64.c:1.1.1.1	Mon Mar  2 19:18:44 2020
+++ src/external/bsd/pam-u2f/dist/b64.c	Mon Mar  2 19:27:31 2020
@@ -75,7 +75,7 @@ int b64_decode(const char *in, void **pt
   if (bio_b64 == NULL)
 goto fail;
 
-  bio_mem = BIO_new_mem_buf((void *) in, -1);
+  bio_mem = BIO_new_mem_buf((const void *) in, -1);
   if (bio_mem == NULL)
 goto fail;
 



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:27:08 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: drop_privs.h

Log Message:
add casts, change to multiline.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/drop_privs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:27:31 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: b64.c

Log Message:
Add cast


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/b64.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:22:29 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: pam-u2f.c

Log Message:
- fix order initialization: debug_file was not getting properly initialized
- fix free casts
- add pam module entry for OpenPAM


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/pam-u2f.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pam-u2f/dist/pam-u2f.c
diff -u src/external/bsd/pam-u2f/dist/pam-u2f.c:1.1.1.1 src/external/bsd/pam-u2f/dist/pam-u2f.c:1.2
--- src/external/bsd/pam-u2f/dist/pam-u2f.c:1.1.1.1	Mon Mar  2 19:18:44 2020
+++ src/external/bsd/pam-u2f/dist/pam-u2f.c	Mon Mar  2 19:22:29 2020
@@ -168,10 +168,11 @@ int pam_sm_authenticate(pam_handle_t *pa
   int should_free_appid = 0;
   int should_free_auth_file = 0;
   int should_free_authpending_file = 0;
-  PAM_MODUTIL_DEF_PRIVS(privs);
 
   parse_cfg(flags, argc, argv, cfg);
 
+  PAM_MODUTIL_DEF_PRIVS(privs);
+
   if (!cfg->origin) {
 strcpy(buffer, DEFAULT_ORIGIN_PREFIX);
 
@@ -427,24 +428,24 @@ done:
 free(buf);
 buf = NULL;
   }
-
+#define free_const(a)	free((void *)(uintptr_t)(a))
   if (should_free_origin) {
-free((char *) cfg->origin);
+free_const(cfg->origin);
 cfg->origin = NULL;
   }
 
   if (should_free_appid) {
-free((char *) cfg->appid);
+free_const(cfg->appid);
 cfg->appid = NULL;
   }
 
   if (should_free_auth_file) {
-free((char *) cfg->auth_file);
+free_const(cfg->auth_file);
 cfg->auth_file = NULL;
   }
 
   if (should_free_authpending_file) {
-free((char *) cfg->authpending_file);
+free_const(cfg->authpending_file);
 cfg->authpending_file = NULL;
   }
 
@@ -470,3 +471,7 @@ PAM_EXTERN int pam_sm_setcred(pam_handle
 
   return PAM_SUCCESS;
 }
+
+#ifdef PAM_MODULE_ENTRY
+PAM_MODULE_ENTRY("pam_u2f"); 
+#endif



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:22:29 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: pam-u2f.c

Log Message:
- fix order initialization: debug_file was not getting properly initialized
- fix free casts
- add pam module entry for OpenPAM


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/pam-u2f.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:21:20 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: util.c

Log Message:
back to LOG_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pam-u2f/dist/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pam-u2f/dist/util.c
diff -u src/external/bsd/pam-u2f/dist/util.c:1.2 src/external/bsd/pam-u2f/dist/util.c:1.3
--- src/external/bsd/pam-u2f/dist/util.c:1.2	Mon Mar  2 19:20:20 2020
+++ src/external/bsd/pam-u2f/dist/util.c	Mon Mar  2 19:21:20 2020
@@ -1165,8 +1165,8 @@ void _debug(FILE *debug_file, const char
   va_start(ap, fmt);
 #ifdef LOG_DEBUG
   if (debug_file == (FILE *) -1) {
-syslog(LOG_AUTHPRIV | LOG_ERR, DEBUG_STR, file, line, func);
-vsyslog(LOG_AUTHPRIV | LOG_ERR, fmt, ap);
+syslog(LOG_AUTHPRIV | LOG_DEBUG, DEBUG_STR, file, line, func);
+vsyslog(LOG_AUTHPRIV | LOG_DEBUG, fmt, ap);
   } else {
 fprintf(debug_file, DEBUG_STR, file, line, func);
 vfprintf(debug_file, fmt, ap);



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:21:20 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: util.c

Log Message:
back to LOG_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pam-u2f/dist/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:20:20 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: util.c

Log Message:
define as empty when not debugging


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:20:20 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: util.c

Log Message:
define as empty when not debugging


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pam-u2f/dist/util.c
diff -u src/external/bsd/pam-u2f/dist/util.c:1.1.1.1 src/external/bsd/pam-u2f/dist/util.c:1.2
--- src/external/bsd/pam-u2f/dist/util.c:1.1.1.1	Mon Mar  2 19:18:44 2020
+++ src/external/bsd/pam-u2f/dist/util.c	Mon Mar  2 19:20:20 2020
@@ -236,7 +236,7 @@ int get_devices_from_authfile(const char
   *n_devs = 0;
 
   i = 0;
-  while ((s_token = strtok_r(NULL, ",", ))) {
+  while ((s_token = strtok_r(NULL, ",", )) != NULL) {
 if ((*n_devs)++ > max_devs - 1) {
   *n_devs = max_devs;
   if (verbose)
@@ -1131,7 +1131,7 @@ static int _converse(pam_handle_t *pamh,
 
 char *converse(pam_handle_t *pamh, int echocode, const char *prompt) {
   const struct pam_message msg = {.msg_style = echocode,
-  .msg = (char *) prompt};
+  .msg = (char *)(uintptr_t)prompt};
   const struct pam_message *msgs = 
   struct pam_response *resp = NULL;
   int retval = _converse(pamh, 1, , );
@@ -1163,10 +1163,10 @@ void _debug(FILE *debug_file, const char
 const char *fmt, ...) {
   va_list ap;
   va_start(ap, fmt);
-#ifdef __linux__
+#ifdef LOG_DEBUG
   if (debug_file == (FILE *) -1) {
-syslog(LOG_AUTHPRIV | LOG_DEBUG, DEBUG_STR, file, line, func);
-vsyslog(LOG_AUTHPRIV | LOG_DEBUG, fmt, ap);
+syslog(LOG_AUTHPRIV | LOG_ERR, DEBUG_STR, file, line, func);
+vsyslog(LOG_AUTHPRIV | LOG_ERR, fmt, ap);
   } else {
 fprintf(debug_file, DEBUG_STR, file, line, func);
 vfprintf(debug_file, fmt, ap);



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:20:46 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: util.h

Log Message:
define as empty when not debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/util.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:20:46 UTC 2020

Modified Files:
src/external/bsd/pam-u2f/dist: util.h

Log Message:
define as empty when not debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pam-u2f/dist/util.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pam-u2f/dist/util.h
diff -u src/external/bsd/pam-u2f/dist/util.h:1.1.1.1 src/external/bsd/pam-u2f/dist/util.h:1.2
--- src/external/bsd/pam-u2f/dist/util.h:1.1.1.1	Mon Mar  2 19:18:44 2020
+++ src/external/bsd/pam-u2f/dist/util.h	Mon Mar  2 19:20:45 2020
@@ -25,7 +25,7 @@
 #if defined(DEBUG_PAM)
 #define D(file, ...) _debug(file, __FILE__, __LINE__, __func__, __VA_ARGS__)
 #else
-#define D(file, ...)
+#define D(file, ...) ((void)0)
 #endif /* DEBUG_PAM */
 
 typedef struct {



CVS import: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:18:44 UTC 2020

Update of /cvsroot/src/external/bsd/pam-u2f/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13489

Log Message:
Import Yubico's pam-u2f from https://github.com/Yubico/pam-u2f.git

Status:

Vendor Tag: YUBICO
Release Tags:   pam-u2f-d10f84314c55f10d244bc275794e783dc408e45c

N src/external/bsd/pam-u2f/dist/.clang-format
N src/external/bsd/pam-u2f/dist/.travis.yml
N src/external/bsd/pam-u2f/dist/AUTHORS
N src/external/bsd/pam-u2f/dist/COPYING
N src/external/bsd/pam-u2f/dist/Makefile.am
N src/external/bsd/pam-u2f/dist/NEWS
N src/external/bsd/pam-u2f/dist/README
N src/external/bsd/pam-u2f/dist/autogen.sh
N src/external/bsd/pam-u2f/dist/b64.c
N src/external/bsd/pam-u2f/dist/b64.h
N src/external/bsd/pam-u2f/dist/configure.ac
N src/external/bsd/pam-u2f/dist/drop_privs.c
N src/external/bsd/pam-u2f/dist/drop_privs.h
N src/external/bsd/pam-u2f/dist/explicit_bzero.c
N src/external/bsd/pam-u2f/dist/pam-u2f.c
N src/external/bsd/pam-u2f/dist/util.c
N src/external/bsd/pam-u2f/dist/util.h
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-clang7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-clang8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-gcc7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-gcc8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-gcc9.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-linux.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-osx.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-osx11-clang.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-osx9.4-clang.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-clang7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-clang8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-gcc7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-gcc8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-gcc9.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/format-code.sh
N src/external/bsd/pam-u2f/dist/m4/ax_check_compile_flag.m4
N src/external/bsd/pam-u2f/dist/m4/lib-ld.m4
N src/external/bsd/pam-u2f/dist/m4/lib-link.m4
N src/external/bsd/pam-u2f/dist/m4/lib-prefix.m4
N src/external/bsd/pam-u2f/dist/man/pam_u2f.8.txt
N src/external/bsd/pam-u2f/dist/man/pamu2fcfg.1.txt
N src/external/bsd/pam-u2f/dist/pamu2fcfg/Makefile.am
N src/external/bsd/pam-u2f/dist/pamu2fcfg/_readpassphrase.h
N src/external/bsd/pam-u2f/dist/pamu2fcfg/cmdline.ggo
N src/external/bsd/pam-u2f/dist/pamu2fcfg/pamu2fcfg.c
N src/external/bsd/pam-u2f/dist/pamu2fcfg/readpassphrase.c
N src/external/bsd/pam-u2f/dist/tests/Makefile.am
N src/external/bsd/pam-u2f/dist/tests/basic.c
N src/external/bsd/pam-u2f/dist/tests/bionic/Dockerfile
N src/external/bsd/pam-u2f/dist/tests/bionic/README
N src/external/bsd/pam-u2f/dist/tests/bionic/run.sh

No conflicts created by this import



CVS import: src/external/bsd/pam-u2f/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:18:44 UTC 2020

Update of /cvsroot/src/external/bsd/pam-u2f/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13489

Log Message:
Import Yubico's pam-u2f from https://github.com/Yubico/pam-u2f.git

Status:

Vendor Tag: YUBICO
Release Tags:   pam-u2f-d10f84314c55f10d244bc275794e783dc408e45c

N src/external/bsd/pam-u2f/dist/.clang-format
N src/external/bsd/pam-u2f/dist/.travis.yml
N src/external/bsd/pam-u2f/dist/AUTHORS
N src/external/bsd/pam-u2f/dist/COPYING
N src/external/bsd/pam-u2f/dist/Makefile.am
N src/external/bsd/pam-u2f/dist/NEWS
N src/external/bsd/pam-u2f/dist/README
N src/external/bsd/pam-u2f/dist/autogen.sh
N src/external/bsd/pam-u2f/dist/b64.c
N src/external/bsd/pam-u2f/dist/b64.h
N src/external/bsd/pam-u2f/dist/configure.ac
N src/external/bsd/pam-u2f/dist/drop_privs.c
N src/external/bsd/pam-u2f/dist/drop_privs.h
N src/external/bsd/pam-u2f/dist/explicit_bzero.c
N src/external/bsd/pam-u2f/dist/pam-u2f.c
N src/external/bsd/pam-u2f/dist/util.c
N src/external/bsd/pam-u2f/dist/util.h
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-clang7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-clang8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-gcc7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-gcc8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-bionic-gcc9.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-linux.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-osx.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-osx11-clang.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-osx9.4-clang.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-clang7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-clang8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-gcc7.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-gcc8.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/build-xenial-gcc9.sh
N src/external/bsd/pam-u2f/dist/build-aux/ci/format-code.sh
N src/external/bsd/pam-u2f/dist/m4/ax_check_compile_flag.m4
N src/external/bsd/pam-u2f/dist/m4/lib-ld.m4
N src/external/bsd/pam-u2f/dist/m4/lib-link.m4
N src/external/bsd/pam-u2f/dist/m4/lib-prefix.m4
N src/external/bsd/pam-u2f/dist/man/pam_u2f.8.txt
N src/external/bsd/pam-u2f/dist/man/pamu2fcfg.1.txt
N src/external/bsd/pam-u2f/dist/pamu2fcfg/Makefile.am
N src/external/bsd/pam-u2f/dist/pamu2fcfg/_readpassphrase.h
N src/external/bsd/pam-u2f/dist/pamu2fcfg/cmdline.ggo
N src/external/bsd/pam-u2f/dist/pamu2fcfg/pamu2fcfg.c
N src/external/bsd/pam-u2f/dist/pamu2fcfg/readpassphrase.c
N src/external/bsd/pam-u2f/dist/tests/Makefile.am
N src/external/bsd/pam-u2f/dist/tests/basic.c
N src/external/bsd/pam-u2f/dist/tests/bionic/Dockerfile
N src/external/bsd/pam-u2f/dist/tests/bionic/README
N src/external/bsd/pam-u2f/dist/tests/bionic/run.sh

No conflicts created by this import



CVS commit: src/external/bsd/libfido2

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:14:18 UTC 2020

Added Files:
src/external/bsd/libfido2: Makefile Makefile.inc
src/external/bsd/libfido2/bin: Makefile Makefile.inc
src/external/bsd/libfido2/bin/fido2-assert: Makefile
src/external/bsd/libfido2/bin/fido2-cred: Makefile
src/external/bsd/libfido2/bin/fido2-token: Makefile
src/external/bsd/libfido2/lib: Makefile fido2.map

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/Makefile \
src/external/bsd/libfido2/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/Makefile \
src/external/bsd/libfido2/bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/fido2-assert/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/fido2-cred/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/fido2-token/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/lib/Makefile \
src/external/bsd/libfido2/lib/fido2.map

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/libfido2

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:14:18 UTC 2020

Added Files:
src/external/bsd/libfido2: Makefile Makefile.inc
src/external/bsd/libfido2/bin: Makefile Makefile.inc
src/external/bsd/libfido2/bin/fido2-assert: Makefile
src/external/bsd/libfido2/bin/fido2-cred: Makefile
src/external/bsd/libfido2/bin/fido2-token: Makefile
src/external/bsd/libfido2/lib: Makefile fido2.map

Log Message:
Add build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/Makefile \
src/external/bsd/libfido2/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/Makefile \
src/external/bsd/libfido2/bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/fido2-assert/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/fido2-cred/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/bin/fido2-token/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/lib/Makefile \
src/external/bsd/libfido2/lib/fido2.map

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/libfido2/Makefile
diff -u /dev/null src/external/bsd/libfido2/Makefile:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/Makefile	Mon Mar  2 19:14:17 2020
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include 
+
+SUBDIR= lib .WAIT bin
+
+.include 
Index: src/external/bsd/libfido2/Makefile.inc
diff -u /dev/null src/external/bsd/libfido2/Makefile.inc:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/Makefile.inc	Mon Mar  2 19:14:17 2020
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile.inc,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+DIST:=${.PARSEDIR}/dist
+
+VERS_FILE=${DIST}/CMakeLists.txt
+
+.for i in MAJOR MINOR PATCH
+FIDO_${i} != \
+${TOOL_SED} -ne '/FIDO_${i}/s/.*"\([0-9]*\)")$$/\1/p' ${VERS_FILE}
+.endfor
+FIDO_VERSION=${FIDO_MAJOR}.${FIDO_MINOR}.${FIDO_PATCH}
+
+CPPFLAGS+=-D_FIDO_MAJOR=${FIDO_MAJOR} -D_FIDO_MINOR=${FIDO_MINOR}
+CPPFLAGS+=-D_FIDO_PATCH=${FIDO_PATCH}
+CPPFLAGS+=-DHAVE_UNISTD_H

Index: src/external/bsd/libfido2/bin/Makefile
diff -u /dev/null src/external/bsd/libfido2/bin/Makefile:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/bin/Makefile	Mon Mar  2 19:14:17 2020
@@ -0,0 +1,7 @@
+#	$NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include 
+
+SUBDIR=	fido2-assert fido2-cred fido2-token
+
+.include 
Index: src/external/bsd/libfido2/bin/Makefile.inc
diff -u /dev/null src/external/bsd/libfido2/bin/Makefile.inc:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/bin/Makefile.inc	Mon Mar  2 19:14:17 2020
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile.inc,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include "${.PARSEDIR}/../Makefile.inc"
+
+.PATH: ${DIST}/tools ${DIST}/man ${DIST}/openbsd-compat
+
+LDADD+=-lfido2 -lcbor -lusbhid -lcrypto 
+DPADD+=${LIBFIDO2} ${LIBCBOR} ${LIBUSBHID} ${LIBCRYPTO}

Index: src/external/bsd/libfido2/bin/fido2-assert/Makefile
diff -u /dev/null src/external/bsd/libfido2/bin/fido2-assert/Makefile:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/bin/fido2-assert/Makefile	Mon Mar  2 19:14:17 2020
@@ -0,0 +1,24 @@
+#	$NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include 
+
+BINDIR=/usr/bin
+
+PROG=	fido2-assert
+SRCS+=\
+assert_get.c \
+assert_verify.c \
+fido2-assert.c \
+base64.c \
+bio.c \
+credman.c \
+pin.c \
+token.c \
+util.c
+
+SRCS+=\
+explicit_bzero.c \
+readpassphrase.c \
+recallocarray.c
+
+.include 

Index: src/external/bsd/libfido2/bin/fido2-cred/Makefile
diff -u /dev/null src/external/bsd/libfido2/bin/fido2-cred/Makefile:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/bin/fido2-cred/Makefile	Mon Mar  2 19:14:17 2020
@@ -0,0 +1,24 @@
+#	$NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include 
+
+BINDIR=/usr/bin
+
+PROG=	fido2-cred
+SRCS+=\
+cred_make.c \
+cred_verify.c \
+base64.c \
+bio.c \
+credman.c \
+fido2-cred.c \
+pin.c \
+token.c \
+util.c
+
+SRCS+=\
+explicit_bzero.c \
+readpassphrase.c \
+recallocarray.c
+
+.include 

Index: src/external/bsd/libfido2/bin/fido2-token/Makefile
diff -u /dev/null src/external/bsd/libfido2/bin/fido2-token/Makefile:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/bin/fido2-token/Makefile	Mon Mar  2 19:14:17 2020
@@ -0,0 +1,22 @@
+#	$NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include 
+
+BINDIR=/usr/bin
+
+PROG=	fido2-token
+SRCS+=\
+base64.c \
+bio.c \
+credman.c \
+fido2-token.c \
+pin.c \
+token.c \
+util.c
+
+SRCS+=\
+explicit_bzero.c \
+readpassphrase.c \
+recallocarray.c
+
+.include 

Index: src/external/bsd/libfido2/lib/Makefile
diff -u /dev/null src/external/bsd/libfido2/lib/Makefile:1.1
--- /dev/null	Mon Mar  2 19:14:18 2020
+++ src/external/bsd/libfido2/lib/Makefile	

CVS import: src/external/bsd/libfido2/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:11:48 UTC 2020

Update of /cvsroot/src/external/bsd/libfido2/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv21345

Log Message:
Import Yubico's libfido2 from https://github.com/Yubico/libfido2.git

Status:

Vendor Tag: YUBICO
Release Tags:   libfido2-f6ab2ce65745f7f3b1bee7481623de5eaac28bb0

N src/external/bsd/libfido2/dist/.travis.yml
N src/external/bsd/libfido2/dist/CMakeLists.txt
N src/external/bsd/libfido2/dist/LICENSE
N src/external/bsd/libfido2/dist/NEWS
N src/external/bsd/libfido2/dist/README.adoc
N src/external/bsd/libfido2/dist/.github/workflows/scan.yml
N src/external/bsd/libfido2/dist/.github/workflows/windows.yml
N src/external/bsd/libfido2/dist/.travis/build-linux-clang
N src/external/bsd/libfido2/dist/.travis/build-linux-gcc
N src/external/bsd/libfido2/dist/.travis/build-linux-mingw
N src/external/bsd/libfido2/dist/.travis/build-osx-clang
N src/external/bsd/libfido2/dist/.travis/fuzz-linux-asan
N src/external/bsd/libfido2/dist/.travis/fuzz-linux-msan
N src/external/bsd/libfido2/dist/debian/changelog
N src/external/bsd/libfido2/dist/debian/compat
N src/external/bsd/libfido2/dist/debian/control
N src/external/bsd/libfido2/dist/debian/copyright
N src/external/bsd/libfido2/dist/debian/fido2-tools.install
N src/external/bsd/libfido2/dist/debian/fido2-tools.manpages
N src/external/bsd/libfido2/dist/debian/libfido2-1.install
N src/external/bsd/libfido2/dist/debian/libfido2-1.symbols
N src/external/bsd/libfido2/dist/debian/libfido2-dev.install
N src/external/bsd/libfido2/dist/debian/libfido2-dev.links
N src/external/bsd/libfido2/dist/debian/libfido2-dev.manpages
N src/external/bsd/libfido2/dist/debian/libfido2-udev.install
N src/external/bsd/libfido2/dist/debian/rules
N src/external/bsd/libfido2/dist/debian/source/format
N src/external/bsd/libfido2/dist/docker/bionic/Dockerfile
N src/external/bsd/libfido2/dist/examples/CMakeLists.txt
N src/external/bsd/libfido2/dist/examples/README.adoc
N src/external/bsd/libfido2/dist/examples/assert.c
N src/external/bsd/libfido2/dist/examples/cred.c
N src/external/bsd/libfido2/dist/examples/extern.h
N src/external/bsd/libfido2/dist/examples/info.c
N src/external/bsd/libfido2/dist/examples/manifest.c
N src/external/bsd/libfido2/dist/examples/reset.c
N src/external/bsd/libfido2/dist/examples/retries.c
N src/external/bsd/libfido2/dist/examples/setpin.c
N src/external/bsd/libfido2/dist/examples/util.c
N src/external/bsd/libfido2/dist/fuzz/CMakeLists.txt
N src/external/bsd/libfido2/dist/fuzz/Dockerfile
N src/external/bsd/libfido2/dist/fuzz/Makefile
N src/external/bsd/libfido2/dist/fuzz/README
N src/external/bsd/libfido2/dist/fuzz/build-coverage
N src/external/bsd/libfido2/dist/fuzz/corpus.tgz
N src/external/bsd/libfido2/dist/fuzz/dummy.h
N src/external/bsd/libfido2/dist/fuzz/export.gnu
N src/external/bsd/libfido2/dist/fuzz/functions.txt
N src/external/bsd/libfido2/dist/fuzz/fuzz_assert.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_bio.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_cred.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_credman.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_mgmt.c
N src/external/bsd/libfido2/dist/fuzz/mutator_aux.c
N src/external/bsd/libfido2/dist/fuzz/mutator_aux.h
N src/external/bsd/libfido2/dist/fuzz/preload-fuzz.c
N src/external/bsd/libfido2/dist/fuzz/preload-snoop.c
N src/external/bsd/libfido2/dist/fuzz/prng.c
N src/external/bsd/libfido2/dist/fuzz/report.tgz
N src/external/bsd/libfido2/dist/fuzz/summary.txt
N src/external/bsd/libfido2/dist/fuzz/uniform_random.c
N src/external/bsd/libfido2/dist/fuzz/wrap.c
N src/external/bsd/libfido2/dist/fuzz/wiredata_fido2.h
N src/external/bsd/libfido2/dist/fuzz/wiredata_u2f.h
N src/external/bsd/libfido2/dist/fuzz/wrapped.sym
N src/external/bsd/libfido2/dist/man/CMakeLists.txt
N src/external/bsd/libfido2/dist/man/NOTES
N src/external/bsd/libfido2/dist/man/dyc.css
N src/external/bsd/libfido2/dist/man/eddsa_pk_new.3
N src/external/bsd/libfido2/dist/man/es256_pk_new.3
N src/external/bsd/libfido2/dist/man/fido2-assert.1
N src/external/bsd/libfido2/dist/man/fido2-cred.1
N src/external/bsd/libfido2/dist/man/fido2-token.1
N src/external/bsd/libfido2/dist/man/fido_assert_allow_cred.3
N src/external/bsd/libfido2/dist/man/fido_assert_new.3
N src/external/bsd/libfido2/dist/man/fido_assert_set_authdata.3
N src/external/bsd/libfido2/dist/man/fido_assert_verify.3
N src/external/bsd/libfido2/dist/man/fido_bio_dev_get_info.3
N src/external/bsd/libfido2/dist/man/fido_bio_enroll_new.3
N src/external/bsd/libfido2/dist/man/fido_bio_info_new.3
N src/external/bsd/libfido2/dist/man/fido_bio_template.3
N src/external/bsd/libfido2/dist/man/fido_cbor_info_new.3
N src/external/bsd/libfido2/dist/man/fido_cred_exclude.3
N src/external/bsd/libfido2/dist/man/fido_cred_new.3
N src/external/bsd/libfido2/dist/man/fido_cred_set_authdata.3
N src/external/bsd/libfido2/dist/man/fido_cred_verify.3
N 

CVS import: src/external/bsd/libfido2/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:11:48 UTC 2020

Update of /cvsroot/src/external/bsd/libfido2/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv21345

Log Message:
Import Yubico's libfido2 from https://github.com/Yubico/libfido2.git

Status:

Vendor Tag: YUBICO
Release Tags:   libfido2-f6ab2ce65745f7f3b1bee7481623de5eaac28bb0

N src/external/bsd/libfido2/dist/.travis.yml
N src/external/bsd/libfido2/dist/CMakeLists.txt
N src/external/bsd/libfido2/dist/LICENSE
N src/external/bsd/libfido2/dist/NEWS
N src/external/bsd/libfido2/dist/README.adoc
N src/external/bsd/libfido2/dist/.github/workflows/scan.yml
N src/external/bsd/libfido2/dist/.github/workflows/windows.yml
N src/external/bsd/libfido2/dist/.travis/build-linux-clang
N src/external/bsd/libfido2/dist/.travis/build-linux-gcc
N src/external/bsd/libfido2/dist/.travis/build-linux-mingw
N src/external/bsd/libfido2/dist/.travis/build-osx-clang
N src/external/bsd/libfido2/dist/.travis/fuzz-linux-asan
N src/external/bsd/libfido2/dist/.travis/fuzz-linux-msan
N src/external/bsd/libfido2/dist/debian/changelog
N src/external/bsd/libfido2/dist/debian/compat
N src/external/bsd/libfido2/dist/debian/control
N src/external/bsd/libfido2/dist/debian/copyright
N src/external/bsd/libfido2/dist/debian/fido2-tools.install
N src/external/bsd/libfido2/dist/debian/fido2-tools.manpages
N src/external/bsd/libfido2/dist/debian/libfido2-1.install
N src/external/bsd/libfido2/dist/debian/libfido2-1.symbols
N src/external/bsd/libfido2/dist/debian/libfido2-dev.install
N src/external/bsd/libfido2/dist/debian/libfido2-dev.links
N src/external/bsd/libfido2/dist/debian/libfido2-dev.manpages
N src/external/bsd/libfido2/dist/debian/libfido2-udev.install
N src/external/bsd/libfido2/dist/debian/rules
N src/external/bsd/libfido2/dist/debian/source/format
N src/external/bsd/libfido2/dist/docker/bionic/Dockerfile
N src/external/bsd/libfido2/dist/examples/CMakeLists.txt
N src/external/bsd/libfido2/dist/examples/README.adoc
N src/external/bsd/libfido2/dist/examples/assert.c
N src/external/bsd/libfido2/dist/examples/cred.c
N src/external/bsd/libfido2/dist/examples/extern.h
N src/external/bsd/libfido2/dist/examples/info.c
N src/external/bsd/libfido2/dist/examples/manifest.c
N src/external/bsd/libfido2/dist/examples/reset.c
N src/external/bsd/libfido2/dist/examples/retries.c
N src/external/bsd/libfido2/dist/examples/setpin.c
N src/external/bsd/libfido2/dist/examples/util.c
N src/external/bsd/libfido2/dist/fuzz/CMakeLists.txt
N src/external/bsd/libfido2/dist/fuzz/Dockerfile
N src/external/bsd/libfido2/dist/fuzz/Makefile
N src/external/bsd/libfido2/dist/fuzz/README
N src/external/bsd/libfido2/dist/fuzz/build-coverage
N src/external/bsd/libfido2/dist/fuzz/corpus.tgz
N src/external/bsd/libfido2/dist/fuzz/dummy.h
N src/external/bsd/libfido2/dist/fuzz/export.gnu
N src/external/bsd/libfido2/dist/fuzz/functions.txt
N src/external/bsd/libfido2/dist/fuzz/fuzz_assert.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_bio.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_cred.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_credman.c
N src/external/bsd/libfido2/dist/fuzz/fuzz_mgmt.c
N src/external/bsd/libfido2/dist/fuzz/mutator_aux.c
N src/external/bsd/libfido2/dist/fuzz/mutator_aux.h
N src/external/bsd/libfido2/dist/fuzz/preload-fuzz.c
N src/external/bsd/libfido2/dist/fuzz/preload-snoop.c
N src/external/bsd/libfido2/dist/fuzz/prng.c
N src/external/bsd/libfido2/dist/fuzz/report.tgz
N src/external/bsd/libfido2/dist/fuzz/summary.txt
N src/external/bsd/libfido2/dist/fuzz/uniform_random.c
N src/external/bsd/libfido2/dist/fuzz/wrap.c
N src/external/bsd/libfido2/dist/fuzz/wiredata_fido2.h
N src/external/bsd/libfido2/dist/fuzz/wiredata_u2f.h
N src/external/bsd/libfido2/dist/fuzz/wrapped.sym
N src/external/bsd/libfido2/dist/man/CMakeLists.txt
N src/external/bsd/libfido2/dist/man/NOTES
N src/external/bsd/libfido2/dist/man/dyc.css
N src/external/bsd/libfido2/dist/man/eddsa_pk_new.3
N src/external/bsd/libfido2/dist/man/es256_pk_new.3
N src/external/bsd/libfido2/dist/man/fido2-assert.1
N src/external/bsd/libfido2/dist/man/fido2-cred.1
N src/external/bsd/libfido2/dist/man/fido2-token.1
N src/external/bsd/libfido2/dist/man/fido_assert_allow_cred.3
N src/external/bsd/libfido2/dist/man/fido_assert_new.3
N src/external/bsd/libfido2/dist/man/fido_assert_set_authdata.3
N src/external/bsd/libfido2/dist/man/fido_assert_verify.3
N src/external/bsd/libfido2/dist/man/fido_bio_dev_get_info.3
N src/external/bsd/libfido2/dist/man/fido_bio_enroll_new.3
N src/external/bsd/libfido2/dist/man/fido_bio_info_new.3
N src/external/bsd/libfido2/dist/man/fido_bio_template.3
N src/external/bsd/libfido2/dist/man/fido_cbor_info_new.3
N src/external/bsd/libfido2/dist/man/fido_cred_exclude.3
N src/external/bsd/libfido2/dist/man/fido_cred_new.3
N src/external/bsd/libfido2/dist/man/fido_cred_set_authdata.3
N src/external/bsd/libfido2/dist/man/fido_cred_verify.3
N 

CVS import: src/external/bsd/libfido2/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:08:05 UTC 2020

Update of /cvsroot/src/external/bsd/libfido2/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv764

Log Message:
Import libfido2 from: https://github.com/Yubico/libfido2.git

Status:

Vendor Tag: YUBICO
Release Tags:   libfido2-f6ab2ce65745f7f3b1bee7481623de5eaac28bb0

N src/external/bsd/libfido2/dist/CMakeLists.txt
N src/external/bsd/libfido2/dist/aes256.c
N src/external/bsd/libfido2/dist/assert.c
N src/external/bsd/libfido2/dist/authkey.c
N src/external/bsd/libfido2/dist/bio.c
N src/external/bsd/libfido2/dist/blob.c
N src/external/bsd/libfido2/dist/blob.h
N src/external/bsd/libfido2/dist/buf.c
N src/external/bsd/libfido2/dist/cbor.c
N src/external/bsd/libfido2/dist/cred.c
N src/external/bsd/libfido2/dist/credman.c
N src/external/bsd/libfido2/dist/dev.c
N src/external/bsd/libfido2/dist/diff_exports.sh
N src/external/bsd/libfido2/dist/ecdh.c
N src/external/bsd/libfido2/dist/eddsa.c
N src/external/bsd/libfido2/dist/err.c
N src/external/bsd/libfido2/dist/es256.c
N src/external/bsd/libfido2/dist/export.gnu
N src/external/bsd/libfido2/dist/export.llvm
N src/external/bsd/libfido2/dist/export.msvc
N src/external/bsd/libfido2/dist/extern.h
N src/external/bsd/libfido2/dist/fido.h
N src/external/bsd/libfido2/dist/hid.c
N src/external/bsd/libfido2/dist/hid_hidapi.c
N src/external/bsd/libfido2/dist/hid_linux.c
N src/external/bsd/libfido2/dist/hid_openbsd.c
N src/external/bsd/libfido2/dist/hid_osx.c
N src/external/bsd/libfido2/dist/hid_win.c
N src/external/bsd/libfido2/dist/info.c
N src/external/bsd/libfido2/dist/io.c
N src/external/bsd/libfido2/dist/iso7816.c
N src/external/bsd/libfido2/dist/iso7816.h
N src/external/bsd/libfido2/dist/libfido2.pc.in
N src/external/bsd/libfido2/dist/log.c
N src/external/bsd/libfido2/dist/packed.h
N src/external/bsd/libfido2/dist/pin.c
N src/external/bsd/libfido2/dist/reset.c
N src/external/bsd/libfido2/dist/rs256.c
N src/external/bsd/libfido2/dist/u2f.c
N src/external/bsd/libfido2/dist/fido/bio.h
N src/external/bsd/libfido2/dist/fido/credman.h
N src/external/bsd/libfido2/dist/fido/eddsa.h
N src/external/bsd/libfido2/dist/fido/err.h
N src/external/bsd/libfido2/dist/fido/es256.h
N src/external/bsd/libfido2/dist/fido/param.h
N src/external/bsd/libfido2/dist/fido/rs256.h
N src/external/bsd/libfido2/dist/fido/types.h

No conflicts created by this import



CVS import: src/external/bsd/libfido2/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:08:05 UTC 2020

Update of /cvsroot/src/external/bsd/libfido2/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv764

Log Message:
Import libfido2 from: https://github.com/Yubico/libfido2.git

Status:

Vendor Tag: YUBICO
Release Tags:   libfido2-f6ab2ce65745f7f3b1bee7481623de5eaac28bb0

N src/external/bsd/libfido2/dist/CMakeLists.txt
N src/external/bsd/libfido2/dist/aes256.c
N src/external/bsd/libfido2/dist/assert.c
N src/external/bsd/libfido2/dist/authkey.c
N src/external/bsd/libfido2/dist/bio.c
N src/external/bsd/libfido2/dist/blob.c
N src/external/bsd/libfido2/dist/blob.h
N src/external/bsd/libfido2/dist/buf.c
N src/external/bsd/libfido2/dist/cbor.c
N src/external/bsd/libfido2/dist/cred.c
N src/external/bsd/libfido2/dist/credman.c
N src/external/bsd/libfido2/dist/dev.c
N src/external/bsd/libfido2/dist/diff_exports.sh
N src/external/bsd/libfido2/dist/ecdh.c
N src/external/bsd/libfido2/dist/eddsa.c
N src/external/bsd/libfido2/dist/err.c
N src/external/bsd/libfido2/dist/es256.c
N src/external/bsd/libfido2/dist/export.gnu
N src/external/bsd/libfido2/dist/export.llvm
N src/external/bsd/libfido2/dist/export.msvc
N src/external/bsd/libfido2/dist/extern.h
N src/external/bsd/libfido2/dist/fido.h
N src/external/bsd/libfido2/dist/hid.c
N src/external/bsd/libfido2/dist/hid_hidapi.c
N src/external/bsd/libfido2/dist/hid_linux.c
N src/external/bsd/libfido2/dist/hid_openbsd.c
N src/external/bsd/libfido2/dist/hid_osx.c
N src/external/bsd/libfido2/dist/hid_win.c
N src/external/bsd/libfido2/dist/info.c
N src/external/bsd/libfido2/dist/io.c
N src/external/bsd/libfido2/dist/iso7816.c
N src/external/bsd/libfido2/dist/iso7816.h
N src/external/bsd/libfido2/dist/libfido2.pc.in
N src/external/bsd/libfido2/dist/log.c
N src/external/bsd/libfido2/dist/packed.h
N src/external/bsd/libfido2/dist/pin.c
N src/external/bsd/libfido2/dist/reset.c
N src/external/bsd/libfido2/dist/rs256.c
N src/external/bsd/libfido2/dist/u2f.c
N src/external/bsd/libfido2/dist/fido/bio.h
N src/external/bsd/libfido2/dist/fido/credman.h
N src/external/bsd/libfido2/dist/fido/eddsa.h
N src/external/bsd/libfido2/dist/fido/err.h
N src/external/bsd/libfido2/dist/fido/es256.h
N src/external/bsd/libfido2/dist/fido/param.h
N src/external/bsd/libfido2/dist/fido/rs256.h
N src/external/bsd/libfido2/dist/fido/types.h

No conflicts created by this import



CVS import: src/external/bsd/libfido/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:06:26 UTC 2020

Update of /cvsroot/src/external/bsd/libfido/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv8532

Log Message:
Import libfido2 from github current.

Status:

Vendor Tag: YUBICO
Release Tags:   libfido2-f6ab2ce65745f7f3b1bee7481623de5eaac28bb0

N src/external/bsd/libfido/dist/CMakeLists.txt
N src/external/bsd/libfido/dist/aes256.c
N src/external/bsd/libfido/dist/assert.c
N src/external/bsd/libfido/dist/authkey.c
N src/external/bsd/libfido/dist/bio.c
N src/external/bsd/libfido/dist/blob.c
N src/external/bsd/libfido/dist/blob.h
N src/external/bsd/libfido/dist/buf.c
N src/external/bsd/libfido/dist/cbor.c
N src/external/bsd/libfido/dist/cred.c
N src/external/bsd/libfido/dist/credman.c
N src/external/bsd/libfido/dist/dev.c
N src/external/bsd/libfido/dist/diff_exports.sh
N src/external/bsd/libfido/dist/ecdh.c
N src/external/bsd/libfido/dist/eddsa.c
N src/external/bsd/libfido/dist/err.c
N src/external/bsd/libfido/dist/es256.c
N src/external/bsd/libfido/dist/export.gnu
N src/external/bsd/libfido/dist/export.llvm
N src/external/bsd/libfido/dist/export.msvc
N src/external/bsd/libfido/dist/extern.h
N src/external/bsd/libfido/dist/fido.h
N src/external/bsd/libfido/dist/hid.c
N src/external/bsd/libfido/dist/hid_hidapi.c
N src/external/bsd/libfido/dist/hid_linux.c
N src/external/bsd/libfido/dist/hid_openbsd.c
N src/external/bsd/libfido/dist/hid_osx.c
N src/external/bsd/libfido/dist/hid_win.c
N src/external/bsd/libfido/dist/info.c
N src/external/bsd/libfido/dist/io.c
N src/external/bsd/libfido/dist/iso7816.c
N src/external/bsd/libfido/dist/iso7816.h
N src/external/bsd/libfido/dist/libfido2.pc.in
N src/external/bsd/libfido/dist/log.c
N src/external/bsd/libfido/dist/packed.h
N src/external/bsd/libfido/dist/pin.c
N src/external/bsd/libfido/dist/reset.c
N src/external/bsd/libfido/dist/rs256.c
N src/external/bsd/libfido/dist/u2f.c
N src/external/bsd/libfido/dist/fido/bio.h
N src/external/bsd/libfido/dist/fido/credman.h
N src/external/bsd/libfido/dist/fido/eddsa.h
N src/external/bsd/libfido/dist/fido/err.h
N src/external/bsd/libfido/dist/fido/es256.h
N src/external/bsd/libfido/dist/fido/param.h
N src/external/bsd/libfido/dist/fido/rs256.h
N src/external/bsd/libfido/dist/fido/types.h

No conflicts created by this import



CVS import: src/external/bsd/libfido/dist

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:06:26 UTC 2020

Update of /cvsroot/src/external/bsd/libfido/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv8532

Log Message:
Import libfido2 from github current.

Status:

Vendor Tag: YUBICO
Release Tags:   libfido2-f6ab2ce65745f7f3b1bee7481623de5eaac28bb0

N src/external/bsd/libfido/dist/CMakeLists.txt
N src/external/bsd/libfido/dist/aes256.c
N src/external/bsd/libfido/dist/assert.c
N src/external/bsd/libfido/dist/authkey.c
N src/external/bsd/libfido/dist/bio.c
N src/external/bsd/libfido/dist/blob.c
N src/external/bsd/libfido/dist/blob.h
N src/external/bsd/libfido/dist/buf.c
N src/external/bsd/libfido/dist/cbor.c
N src/external/bsd/libfido/dist/cred.c
N src/external/bsd/libfido/dist/credman.c
N src/external/bsd/libfido/dist/dev.c
N src/external/bsd/libfido/dist/diff_exports.sh
N src/external/bsd/libfido/dist/ecdh.c
N src/external/bsd/libfido/dist/eddsa.c
N src/external/bsd/libfido/dist/err.c
N src/external/bsd/libfido/dist/es256.c
N src/external/bsd/libfido/dist/export.gnu
N src/external/bsd/libfido/dist/export.llvm
N src/external/bsd/libfido/dist/export.msvc
N src/external/bsd/libfido/dist/extern.h
N src/external/bsd/libfido/dist/fido.h
N src/external/bsd/libfido/dist/hid.c
N src/external/bsd/libfido/dist/hid_hidapi.c
N src/external/bsd/libfido/dist/hid_linux.c
N src/external/bsd/libfido/dist/hid_openbsd.c
N src/external/bsd/libfido/dist/hid_osx.c
N src/external/bsd/libfido/dist/hid_win.c
N src/external/bsd/libfido/dist/info.c
N src/external/bsd/libfido/dist/io.c
N src/external/bsd/libfido/dist/iso7816.c
N src/external/bsd/libfido/dist/iso7816.h
N src/external/bsd/libfido/dist/libfido2.pc.in
N src/external/bsd/libfido/dist/log.c
N src/external/bsd/libfido/dist/packed.h
N src/external/bsd/libfido/dist/pin.c
N src/external/bsd/libfido/dist/reset.c
N src/external/bsd/libfido/dist/rs256.c
N src/external/bsd/libfido/dist/u2f.c
N src/external/bsd/libfido/dist/fido/bio.h
N src/external/bsd/libfido/dist/fido/credman.h
N src/external/bsd/libfido/dist/fido/eddsa.h
N src/external/bsd/libfido/dist/fido/err.h
N src/external/bsd/libfido/dist/fido/es256.h
N src/external/bsd/libfido/dist/fido/param.h
N src/external/bsd/libfido/dist/fido/rs256.h
N src/external/bsd/libfido/dist/fido/types.h

No conflicts created by this import



CVS commit: src/doc

2020-03-02 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Mon Mar  2 20:04:42 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Fix word accesses on Gayle (Amiga1200) pcmcia. Patch by Martin Åberg.


To generate a diff of this commit:
cvs rdiff -u -r1.2654 -r1.2655 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2654 src/doc/CHANGES:1.2655
--- src/doc/CHANGES:1.2654	Sat Feb 29 04:27:01 2020
+++ src/doc/CHANGES	Mon Mar  2 20:04:42 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2654 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2655 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -148,3 +148,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		in the Raspberry Pi 4. [jmcneill 20200222]
 	OpenSSH: Import 8.2. [christos 20200226]
 	ld.elf_so(1): Implement DT_GNU_HASH [kamil 20200229]
+	amiga: Fix word accesses on Gayle (A1200) pcmcia. [is 20200302]



CVS commit: src/doc

2020-03-02 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Mon Mar  2 20:04:42 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Fix word accesses on Gayle (Amiga1200) pcmcia. Patch by Martin Åberg.


To generate a diff of this commit:
cvs rdiff -u -r1.2654 -r1.2655 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/amiga/dev

2020-03-02 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Mon Mar  2 19:48:23 UTC 2020

Modified Files:
src/sys/arch/amiga/dev: gayle_pcmcia.c

Log Message:
The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin Åberg.

Tested on formerly working hardware

- by Jukka Andberg  with Dlink DE-660+  (ne)
- by Frank Willewith D-Link DFE-670TXD  (ne)

Tested on formerly not working hardware:

- by Martin with 3Com 3c589 Etherling III   (ep)
- by Martin and Frank   with CompactFlash cards (wdc)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amiga/dev/gayle_pcmcia.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amiga/dev/gayle_pcmcia.c
diff -u src/sys/arch/amiga/dev/gayle_pcmcia.c:1.31 src/sys/arch/amiga/dev/gayle_pcmcia.c:1.32
--- src/sys/arch/amiga/dev/gayle_pcmcia.c:1.31	Sun Feb  8 09:55:25 2015
+++ src/sys/arch/amiga/dev/gayle_pcmcia.c	Mon Mar  2 19:48:23 2020
@@ -1,9 +1,9 @@
-/*	$NetBSD: gayle_pcmcia.c,v 1.31 2015/02/08 09:55:25 jandberg Exp $ */
+/*	$NetBSD: gayle_pcmcia.c,v 1.32 2020/03/02 19:48:23 is Exp $ */
 
 /* public domain */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.31 2015/02/08 09:55:25 jandberg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.32 2020/03/02 19:48:23 is Exp $");
 
 /* PCMCIA front-end driver for A1200's and A600's. */
 
@@ -131,7 +131,7 @@ pccard_attach(device_t parent, device_t 
 	pmap_update(vm_map_pmap(kernel_map));
 
 	/* override the one-byte access methods for I/O space */
-	pcmio_bs_methods = amiga_bus_stride_1;
+	pcmio_bs_methods = amiga_bus_stride_1swap;
 	pcmio_bs_methods.bsr1 = pcmio_bsr1;
 	pcmio_bs_methods.bsw1 = pcmio_bsw1;
 	pcmio_bs_methods.bsrm1 = pcmio_bsrm1;



CVS commit: src/sys/arch/amiga/dev

2020-03-02 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Mon Mar  2 19:48:23 UTC 2020

Modified Files:
src/sys/arch/amiga/dev: gayle_pcmcia.c

Log Message:
The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin Åberg.

Tested on formerly working hardware

- by Jukka Andberg  with Dlink DE-660+  (ne)
- by Frank Willewith D-Link DFE-670TXD  (ne)

Tested on formerly not working hardware:

- by Martin with 3Com 3c589 Etherling III   (ep)
- by Martin and Frank   with CompactFlash cards (wdc)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amiga/dev/gayle_pcmcia.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2020-03-02 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Mon Mar  2 19:16:02 UTC 2020

Modified Files:
src/sys/dev/pci: if_kse.c

Log Message:
minor knits in mcast handling.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_kse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_kse.c
diff -u src/sys/dev/pci/if_kse.c:1.49 src/sys/dev/pci/if_kse.c:1.50
--- src/sys/dev/pci/if_kse.c:1.49	Mon Feb 17 06:05:31 2020
+++ src/sys/dev/pci/if_kse.c	Mon Mar  2 19:16:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_kse.c,v 1.49 2020/02/17 06:05:31 nisimura Exp $	*/
+/*	$NetBSD: if_kse.c,v 1.50 2020/03/02 19:16:02 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.49 2020/02/17 06:05:31 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.50 2020/03/02 19:16:02 nisimura Exp $");
 
 #include 
 #include 
@@ -1114,11 +1114,6 @@ kse_set_filter(struct kse_softc *sc)
 	ETHER_FIRST_MULTI(step, ec, enm);
 	i = 0;
 	while (enm != NULL) {
-#if KSE_MCASTDEBUG == 1
-		printf("%s: addrs %s %s\n", __func__,
-		   ether_sprintf(enm->enm_addrlo),
-		   ether_sprintf(enm->enm_addrhi));
-#endif
 		if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
 			/*
 			 * We must listen to a range of multicast addresses.
@@ -1132,6 +1127,9 @@ kse_set_filter(struct kse_softc *sc)
 			ifp->if_flags |= IFF_ALLMULTI;
 			goto update;
 		}
+#if KSE_MCASTDEBUG == 1
+		printf("[%d] %s\n", i, ether_sprintf(enm->enm_addrlo));
+#endif
 		if (i < 16) {
 			/* use 16 additional MAC addr to accept mcast */
 			uint32_t addr;
@@ -1139,8 +1137,8 @@ kse_set_filter(struct kse_softc *sc)
 			addr = (ep[3] << 24) | (ep[2] << 16)
 			 | (ep[1] << 8)  |  ep[0];
 			CSR_WRITE_4(sc, MAAL0 + i*8, addr);
-			addr = (ep[5] << 8) | ep[4] | (1U<<31);
-			CSR_WRITE_4(sc, MAAH0 + i*8, addr);
+			addr = (ep[5] << 8) | ep[4];
+			CSR_WRITE_4(sc, MAAH0 + i*8, addr | (1U << 31));
 		} else {
 			/* use hash table when too many */
 			crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN);
@@ -1151,11 +1149,10 @@ kse_set_filter(struct kse_softc *sc)
 	}
 	ETHER_UNLOCK(ec);
 
-	if (crc) {
-		CSR_WRITE_4(sc, MTR0, mchash[0]);
-		CSR_WRITE_4(sc, MTR1, mchash[1]);
+	if (crc)
 		sc->sc_rxc |= RXC_MHTE;
-	}
+	CSR_WRITE_4(sc, MTR0, mchash[0]);
+	CSR_WRITE_4(sc, MTR1, mchash[1]);
 	return;
 
  update:



CVS commit: src/sys/dev/pci

2020-03-02 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Mon Mar  2 19:16:02 UTC 2020

Modified Files:
src/sys/dev/pci: if_kse.c

Log Message:
minor knits in mcast handling.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_kse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  2 18:15:29 UTC 2020

Modified Files:
src/sys/dev/hid: hid.h
src/sys/dev/usb: uhid.c

Log Message:
Add fido constants, and turn hid "raw" mode for fido devices.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hid.h
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/usb/uhid.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  2 18:15:29 UTC 2020

Modified Files:
src/sys/dev/hid: hid.h
src/sys/dev/usb: uhid.c

Log Message:
Add fido constants, and turn hid "raw" mode for fido devices.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hid.h
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/usb/uhid.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/hid/hid.h
diff -u src/sys/dev/hid/hid.h:1.3 src/sys/dev/hid/hid.h:1.4
--- src/sys/dev/hid/hid.h:1.3	Thu Nov 15 18:01:45 2018
+++ src/sys/dev/hid/hid.h	Mon Mar  2 13:15:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hid.h,v 1.3 2018/11/15 23:01:45 jakllsch Exp $	*/
+/*	$NetBSD: hid.h,v 1.4 2020/03/02 18:15:28 christos Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/hid.h,v 1.7 1999/11/17 22:33:40 n_hibma Exp $ */
 
 /*
@@ -123,6 +123,7 @@ int hid_is_collection(const void *, int,
 #define HUP_CAMERA_CONTROL	0x0090
 #define HUP_ARCADE		0x0091
 #define HUP_VENDOR		0x00ff
+#define HUP_FIDO		0xf1d0
 #define HUP_MICROSOFT		0xff00
 /* XXX compat */
 #define HUP_APPLE		0x00ff
@@ -396,6 +397,9 @@ int hid_is_collection(const void *, int,
 /* Usages, Consumer */
 #define HUC_AC_PAN		0x0238
 
+/* Usages, FIDO */
+#define HUF_U2FHID		0x0001
+
 #define HID_USAGE2(p, u) (((p) << 16) | u)
 #define HID_GET_USAGE(u) ((u) & 0x)
 #define HID_GET_USAGE_PAGE(u) (((u) >> 16) & 0x)

Index: src/sys/dev/usb/uhid.c
diff -u src/sys/dev/usb/uhid.c:1.111 src/sys/dev/usb/uhid.c:1.112
--- src/sys/dev/usb/uhid.c:1.111	Wed Jan  1 04:05:03 2020
+++ src/sys/dev/usb/uhid.c	Mon Mar  2 13:15:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhid.c,v 1.111 2020/01/01 09:05:03 maxv Exp $	*/
+/*	$NetBSD: uhid.c,v 1.112 2020/03/02 18:15:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2008, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.111 2020/01/01 09:05:03 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.112 2020/03/02 18:15:28 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -104,6 +104,7 @@ struct uhid_softc {
 #define UHID_IMMED	0x02	/* return read data immediately */
 
 	int sc_refcnt;
+	int sc_raw;
 	u_char sc_dying;
 };
 
@@ -184,6 +185,8 @@ uhid_attach(device_t parent, device_t se
 	sc->sc_isize = hid_report_size(desc, size, hid_input,   repid);
 	sc->sc_osize = hid_report_size(desc, size, hid_output,  repid);
 	sc->sc_fsize = hid_report_size(desc, size, hid_feature, repid);
+	sc->sc_raw =  hid_is_collection(desc, size, uha->reportid,
+	HID_USAGE2(HUP_FIDO, HUF_U2FHID));
 
 	aprint_naive("\n");
 	aprint_normal(": input=%d, output=%d, feature=%d\n",
@@ -482,15 +485,32 @@ uhid_do_write(struct uhid_softc *sc, str
 		return EIO;
 
 	size = sc->sc_osize;
-	error = 0;
 	if (uio->uio_resid != size || size == 0)
 		return EINVAL;
 	error = uiomove(sc->sc_obuf, size, uio);
+#ifdef UHID_DEBUG
+	if (uhiddebug > 5) {
+		uint32_t i;
+
+		DPRINTF(("%s: outdata[%d] =", device_xname(sc->sc_hdev.sc_dev),
+		error));
+		for (i = 0; i < size; i++)
+			DPRINTF((" %02x", sc->sc_obuf[i]));
+		DPRINTF(("\n"));
+	}
+#endif
 	if (!error) {
-		err = uhidev_set_report(>sc_hdev, UHID_OUTPUT_REPORT,
-	sc->sc_obuf, size);
-		if (err)
+		if (sc->sc_raw)
+			err = uhidev_write(sc->sc_hdev.sc_parent, sc->sc_obuf,
+			size);
+		else
+			err = uhidev_set_report(>sc_hdev,
+			UHID_OUTPUT_REPORT, sc->sc_obuf, size);
+		if (err) {
+			DPRINTF(("%s: err = %d\n",
+			device_xname(sc->sc_hdev.sc_dev), err));
 			error = EIO;
+		}
 	}
 
 	return error;



CVS commit: src/distrib/amd64/ramdisks/ramdisk-zfsroot

2020-03-02 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Mar  2 16:04:49 UTC 2020

Modified Files:
src/distrib/amd64/ramdisks/ramdisk-zfsroot: Makefile

Log Message:
ramdisk-zfsroot: Build with -D_REENTRANT

zpool(8) requires libhack built with it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/ramdisks/ramdisk-zfsroot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/amd64/ramdisks/ramdisk-zfsroot/Makefile
diff -u src/distrib/amd64/ramdisks/ramdisk-zfsroot/Makefile:1.1 src/distrib/amd64/ramdisks/ramdisk-zfsroot/Makefile:1.2
--- src/distrib/amd64/ramdisks/ramdisk-zfsroot/Makefile:1.1	Sat Feb 22 09:53:47 2020
+++ src/distrib/amd64/ramdisks/ramdisk-zfsroot/Makefile	Mon Mar  2 16:04:49 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2020/02/22 09:53:47 roy Exp $
+#	$NetBSD: Makefile,v 1.2 2020/03/02 16:04:49 roy Exp $
 
 IMAGE=			ramdisk-zfsroot.fs
 IMAGESIZE=		5000k
@@ -7,6 +7,9 @@ MAKEDEVTARGETS=		all
 CRUNCHENV=		INIT_CHROOT=1
 SMALLPROG_INET6=	1
 
+# Build as re-entrant because zpool requires libhack built this way.
+CPPFLAGS+=		-D_REENTRANT
+
 LISTS+=			${DISTRIBDIR}/common/list.zfsroot
 
 .include "${.CURDIR}/../common/Makefile.ramdisk"



CVS commit: src/distrib/amd64/ramdisks/ramdisk-zfsroot

2020-03-02 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Mar  2 16:04:49 UTC 2020

Modified Files:
src/distrib/amd64/ramdisks/ramdisk-zfsroot: Makefile

Log Message:
ramdisk-zfsroot: Build with -D_REENTRANT

zpool(8) requires libhack built with it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/ramdisks/ramdisk-zfsroot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/utils/libhack

2020-03-02 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Mar  2 16:01:52 UTC 2020

Modified Files:
src/distrib/utils/libhack: Makefile.inc

Log Message:
libhack: revert prior, will be done per consumer instead.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/utils/libhack/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/libhack/Makefile.inc
diff -u src/distrib/utils/libhack/Makefile.inc:1.33 src/distrib/utils/libhack/Makefile.inc:1.34
--- src/distrib/utils/libhack/Makefile.inc:1.33	Sun Mar  1 22:47:26 2020
+++ src/distrib/utils/libhack/Makefile.inc	Mon Mar  2 16:01:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.33 2020/03/01 22:47:26 roy Exp $
+# $NetBSD: Makefile.inc,v 1.34 2020/03/02 16:01:52 roy Exp $
 #
 # Include this fragment to build libhack.o
 # It is .o and not .a to make sure these are the
@@ -21,12 +21,6 @@
 CPPFLAGS+=	-DSMALL
 CPPFLAGS+=	-DLIBHACK
 
-# Build as re-entrant.
-# A few tool using libhack, such as zpool on the ramdisk-zfsroot,
-# expect this and it's simpler just to set it globally rather than
-# debugging why stuff randomly crashes.
-CPPFLAGS+=	-D_REENTRANT
-
 HACKOBJS+=	getcap.o getgrent.o getnet.o getnetgr.o getpwent.o jemalloc.o \
 		localeconv.o multibyte.o perror.o runetable.o setlocale.o \
 		nl_langinfo.o strcasecmp.o \



CVS commit: src

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar  2 16:01:57 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: vdev_disk.c
src/sys/dev: cgd.c
src/sys/dev/ata: wd.c wdvar.h
src/sys/dev/dkwedge: dk.c
src/sys/sys: disk.h dkio.h

Log Message:
New ioctl DIOCGSECTORALIGN returns sector alignment parameters.

struct disk_sectoralign {
/* First aligned sector number.  */
uint32_t dsa_firstaligned;

/* Number of sectors per aligned unit.  */
uint32_t dsa_alignment;
};

- Teach wd(4) to get it from ATA.
- Teach cgd(4) to pass it through from the underlying disk.
- Teach dk(4) to pass it through with adjustments.
- Teach zpool (zfs) to take advantage of it.
  => XXX zpool doesn't seem to understand when the vdev's starting
 sector is misaligned.

Missing:

- ccd(4) and raidframe(4) support -- these should support _using_
  DIOCGSECTORALIGN to decide where to start putting ccd or raid
  stripes on disk, and these should perhaps _implement_
  DIOCGSECTORALIGN by reporting the stripe/interleave factor.

- sd(4) support -- I don't know any obvious way to get it from SCSI,
  but if any SCSI wizards know better than I, please feel free to
  teach sd(4) about it!

- any ld(4) attachments -- might be worth teaching the ld drivers for
  nvme and various raid controllers to get the aligned sector size

There's some duplicate logic here for now.  I'm doing it this way,
rather than gathering the logic into a new disklabel_sectoralign
function or something, so that this change is limited to adding a new
ioctl, without any new kernel symbols, in order to make it easy to
pull up to netbsd-9 without worrying about the module ABI.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/cgd.c
cvs rdiff -u -r1.458 -r1.459 src/sys/dev/ata/wd.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ata/wdvar.h
cvs rdiff -u -r1.99 -r1.100 src/sys/dev/dkwedge/dk.c
cvs rdiff -u -r1.74 -r1.75 src/sys/sys/disk.h
cvs rdiff -u -r1.25 -r1.26 src/sys/sys/dkio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar  2 16:01:57 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: vdev_disk.c
src/sys/dev: cgd.c
src/sys/dev/ata: wd.c wdvar.h
src/sys/dev/dkwedge: dk.c
src/sys/sys: disk.h dkio.h

Log Message:
New ioctl DIOCGSECTORALIGN returns sector alignment parameters.

struct disk_sectoralign {
/* First aligned sector number.  */
uint32_t dsa_firstaligned;

/* Number of sectors per aligned unit.  */
uint32_t dsa_alignment;
};

- Teach wd(4) to get it from ATA.
- Teach cgd(4) to pass it through from the underlying disk.
- Teach dk(4) to pass it through with adjustments.
- Teach zpool (zfs) to take advantage of it.
  => XXX zpool doesn't seem to understand when the vdev's starting
 sector is misaligned.

Missing:

- ccd(4) and raidframe(4) support -- these should support _using_
  DIOCGSECTORALIGN to decide where to start putting ccd or raid
  stripes on disk, and these should perhaps _implement_
  DIOCGSECTORALIGN by reporting the stripe/interleave factor.

- sd(4) support -- I don't know any obvious way to get it from SCSI,
  but if any SCSI wizards know better than I, please feel free to
  teach sd(4) about it!

- any ld(4) attachments -- might be worth teaching the ld drivers for
  nvme and various raid controllers to get the aligned sector size

There's some duplicate logic here for now.  I'm doing it this way,
rather than gathering the logic into a new disklabel_sectoralign
function or something, so that this change is limited to adding a new
ioctl, without any new kernel symbols, in order to make it easy to
pull up to netbsd-9 without worrying about the module ABI.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/cgd.c
cvs rdiff -u -r1.458 -r1.459 src/sys/dev/ata/wd.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ata/wdvar.h
cvs rdiff -u -r1.99 -r1.100 src/sys/dev/dkwedge/dk.c
cvs rdiff -u -r1.74 -r1.75 src/sys/sys/disk.h
cvs rdiff -u -r1.25 -r1.26 src/sys/sys/dkio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.14 src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.15
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.14	Sat Feb 29 17:15:43 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c	Mon Mar  2 16:01:56 2020
@@ -151,6 +151,7 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi
 	unsigned secsize;
 	struct disk *pdk;
 	struct dkwedge_info dkw;
+	struct disk_sectoralign dsa;
 
 	/*
 	 * We must have a pathname, and it must be absolute.
@@ -260,7 +261,23 @@ skip_open:
 	*max_psize = *psize;
 
 	*ashift = highbit(MAX(secsize, SPA_MINBLOCKSIZE)) - 1;
-	*pashift = *ashift;
+
+	/*
+	 * Try to determine whether the disk has a preferred physical
+	 * sector size even if it can emulate a smaller logical sector
+	 * size with r/m/w cycles, e.g. a disk with 4096-byte sectors
+	 * that for compatibility claims to support 512-byte ones.
+	 */
+	if (VOP_IOCTL(vp, DIOCGSECTORALIGN, , FREAD, NOCRED) == 0) {
+		*pashift = highbit(dsa.dsa_alignment * secsize) - 1;
+		if (dsa.dsa_firstaligned % dsa.dsa_alignment)
+			printf("ZFS WARNING: vdev %s: sectors are misaligned"
+			" (alignment=%"PRIu32", firstaligned=%"PRIu32")\n",
+			vd->vdev_path,
+			dsa.dsa_alignment, dsa.dsa_firstaligned);
+	} else {
+		*pashift = *ashift;
+	}
 
 	vd->vdev_wholedisk = 0;
 	if (getdiskinfo(vp, ) != 0 &&

Index: src/sys/dev/cgd.c
diff -u src/sys/dev/cgd.c:1.120 src/sys/dev/cgd.c:1.121
--- src/sys/dev/cgd.c:1.120	Sun Mar  1 03:21:54 2020
+++ src/sys/dev/cgd.c	Mon Mar  2 16:01:56 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.120 2020/03/01 03:21:54 riastradh Exp $ */
+/* $NetBSD: cgd.c,v 1.121 2020/03/02 16:01:56 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.120 2020/03/01 03:21:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.121 2020/03/02 16:01:56 riastradh Exp $");
 
 #include 
 #include 
@@ -716,6 +716,33 @@ cgdioctl(dev_t dev, u_long cmd, void *da
 		 * We pass this call down to the underlying disk.
 		 */
 		return VOP_IOCTL(cs->sc_tvn, cmd, data, flag, l->l_cred);
+	case DIOCGSECTORALIGN: {
+		struct disk_sectoralign *dsa = data;
+		int error;
+
+		if (!DK_ATTACHED(dksc))
+			return ENOENT;
+
+		/* Get the underlying disk's sector alignment.  */
+		error = VOP_IOCTL(cs->sc_tvn, cmd, data, flag, l->l_cred);
+		if (error)
+			return error;
+
+		/* Adjust for the disklabel partition if necessary.  */
+		if (part != RAW_PART) {
+			struct disklabel *lp = dksc->sc_dkdev.dk_label;
+			daddr_t 

CVS commit: src/distrib/utils/libhack

2020-03-02 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Mar  2 16:01:52 UTC 2020

Modified Files:
src/distrib/utils/libhack: Makefile.inc

Log Message:
libhack: revert prior, will be done per consumer instead.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/utils/libhack/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar  2 16:00:54 UTC 2020

Modified Files:
src/sys/kern: files.kern

Log Message:
Include kern_crashme.c in non-DEBUG kernels.

This is useful for simulating crashes in production to test failover.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/files.kern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar  2 16:00:54 UTC 2020

Modified Files:
src/sys/kern: files.kern

Log Message:
Include kern_crashme.c in non-DEBUG kernels.

This is useful for simulating crashes in production to test failover.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/files.kern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/files.kern
diff -u src/sys/kern/files.kern:1.43 src/sys/kern/files.kern:1.44
--- src/sys/kern/files.kern:1.43	Sat Feb  8 07:07:07 2020
+++ src/sys/kern/files.kern	Mon Mar  2 16:00:54 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.kern,v 1.43 2020/02/08 07:07:07 maxv Exp $
+#	$NetBSD: files.kern,v 1.44 2020/03/02 16:00:54 riastradh Exp $
 
 #
 # kernel sources
@@ -77,7 +77,7 @@ file	kern/kern_rwlock.c		kern
 file	kern/kern_rwlock_obj.c		kern
 file	kern/kern_scdebug.c		kern
 file	kern/kern_sdt.c			kdtrace_hooks
-file	kern/kern_crashme.c		debug
+file	kern/kern_crashme.c		kern
 file	kern/kern_sig.c			kern
 file	kern/kern_sleepq.c		kern
 file	kern/kern_softint.c		kern



CVS commit: src/etc

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar  2 15:49:30 UTC 2020

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


To generate a diff of this commit:
cvs rdiff -u -r1.215 -r1.216 src/etc/MAKEDEV.tmpl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.215 src/etc/MAKEDEV.tmpl:1.216
--- src/etc/MAKEDEV.tmpl:1.215	Thu Feb 27 16:59:23 2020
+++ src/etc/MAKEDEV.tmpl	Mon Mar  2 15:49:30 2020
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.215 2020/02/27 16:59:23 riastradh Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.216 2020/03/02 15:49:30 riastradh Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -844,6 +844,7 @@ all)
 	makedev veriexec
 	makedev autofs
 	makedev fw0 fw1 fw2 fw3
+	makedev ipmi0
 	makedev local # do this last
 	;;
 



CVS commit: src/etc

2020-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar  2 15:49:30 UTC 2020

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


To generate a diff of this commit:
cvs rdiff -u -r1.215 -r1.216 src/etc/MAKEDEV.tmpl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/dist/common/nvpair

2020-03-02 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Mar  2 15:45:33 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/common/nvpair: nvpair.c

Log Message:
Fix undefined behavior in misaligned pointer usage

Detected by UBSan and already fixed upstream.

Cherry-pick:
>From aa0218d6a12814fac50b287214f9f3b0b99e11b1 Mon Sep 17 00:00:00 2001
From: Brian Behlendorf 
Date: Tue, 7 Jan 2014 23:24:37 +0100
Subject: [PATCH] Fix nvlist 'Bus Error' for Sparc

The mis-aligned memory accesses in nvpair_native_embedded() and
nvpair_native_embedded_array() will cause a 'Bus Error' for
architectures such as Sparc which not fully byte addressible.
To avoid this issue care is taken to avoid dereferencing the
potentially mis-aligned packed nvlist_t.

Signed-off-by: Brian Behlendorf 
Signed-off-by: Ned Bass 
Signed-off-by: marku89 
Issue #1700


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dist/common/nvpair/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/dist/common/nvpair

2020-03-02 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Mar  2 15:45:33 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/common/nvpair: nvpair.c

Log Message:
Fix undefined behavior in misaligned pointer usage

Detected by UBSan and already fixed upstream.

Cherry-pick:
>From aa0218d6a12814fac50b287214f9f3b0b99e11b1 Mon Sep 17 00:00:00 2001
From: Brian Behlendorf 
Date: Tue, 7 Jan 2014 23:24:37 +0100
Subject: [PATCH] Fix nvlist 'Bus Error' for Sparc

The mis-aligned memory accesses in nvpair_native_embedded() and
nvpair_native_embedded_array() will cause a 'Bus Error' for
architectures such as Sparc which not fully byte addressible.
To avoid this issue care is taken to avoid dereferencing the
potentially mis-aligned packed nvlist_t.

Signed-off-by: Brian Behlendorf 
Signed-off-by: Ned Bass 
Signed-off-by: marku89 
Issue #1700


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dist/common/nvpair/nvpair.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/common/nvpair/nvpair.c
diff -u src/external/cddl/osnet/dist/common/nvpair/nvpair.c:1.4 src/external/cddl/osnet/dist/common/nvpair/nvpair.c:1.5
--- src/external/cddl/osnet/dist/common/nvpair/nvpair.c:1.4	Mon May 28 21:05:04 2018
+++ src/external/cddl/osnet/dist/common/nvpair/nvpair.c	Mon Mar  2 15:45:33 2020
@@ -2586,7 +2586,8 @@ nvpair_native_embedded(nvstream_t *nvs, 
 		 * structure. The address may not be aligned, so we have
 		 * to use bzero.
 		 */
-		bzero(>nvl_priv, sizeof (packed->nvl_priv));
+		bzero((char *)packed + offsetof(nvlist_t, nvl_priv),
+		sizeof (uint64_t));
 	}
 
 	return (nvs_embedded(nvs, EMBEDDED_NVL(nvp)));
@@ -2614,7 +2615,8 @@ nvpair_native_embedded_array(nvstream_t 
 			 * packed structure. The address may not be aligned,
 			 * so we have to use bzero.
 			 */
-			bzero(>nvl_priv, sizeof (packed->nvl_priv));
+			bzero((char *)packed + offsetof(nvlist_t, nvl_priv),
+			sizeof (uint64_t));
 	}
 
 	return (nvs_embedded_nvl_array(nvs, nvp, NULL));



CVS commit: src/lib/libc/gen

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  2 15:30:25 UTC 2020

Modified Files:
src/lib/libc/gen: xsyslog.c

Log Message:
Add sysloglike attr.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gen/xsyslog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/xsyslog.c
diff -u src/lib/libc/gen/xsyslog.c:1.6 src/lib/libc/gen/xsyslog.c:1.7
--- src/lib/libc/gen/xsyslog.c:1.6	Mon Mar  2 09:10:24 2020
+++ src/lib/libc/gen/xsyslog.c	Mon Mar  2 10:30:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: xsyslog.c,v 1.6 2020/03/02 14:10:24 christos Exp $	*/
+/*	$NetBSD: xsyslog.c,v 1.7 2020/03/02 15:30:25 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)syslog.c	8.5 (Berkeley) 4/29/95";
 #else
-__RCSID("$NetBSD: xsyslog.c,v 1.6 2020/03/02 14:10:24 christos Exp $");
+__RCSID("$NetBSD: xsyslog.c,v 1.7 2020/03/02 15:30:25 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -124,7 +124,7 @@ _closelog_unlocked_r(struct syslog_data 
 	data->log_connected = 0;
 }
 
-static void
+static __sysloglike(6, 7) void
 _xsyslogp_r(int pri, struct syslog_fun *fun,
 struct syslog_data *data, const char *msgid,
 const char *sdfmt, const char *msgfmt, ...)



CVS commit: src/lib/libc/gen

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  2 15:30:25 UTC 2020

Modified Files:
src/lib/libc/gen: xsyslog.c

Log Message:
Add sysloglike attr.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gen/xsyslog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/openssh

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  2 15:23:17 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh: Makefile.inc

Log Message:
Enable compression


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/crypto/external/bsd/openssh/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/Makefile.inc
diff -u src/crypto/external/bsd/openssh/Makefile.inc:1.14 src/crypto/external/bsd/openssh/Makefile.inc:1.15
--- src/crypto/external/bsd/openssh/Makefile.inc:1.14	Fri Apr  6 14:58:59 2018
+++ src/crypto/external/bsd/openssh/Makefile.inc	Mon Mar  2 10:23:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.14 2018/04/06 18:58:59 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.15 2020/03/02 15:23:17 christos Exp $
 
 WARNS?=	4
 
@@ -11,6 +11,7 @@ SSHDIST?= ${NETBSDSRCDIR}/crypto/externa
 
 CPPFLAGS+=-I${SSHDIST}
 
+CPPFLAGS+=-D_OPENBSD_SOURCE 
 CPPFLAGS+=-DHAVE_DLOPEN
 CPPFLAGS+=-DHAVE_HEADER_AD
 CPPFLAGS+=-DHAVE_LOGIN_CAP
@@ -19,7 +20,7 @@ CPPFLAGS+=-DHAVE_STDLIB_H
 CPPFLAGS+=-DOPENSSL_API_COMPAT=0x1010L
 .endif
 
-CPPFLAGS+=-DWITH_OPENSSL -DENABLE_PKCS11 -D_OPENBSD_SOURCE -DWITH_XMSS
+CPPFLAGS+=-DWITH_OPENSSL -DENABLE_PKCS11 -DWITH_XMSS -DWITH_ZLIB
 .if !defined(NOPIC)
 CPPFLAGS+=-DHAVE_DLOPEN
 .endif



CVS commit: src/crypto/external/bsd/openssh

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  2 15:23:17 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh: Makefile.inc

Log Message:
Enable compression


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/crypto/external/bsd/openssh/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   >