CVS commit: src/tools/gcc
Module Name:src Committed By: mrg Date: Mon Feb 5 06:22:27 UTC 2018 Modified Files: src/tools/gcc: gcc-version.mk Log Message: mark GCC 6.4 has nb1 20180203 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tools/gcc/gcc-version.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gcc/gcc-version.mk diff -u src/tools/gcc/gcc-version.mk:1.8 src/tools/gcc/gcc-version.mk:1.9 --- src/tools/gcc/gcc-version.mk:1.8 Mon Nov 13 08:47:24 2017 +++ src/tools/gcc/gcc-version.mk Mon Feb 5 06:22:27 2018 @@ -1,5 +1,9 @@ -# $NetBSD: gcc-version.mk,v 1.8 2017/11/13 08:47:24 mrg Exp $ +# $NetBSD: gcc-version.mk,v 1.9 2018/02/05 06:22:27 mrg Exp $ # common location for tools and native build +.if ${HAVE_GCC} == 5 NETBSD_GCC_VERSION=nb1 20171112 +.elif ${HAVE_GCC} == 6 +NETBSD_GCC_VERSION=nb1 20180203 +.endif
CVS commit: src/external/gpl3/gcc/usr.bin/gcc/arch
Module Name:src Committed By: mrg Date: Mon Feb 5 06:13:33 UTC 2018 Modified Files: src/external/gpl3/gcc/usr.bin/gcc/arch/sparc: auto-host.h src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64: auto-host.h src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64: auto-host.h configargs.h multilib.h Log Message: more mknative-gcc 6.5 for sparc, sparc64 and amd64. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc/usr.bin/gcc/arch/sparc/auto-host.h cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h cvs rdiff -u -r1.34 -r1.35 \ src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/configargs.h cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/multilib.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/gpl3/gcc/usr.bin/gcc/arch/sparc/auto-host.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/sparc/auto-host.h:1.10 src/external/gpl3/gcc/usr.bin/gcc/arch/sparc/auto-host.h:1.11 --- src/external/gpl3/gcc/usr.bin/gcc/arch/sparc/auto-host.h:1.10 Sun Feb 4 01:17:45 2018 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/sparc/auto-host.h Mon Feb 5 06:13:33 2018 @@ -704,7 +704,7 @@ /* Define if defines clock_t. */ #ifndef USED_FOR_TARGET -/* #undef HAVE_CLOCK_T */ +#define HAVE_CLOCK_T 1 #endif @@ -717,33 +717,33 @@ /* Define to 1 if we found a declaration for 'abort', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ABORT 0 +#define HAVE_DECL_ABORT 1 #endif /* Define to 1 if we found a declaration for 'asprintf', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ASPRINTF 0 +#define HAVE_DECL_ASPRINTF 1 #endif /* Define to 1 if we found a declaration for 'atof', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ATOF 0 +#define HAVE_DECL_ATOF 1 #endif /* Define to 1 if we found a declaration for 'atol', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ATOL 0 +#define HAVE_DECL_ATOL 1 #endif /* Define to 1 if we found a declaration for 'atoll', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ATOLL 0 +#define HAVE_DECL_ATOLL 1 #endif @@ -757,7 +757,7 @@ /* Define to 1 if we found a declaration for 'calloc', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_CALLOC 0 +#define HAVE_DECL_CALLOC 1 #endif @@ -771,14 +771,14 @@ /* Define to 1 if we found a declaration for 'clock', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_CLOCK 0 +#define HAVE_DECL_CLOCK 1 #endif /* Define to 1 if we found a declaration for 'errno', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ERRNO 0 +#define HAVE_DECL_ERRNO 1 #endif @@ -805,7 +805,7 @@ /* Define to 1 if we found a declaration for 'ffs', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_FFS 0 +#define HAVE_DECL_FFS 1 #endif @@ -860,7 +860,7 @@ /* Define to 1 if we found a declaration for 'free', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_FREE 0 +#define HAVE_DECL_FREE 1 #endif @@ -874,63 +874,63 @@ /* Define to 1 if we found a declaration for 'getchar_unlocked', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETCHAR_UNLOCKED 0 +#define HAVE_DECL_GETCHAR_UNLOCKED 1 #endif /* Define to 1 if we found a declaration for 'getcwd', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETCWD 0 +#define HAVE_DECL_GETCWD 1 #endif /* Define to 1 if we found a declaration for 'getc_unlocked', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETC_UNLOCKED 0 +#define HAVE_DECL_GETC_UNLOCKED 1 #endif /* Define to 1 if we found a declaration for 'getenv', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETENV 0 +#define HAVE_DECL_GETENV 1 #endif /* Define to 1 if we found a declaration for 'getopt', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETOPT 0 +#define HAVE_DECL_GETOPT 1 #endif /* Define to 1 if we found a declaration for 'getpagesize', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETPAGESIZE 0 +#define HAVE_DECL_GETPAGESIZE 1 #endif /* Define to 1 if we found a declaration for 'getrlimit', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETRLIMIT 0 +#define HAVE_DECL_GETRLIMIT 1 #endif /* Define to 1 if we found a declaration for 'getrusage', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_GETRUSAGE 0 +#define HAVE_DECL_GETRUSAGE 1 #endif /* Define to 1 if we found a declaration for 'getwd', otherwise
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: mrg Date: Mon Feb 5 05:43:53 UTC 2018 Modified Files: src/distrib/sets/lists/comp: md.amd64 Log Message: it's called avx512bwintrin.h. To generate a diff of this commit: cvs rdiff -u -r1.255 -r1.256 src/distrib/sets/lists/comp/md.amd64 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/comp/md.amd64 diff -u src/distrib/sets/lists/comp/md.amd64:1.255 src/distrib/sets/lists/comp/md.amd64:1.256 --- src/distrib/sets/lists/comp/md.amd64:1.255 Sun Feb 4 11:08:16 2018 +++ src/distrib/sets/lists/comp/md.amd64 Mon Feb 5 05:43:53 2018 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.255 2018/02/04 11:08:16 mrg Exp $ +# $NetBSD: md.amd64,v 1.256 2018/02/05 05:43:53 mrg Exp $ ./usr/include/amd64comp-c-include ./usr/include/amd64/ansi.h comp-c-include @@ -466,7 +466,7 @@ ./usr/include/gcc-6/adxintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/ammintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/avx2intrin.h comp-c-include gcccmds,gcc=6 -./usr/include/gcc-6/avx612bwintrin.h comp-c-include gcccmds,gcc=6 +./usr/include/gcc-6/avx512bwintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/avx512cdintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/avx512dqintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/avx512erintrin.h comp-c-include gcccmds,gcc=6
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: ozaki-r Date: Mon Feb 5 05:00:48 UTC 2018 Modified Files: src/sys/rump/librump/rumpkern: locks.c Log Message: Obtain proper initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc Initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc were not useful because the addresses were mutex_obj_alloc or rw_obj_alloc itself. What we want to know are callers of them. (forgot to commit) To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/rump/librump/rumpkern/locks.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/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.79 src/sys/rump/librump/rumpkern/locks.c:1.80 --- src/sys/rump/librump/rumpkern/locks.c:1.79 Wed Dec 27 09:03:22 2017 +++ src/sys/rump/librump/rumpkern/locks.c Mon Feb 5 05:00:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.79 2017/12/27 09:03:22 ozaki-r Exp $ */ +/* $NetBSD: locks.c,v 1.80 2018/02/05 05:00:48 ozaki-r Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.79 2017/12/27 09:03:22 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.80 2018/02/05 05:00:48 ozaki-r Exp $"); #include #include @@ -66,9 +66,9 @@ static lockops_t rw_lockops = { .lo_dump = NULL, }; -#define ALLOCK(lock, ops)\ +#define ALLOCK(lock, ops, return_address) \ lockdebug_alloc(__func__, __LINE__, lock, ops, \ - (uintptr_t)__builtin_return_address(0)) + return_address) #define FREELOCK(lock) \ lockdebug_free(__func__, __LINE__, lock) #define WANTLOCK(lock, shar)\ @@ -83,7 +83,7 @@ static lockops_t rw_lockops = { #define BARRIER(lock, slp)\ lockdebug_barrier(__func__, __LINE__, lock, slp) #else -#define ALLOCK(a, b) do {} while (0) +#define ALLOCK(a, b, c) do {} while (0) #define FREELOCK(a) do {} while (0) #define WANTLOCK(a, b) do {} while (0) #define LOCKED(a, b) do {} while (0) @@ -105,8 +105,9 @@ static lockops_t rw_lockops = { #define RUMPMTX(mtx) (*(struct rumpuser_mtx *const*)(mtx)) +void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); void -mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl) +_mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl, uintptr_t return_address) { int ruflags = RUMPUSER_MTX_KMUTEX; int isspin; @@ -135,9 +136,16 @@ mutex_init(kmutex_t *mtx, kmutex_type_t ruflags |= RUMPUSER_MTX_SPIN; rumpuser_mutex_init((struct rumpuser_mtx **)mtx, ruflags); if (isspin) - ALLOCK(mtx, _spin_lockops); + ALLOCK(mtx, _spin_lockops, return_address); else - ALLOCK(mtx, _adaptive_lockops); + ALLOCK(mtx, _adaptive_lockops, return_address); +} + +void +mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl) +{ + + _mutex_init(mtx, type, ipl, (uintptr_t)__builtin_return_address(0)); } void @@ -238,14 +246,22 @@ krw2rumprw(const krw_t op) } } +void _rw_init(krwlock_t *, uintptr_t); void -rw_init(krwlock_t *rw) +_rw_init(krwlock_t *rw, uintptr_t return_address) { CTASSERT(sizeof(krwlock_t) >= sizeof(void *)); rumpuser_rw_init((struct rumpuser_rw **)rw); - ALLOCK(rw, _lockops); + ALLOCK(rw, _lockops, return_address); +} + +void +rw_init(krwlock_t *rw) +{ + + _rw_init(rw, (uintptr_t)__builtin_return_address(0)); } void
CVS commit: src/sys/kern
Module Name:src Committed By: ozaki-r Date: Mon Feb 5 04:25:04 UTC 2018 Modified Files: src/sys/kern: kern_mutex.c kern_mutex_obj.c kern_rwlock.c kern_rwlock_obj.c Log Message: Obtain proper initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc Initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc were not useful because the addresses were mutex_obj_alloc or rw_obj_alloc itself. What we want to know are callers of them. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/kern/kern_mutex.c cvs rdiff -u -r1.5 -r1.6 src/sys/kern/kern_mutex_obj.c cvs rdiff -u -r1.49 -r1.50 src/sys/kern/kern_rwlock.c cvs rdiff -u -r1.3 -r1.4 src/sys/kern/kern_rwlock_obj.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/kern/kern_mutex.c diff -u src/sys/kern/kern_mutex.c:1.70 src/sys/kern/kern_mutex.c:1.71 --- src/sys/kern/kern_mutex.c:1.70 Tue Jan 30 07:52:22 2018 +++ src/sys/kern/kern_mutex.c Mon Feb 5 04:25:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_mutex.c,v 1.70 2018/01/30 07:52:22 ozaki-r Exp $ */ +/* $NetBSD: kern_mutex.c,v 1.71 2018/02/05 04:25:04 ozaki-r Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #define __MUTEX_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.70 2018/01/30 07:52:22 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.71 2018/02/05 04:25:04 ozaki-r Exp $"); #include #include @@ -327,8 +327,10 @@ mutex_abort(const char *func, size_t lin * sleeps - see comments in mutex_vector_enter() about releasing * mutexes unlocked. */ +void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); void -mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl) +_mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl, +uintptr_t return_address) { bool dodebug; @@ -354,18 +356,17 @@ mutex_init(kmutex_t *mtx, kmutex_type_t switch (type) { case MUTEX_NODEBUG: - dodebug = LOCKDEBUG_ALLOC(mtx, NULL, - (uintptr_t)__builtin_return_address(0)); + dodebug = LOCKDEBUG_ALLOC(mtx, NULL, return_address); MUTEX_INITIALIZE_SPIN(mtx, dodebug, ipl); break; case MUTEX_ADAPTIVE: dodebug = LOCKDEBUG_ALLOC(mtx, _adaptive_lockops, - (uintptr_t)__builtin_return_address(0)); + return_address); MUTEX_INITIALIZE_ADAPTIVE(mtx, dodebug); break; case MUTEX_SPIN: dodebug = LOCKDEBUG_ALLOC(mtx, _spin_lockops, - (uintptr_t)__builtin_return_address(0)); + return_address); MUTEX_INITIALIZE_SPIN(mtx, dodebug, ipl); break; default: @@ -374,6 +375,13 @@ mutex_init(kmutex_t *mtx, kmutex_type_t } } +void +mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl) +{ + + _mutex_init(mtx, type, ipl, (uintptr_t)__builtin_return_address(0)); +} + /* * mutex_destroy: * Index: src/sys/kern/kern_mutex_obj.c diff -u src/sys/kern/kern_mutex_obj.c:1.5 src/sys/kern/kern_mutex_obj.c:1.6 --- src/sys/kern/kern_mutex_obj.c:1.5 Tue Sep 27 01:02:38 2011 +++ src/sys/kern/kern_mutex_obj.c Mon Feb 5 04:25:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_mutex_obj.c,v 1.5 2011/09/27 01:02:38 jym Exp $ */ +/* $NetBSD: kern_mutex_obj.c,v 1.6 2018/02/05 04:25:04 ozaki-r Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_mutex_obj.c,v 1.5 2011/09/27 01:02:38 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_mutex_obj.c,v 1.6 2018/02/05 04:25:04 ozaki-r Exp $"); #include #include @@ -87,9 +87,11 @@ kmutex_t * mutex_obj_alloc(kmutex_type_t type, int ipl) { struct kmutexobj *mo; + extern void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); mo = pool_cache_get(mutex_obj_cache, PR_WAITOK); - mutex_init(>mo_lock, type, ipl); + _mutex_init(>mo_lock, type, ipl, + (uintptr_t)__builtin_return_address(0)); mo->mo_refcnt = 1; return (kmutex_t *)mo; Index: src/sys/kern/kern_rwlock.c diff -u src/sys/kern/kern_rwlock.c:1.49 src/sys/kern/kern_rwlock.c:1.50 --- src/sys/kern/kern_rwlock.c:1.49 Tue Jan 30 07:52:22 2018 +++ src/sys/kern/kern_rwlock.c Mon Feb 5 04:25:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rwlock.c,v 1.49 2018/01/30 07:52:22 ozaki-r Exp $ */ +/* $NetBSD: kern_rwlock.c,v 1.50 2018/02/05 04:25:04 ozaki-r Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.49 2018/01/30 07:52:22 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.50 2018/02/05 04:25:04 ozaki-r Exp $"); #define __RWLOCK_PRIVATE @@ -197,18 +197,25 @@ rw_abort(const char *func, size_t line, * * Initialize a rwlock for use. */ +void _rw_init(krwlock_t *, uintptr_t); void -rw_init(krwlock_t *rw) +_rw_init(krwlock_t *rw, uintptr_t return_address) { bool dodebug; memset(rw, 0, sizeof(*rw));
CVS commit: src/sys/kern
Module Name:src Committed By: ozaki-r Date: Mon Feb 5 02:51:41 UTC 2018 Modified Files: src/sys/kern: subr_xcall.c Log Message: Sort XC_IPL_* in order of priority (NFC) To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/kern/subr_xcall.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/kern/subr_xcall.c diff -u src/sys/kern/subr_xcall.c:1.24 src/sys/kern/subr_xcall.c:1.25 --- src/sys/kern/subr_xcall.c:1.24 Mon Feb 5 02:51:08 2018 +++ src/sys/kern/subr_xcall.c Mon Feb 5 02:51:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_xcall.c,v 1.24 2018/02/05 02:51:08 ozaki-r Exp $ */ +/* $NetBSD: subr_xcall.c,v 1.25 2018/02/05 02:51:41 ozaki-r Exp $ */ /*- * Copyright (c) 2007-2010 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.24 2018/02/05 02:51:08 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.25 2018/02/05 02:51:41 ozaki-r Exp $"); #include #include @@ -129,10 +129,10 @@ static inline uint64_t xc_lowpri(xcfunc_ * (just XC_HIGHPRI). */ #define XC_IPL_SOFTSERIAL 0 -#define XC_IPL_SOFTBIO 1 -#define XC_IPL_SOFTCLOCK 2 -#define XC_IPL_SOFTNET 3 -#define XC_IPL_MAX XC_IPL_SOFTNET +#define XC_IPL_SOFTNET 1 +#define XC_IPL_SOFTBIO 2 +#define XC_IPL_SOFTCLOCK 3 +#define XC_IPL_MAX XC_IPL_SOFTCLOCK CTASSERT(XC_IPL_MAX <= __arraycount(xc_sihs));
CVS commit: src/sys/kern
Module Name:src Committed By: ozaki-r Date: Mon Feb 5 02:51:08 UTC 2018 Modified Files: src/sys/kern: subr_xcall.c Log Message: Avoid allocating unused softints that share a value of IPL between another To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/kern/subr_xcall.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/kern/subr_xcall.c diff -u src/sys/kern/subr_xcall.c:1.23 src/sys/kern/subr_xcall.c:1.24 --- src/sys/kern/subr_xcall.c:1.23 Mon Feb 5 02:49:46 2018 +++ src/sys/kern/subr_xcall.c Mon Feb 5 02:51:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_xcall.c,v 1.23 2018/02/05 02:49:46 ozaki-r Exp $ */ +/* $NetBSD: subr_xcall.c,v 1.24 2018/02/05 02:51:08 ozaki-r Exp $ */ /*- * Copyright (c) 2007-2010 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.23 2018/02/05 02:49:46 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.24 2018/02/05 02:51:08 ozaki-r Exp $"); #include #include @@ -154,6 +154,7 @@ xc_init(void) mutex_init(>xc_lock, MUTEX_DEFAULT, IPL_SOFTSERIAL); cv_init(>xc_busy, "xchicv"); + /* Set up a softint for each IPL_SOFT*. */ #define SETUP_SOFTINT(xipl, sipl) do { \ xc_sihs[(xipl)] = softint_establish( (sipl) | SOFTINT_MPSAFE,\ xc__highpri_intr, NULL);\ @@ -161,9 +162,20 @@ xc_init(void) } while (0) SETUP_SOFTINT(XC_IPL_SOFTSERIAL, SOFTINT_SERIAL); + /* + * If a IPL_SOFTXXX have the same value of the previous, we don't use + * the IPL (see xc_encode_ipl). So we don't need to allocate a softint + * for it. + */ +#if IPL_SOFTNET != IPL_SOFTSERIAL + SETUP_SOFTINT(XC_IPL_SOFTNET, SOFTINT_NET); +#endif +#if IPL_SOFTBIO != IPL_SOFTNET SETUP_SOFTINT(XC_IPL_SOFTBIO, SOFTINT_BIO); +#endif +#if IPL_SOFTCLOCK != IPL_SOFTBIO SETUP_SOFTINT(XC_IPL_SOFTCLOCK, SOFTINT_CLOCK); - SETUP_SOFTINT(XC_IPL_SOFTNET, SOFTINT_NET); +#endif #undef SETUP_SOFTINT @@ -399,6 +411,7 @@ xc_ipi_handler(void) xc_state_t *xc = & xc_high_pri; KASSERT(xc->xc_ipl < __arraycount(xc_sihs)); + KASSERT(xc_sihs[xc->xc_ipl] != NULL); /* Executes xc__highpri_intr() via software interrupt. */ softint_schedule(xc_sihs[xc->xc_ipl]);
CVS commit: src/sys/kern
Module Name:src Committed By: ozaki-r Date: Mon Feb 5 02:49:47 UTC 2018 Modified Files: src/sys/kern: subr_xcall.c Log Message: Fix build of kernels that some (or all) IPL_SOFT* share a value (e.g., mips) To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/kern/subr_xcall.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/kern/subr_xcall.c diff -u src/sys/kern/subr_xcall.c:1.22 src/sys/kern/subr_xcall.c:1.23 --- src/sys/kern/subr_xcall.c:1.22 Sat Feb 3 11:30:01 2018 +++ src/sys/kern/subr_xcall.c Mon Feb 5 02:49:46 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_xcall.c,v 1.22 2018/02/03 11:30:01 martin Exp $ */ +/* $NetBSD: subr_xcall.c,v 1.23 2018/02/05 02:49:46 ozaki-r Exp $ */ /*- * Copyright (c) 2007-2010 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.22 2018/02/03 11:30:01 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.23 2018/02/05 02:49:46 ozaki-r Exp $"); #include #include @@ -184,16 +184,19 @@ xc_encode_ipl(int ipl) switch (ipl) { case IPL_SOFTSERIAL: return __SHIFTIN(XC_IPL_SOFTSERIAL, XC_IPL_MASK); + /* IPL_SOFT* can be the same value (e.g., on sparc or mips). */ +#if IPL_SOFTNET != IPL_SOFTSERIAL + case IPL_SOFTNET: + return __SHIFTIN(XC_IPL_SOFTNET, XC_IPL_MASK); +#endif +#if IPL_SOFTBIO != IPL_SOFTNET case IPL_SOFTBIO: return __SHIFTIN(XC_IPL_SOFTBIO, XC_IPL_MASK); +#endif #if IPL_SOFTCLOCK != IPL_SOFTBIO case IPL_SOFTCLOCK: return __SHIFTIN(XC_IPL_SOFTCLOCK, XC_IPL_MASK); #endif -#if IPL_SOFTNET != IPL_SOFTBIO - case IPL_SOFTNET: - return __SHIFTIN(XC_IPL_SOFTNET, XC_IPL_MASK); -#endif } panic("Invalid IPL: %d", ipl);
CVS commit: src/lib/libradius
Module Name:src Committed By: christos Date: Mon Feb 5 00:43:07 UTC 2018 Modified Files: src/lib/libradius: radlib.c Log Message: Adjust to openssl 1.1 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libradius/radlib.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/libradius/radlib.c diff -u src/lib/libradius/radlib.c:1.11 src/lib/libradius/radlib.c:1.12 --- src/lib/libradius/radlib.c:1.11 Mon Jan 19 04:43:11 2009 +++ src/lib/libradius/radlib.c Sun Feb 4 19:43:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: radlib.c,v 1.11 2009/01/19 09:43:11 jmmv Exp $ */ +/* $NetBSD: radlib.c,v 1.12 2018/02/05 00:43:06 christos Exp $ */ /*- * Copyright 1998 Juniper Networks, Inc. @@ -30,7 +30,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libradius/radlib.c,v 1.12 2004/06/14 20:55:30 stefanf Exp $"); #else -__RCSID("$NetBSD: radlib.c,v 1.11 2009/01/19 09:43:11 jmmv Exp $"); +__RCSID("$NetBSD: radlib.c,v 1.12 2018/02/05 00:43:06 christos Exp $"); #endif #include @@ -177,20 +177,19 @@ insert_message_authenticator(struct rad_ u_char md[EVP_MAX_MD_SIZE]; u_int md_len; const struct rad_server *srvp; - HMAC_CTX ctx; + HMAC_CTX *ctx; srvp = >servers[srv]; if (h->authentic_pos != 0) { - HMAC_CTX_init(); - HMAC_Init(, srvp->secret, - (int)strlen(srvp->secret), EVP_md5()); - HMAC_Update(, >request[POS_CODE], (size_t)(POS_AUTH - POS_CODE)); - HMAC_Update(, >request[POS_AUTH], (size_t)LEN_AUTH); - HMAC_Update(, >request[POS_ATTRS], + ctx = HMAC_CTX_new(); + HMAC_Init_ex(ctx, srvp->secret, + (int)strlen(srvp->secret), EVP_md5(), NULL); + HMAC_Update(ctx, >request[POS_CODE], (size_t)(POS_AUTH - POS_CODE)); + HMAC_Update(ctx, >request[POS_AUTH], (size_t)LEN_AUTH); + HMAC_Update(ctx, >request[POS_ATTRS], (size_t)(h->req_len - POS_ATTRS)); - HMAC_Final(, md, _len); - HMAC_CTX_cleanup(); - HMAC_cleanup(); + HMAC_Final(ctx, md, _len); + HMAC_CTX_free(ctx); (void)memcpy(>request[h->authentic_pos + 2], md, (size_t)md_len); } @@ -210,7 +209,7 @@ is_valid_response(struct rad_handle *h, const struct rad_server *srvp; size_t len; #ifdef WITH_SSL - HMAC_CTX hctx; + HMAC_CTX *hctx; u_char resp[MSGSIZE], md[EVP_MAX_MD_SIZE]; size_t pos; u_int md_len; @@ -263,18 +262,17 @@ is_valid_response(struct rad_handle *h, (void)memset([pos + 2], 0, (size_t)MD5_DIGEST_LENGTH); -HMAC_CTX_init(); -HMAC_Init(, srvp->secret, -(int)strlen(srvp->secret), EVP_md5()); -HMAC_Update(, >response[POS_CODE], +hctx = HMAC_CTX_new(); +HMAC_Init_ex(hctx, srvp->secret, +(int)strlen(srvp->secret), EVP_md5(), NULL); +HMAC_Update(hctx, >response[POS_CODE], (size_t)(POS_AUTH - POS_CODE)); -HMAC_Update(, >request[POS_AUTH], +HMAC_Update(hctx, >request[POS_AUTH], (size_t)LEN_AUTH); -HMAC_Update(, [POS_ATTRS], +HMAC_Update(hctx, [POS_ATTRS], (size_t)(h->resp_len - POS_ATTRS)); -HMAC_Final(, md, _len); -HMAC_CTX_cleanup(); -HMAC_cleanup(); +HMAC_Final(hctx, md, _len); +HMAC_CTX_free(hctx); if (memcmp(md, >response[pos + 2], (size_t)MD5_DIGEST_LENGTH) != 0) return 0;
CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/hmac
Module Name:src Committed By: christos Date: Mon Feb 5 00:42:47 UTC 2018 Modified Files: src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h Log Message: provide compatibility for libradius To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h 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/openssl.old/dist/crypto/hmac/hmac.h diff -u src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.2 --- src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.1.1.1 Sat Feb 3 17:43:45 2018 +++ src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h Sun Feb 4 19:42:46 2018 @@ -102,6 +102,24 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_C void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); +static inline HMAC_CTX *HMAC_CTX_new(void) +{ + HMAC_CTX *ctx = malloc(sizeof(*ctx)); + if (ctx == NULL) + return NULL; + HMAC_CTX_init(ctx); + return ctx; +} + +static inline void HMAC_CTX_free(HMAC_CTX *ctx) +{ + if (ctx == NULL) + return; + HMAC_CTX_cleanup(ctx); + free(ctx); +} + + #ifdef __cplusplus } #endif
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Mon Feb 5 00:13:50 UTC 2018 Modified Files: src/crypto/external/bsd/openssh/dist: auth-pam.c cipher.c cipher.h dh.c dh.h digest-openssl.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c monitor.c ssh-dss.c ssh-ecdsa.c ssh-keygen.c ssh-pkcs11-client.c ssh-pkcs11.c ssh-rsa.c sshkey.c Log Message: patch for OpenSSL-1.1 To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/crypto/external/bsd/openssh/dist/auth-pam.c \ src/crypto/external/bsd/openssh/dist/dh.c cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssh/dist/cipher.c \ src/crypto/external/bsd/openssh/dist/cipher.h \ src/crypto/external/bsd/openssh/dist/ssh-dss.c \ src/crypto/external/bsd/openssh/dist/sshkey.c cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssh/dist/dh.h cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/openssh/dist/digest-openssl.c cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssh/dist/kexdhc.c \ src/crypto/external/bsd/openssh/dist/kexgexc.c \ src/crypto/external/bsd/openssh/dist/ssh-ecdsa.c \ src/crypto/external/bsd/openssh/dist/ssh-pkcs11-client.c cvs rdiff -u -r1.13 -r1.14 src/crypto/external/bsd/openssh/dist/kexdhs.c \ src/crypto/external/bsd/openssh/dist/ssh-pkcs11.c \ src/crypto/external/bsd/openssh/dist/ssh-rsa.c cvs rdiff -u -r1.14 -r1.15 src/crypto/external/bsd/openssh/dist/kexgexs.c cvs rdiff -u -r1.23 -r1.24 src/crypto/external/bsd/openssh/dist/monitor.c cvs rdiff -u -r1.28 -r1.29 src/crypto/external/bsd/openssh/dist/ssh-keygen.c 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/dist/auth-pam.c diff -u src/crypto/external/bsd/openssh/dist/auth-pam.c:1.12 src/crypto/external/bsd/openssh/dist/auth-pam.c:1.13 --- src/crypto/external/bsd/openssh/dist/auth-pam.c:1.12 Sat Oct 7 15:39:19 2017 +++ src/crypto/external/bsd/openssh/dist/auth-pam.c Sun Feb 4 19:13:50 2018 @@ -50,7 +50,7 @@ /* * NetBSD local changes */ -__RCSID("$NetBSD: auth-pam.c,v 1.12 2017/10/07 19:39:19 christos Exp $"); +__RCSID("$NetBSD: auth-pam.c,v 1.13 2018/02/05 00:13:50 christos Exp $"); #undef USE_POSIX_THREADS /* Not yet */ #define HAVE_SECURITY_PAM_APPL_H #define HAVE_PAM_GETENVLIST @@ -142,6 +142,11 @@ extern u_int utmp_len; typedef pthread_t sp_pthread_t; #else typedef pid_t sp_pthread_t; +# undef pthread_exit +# define pthread_create(a, b, c, d)_ssh_compat_pthread_create(a, b, c, d) +# define pthread_exit(a) _ssh_compat_pthread_exit(a) +# define pthread_cancel(a) _ssh_compat_pthread_cancel(a) +# define pthread_join(a, b)_ssh_compat_pthread_join(a, b) #endif struct pam_ctxt { Index: src/crypto/external/bsd/openssh/dist/dh.c diff -u src/crypto/external/bsd/openssh/dist/dh.c:1.12 src/crypto/external/bsd/openssh/dist/dh.c:1.13 --- src/crypto/external/bsd/openssh/dist/dh.c:1.12 Tue Apr 18 14:41:46 2017 +++ src/crypto/external/bsd/openssh/dist/dh.c Sun Feb 4 19:13:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dh.c,v 1.12 2017/04/18 18:41:46 christos Exp $ */ +/* $NetBSD: dh.c,v 1.13 2018/02/05 00:13:50 christos Exp $ */ /* $OpenBSD: dh.c,v 1.62 2016/12/15 21:20:41 dtucker Exp $ */ /* @@ -26,7 +26,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: dh.c,v 1.12 2017/04/18 18:41:46 christos Exp $"); +__RCSID("$NetBSD: dh.c,v 1.13 2018/02/05 00:13:50 christos Exp $"); #include /* MIN */ #include @@ -216,14 +216,15 @@ choose_dh(int min, int wantbits, int max /* diffie-hellman-groupN-sha1 */ int -dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) +dh_pub_is_valid(const DH *dh, const BIGNUM *dh_pub) { int i; int n = BN_num_bits(dh_pub); int bits_set = 0; BIGNUM *tmp; + const BIGNUM *p; - if (dh_pub->neg) { + if (BN_is_negative(dh_pub)) { logit("invalid public DH value: negative"); return 0; } @@ -236,7 +237,8 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) error("%s: BN_new failed", __func__); return 0; } - if (!BN_sub(tmp, dh->p, BN_value_one()) || + DH_get0_pqg(dh, , NULL, NULL); + if (!BN_sub(tmp, p, BN_value_one()) || BN_cmp(dh_pub, tmp) != -1) { /* pub_exp > p-2 */ BN_clear_free(tmp); logit("invalid public DH value: >= p-1"); @@ -247,14 +249,14 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) for (i = 0; i <= n; i++) if (BN_is_bit_set(dh_pub, i)) bits_set++; - debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p)); + debug2("bits set: %d/%d", bits_set, BN_num_bits(p)); /* * if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */ if (bits_set < 4) { logit("invalid public DH value (%d/%d)", - bits_set, BN_num_bits(dh->p)); + bits_set, BN_num_bits(p)); return 0; } return 1; @@ -264,9 +266,12 @@ int dh_gen_key(DH *dh, int need) { int pbits; + const BIGNUM *p, *pub_key, *priv_key; - if (need < 0 || dh->p == NULL || - (pbits =
CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto
Module Name:src Committed By: christos Date: Mon Feb 5 00:11:33 UTC 2018 Modified Files: src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h src/crypto/external/bsd/openssl.old/dist/crypto/dsa: dsa.h src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa: ecdsa.h src/crypto/external/bsd/openssl.old/dist/crypto/evp: evp.h src/crypto/external/bsd/openssl.old/dist/crypto/rsa: rsa.h Log Message: add enough of the 1.1 API to compile openssh To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h 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/openssl.old/dist/crypto/dh/dh.h diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.2 --- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.1.1.1 Sat Feb 3 17:43:43 2018 +++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h Sun Feb 4 19:11:33 2018 @@ -387,6 +387,45 @@ void ERR_load_DH_strings(void); # define DH_R_PEER_KEY_ERROR 113 # define DH_R_SHARED_INFO_ERROR 114 +static inline void +DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) +{ + if (pub_key) + *pub_key = dh->pub_key; + if (priv_key) + *priv_key = dh->priv_key; +} + +static inline void +DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, +const BIGNUM **g) +{ + if (p) + *p = dh->p; + if (q) + *q = dh->q; + if (g) + *g = dh->g; +} + +static inline int +DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + if (p) + dh->p = p; + if (q) + dh->q = q; + if (g) + dh->g = g; + return 1; +} + +static inline void +DH_set_length(DH *dh, long length) +{ + dh->length = length; +} + #ifdef __cplusplus } #endif Index: src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.2 --- src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.1.1.1 Sat Feb 3 17:43:43 2018 +++ src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h Sun Feb 4 19:11:33 2018 @@ -326,6 +326,82 @@ void ERR_load_DSA_strings(void); # define DSA_R_PARAMETER_ENCODING_ERROR 105 # define DSA_R_Q_NOT_PRIME113 +static inline void +DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **r, const BIGNUM **s) +{ + if (r) + *r = sig->r; + if (s) + *s = sig->s; +} + +static inline int +DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) +{ + if (r) { + BN_free(r); + sig->r = r; + } + if (s) { + BN_free(s); + sig->s = s; + } + return 1; +} + +static inline void DSA_get0_pqg(const DSA *d, const BIGNUM **p, +const BIGNUM **q, const BIGNUM **g) +{ + if (p) + *p = d->p; + if (q) + *q = d->q; + if (g) + *g = d->g; +} + + +static inline int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + if (p) { + BN_free(d->p); + d->p = p; + } + if (q) { + BN_free(d->q); + d->q = q; + } + if (g) { + BN_free(d->g); + d->g = g; + } + return 1; +} + +static inline void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, + const BIGNUM **priv_key) +{ + if (pub_key) + *pub_key = d->pub_key; + if (priv_key) + *priv_key = d->priv_key; +} + +static inline int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) +{ + if (pub_key) { + BN_free(d->pub_key); + d->pub_key = pub_key; + } + if (priv_key) { + BN_free(d->priv_key); + d->priv_key = priv_key; + } + + return 1; +} + + #ifdef __cplusplus } #endif Index: src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h diff -u src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.2 --- src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.1.1.1 Sat Feb 3 17:43:44 2018 +++ src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h Sun Feb 4 19:11:33 2018 @@ -329,6 +329,28 @@ void ERR_load_ECDSA_strings(void); # define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104 # define ECDSA_R_SIGNATURE_MALLOC_FAILED 105 +static inline void +ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **r, const BIGNUM **s) +{ + if (r) + *r = sig->r; + if (s) + *s = sig->s; +} + +static inline int +ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) +{ + if (r) { +
CVS commit: src/common/lib/libc/arch/aarch64/string
Module Name:src Committed By: skrll Date: Sun Feb 4 21:52:17 UTC 2018 Modified Files: src/common/lib/libc/arch/aarch64/string: memcmp.S memcpy.S Added Files: src/common/lib/libc/arch/aarch64/string: bcopy.S memmove.S Log Message: Working / new versions from Ryo Shimizu To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/aarch64/string/bcopy.S \ src/common/lib/libc/arch/aarch64/string/memmove.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/aarch64/string/memcmp.S \ src/common/lib/libc/arch/aarch64/string/memcpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/aarch64/string/memcmp.S diff -u src/common/lib/libc/arch/aarch64/string/memcmp.S:1.1 src/common/lib/libc/arch/aarch64/string/memcmp.S:1.2 --- src/common/lib/libc/arch/aarch64/string/memcmp.S:1.1 Sun Aug 10 05:47:35 2014 +++ src/common/lib/libc/arch/aarch64/string/memcmp.S Sun Feb 4 21:52:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: memcmp.S,v 1.1 2014/08/10 05:47:35 matt Exp $ */ +/* $NetBSD: memcmp.S,v 1.2 2018/02/04 21:52:16 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -RCSID("$NetBSD: memcmp.S,v 1.1 2014/08/10 05:47:35 matt Exp $") +RCSID("$NetBSD: memcmp.S,v 1.2 2018/02/04 21:52:16 skrll Exp $") ENTRY(memcmp) mov x9, x0 @@ -42,14 +42,14 @@ ENTRY(memcmp) cmp x2, #6 b.eq .Lmemcmp_6bytes #endif - cmp x2, #7 + cmp x2, #8 b.ls .Lmemcmp_lessthan8 ands x3, x9, #7 b.eq .Lmemcmp_dword_loop /* - * The two addresses have identical alignment but are not yet dword aligned. + * The src1 address is not dword aligned. */ add x2, x2, x3 /* add unalignment to length */ sub x2, x2, #8 /* now subtract a dword */ @@ -68,14 +68,7 @@ ENTRY(memcmp) lsr x6, x6, x3 /* discard leading bytes from data2 */ #endif subs x0, x4, x6 /* compare data */ -#ifdef __AARCH64EL__ b.ne .Lmemcmp_last_compare /* difference. find it */ -#else - b.eq .Lmemcmp_dword_loop /* no difference. go to loop */ - rev x4, x4 /* byte swap data1 */ - rev x6, x6 /* byte swap data2 */ - b .Lmemcmp_last_compare /* go find the difference. */ -#endif .Lmemcmp_dword_loop: subs x2, x2, #8 @@ -84,10 +77,6 @@ ENTRY(memcmp) ldr x6, [x10], #8 subs x0, x4, x6 b.eq .Lmemcmp_dword_loop /* no difference. go to loop */ -#ifdef __AARCH64EB__ - rev x4, x4 /* byte swap data1 */ - rev x6, x6 /* byte swap data2 */ -#endif b .Lmemcmp_last_compare /* go find the difference. */ .Lmemcmp_finish_dword: @@ -96,6 +85,8 @@ ENTRY(memcmp) */ tst x2, #7 b.eq .Lmemcmp_ret + mov x4, xzr + mov x6, xzr /* * */ @@ -120,16 +111,18 @@ ENTRY(memcmp) #endif .Lmemcmp_finish_hword: -#ifdef __AARCH64EB__ - rev x4, x4 /* byte swap data1 */ - rev x6, x6 /* byte swap data1 */ -#endif - tbz x2, #0, .Lmemcmp_last_compare + tbz x2, #0, .Lmemcmp_last_compare0 + ldrb w5, [x9] ldrb w7, [x10] +#ifdef __AARCH64EB__ + orr x4, x4, x5, lsl #8 + orr x6, x6, x7, lsl #8 +#else orr x4, x4, x5, lsl #48 orr x6, x6, x7, lsl #48 - b .Lmemcmp_last_compare /* go find the difference. */ +#endif + b .Lmemcmp_last_compare0 /* go find the difference. */ /* * D @@ -167,7 +160,7 @@ ENTRY(memcmp) #endif /* _KERNEL */ /* - * We have loaded the final bytes in x4 and x6 in LE format. Now we have + * We have loaded the final bytes in x4 and x6 in host-endian. Now we have * to figure what the difference is (if any). First we subtract. Any bytes * that are the same will be 0. So to find the first non-zero byte we byterev * and then use clz to find that byte. @@ -175,13 +168,25 @@ ENTRY(memcmp) * data dwords left to remove the equal part. Then we shift right to discard * the trailing bytes. Then we subtract and return. */ +.Lmemcmp_last_compare0: subs x0, x4, x6 b.eq .Lmemcmp_ret .Lmemcmp_last_compare: - rev x1, x0 /* byte reverse */ +#if __AARCH64EB__ + clz x1, x0 /* find first non-zero byte */ + rev x0, x0 +#else + rev x1, x0 clz x1, x1 /* find first non-zero byte */ - bfi x1, xzr, #0, #3 /* make it byte aligned */ - lsr x0, x0, x1 /* shift to LSB */ - sxtb w0, w0 /* sign extend */ +#endif + bfi x1, xzr, #0, #3 /* make it byte aligned */ + lsr x1, x0, x1 /* shift to LSB */ +#if __AARCH64EL__ + rev x4, x4 /* byte reverse */ + rev x6, x6 /* byte reverse */ +#endif + subs x0, x4, x6 + csetm x0, cc /* set mask bits as sign */ + bfm x0, x1, #0, #7 /* extend with sign bit */ ret END(memcmp) Index: src/common/lib/libc/arch/aarch64/string/memcpy.S diff -u src/common/lib/libc/arch/aarch64/string/memcpy.S:1.1 src/common/lib/libc/arch/aarch64/string/memcpy.S:1.2 --- src/common/lib/libc/arch/aarch64/string/memcpy.S:1.1 Sun Aug 10 05:47:35 2014 +++ src/common/lib/libc/arch/aarch64/string/memcpy.S Sun Feb 4 21:52:16 2018 @@ -1,126 +1,4 @@ -/* $NetBSD: memcpy.S,v 1.1 2014/08/10 05:47:35 matt Exp $ */ +/* $NetBSD:
CVS commit: src/libexec/ld.elf_so/arch/aarch64
Module Name:src Committed By: skrll Date: Sun Feb 4 21:49:51 UTC 2018 Modified Files: src/libexec/ld.elf_so/arch/aarch64: mdreloc.c rtld_start.S Log Message: Various fixes / changes from Ryo Shimizu / Toru Nishimura to make this work. _rtld_call_ifunc copied from other rela platforms by me - not tested in any way. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/arch/aarch64/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/aarch64/mdreloc.c diff -u src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.6 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.7 --- src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.6 Mon Aug 28 06:59:25 2017 +++ src/libexec/ld.elf_so/arch/aarch64/mdreloc.c Sun Feb 4 21:49:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.6 2017/08/28 06:59:25 nisimura Exp $ */ +/* $NetBSD: mdreloc.c,v 1.7 2018/02/04 21:49:51 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.6 2017/08/28 06:59:25 nisimura Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.7 2018/02/04 21:49:51 skrll Exp $"); #endif /* not lint */ #include @@ -43,6 +43,7 @@ __RCSID("$NetBSD: mdreloc.c,v 1.6 2017/0 void _rtld_bind_start(void); void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); Elf_Addr _rtld_bind(const Obj_Entry *, Elf_Word); +void *_rtld_tlsdesc(void *); /* * AARCH64 PLT looks like this; @@ -81,23 +82,23 @@ _rtld_setup_pltgot(const Obj_Entry *obj) void _rtld_relocate_nonplt_self(Elf_Dyn *dynp, Elf_Addr relocbase) { - const Elf_Rel *rel = 0, *rellim; - Elf_Addr relsz = 0; + const Elf_Rela *rela = 0, *relalim; + Elf_Addr relasz = 0; Elf_Addr *where; for (; dynp->d_tag != DT_NULL; dynp++) { switch (dynp->d_tag) { - case DT_REL: - rel = (const Elf_Rel *)(relocbase + dynp->d_un.d_ptr); + case DT_RELA: + rela = (const Elf_Rela *)(relocbase + dynp->d_un.d_ptr); break; - case DT_RELSZ: - relsz = dynp->d_un.d_val; + case DT_RELASZ: + relasz = dynp->d_un.d_val; break; } } - rellim = (const Elf_Rel *)((const uint8_t *)rel + relsz); - for (; rel < rellim; rel++) { - where = (Elf_Addr *)(relocbase + rel->r_offset); + relalim = (const Elf_Rela *)((const uint8_t *)rela + relasz); + for (; rela < relalim; rela++) { + where = (Elf_Addr *)(relocbase + rela->r_offset); *where += (Elf_Addr)relocbase; } } @@ -117,8 +118,8 @@ _rtld_relocate_nonplt_objects(Obj_Entry where = (Elf_Addr *)(obj->relocbase + rela->r_offset); switch (ELF_R_TYPE(rela->r_info)) { - case R_TYPE(ABS64): /* word B + S + A */ - case R_TYPE(GLOB_DAT): /* word B + S */ + case R_TYPE(ABS64): /* word S + A */ + case R_TYPE(GLOB_DAT): /* word S + A */ case R_TLS_TYPE(TLS_DTPREL): case R_TLS_TYPE(TLS_DTPMOD): case R_TLS_TYPE(TLS_TPREL): @@ -139,8 +140,8 @@ _rtld_relocate_nonplt_objects(Obj_Entry case R_TYPE(NONE): break; - case R_TYPE(ABS64): /* word B + S + A */ - case R_TYPE(GLOB_DAT): /* word B + S */ + case R_TYPE(ABS64): /* word S + A */ + case R_TYPE(GLOB_DAT): /* word S + A */ tmp = (Elf_Addr)defobj->relocbase + def->st_value + rela->r_addend; if (*where != tmp) @@ -225,28 +226,61 @@ _rtld_relocate_plt_lazy(Obj_Entry *obj) if (!obj->relocbase) return 0; - for (const Elf_Rel *rel = obj->pltrel; rel < obj->pltrellim; rel++) { - Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rel->r_offset); + for (const Elf_Rela *rela = obj->pltrela; rela < obj->pltrelalim; rela++) { + Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset); - assert(ELF_R_TYPE(rel->r_info) == R_TYPE(JUMP_SLOT)); + assert((ELF_R_TYPE(rela->r_info) == R_TYPE(JUMP_SLOT)) || + (ELF_R_TYPE(rela->r_info) == R_TYPE(TLSDESC))); - /* Just relocate the GOT slots pointing into the PLT */ - *where += (Elf_Addr)obj->relocbase; - rdbg(("fixup !main in %s --> %p", obj->path, (void *)*where)); + switch (ELF_R_TYPE(rela->r_info)) { + case R_TYPE(JUMP_SLOT): + /* Just relocate the GOT slots pointing into the PLT */ + *where += (Elf_Addr)obj->relocbase; + rdbg(("fixup !main in %s --> %p", obj->path, (void *)*where)); + break; + case R_TYPE(TLSDESC): + assert(ELF_R_SYM(rela->r_info) == 0); /* XXX */ + if (ELF_R_SYM(rela->r_info) == 0) { +where[0] = (Elf_Addr)_rtld_tlsdesc; +where[1] = obj->tlsoffset + rela->r_addend + sizeof(struct tls_tcb); + } + break; + } } return 0; } +void +_rtld_call_ifunc(Obj_Entry *obj, sigset_t *mask, u_int cur_objgen) +{ + const Elf_Rela *rela; + Elf_Addr *where, target; + + while (obj->ifunc_remaining > 0 && _rtld_objgen == cur_objgen) { + rela = obj->pltrelalim - obj->ifunc_remaining; + --obj->ifunc_remaining; + if (ELF_R_TYPE(rela->r_info) == R_TYPE(IRELATIVE)) { + where
CVS commit: src/external/apache2/mDNSResponder/dist/mDNSShared
Module Name:src Committed By: christos Date: Sun Feb 4 20:38:41 UTC 2018 Modified Files: src/external/apache2/mDNSResponder/dist/mDNSShared: dnssd_clientstub.c uds_daemon.c Log Message: optval is int not long To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c \ src/external/apache2/mDNSResponder/dist/mDNSShared/uds_daemon.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/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.10 src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.11 --- src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.10 Sun Jan 14 15:04:56 2018 +++ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c Sun Feb 4 15:38:41 2018 @@ -552,7 +552,7 @@ static DNSServiceErrorType ConnectToServ else { #ifdef SO_NOSIGPIPE -const unsigned long optval = 1; +const unsigned int optval = 1; #endif #ifndef USE_TCP_LOOPBACK char* uds_serverpath = getenv(MDNS_UDS_SERVERPATH_ENVVAR); Index: src/external/apache2/mDNSResponder/dist/mDNSShared/uds_daemon.c diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/uds_daemon.c:1.10 src/external/apache2/mDNSResponder/dist/mDNSShared/uds_daemon.c:1.11 --- src/external/apache2/mDNSResponder/dist/mDNSShared/uds_daemon.c:1.10 Sun Jan 14 15:04:56 2018 +++ src/external/apache2/mDNSResponder/dist/mDNSShared/uds_daemon.c Sun Feb 4 15:38:41 2018 @@ -4978,7 +4978,7 @@ mDNSlocal void connect_callback(int fd, dnssd_socklen_t len = (dnssd_socklen_t) sizeof(cliaddr); dnssd_sock_t sd = accept(fd, (struct sockaddr*) , ); #if defined(SO_NOSIGPIPE) || defined(_WIN32) -unsigned long optval = 1; +unsigned int optval = 1; #endif (void)filter; // Unused
CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64
Module Name:src Committed By: mrg Date: Sun Feb 4 20:22:42 UTC 2018 Modified Files: src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64: c++config.h Log Message: regen mknative-gcc 6.4 and amd64. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.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/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h diff -u src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h:1.26 src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h:1.27 --- src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h:1.26 Sun Feb 4 01:17:45 2018 +++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h Sun Feb 4 20:22:42 2018 @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-gcc,v 1.90 2017/10/04 21:42:20 christos Exp */ +/* Generated from: NetBSD: mknative-gcc,v 1.91 2018/02/03 19:06:25 mrg Exp */ /* Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp */ // Predefined symbols and macros -*- C++ -*- @@ -610,31 +610,31 @@ namespace std /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `acosf' function. */ -#define _GLIBCXX_HAVE_ACOSF 1 +/* #undef _GLIBCXX_HAVE_ACOSF */ /* Define to 1 if you have the `acosl' function. */ -#define _GLIBCXX_HAVE_ACOSL 1 +/* #undef _GLIBCXX_HAVE_ACOSL */ /* Define to 1 if you have the `asinf' function. */ -#define _GLIBCXX_HAVE_ASINF 1 +/* #undef _GLIBCXX_HAVE_ASINF */ /* Define to 1 if you have the `asinl' function. */ -#define _GLIBCXX_HAVE_ASINL 1 +/* #undef _GLIBCXX_HAVE_ASINL */ /* Define to 1 if the target assembler supports .symver directive. */ #define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 /* Define to 1 if you have the `atan2f' function. */ -#define _GLIBCXX_HAVE_ATAN2F 1 +/* #undef _GLIBCXX_HAVE_ATAN2F */ /* Define to 1 if you have the `atan2l' function. */ -#define _GLIBCXX_HAVE_ATAN2L 1 +/* #undef _GLIBCXX_HAVE_ATAN2L */ /* Define to 1 if you have the `atanf' function. */ -#define _GLIBCXX_HAVE_ATANF 1 +/* #undef _GLIBCXX_HAVE_ATANF */ /* Define to 1 if you have the `atanl' function. */ -#define _GLIBCXX_HAVE_ATANL 1 +/* #undef _GLIBCXX_HAVE_ATANL */ /* Define to 1 if you have the `at_quick_exit' function. */ #define _GLIBCXX_HAVE_AT_QUICK_EXIT 1 @@ -643,25 +643,25 @@ namespace std /* #undef _GLIBCXX_HAVE_CC_TLS */ /* Define to 1 if you have the `ceilf' function. */ -#define _GLIBCXX_HAVE_CEILF 1 +/* #undef _GLIBCXX_HAVE_CEILF */ /* Define to 1 if you have the `ceill' function. */ -#define _GLIBCXX_HAVE_CEILL 1 +/* #undef _GLIBCXX_HAVE_CEILL */ /* Define to 1 if you have the header file. */ #define _GLIBCXX_HAVE_COMPLEX_H 1 /* Define to 1 if you have the `cosf' function. */ -#define _GLIBCXX_HAVE_COSF 1 +/* #undef _GLIBCXX_HAVE_COSF */ /* Define to 1 if you have the `coshf' function. */ -#define _GLIBCXX_HAVE_COSHF 1 +/* #undef _GLIBCXX_HAVE_COSHF */ /* Define to 1 if you have the `coshl' function. */ -#define _GLIBCXX_HAVE_COSHL 1 +/* #undef _GLIBCXX_HAVE_COSHL */ /* Define to 1 if you have the `cosl' function. */ -#define _GLIBCXX_HAVE_COSL 1 +/* #undef _GLIBCXX_HAVE_COSL */ /* Define to 1 if you have the header file. */ #define _GLIBCXX_HAVE_DIRENT_H 1 @@ -733,16 +733,16 @@ namespace std #define _GLIBCXX_HAVE_EXECINFO_H 1 /* Define to 1 if you have the `expf' function. */ -#define _GLIBCXX_HAVE_EXPF 1 +/* #undef _GLIBCXX_HAVE_EXPF */ /* Define to 1 if you have the `expl' function. */ -#define _GLIBCXX_HAVE_EXPL 1 +/* #undef _GLIBCXX_HAVE_EXPL */ /* Define to 1 if you have the `fabsf' function. */ -#define _GLIBCXX_HAVE_FABSF 1 +/* #undef _GLIBCXX_HAVE_FABSF */ /* Define to 1 if you have the `fabsl' function. */ -#define _GLIBCXX_HAVE_FABSL 1 +/* #undef _GLIBCXX_HAVE_FABSL */ /* Define to 1 if you have the header file. */ #define _GLIBCXX_HAVE_FCNTL_H 1 @@ -751,10 +751,10 @@ namespace std #define _GLIBCXX_HAVE_FENV_H 1 /* Define to 1 if you have the `finite' function. */ -#define _GLIBCXX_HAVE_FINITE 1 +/* #undef _GLIBCXX_HAVE_FINITE */ /* Define to 1 if you have the `finitef' function. */ -#define _GLIBCXX_HAVE_FINITEF 1 +/* #undef _GLIBCXX_HAVE_FINITEF */ /* Define to 1 if you have the `finitel' function. */ /* #undef _GLIBCXX_HAVE_FINITEL */ @@ -763,16 +763,16 @@ namespace std #define _GLIBCXX_HAVE_FLOAT_H 1 /* Define to 1 if you have the `floorf' function. */ -#define _GLIBCXX_HAVE_FLOORF 1 +/* #undef _GLIBCXX_HAVE_FLOORF */ /* Define to 1 if you have the `floorl' function. */ -#define _GLIBCXX_HAVE_FLOORL 1 +/* #undef _GLIBCXX_HAVE_FLOORL */ /* Define to 1 if you have the `fmodf' function. */ -#define _GLIBCXX_HAVE_FMODF 1 +/* #undef _GLIBCXX_HAVE_FMODF */ /* Define to
CVS commit: src
Module Name:src Committed By: mrg Date: Sun Feb 4 20:22:18 UTC 2018 Modified Files: src/common/lib/libc/string: bcopy.c memchr.c memcmp.c strcat.c strchr.c strcmp.c strcpy.c strncmp.c strrchr.c src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc src/external/gpl3/gcc/dist/libsanitizer/ubsan: ubsan_platform.h Log Message: updates for GCC 6.4: - remove many _DIAGASSERT() checks against not NULL for functions with arguments with nonnull attributes. (probably more to come, the set between x86 and sparc us disjoint.) - port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/common/lib/libc/string/bcopy.c cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/string/memchr.c \ src/common/lib/libc/string/strcmp.c src/common/lib/libc/string/strcpy.c cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/string/memcmp.c cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/string/strcat.c \ src/common/lib/libc/string/strncmp.c cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/string/strchr.c \ src/common/lib/libc/string/strrchr.c cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/gcc/dist/libsanitizer/ubsan/ubsan_platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/string/bcopy.c diff -u src/common/lib/libc/string/bcopy.c:1.11 src/common/lib/libc/string/bcopy.c:1.12 --- src/common/lib/libc/string/bcopy.c:1.11 Wed Apr 16 20:39:55 2014 +++ src/common/lib/libc/string/bcopy.c Sun Feb 4 20:22:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bcopy.c,v 1.11 2014/04/16 20:39:55 joerg Exp $ */ +/* $NetBSD: bcopy.c,v 1.12 2018/02/04 20:22:17 mrg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: bcopy.c,v 1.11 2014/04/16 20:39:55 joerg Exp $"); +__RCSID("$NetBSD: bcopy.c,v 1.12 2018/02/04 20:22:17 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -89,7 +89,7 @@ bcopy(const void *src0, void *dst0, size unsigned long u; #if !defined(_KERNEL) - _DIAGASSERT((dst0 && src0) || length == 0); + _DIAGASSERT(length == 0); #endif if (length == 0 || dst == src) /* nothing to do */ Index: src/common/lib/libc/string/memchr.c diff -u src/common/lib/libc/string/memchr.c:1.3 src/common/lib/libc/string/memchr.c:1.4 --- src/common/lib/libc/string/memchr.c:1.3 Tue Jan 8 21:57:06 2008 +++ src/common/lib/libc/string/memchr.c Sun Feb 4 20:22:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: memchr.c,v 1.3 2008/01/08 21:57:06 martin Exp $ */ +/* $NetBSD: memchr.c,v 1.4 2018/02/04 20:22:17 mrg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)memchr.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: memchr.c,v 1.3 2008/01/08 21:57:06 martin Exp $"); +__RCSID("$NetBSD: memchr.c,v 1.4 2018/02/04 20:22:17 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -51,7 +51,6 @@ __RCSID("$NetBSD: memchr.c,v 1.3 2008/01 void * memchr(const void *s, int c, size_t n) { - _DIAGASSERT(s != NULL); if (n != 0) { const unsigned char *p = s; Index: src/common/lib/libc/string/strcmp.c diff -u src/common/lib/libc/string/strcmp.c:1.3 src/common/lib/libc/string/strcmp.c:1.4 --- src/common/lib/libc/string/strcmp.c:1.3 Mon Jul 1 20:51:59 2013 +++ src/common/lib/libc/string/strcmp.c Sun Feb 4 20:22:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: strcmp.c,v 1.3 2013/07/01 20:51:59 joerg Exp $ */ +/* $NetBSD: strcmp.c,v 1.4 2018/02/04 20:22:17 mrg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)strcmp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: strcmp.c,v 1.3 2013/07/01 20:51:59 joerg Exp $"); +__RCSID("$NetBSD: strcmp.c,v 1.4 2018/02/04 20:22:17 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -57,9 +57,6 @@ int strcmp(const char *s1, const char *s2) { - _DIAGASSERT(s1 != NULL); - _DIAGASSERT(s2 != NULL); - while (*s1 == *s2++) if (*s1++ == 0) return (0); Index: src/common/lib/libc/string/strcpy.c diff -u src/common/lib/libc/string/strcpy.c:1.3 src/common/lib/libc/string/strcpy.c:1.4 --- src/common/lib/libc/string/strcpy.c:1.3 Tue Nov 8 16:52:11 2011 +++ src/common/lib/libc/string/strcpy.c Sun Feb 4 20:22:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: strcpy.c,v 1.3 2011/11/08 16:52:11 joerg Exp $ */ +/* $NetBSD: strcpy.c,v 1.4 2018/02/04 20:22:17 mrg Exp $ */ /* * Copyright (c) 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)strcpy.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: strcpy.c,v 1.3 2011/11/08 16:52:11 joerg Exp $"); +__RCSID("$NetBSD: strcpy.c,v 1.4 2018/02/04 20:22:17 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */
CVS commit: src/lib/libc/arch/aarch64/sys
Module Name:src Committed By: skrll Date: Sun Feb 4 18:32:31 UTC 2018 Modified Files: src/lib/libc/arch/aarch64/sys: pipe.S Log Message: lower case 'ret' to avoid macro clash To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/sys/pipe.S 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/arch/aarch64/sys/pipe.S diff -u src/lib/libc/arch/aarch64/sys/pipe.S:1.1 src/lib/libc/arch/aarch64/sys/pipe.S:1.2 --- src/lib/libc/arch/aarch64/sys/pipe.S:1.1 Sun Aug 10 05:47:37 2014 +++ src/lib/libc/arch/aarch64/sys/pipe.S Sun Feb 4 18:32:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pipe.S,v 1.1 2014/08/10 05:47:37 matt Exp $ */ +/* $NetBSD: pipe.S,v 1.2 2018/02/04 18:32:31 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -39,5 +39,5 @@ ENTRY(_pipe) _INVOKE_CERROR() stp w0, w1, [x9] mov w0, wzr - RET + ret END(_pipe)
CVS commit: src/share/man/man4
Module Name:src Committed By: christos Date: Sun Feb 4 18:17:59 UTC 2018 Modified Files: src/share/man/man4: pms.4 Log Message: remove dup the from %eax To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/pms.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/pms.4 diff -u src/share/man/man4/pms.4:1.30 src/share/man/man4/pms.4:1.31 --- src/share/man/man4/pms.4:1.30 Mon Nov 6 16:40:04 2017 +++ src/share/man/man4/pms.4 Sun Feb 4 13:17:59 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: pms.4,v 1.30 2017/11/06 21:40:04 wiz Exp $ +.\" $NetBSD: pms.4,v 1.31 2018/02/04 18:17:59 christos Exp $ .\" .\" Copyright (c) 1993 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <> .\" -.Dd November 6, 2017 +.Dd February 4, 2018 .Dt PMS 4 .Os .Sh NAME @@ -157,7 +157,7 @@ ignored (default 4). Sets the top edge of the button emulation region on a clickpad. Since a clickpad only reports left clicks this region is used to emulate two or three buttons by detecting the finger location and reporting -either a button 2 or button 3 click iff the the click occurs within +either a button 2 or button 3 click iff the click occurs within the region bounded by button_boundary and the bottom of the clickpad. .It Dv hw.synaptics.button3_edge This defines the left hand edge of the button 3 region.
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: maxv Date: Sun Feb 4 17:54:35 UTC 2018 Modified Files: src/sys/arch/amd64/conf: GENERIC_KASLR Log Message: Explicitly disable the kernel-mode GPROF (even though it is never enabled), and explain a bit. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/conf/GENERIC_KASLR 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/amd64/conf/GENERIC_KASLR diff -u src/sys/arch/amd64/conf/GENERIC_KASLR:1.3 src/sys/arch/amd64/conf/GENERIC_KASLR:1.4 --- src/sys/arch/amd64/conf/GENERIC_KASLR:1.3 Sun Oct 29 17:19:14 2017 +++ src/sys/arch/amd64/conf/GENERIC_KASLR Sun Feb 4 17:54:34 2018 @@ -1,8 +1,12 @@ -# $NetBSD: GENERIC_KASLR,v 1.3 2017/10/29 17:19:14 maxv Exp $ +# $NetBSD: GENERIC_KASLR,v 1.4 2018/02/04 17:54:34 maxv Exp $ include "arch/amd64/conf/GENERIC" +# KDTRACE_HOOKS does not support multiple CTF sections. no options KDTRACE_HOOKS +# The kernel-mode GPROF does not support multiple .text sections. +no options GPROF + makeoptions KASLR=1 # Kernel ASLR options KASLR
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: jmcneill Date: Sun Feb 4 17:33:34 UTC 2018 Modified Files: src/usr.bin/mkubootimage: arm64.h mkubootimage.c Log Message: Fix tools build To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/mkubootimage/arm64.h cvs rdiff -u -r1.23 -r1.24 src/usr.bin/mkubootimage/mkubootimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/arm64.h diff -u src/usr.bin/mkubootimage/arm64.h:1.1 src/usr.bin/mkubootimage/arm64.h:1.2 --- src/usr.bin/mkubootimage/arm64.h:1.1 Sun Feb 4 15:44:51 2018 +++ src/usr.bin/mkubootimage/arm64.h Sun Feb 4 17:33:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: arm64.h,v 1.1 2018/02/04 15:44:51 jmcneill Exp $ */ +/* $NetBSD: arm64.h,v 1.2 2018/02/04 17:33:34 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill@@ -48,15 +48,15 @@ struct arm64_image_header { }; /* Kernel flags */ -#define ARM64_FLAGS_ENDIAN_BE __BIT(0) -#define ARM64_FLAGS_PAGE_SIZE __BITS(2,1) -#define ARM64_FLAGS_PAGE_SIZE_UNSPEC 0 -#define ARM64_FLAGS_PAGE_SIZE_4K 1 -#define ARM64_FLAGS_PAGE_SIZE_16K 2 -#define ARM64_FLAGS_PAGE_SIZE_64K 3 -#define ARM64_FLAGS_PHYS_PLACEMENT __BIT(3) -#define ARM64_FLAGS_PHYS_PLACEMENT_DRAM_BASE 0 -#define ARM64_FLAGS_PHYS_PLACEMENT_ANY 1 +#define ARM64_FLAGS_ENDIAN_BE (1 << 0) +#define ARM64_FLAGS_PAGE_SIZE (3 << 1) +#define ARM64_FLAGS_PAGE_SIZE_UNSPEC (0 << 1) +#define ARM64_FLAGS_PAGE_SIZE_4K (1 << 1) +#define ARM64_FLAGS_PAGE_SIZE_16K (2 << 1) +#define ARM64_FLAGS_PAGE_SIZE_64K (3 << 1) +#define ARM64_FLAGS_PHYS_PLACEMENT (1 << 3) +#define ARM64_FLAGS_PHYS_PLACEMENT_DRAM_BASE (0 << 3) +#define ARM64_FLAGS_PHYS_PLACEMENT_ANY (1 << 3) /* Magic */ #define ARM64_MAGIC 0x644d5241 Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.23 src/usr.bin/mkubootimage/mkubootimage.c:1.24 --- src/usr.bin/mkubootimage/mkubootimage.c:1.23 Sun Feb 4 15:44:51 2018 +++ src/usr.bin/mkubootimage/mkubootimage.c Sun Feb 4 17:33:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.23 2018/02/04 15:44:51 jmcneill Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.24 2018/02/04 17:33:34 jmcneill Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.23 2018/02/04 15:44:51 jmcneill Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.24 2018/02/04 17:33:34 jmcneill Exp $"); #include #include @@ -244,7 +244,7 @@ get_comp(const char *name) return uboot_comp[i].comp; } - return IH_TYPE_UNKNOWN; + return IH_COMP_NONE; } static const char * @@ -383,12 +383,9 @@ generate_header_arm64(struct arm64_image } flags = 0; - - flags |= __SHIFTIN(ARM64_FLAGS_PAGE_SIZE_4K, - ARM64_FLAGS_PAGE_SIZE); + flags |= ARM64_FLAGS_PAGE_SIZE_4K; #if 0 - flags |= __SHIFTIN(ARM64_FLAGS_PHYS_PLACEMENT_ANY, - ARM64_FLAGS_PHYS_PLACEMENT); + flags |= ARM64_FLAGS_PHYS_PLACEMENT_ANY; #endif memset(hdr, 0, sizeof(*hdr));
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Sun Feb 4 17:31:51 UTC 2018 Modified Files: src/sys/conf: files src/sys/kern: init_main.c init_sysctl.c kern_clock.c subr_prof.c src/sys/sys: systm.h Log Message: Add a proper defflag for GPROF, and include opt_gprof.h, otherwise we're not gonna go very far. To generate a diff of this commit: cvs rdiff -u -r1.1192 -r1.1193 src/sys/conf/files cvs rdiff -u -r1.494 -r1.495 src/sys/kern/init_main.c cvs rdiff -u -r1.213 -r1.214 src/sys/kern/init_sysctl.c cvs rdiff -u -r1.135 -r1.136 src/sys/kern/kern_clock.c cvs rdiff -u -r1.47 -r1.48 src/sys/kern/subr_prof.c cvs rdiff -u -r1.274 -r1.275 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1192 src/sys/conf/files:1.1193 --- src/sys/conf/files:1.1192 Thu Jan 18 00:32:48 2018 +++ src/sys/conf/files Sun Feb 4 17:31:51 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1192 2018/01/18 00:32:48 mrg Exp $ +# $NetBSD: files,v 1.1193 2018/02/04 17:31:51 maxv Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -28,6 +28,7 @@ defflag opt_modular.h MODULAR_DEFAULT_A defflagKEYLOCK defparam opt_syslimits.h CHILD_MAX OPEN_MAX defflag opt_diagnostic.h _DIAGNOSTIC +defflagGPROF defparam opt_copy_symtab.h makeoptions_COPY_SYMTAB Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.494 src/sys/kern/init_main.c:1.495 --- src/sys/kern/init_main.c:1.494 Tue Dec 26 03:58:03 2017 +++ src/sys/kern/init_main.c Sun Feb 4 17:31:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.494 2017/12/26 03:58:03 msaitoh Exp $ */ +/* $NetBSD: init_main.c,v 1.495 2018/02/04 17:31:51 maxv Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.494 2017/12/26 03:58:03 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.495 2018/02/04 17:31:51 maxv Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -116,6 +116,7 @@ __KERNEL_RCSID(0, "$NetBSD: init_main.c, #include "opt_rnd_printf.h" #include "opt_splash.h" #include "opt_kernhist.h" +#include "opt_gprof.h" #if defined(SPLASHSCREEN) && defined(makeoptions_SPLASHSCREEN_IMAGE) extern void *_binary_splash_image_start; Index: src/sys/kern/init_sysctl.c diff -u src/sys/kern/init_sysctl.c:1.213 src/sys/kern/init_sysctl.c:1.214 --- src/sys/kern/init_sysctl.c:1.213 Thu Jun 1 02:45:13 2017 +++ src/sys/kern/init_sysctl.c Sun Feb 4 17:31:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.213 2017/06/01 02:45:13 chs Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.214 2018/02/04 17:31:51 maxv Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,11 +30,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.213 2017/06/01 02:45:13 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.214 2018/02/04 17:31:51 maxv Exp $"); #include "opt_sysv.h" #include "opt_compat_netbsd.h" #include "opt_modular.h" +#include "opt_gprof.h" #include "pty.h" #include Index: src/sys/kern/kern_clock.c diff -u src/sys/kern/kern_clock.c:1.135 src/sys/kern/kern_clock.c:1.136 --- src/sys/kern/kern_clock.c:1.135 Sun Feb 12 18:43:56 2017 +++ src/sys/kern/kern_clock.c Sun Feb 4 17:31:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_clock.c,v 1.135 2017/02/12 18:43:56 maxv Exp $ */ +/* $NetBSD: kern_clock.c,v 1.136 2018/02/04 17:31:51 maxv Exp $ */ /*- * Copyright (c) 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -69,11 +69,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.135 2017/02/12 18:43:56 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.136 2018/02/04 17:31:51 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_dtrace.h" #include "opt_perfctrs.h" +#include "opt_gprof.h" #endif #include Index: src/sys/kern/subr_prof.c diff -u src/sys/kern/subr_prof.c:1.47 src/sys/kern/subr_prof.c:1.48 --- src/sys/kern/subr_prof.c:1.47 Thu Jul 10 21:13:52 2014 +++ src/sys/kern/subr_prof.c Sun Feb 4 17:31:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_prof.c,v 1.47 2014/07/10 21:13:52 christos Exp $ */ +/* $NetBSD: subr_prof.c,v 1.48 2018/02/04 17:31:51 maxv Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_prof.c,v 1.47 2014/07/10 21:13:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_prof.c,v 1.48 2018/02/04 17:31:51 maxv Exp $"); + +#ifdef _KERNEL_OPT +#include "opt_gprof.h" +#endif #include #include Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.274 src/sys/sys/systm.h:1.275 --- src/sys/sys/systm.h:1.274 Fri Oct 27 12:25:15 2017 +++ src/sys/sys/systm.h Sun Feb 4 17:31:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.274 2017/10/27 12:25:15 joerg Exp $ */ +/* $NetBSD: systm.h,v 1.275 2018/02/04
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maxv Date: Sun Feb 4 17:03:21 UTC 2018 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Add a TODO list for SVS. To generate a diff of this commit: cvs rdiff -u -r1.296 -r1.297 src/sys/arch/amd64/amd64/machdep.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/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.296 src/sys/arch/amd64/amd64/machdep.c:1.297 --- src/sys/arch/amd64/amd64/machdep.c:1.296 Fri Jan 26 14:38:46 2018 +++ src/sys/arch/amd64/amd64/machdep.c Sun Feb 4 17:03:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.296 2018/01/26 14:38:46 maxv Exp $ */ +/* $NetBSD: machdep.c,v 1.297 2018/02/04 17:03:21 maxv Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.296 2018/01/26 14:38:46 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.297 2018/02/04 17:03:21 maxv Exp $"); /* #define XENDEBUG_LOW */ @@ -2267,6 +2267,23 @@ mm_md_direct_mapped_phys(paddr_t paddr, * Remote PCPU Areas [OK] * Kernel Heap [OK] * Kernel Image [OK] + * + * TODO: + * + * (a) The NMI stack is not double-entered. Therefore if we ever receive + * an NMI and leave it, the content of the stack will be visible to + * userland (via Meltdown). Normally we never leave NMIs, unless a + * privileged user launched PMCs. That's unlikely to happen, our PMC + * support is pretty minimal. + * + * (b) Enable SVS depending on the CPU model, and add a sysctl to disable + * it dynamically. + * + * (c) Narrow down the entry points: hide the 'jmp handler' instructions. + * This makes sense on GENERIC_KASLR kernels. + * + * (d) Right now there is only one global LDT, and that's not compatible + * with USER_LDT. */ struct svs_utls {
CVS commit: src/crypto/external/bsd
Module Name:src Committed By: christos Date: Sun Feb 4 16:22:48 UTC 2018 Modified Files: src/crypto/external/bsd: Makefile Log Message: Fix typo (thanks Martin) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/crypto/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/crypto/external/bsd/Makefile diff -u src/crypto/external/bsd/Makefile:1.13 src/crypto/external/bsd/Makefile:1.14 --- src/crypto/external/bsd/Makefile:1.13 Sat Feb 3 22:19:51 2018 +++ src/crypto/external/bsd/Makefile Sun Feb 4 11:22:48 2018 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.13 2018/02/04 03:19:51 christos Exp $ +# $NetBSD: Makefile,v 1.14 2018/02/04 16:22:48 christos Exp $ .include -SUBDIR+= ${EXTERNAL_OPENSSL_SUBDDIR} .WAIT heimdal netpgp .WAIT openssh libsaslc +SUBDIR+= ${EXTERNAL_OPENSSL_SUBDIR} .WAIT heimdal netpgp .WAIT openssh libsaslc .include
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: jmcneill Date: Sun Feb 4 15:44:51 UTC 2018 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 mkubootimage.c Added Files: src/usr.bin/mkubootimage: arm64.h Log Message: Add support for writing "AArch64 Linux kernel image" format images. These images begin with a 64-byte header that includes a load offset, image size, some flags, and a small (2 word) area at the start for executable code. These images are compatible with U-Boot's "booti" command, and can be used to make U-Boot relocate our kernel to a 2MB aligned base address. After relocation, U-Boot will jump to the code at the beginning of the header, where we encode a relative branch forward instruction to branch to the beginning of the kernel at offset +0x40. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.bin/mkubootimage/arm64.h cvs rdiff -u -r1.11 -r1.12 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.22 -r1.23 src/usr.bin/mkubootimage/mkubootimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.11 src/usr.bin/mkubootimage/mkubootimage.1:1.12 --- src/usr.bin/mkubootimage/mkubootimage.1:1.11 Fri Sep 29 21:18:28 2017 +++ src/usr.bin/mkubootimage/mkubootimage.1 Sun Feb 4 15:44:51 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.11 2017/09/29 21:18:28 jmcneill Exp $ +.\" $NetBSD: mkubootimage.1,v 1.12 2018/02/04 15:44:51 jmcneill Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 29, 2017 +.Dd February 4, 2018 .Dt MKUBOOTIMAGE 1 .Os .Sh NAME @@ -41,6 +41,7 @@ .Op Fl C Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc .Op Fl E Ar address .Op Fl e Ar address +.Op Fl f Po arm64 Ns | Ns uimg Pc .Op Fl m Ar magic .Fl n Ar image .Op Fl O Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc @@ -57,12 +58,16 @@ The arguments are as follows: .Bl -tag -width indent .It Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k Ns | Ns powerpc Ns | Ns sh ) Defines the architecture. -This is required. +This is required for +.Qq uimg +format images. .It Fl a Ar address Sets the image load address. This is an integer between 0 and .Dv UINT32_MAX . -This is required for all image types except for script, ramdisk, and kernel_noload. +This is required for all +.Qq uimg +image types except for script, ramdisk, and kernel_noload. .It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none ) Defines the compression. The default is @@ -93,10 +98,16 @@ or are not set, the entry point defaults to the image load address .Pq Fl a . +.It Fl f No ( arm64 Ns | Ns uimg ) +Defines the output image format type. +The default is +.Qq uimg . .It Fl h Display the usage and exit. .It Fl m Ar magic -Set the magic. +Set the magic used for +.Qq uimg +format images. This is an integer between 0 and .Dv UINT32_MAX . The default is @@ -110,7 +121,9 @@ The default OS name is .Qq netbsd . .It Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns standalone Ns | Ns script ) Defines the image type. -This is required. +This is required for +.Qq uimg +format images. .El .Pp The required @@ -161,7 +174,7 @@ command first appeared in The .Nm utility was originally written by -.An Jared D. McNeill . +.An Jared McNeill . This manual page was written by .An Jeremy C. Reed . .\" .Sh CAVEATS Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.22 src/usr.bin/mkubootimage/mkubootimage.c:1.23 --- src/usr.bin/mkubootimage/mkubootimage.c:1.22 Sun Nov 5 11:07:32 2017 +++ src/usr.bin/mkubootimage/mkubootimage.c Sun Feb 4 15:44:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.22 2017/11/05 11:07:32 jmcneill Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.23 2018/02/04 15:44:51 jmcneill Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill@@ -30,15 +30,17 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.22 2017/11/05 11:07:32 jmcneill Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.23 2018/02/04 15:44:51 jmcneill Exp $"); #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -48,11 +50,18 @@ __RCSID("$NetBSD: mkubootimage.c,v 1.22 #include #include "uboot.h" +#include "arm64.h" #ifndef __arraycount #define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) #endif +enum image_format { + FMT_UNKNOWN, + FMT_UIMG, /* Legacy U-Boot image */ + FMT_ARM64, /* Linux ARM64 image (booti) */ +}; + extern uint32_t crc32(const void *, size_t); extern uint32_t crc32v(const
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Feb 4 12:53:51 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: Tickets #518 - #523 To generate a diff of this commit: cvs rdiff -u -r1.1.2.113 -r1.1.2.114 src/doc/CHANGES-8.0 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-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.113 src/doc/CHANGES-8.0:1.1.2.114 --- src/doc/CHANGES-8.0:1.1.2.113 Sat Feb 3 22:17:14 2018 +++ src/doc/CHANGES-8.0 Sun Feb 4 12:53:51 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.113 2018/02/03 22:17:14 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.114 2018/02/04 12:53:51 martin Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -9393,3 +9393,42 @@ lib/libkvm/kvm_getprocs.3 1.17 The elemsize argument is of type "size_t", not "int". [kamil, ticket #517] +sys/fs/msdosfs/msdosfs_fat.c 1.32 +usr.sbin/makefs/msdos/msdosfs_vfsops.c 1.11 + + Need strings.h for ffs(3). Avoids a warning when building tools. + [sevan, ticket #518] + +sys/arch/i386/conf/kern.ldscript.4MB delete +sys/arch/i386/conf/largepages.inc delete +sys/arch/i386/i386/copy.S 1.26 + + Sync with NetBSD-current, in order to reduce future pullups. + [maxv, ticket #519] + +sys/arch/macppc/dev/snapper.c 1.42 + + Fix initialization. + [sevan, ticket #520] + +sys/arch/i386/stand/lib/bootinfo.h 1.12 + + Recent changes have increased the number of "things" the bootloader + needs to deal with. Increase the table size so we don't overflow. + [pgoyette, ticket #521] + +libexec/httpd/bozohttpd.c 1.87 + + Use a protocol-agnostic URL (don't degrade HTTPS->HTTP) for + error messages. + [maya, ticket #522] + +sys/ufs/ffs/ffs_vfsops.c 1.356 +sys/ufs/ufs/ufs_inode.c1.103 + + Make sure inode blocks and size are zero when VOP_INACTIVE() + finalises a now unlinked inode. + Prevent use-after-free where genfs_node_destroy() would destroy + a lock residing in the just freed inode data. + [christos, ticket #523] +
CVS commit: [netbsd-8] src/sys/ufs
Module Name:src Committed By: martin Date: Sun Feb 4 12:52:02 UTC 2018 Modified Files: src/sys/ufs/ffs [netbsd-8]: ffs_vfsops.c src/sys/ufs/ufs [netbsd-8]: ufs_inode.c Log Message: Pull up following revision(s) (requested by christos in ticket #523): sys/ufs/ffs/ffs_vfsops.c: revision 1.356 sys/ufs/ufs/ufs_inode.c: revision 1.103 Make sure inode blocks and size are zero when VOP_INACTIVE() finalises a now unlinked inode. Counterpart of the check in ffs_newvnode(). Prevent use-after-free where genfs_node_destroy() would destroy a lock residing in the just freed inode data. To generate a diff of this commit: cvs rdiff -u -r1.353 -r1.353.4.1 src/sys/ufs/ffs/ffs_vfsops.c cvs rdiff -u -r1.101.2.1 -r1.101.2.2 src/sys/ufs/ufs/ufs_inode.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/ufs/ffs/ffs_vfsops.c diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.353 src/sys/ufs/ffs/ffs_vfsops.c:1.353.4.1 --- src/sys/ufs/ffs/ffs_vfsops.c:1.353 Mon Apr 17 08:32:01 2017 +++ src/sys/ufs/ffs/ffs_vfsops.c Sun Feb 4 12:52:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_vfsops.c,v 1.353 2017/04/17 08:32:01 hannken Exp $ */ +/* $NetBSD: ffs_vfsops.c,v 1.353.4.1 2018/02/04 12:52:02 martin Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.353 2017/04/17 08:32:01 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.353.4.1 2018/02/04 12:52:02 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -2030,14 +2030,14 @@ ffs_deinit_vnode(struct ufsmount *ump, s { struct inode *ip = VTOI(vp); + genfs_node_destroy(vp); + vp->v_data = NULL; + if (ump->um_fstype == UFS1) pool_cache_put(ffs_dinode1_cache, ip->i_din.ffs1_din); else pool_cache_put(ffs_dinode2_cache, ip->i_din.ffs2_din); pool_cache_put(ffs_inode_cache, ip); - - genfs_node_destroy(vp); - vp->v_data = NULL; } /* Index: src/sys/ufs/ufs/ufs_inode.c diff -u src/sys/ufs/ufs/ufs_inode.c:1.101.2.1 src/sys/ufs/ufs/ufs_inode.c:1.101.2.2 --- src/sys/ufs/ufs/ufs_inode.c:1.101.2.1 Thu Nov 2 21:29:53 2017 +++ src/sys/ufs/ufs/ufs_inode.c Sun Feb 4 12:52:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_inode.c,v 1.101.2.1 2017/11/02 21:29:53 snj Exp $ */ +/* $NetBSD: ufs_inode.c,v 1.101.2.2 2018/02/04 12:52:02 martin Exp $ */ /* * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.101.2.1 2017/11/02 21:29:53 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.101.2.2 2018/02/04 12:52:02 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -149,6 +149,15 @@ out: */ *ap->a_recycle = (ip->i_mode == 0); + if (ip->i_mode == 0 && (DIP(ip, size) != 0 || DIP(ip, blocks) != 0)) { + printf("%s: unlinked ino %" PRId64 " on \"%s\" has" + " non zero size %" PRIx64 " or blocks %" PRIx64 + " with allerror %d\n", + __func__, ip->i_number, mp->mnt_stat.f_mntonname, + DIP(ip, size), DIP(ip, blocks), allerror); + panic("%s: dirty filesystem?", __func__); + } + return (allerror); }
CVS commit: [netbsd-8] src/libexec/httpd
Module Name:src Committed By: martin Date: Sun Feb 4 12:49:25 UTC 2018 Modified Files: src/libexec/httpd [netbsd-8]: bozohttpd.c Log Message: Pull up following revision(s) (requested by maya in ticket #522): libexec/httpd/bozohttpd.c: revision 1.87 Use a protocol-agnostic URL (don't degrade HTTPS->HTTP) Suggested by Travis Paul in PR bin/52958. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.86.4.1 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.86 src/libexec/httpd/bozohttpd.c:1.86.4.1 --- src/libexec/httpd/bozohttpd.c:1.86 Sun Feb 5 01:55:03 2017 +++ src/libexec/httpd/bozohttpd.c Sun Feb 4 12:49:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.86 2017/02/05 01:55:03 mrg Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.86.4.1 2018/02/04 12:49:25 martin Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -1990,7 +1990,7 @@ bozo_http_error(bozohttpd_t *httpd, int "%s\n" "%s\n" "%s%s: %s\n" - "http://%s%s/\;>%s%s\n" + "%s%s\n" "\n", header, header, user ? user : "", file,
CVS commit: [netbsd-8] src/sys/arch/i386/stand/lib
Module Name:src Committed By: martin Date: Sun Feb 4 12:46:04 UTC 2018 Modified Files: src/sys/arch/i386/stand/lib [netbsd-8]: bootinfo.h Log Message: Pull up following revision(s) (requested by pgoyette in ticket #521): sys/arch/i386/stand/lib/bootinfo.h: revision 1.12 Recent changes have increased the number of "things" the bootloader needs to deal with. Increase the table size so we don't overflow. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.10.1 src/sys/arch/i386/stand/lib/bootinfo.h 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/i386/stand/lib/bootinfo.h diff -u src/sys/arch/i386/stand/lib/bootinfo.h:1.11 src/sys/arch/i386/stand/lib/bootinfo.h:1.11.10.1 --- src/sys/arch/i386/stand/lib/bootinfo.h:1.11 Sun Jun 5 14:13:57 2016 +++ src/sys/arch/i386/stand/lib/bootinfo.h Sun Feb 4 12:46:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.11 2016/06/05 14:13:57 maxv Exp $ */ +/* $NetBSD: bootinfo.h,v 1.11.10.1 2018/02/04 12:46:04 martin Exp $ */ /* * Copyright (c) 1997 @@ -35,7 +35,7 @@ struct bootinfo { extern struct bootinfo *bootinfo; -#define BTINFO_MAX 32 +#define BTINFO_MAX 64 #define BI_ALLOC(max) (bootinfo = alloc(sizeof(struct bootinfo) \ + ((max) - 1) * sizeof(uint32_t))) \
CVS commit: [netbsd-8] src/sys/arch/macppc/dev
Module Name:src Committed By: martin Date: Sun Feb 4 12:43:57 UTC 2018 Modified Files: src/sys/arch/macppc/dev [netbsd-8]: snapper.c Log Message: Pull up following revision(s) (requested by sevan in ticket #520): sys/arch/macppc/dev/snapper.c: revision 1.42 Fix issue with audio being downpitched, thanks to "it seems that snapper_init should be called before audio_attach_mi, as snapper init is setting the rate to 44100 after the hardware format has been configured by audio_attach_mi. audio_attach_mi should be the last thing called during an attach of an audio device so the audio device is ready to be configured when audio_attach_mi is called." Resolves PR port-macppc/52949 To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.6.1 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.41 src/sys/arch/macppc/dev/snapper.c:1.41.6.1 --- src/sys/arch/macppc/dev/snapper.c:1.41 Fri Mar 31 08:38:13 2017 +++ src/sys/arch/macppc/dev/snapper.c Sun Feb 4 12:43:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.41 2017/03/31 08:38:13 msaitoh Exp $ */ +/* $NetBSD: snapper.c,v 1.41.6.1 2018/02/04 12:43:57 martin Exp $ */ /* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */ /* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.41 2017/03/31 08:38:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.41.6.1 2018/02/04 12:43:57 martin Exp $"); #include #include @@ -839,10 +839,10 @@ snapper_defer(device_t dev) break; } - audio_attach_mi(_hw_if, sc, sc->sc_dev); - /* ki2c_setmode(sc->sc_i2c, I2C_STDSUBMODE); */ snapper_init(sc, sc->sc_node); + + audio_attach_mi(_hw_if, sc, sc->sc_dev); } static int
CVS commit: [netbsd-8] src/sys/arch/i386
Module Name:src Committed By: martin Date: Sun Feb 4 12:40:31 UTC 2018 Modified Files: src/sys/arch/i386/i386 [netbsd-8]: copy.S Removed Files: src/sys/arch/i386/conf [netbsd-8]: kern.ldscript.4MB largepages.inc Log Message: Pull up following revision(s) (requested by maxv519): sys/arch/i386/conf/largepages.inc: file removal sys/arch/i386/conf/kern.ldscript.4MB: file removal sys/arch/i386/i386/copy.S: revision 1.26 Sync with amd64, in particular, add END() markers, don't fall through functions, narrow the copy windows, and remove suword. Remove these files. No one cares about this on i386, and there is no point in keeping undocumented options nobody understands anyway. To generate a diff of this commit: cvs rdiff -u -r1.17 -r0 src/sys/arch/i386/conf/kern.ldscript.4MB cvs rdiff -u -r1.4 -r0 src/sys/arch/i386/conf/largepages.inc cvs rdiff -u -r1.25 -r1.25.8.1 src/sys/arch/i386/i386/copy.S 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/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.25 src/sys/arch/i386/i386/copy.S:1.25.8.1 --- src/sys/arch/i386/i386/copy.S:1.25 Fri Sep 16 12:28:41 2016 +++ src/sys/arch/i386/i386/copy.S Sun Feb 4 12:40:31 2018 @@ -1,7 +1,6 @@ -/* $NetBSD: copy.S,v 1.25 2016/09/16 12:28:41 maxv Exp $ */ -/* NetBSD: locore.S,v 1.34 2005/04/01 11:59:31 yamt Exp $ */ +/* $NetBSD: copy.S,v 1.25.8.1 2018/02/04 12:40:31 martin Exp $ */ -/*- +/* * Copyright (c) 1998, 2000, 2004, 2008 The NetBSD Foundation, Inc. * All rights reserved. * @@ -30,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/*- +/* * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * @@ -65,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.25 2016/09/16 12:28:41 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.25.8.1 2018/02/04 12:40:31 martin Exp $"); #include "assym.h" @@ -75,8 +74,8 @@ __KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.2 #include #define GET_CURPCB(reg) \ - movl CPUVAR(CURLWP), reg; \ - movl L_PCB(reg), reg + movl CPUVAR(CURLWP),reg; \ + movl L_PCB(reg),reg /* * These are arranged so that the abnormal case is a forwards @@ -86,10 +85,10 @@ __KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.2 #define DEFERRED_SWITCH_CHECK \ CHECK_DEFERRED_SWITCH ; \ jnz 99f; \ - 98: +98: #define DEFERRED_SWITCH_CALL \ - 99: ; \ +99: ; \ call _C_LABEL(do_pmap_load) ; \ jmp 98b @@ -109,25 +108,26 @@ LABEL(x86_copyfunc_start) */ NENTRY(do_pmap_load) pushl %ebp - movl %esp, %ebp + movl %esp,%ebp pushl %ebx - movl CPUVAR(CURLWP), %ebx + movl CPUVAR(CURLWP),%ebx 1: incl L_NOPREEMPT(%ebx) call _C_LABEL(pmap_load) decl L_NOPREEMPT(%ebx) jnz 2f - cmpl $0, L_DOPREEMPT(%ebx) + cmpl $0,L_DOPREEMPT(%ebx) jz 2f pushl $0 call _C_LABEL(kpreempt) - addl $4, %esp + addl $4,%esp 2: - cmpl $0, CPUVAR(WANT_PMAPLOAD) + cmpl $0,CPUVAR(WANT_PMAPLOAD) jnz 1b popl %ebx leave ret +END(do_pmap_load) /* * void *return_address(unsigned int level); @@ -151,12 +151,12 @@ ENTRY(return_address) movl 0x4(%eax),%eax movl $0,PCB_ONFAULT(%edx) ret +END(return_address) /* * int kcopy(const void *from, void *to, size_t len); - * Copy len bytes, abort on fault. + * Copy len bytes from and to kernel memory, and abort on fault. */ -/* LINTSTUB: Func: int kcopy(const void *from, void *to, size_t len) */ ENTRY(kcopy) pushl %esi pushl %edi @@ -206,6 +206,7 @@ ENTRY(kcopy) popl %esi xorl %eax,%eax ret +END(kcopy) /*/ @@ -219,110 +220,107 @@ ENTRY(kcopy) * Copy len bytes into the user's address space. * see copyout(9) */ - -/* LINTSTUB: Func: int copyout(const void *kaddr, void *uaddr, size_t len) */ ENTRY(copyout) DEFERRED_SWITCH_CHECK pushl %esi pushl %edi - movl 12(%esp),%esi - movl 16(%esp),%edi - movl 20(%esp),%eax -.Lcopyout_start: - /* - * We check that the end of the destination buffer is not past the end - * of the user's address space. - */ + movl 12(%esp),%esi /* from */ + movl 16(%esp),%edi /* to */ + movl 20(%esp),%eax /* len */ + movl %edi,%edx addl %eax,%edx jc _C_LABEL(copy_efault) cmpl $VM_MAXUSER_ADDRESS,%edx ja _C_LABEL(copy_efault) + +.Lcopyout_start: movl %eax,%ecx shrl $2,%ecx rep movsl andl $3,%eax - jz 1f + jz .Lcopyout_end movl %eax,%ecx rep movsb -1: .Lcopyout_end: + popl %edi popl %esi xorl %eax,%eax ret DEFERRED_SWITCH_CALL +END(copyout) /* * int copyin(const void *from, void *to, size_t len); * Copy len bytes from the user's address space. * see copyin(9) */ - -/* LINTSTUB: Func: int copyin(const void *uaddr, void *kaddr, size_t len) */ ENTRY(copyin) DEFERRED_SWITCH_CHECK pushl %esi pushl %edi - movl 12(%esp),%esi - movl 16(%esp),%edi - movl 20(%esp),%eax - /* - * We
CVS commit: [netbsd-8] src
Module Name:src Committed By: martin Date: Sun Feb 4 12:10:48 UTC 2018 Modified Files: src/sys/fs/msdosfs [netbsd-8]: msdosfs_fat.c src/usr.sbin/makefs/msdos [netbsd-8]: msdosfs_vfsops.c Log Message: Pull up following revision(s) (requested by sevan in ticket #518): sys/fs/msdosfs/msdosfs_fat.c: revision 1.32 usr.sbin/makefs/msdos/msdosfs_vfsops.c: revision 1.11 Need strings.h for ffs() Need strings.h for ffs() Resolves implict declaration warning of ffs() when building tools via build.sh To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.31.10.1 src/sys/fs/msdosfs/msdosfs_fat.c cvs rdiff -u -r1.10 -r1.10.8.1 src/usr.sbin/makefs/msdos/msdosfs_vfsops.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/fs/msdosfs/msdosfs_fat.c diff -u src/sys/fs/msdosfs/msdosfs_fat.c:1.31 src/sys/fs/msdosfs/msdosfs_fat.c:1.31.10.1 --- src/sys/fs/msdosfs/msdosfs_fat.c:1.31 Sat May 7 16:43:02 2016 +++ src/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 4 12:10:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_fat.c,v 1.31 2016/05/07 16:43:02 mlelstv Exp $ */ +/* $NetBSD: msdosfs_fat.c,v 1.31.10.1 2018/02/04 12:10:48 martin Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -52,7 +52,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.31 2016/05/07 16:43:02 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.31.10.1 2018/02/04 12:10:48 martin Exp $"); /* * kernel include files. @@ -69,6 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: msdosfs_fat. #include #include /* to define vattr structure */ #else +#include #include #endif Index: src/usr.sbin/makefs/msdos/msdosfs_vfsops.c diff -u src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.10 src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.10.8.1 --- src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.10 Sat Jan 30 09:59:27 2016 +++ src/usr.sbin/makefs/msdos/msdosfs_vfsops.c Sun Feb 4 12:10:48 2018 @@ -50,7 +50,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.10 2016/01/30 09:59:27 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.10.8.1 2018/02/04 12:10:48 martin Exp $"); #include @@ -68,6 +68,7 @@ __KERNEL_RCSID(0, "$NetBSD: msdosfs_vfso #include #include #include +#include #include "makefs.h" #include "msdos.h"
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: mrg Date: Sun Feb 4 11:08:17 UTC 2018 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: md.amd64 md.i386 mi Log Message: more updates for GCC 6. with other uncommited changes, i386 seems to work well enough for hello.c, hello.cc and hello.m. To generate a diff of this commit: cvs rdiff -u -r1.827 -r1.828 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.254 -r1.255 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.177 -r1.178 src/distrib/sets/lists/comp/md.i386 cvs rdiff -u -r1.2174 -r1.2175 src/distrib/sets/lists/comp/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/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.827 src/distrib/sets/lists/base/shl.mi:1.828 --- src/distrib/sets/lists/base/shl.mi:1.827 Sat Feb 3 21:27:45 2018 +++ src/distrib/sets/lists/base/shl.mi Sun Feb 4 11:08:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.827 2018/02/03 21:27:45 mrg Exp $ +# $NetBSD: shl.mi,v 1.828 2018/02/04 11:08:16 mrg Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -302,6 +302,7 @@ ./usr/lib/libgomp.so.1.2 base-sys-shlib compatfile,gcc=5,!machine_arch=mips64eb,!machine_arch=mips64el ./usr/lib/libgomp.so.1.2 base-sys-shlib gcc=5,machine_arch=mips64eb ./usr/lib/libgomp.so.1.2 base-sys-shlib gcc=5,machine_arch=mips64el +./usr/lib/libgomp.so.1.3 base-sys-shlib compatfile,gcc=6 ./usr/lib/libgssapi.sobase-krb5-shlib compatfile,kerberos ./usr/lib/libgssapi.so.11 base-krb5-shlib compatfile,kerberos ./usr/lib/libgssapi.so.11.0 base-krb5-shlib compatfile,kerberos Index: src/distrib/sets/lists/comp/md.amd64 diff -u src/distrib/sets/lists/comp/md.amd64:1.254 src/distrib/sets/lists/comp/md.amd64:1.255 --- src/distrib/sets/lists/comp/md.amd64:1.254 Sat Feb 3 21:27:45 2018 +++ src/distrib/sets/lists/comp/md.amd64 Sun Feb 4 11:08:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.254 2018/02/03 21:27:45 mrg Exp $ +# $NetBSD: md.amd64,v 1.255 2018/02/04 11:08:16 mrg Exp $ ./usr/include/amd64comp-c-include ./usr/include/amd64/ansi.h comp-c-include @@ -485,6 +485,7 @@ ./usr/include/gcc-6/bmmintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/clflushoptintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/clwbintrin.h comp-c-include gcccmds,gcc=6 +./usr/include/gcc-6/clzerointrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/cpuid.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/cross-stdarg.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/emmintrin.h comp-c-include gcccmds,gcc=6 @@ -501,6 +502,7 @@ ./usr/include/gcc-6/mmintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/mwaitxintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/nmmintrin.h comp-c-include gcccmds,gcc=6 +./usr/include/gcc-6/pkuintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/pmmintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/popcntintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/prfchwintrin.h comp-c-include gcccmds,gcc=6 Index: src/distrib/sets/lists/comp/md.i386 diff -u src/distrib/sets/lists/comp/md.i386:1.177 src/distrib/sets/lists/comp/md.i386:1.178 --- src/distrib/sets/lists/comp/md.i386:1.177 Sat Feb 3 21:27:45 2018 +++ src/distrib/sets/lists/comp/md.i386 Sun Feb 4 11:08:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.177 2018/02/03 21:27:45 mrg Exp $ +# $NetBSD: md.i386,v 1.178 2018/02/04 11:08:16 mrg Exp $ ./usr/include/clang-3.4/__wmmintrin_aes.h comp-obsolete obsolete ./usr/include/clang-3.4/__wmmintrin_pclmul.h comp-obsolete obsolete ./usr/include/clang-3.4/ammintrin.h comp-obsolete obsolete @@ -409,6 +409,7 @@ ./usr/include/gcc-6/bmmintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/clflushoptintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/clwbintrin.h comp-c-include gcccmds,gcc=6 +./usr/include/gcc-6/clzerointrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/cpuid.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/cross-stdarg.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/emmintrin.h comp-c-include gcccmds,gcc=6 @@ -425,6 +426,7 @@ ./usr/include/gcc-6/mmintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/mwaitxintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/nmmintrin.h comp-c-include gcccmds,gcc=6 +./usr/include/gcc-6/pkuintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/pmmintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/popcntintrin.h comp-c-include gcccmds,gcc=6 ./usr/include/gcc-6/prfchwintrin.h comp-c-include gcccmds,gcc=6 Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2174 src/distrib/sets/lists/comp/mi:1.2175 --- src/distrib/sets/lists/comp/mi:1.2174 Sat Feb 3
CVS commit: src/external/gpl3/gcc/usr.bin
Module Name:src Committed By: mrg Date: Sun Feb 4 10:16:07 UTC 2018 Modified Files: src/external/gpl3/gcc/usr.bin/backend: Makefile src/external/gpl3/gcc/usr.bin/common: Makefile Log Message: make libbackend.a build and fix the libcommon.a sources list. now all the gcc parts link. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/external/gpl3/gcc/usr.bin/backend/Makefile cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/common/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/gpl3/gcc/usr.bin/backend/Makefile diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.40 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.41 --- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.40 Sun Feb 4 09:22:03 2018 +++ src/external/gpl3/gcc/usr.bin/backend/Makefile Sun Feb 4 10:16:07 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2018/02/04 09:22:03 mrg Exp $ +# $NetBSD: Makefile,v 1.41 2018/02/04 10:16:07 mrg Exp $ LIBISPRIVATE= yes @@ -554,6 +554,11 @@ COPTS.generic-match.c+=-fno-jump-tables COPTS.gimple-match.c+=-fno-jump-tables .endif +# Don't fight with decimal128Local.h. +# The GCC build only ignores the warning? +COPTS.dfp.c+= -fno-strict-aliasing + +CFLAGS+= -fno-exceptions -fno-rtti -fasynchronous-unwind-tables .PATH: ${DIST}/gcc ${DIST}/libiberty ${GCCARCH} ${G_out_file:H} ${DIST}/include .PATH: ${DIST}/gcc/config Index: src/external/gpl3/gcc/usr.bin/common/Makefile diff -u src/external/gpl3/gcc/usr.bin/common/Makefile:1.5 src/external/gpl3/gcc/usr.bin/common/Makefile:1.6 --- src/external/gpl3/gcc/usr.bin/common/Makefile:1.5 Wed Nov 15 07:47:40 2017 +++ src/external/gpl3/gcc/usr.bin/common/Makefile Sun Feb 4 10:16:07 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2017/11/15 07:47:40 mrg Exp $ +# $NetBSD: Makefile,v 1.6 2018/02/04 10:16:07 mrg Exp $ LIBISPRIVATE= yes @@ -9,11 +9,15 @@ LIB= common SRCS= diagnostic.c \ diagnostic-color.c \ + diagnostic-show-locus.o \ pretty-print.c \ - intl.c \ vec.c \ + intl.c \ input.c \ - version.c + version.c \ + hash-table.c \ + ggc-none.c \ + memory-block.cc # XXX make sure this doesn't have more than it needs CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} -I. \
CVS commit: xsrc/external/mit/MesaLib7/dist/src/glsl
Module Name:xsrc Committed By: mrg Date: Sun Feb 4 09:36:25 UTC 2018 Modified Files: xsrc/external/mit/MesaLib7/dist/src/glsl: ir_validate.cpp Log Message: fix a signed vs unsigned issue GCC 6.4 picked up. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/MesaLib7/dist/src/glsl/ir_validate.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib7/dist/src/glsl/ir_validate.cpp diff -u xsrc/external/mit/MesaLib7/dist/src/glsl/ir_validate.cpp:1.1.1.1 xsrc/external/mit/MesaLib7/dist/src/glsl/ir_validate.cpp:1.2 --- xsrc/external/mit/MesaLib7/dist/src/glsl/ir_validate.cpp:1.1.1.1 Mon Jan 5 02:40:57 2015 +++ xsrc/external/mit/MesaLib7/dist/src/glsl/ir_validate.cpp Sun Feb 4 09:36:25 2018 @@ -447,7 +447,7 @@ ir_validate::visit_leave(ir_expression * ir_visitor_status ir_validate::visit_leave(ir_swizzle *ir) { - int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w}; + unsigned chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w}; for (unsigned int i = 0; i < ir->type->vector_elements; i++) { if (chans[i] >= ir->val->type->vector_elements) {
CVS commit: src/external/gpl3/gcc/usr.bin
Module Name:src Committed By: mrg Date: Sun Feb 4 09:22:03 UTC 2018 Modified Files: src/external/gpl3/gcc/usr.bin: Makefile.inc src/external/gpl3/gcc/usr.bin/backend: Makefile src/external/gpl3/gcc/usr.bin/gcc/arch/i386: auto-host.h configargs.h Log Message: partial work-in-progress to build GCC 6.4 natively: - use -std=gnu++98 by default. - add build support for new GCC generators, etc. - regen i386 mknative files. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/gpl3/gcc/usr.bin/Makefile.inc cvs rdiff -u -r1.39 -r1.40 src/external/gpl3/gcc/usr.bin/backend/Makefile cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/gcc/usr.bin/gcc/arch/i386/auto-host.h cvs rdiff -u -r1.32 -r1.33 \ src/external/gpl3/gcc/usr.bin/gcc/arch/i386/configargs.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/gpl3/gcc/usr.bin/Makefile.inc diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.29 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.30 --- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.29 Tue Aug 22 09:17:50 2017 +++ src/external/gpl3/gcc/usr.bin/Makefile.inc Sun Feb 4 09:22:03 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.29 2017/08/22 09:17:50 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.30 2018/02/04 09:22:03 mrg Exp $ .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_ _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1 @@ -39,6 +39,8 @@ FRONTENDOBJ!= cd ${.CURDIR}/../frontend NBCOMPATLIB= -L${TOOLDIR}/lib -lnbcompat .endif +CXXFLAGS+= -std=gnu++98 + GNUHOSTDIST= ${DIST} BUILD_PREFIX= ${C_BUILD_PREFIX} Index: src/external/gpl3/gcc/usr.bin/backend/Makefile diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.39 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.40 --- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.39 Sun Oct 8 11:08:55 2017 +++ src/external/gpl3/gcc/usr.bin/backend/Makefile Sun Feb 4 09:22:03 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2017/10/08 11:08:55 joerg Exp $ +# $NetBSD: Makefile,v 1.40 2018/02/04 09:22:03 mrg Exp $ LIBISPRIVATE= yes @@ -21,6 +21,8 @@ CPPFLAGS+= -I${.CURDIR}/../../lib/libgcc CPPFLAGS.cppdefault.c+= -DPREFIX=\"/usr\" \ -DNATIVE_SYSTEM_HEADER_DIR=\"${G_NATIVE_SYSTEM_HEADER_DIR}\" +HOST_CXXFLAGS+= -std=gnu++98 + HOSTPROG_CXX= 1 .include @@ -172,10 +174,10 @@ genmodes: genmodes.lo build-errors.lo CLEANFILES+= genmodes insn-modes.c insn-modes.h-test min-insn-modes.c -gimple-match.c: genmatch +gimple-match.c: genmatch cfn-operators.pd ./genmatch --gimple ${GNUHOSTDIST}/gcc/match.pd > gimple-match.c.tmp mv gimple-match.c.tmp gimple-match.c -generic-match.c: genmatch +generic-match.c: genmatch cfn-operators.pd ./genmatch --generic ${GNUHOSTDIST}/gcc/match.pd > generic-match.c.tmp mv generic-match.c.tmp generic-match.c genmatch.lo: ${HH_NORTL} ${G_GGC_H} @@ -208,13 +210,15 @@ ${G_OBJS} ${G_OBJS:.o=.d}: tm_p.h # XXX # depends upon) it. CLEANFILES+= auto-build.h HOST_CFLAGS+= -I${.OBJDIR} +HOST_CXXFLAGS+= -I${.OBJDIR} auto-build.h: gmp.h Makefile ${_MKTARGET_CREATE} rm -rf .ab && \ mkdir .ab && \ (cd .ab && \ AWK=${TOOL_AWK:Q} \ - CC=${ORIGHOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} CXX=${HOST_CXX:Q} \ + CC=${ORIGHOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} \ + CXX=${HOST_CXX:Q} CXXFLAGS=${HOST_CXXFLAGS:Q} \ MAKE=${TOOL_GMAKE:Q} \ CONFIG_SHELL=${HOST_SH:Q} \ gcc_cv_ld=${LD:Q} \ @@ -224,7 +228,8 @@ auto-build.h: gmp.h Makefile --host=`${HOST_SH} ${GNUHOSTDIST}/config.guess` \ --target=${MACHINE_GNU_PLATFORM} && \ mv auto-host.h ../auto-build.h) && \ - rm -rf .ab + true + #rm -rf .ab pass-instances.def: passes.def gen-pass-instances.awk ${_MKTARGET_CREATE} @@ -326,7 +331,8 @@ GENPROG_RTL_DEPENDS= ${G_BUILD_RTL:.o=.l # First we generate the rules for the generators. # .for f in attr attr-common attrtab automata codes conditions config emit \ - extract flags opinit output peep preds recog mddump condmd + extract flags opinit output peep preds recog mddump condmd \ + target-def cfn-macros gen${f}.lo: ${HH} gen${f}.c gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS} ${_MKTARGET_LINK} @@ -362,7 +368,8 @@ CLEANFILES+= gen${f} gen${f}.lo # RTL based files .for f in attr.h attr-common.h codes.h config.h flags.h \ - automata.c emit.c extract.c output.c peep.c recog.c + automata.c emit.c extract.c output.c peep.c recog.c \ + target-def.h insn-${f}: gen${f:R} ${G_md_file} insn-conditions.md ${_MKTARGET_CREATE} ./gen${f:R} ${G_md_file} insn-conditions.md >${.TARGET} @@ -412,6 +419,31 @@ insn-conditions.md: gencondmd ./gencondmd >${.TARGET} CLEANFILES+= insn-conditions.md +# build params.list for params.h. +params.h: params.list +DPSRCS+= params.h +params-list.h: params.def +params.list: params-list.h + ${CPP} ${.ALLSRC} | sed 's/^#.*//;/^$$/d' > params.list.tmp && \ + mv params.list.tmp params.list +CLEANFILES+= params.list.tmp
CVS commit: src/sys/dev/stbi
Module Name:src Committed By: mrg Date: Sun Feb 4 09:18:44 UTC 2018 Modified Files: src/sys/dev/stbi: stb_image.c Log Message: a macro idiom used here triggers the GCC 6.4 ident checker. work around it. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/stbi/stb_image.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/stbi/stb_image.c diff -u src/sys/dev/stbi/stb_image.c:1.8 src/sys/dev/stbi/stb_image.c:1.9 --- src/sys/dev/stbi/stb_image.c:1.8 Thu Jan 21 17:17:53 2016 +++ src/sys/dev/stbi/stb_image.c Sun Feb 4 09:18:44 2018 @@ -430,7 +430,7 @@ extern int stbi_gif_info_from_file #endif #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: stb_image.c,v 1.8 2016/01/21 17:17:53 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stb_image.c,v 1.9 2018/02/04 09:18:44 mrg Exp $"); #include #include #include @@ -1000,18 +1000,30 @@ static unsigned char *convert_format(uns // convert source image with img_n components to one with req_comp components; // avoid switch per pixel, so use switch per scanline and massive macros switch (COMBO(img_n, req_comp)) { - CASE(1,2) dest[0]=src[0], dest[1]=255; break; - CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break; - CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break; - CASE(2,1) dest[0]=src[0]; break; - CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break; - CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break; - CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break; - CASE(3,1) dest[0]=compute_y(src[0],src[1],src[2]); break; - CASE(3,2) dest[0]=compute_y(src[0],src[1],src[2]), dest[1] = 255; break; - CASE(4,1) dest[0]=compute_y(src[0],src[1],src[2]); break; - CASE(4,2) dest[0]=compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break; - CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break; + CASE(1,2) dest[0]=src[0], dest[1]=255; + break; + CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; + break; + CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; + break; + CASE(2,1) dest[0]=src[0]; + break; + CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; + break; + CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; + break; + CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; + break; + CASE(3,1) dest[0]=compute_y(src[0],src[1],src[2]); + break; + CASE(3,2) dest[0]=compute_y(src[0],src[1],src[2]), dest[1] = 255; + break; + CASE(4,1) dest[0]=compute_y(src[0],src[1],src[2]); + break; + CASE(4,2) dest[0]=compute_y(src[0],src[1],src[2]), dest[1] = src[3]; + break; + CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; + break; default: assert(0); } #undef CASE @@ -1279,7 +1291,7 @@ __forceinline static int extend_receive( // predict well. I tried to table accelerate it but failed. // maybe it's compiling as a conditional move? if (k < m) - return (-1 << n) + k + 1; + return (UINT_MAX << n) + k + 1; else return k; } @@ -2696,13 +2708,20 @@ static int create_png_image_raw(png *a, for (i=x-1; i >= 1; --i, raw+=img_n,cur+=img_n,prior+=img_n) \ for (k=0; k < img_n; ++k) switch (filter) { -CASE(F_none) cur[k] = raw[k]; break; -CASE(F_sub) cur[k] = raw[k] + cur[k-img_n]; break; -CASE(F_up)cur[k] = raw[k] + prior[k]; break; -CASE(F_avg) cur[k] = raw[k] + ((prior[k] + cur[k-img_n])>>1); break; -CASE(F_paeth) cur[k] = (uint8) (raw[k] + paeth(cur[k-img_n],prior[k],prior[k-img_n])); break; -CASE(F_avg_first)cur[k] = raw[k] + (cur[k-img_n] >> 1); break; -CASE(F_paeth_first) cur[k] = (uint8) (raw[k] + paeth(cur[k-img_n],0,0)); break; +CASE(F_none) cur[k] = raw[k]; + break; +CASE(F_sub) cur[k] = raw[k] + cur[k-img_n]; + break; +CASE(F_up)cur[k] = raw[k] + prior[k]; + break; +CASE(F_avg) cur[k] = raw[k] + ((prior[k] + cur[k-img_n])>>1); + break; +CASE(F_paeth) cur[k] = (uint8) (raw[k] + paeth(cur[k-img_n],prior[k],prior[k-img_n])); + break; +CASE(F_avg_first)cur[k] = raw[k] + (cur[k-img_n] >> 1); + break; +CASE(F_paeth_first) cur[k] = (uint8) (raw[k] + paeth(cur[k-img_n],0,0)); + break; } #undef CASE } else { @@ -2712,13 +2731,20 @@ static int create_png_image_raw(png *a, for (i=x-1; i >= 1; --i, cur[img_n]=255,raw+=img_n,cur+=out_n,prior+=out_n) \ for (k=0; k < img_n; ++k) switch (filter) { -CASE(F_none) cur[k] = raw[k]; break; -CASE(F_sub) cur[k] = raw[k]
CVS commit: src/sys/ddb
Module Name:src Committed By: mrg Date: Sun Feb 4 09:17:54 UTC 2018 Modified Files: src/sys/ddb: db_access.c Log Message: avoid leftshift of an unsigned value To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/ddb/db_access.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/ddb/db_access.c diff -u src/sys/ddb/db_access.c:1.22 src/sys/ddb/db_access.c:1.23 --- src/sys/ddb/db_access.c:1.22 Sat Jun 6 22:06:05 2015 +++ src/sys/ddb/db_access.c Sun Feb 4 09:17:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: db_access.c,v 1.22 2015/06/06 22:06:05 matt Exp $ */ +/* $NetBSD: db_access.c,v 1.23 2018/02/04 09:17:54 mrg Exp $ */ /* * Mach Operating System @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.22 2015/06/06 22:06:05 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.23 2018/02/04 09:17:54 mrg Exp $"); #if defined(_KERNEL_OPT) #include "opt_kgdb.h" @@ -74,7 +74,7 @@ db_get_value(db_addr_t addr, size_t size if (size < sizeof(db_expr_t) && is_signed && (value & ((db_expr_t)1 << (8*size - 1 { - value |= ~(db_expr_t)0 << (8*size - 1); + value |= (unsigned long)~(db_expr_t)0 << (8*size - 1); } return (value); }
CVS commit: src/external/bsd
Module Name:src Committed By: mrg Date: Sun Feb 4 09:15:45 UTC 2018 Modified Files: src/external/bsd/am-utils/dist/amd: amfs_program.c src/external/bsd/flex/dist/src: main.c src/external/bsd/ntp/dist/ntpd: refclock_oncore.c src/external/bsd/ntp/dist/sntp/libopts: nested.c src/external/bsd/nvi/dist/cl: cl_funcs.c src/external/bsd/nvi/dist/vi: vs_refresh.c Log Message: fix GCC 6.4 issues (finally a couple that aren't actual bugs, but only weird code?): amd's amfs_program_exec() has a missing {} issue. flex's check_options() has odd inconsistent identation that trips the new ident checker. ntpd's oncore_check_leap_sec() and oncore_set_traim() have missing {} issues. sntp's optionLoadNested() an identation weirdness that trips the new ident checker. vi's cl_attr() has a wrong {} issue, and its vs_paint() has an identation weirdness that trips the new ident checker. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/am-utils/dist/amd/amfs_program.c cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/src/main.c cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/ntpd/refclock_oncore.c cvs rdiff -u -r1.10 -r1.11 src/external/bsd/ntp/dist/sntp/libopts/nested.c cvs rdiff -u -r1.7 -r1.8 src/external/bsd/nvi/dist/cl/cl_funcs.c cvs rdiff -u -r1.8 -r1.9 src/external/bsd/nvi/dist/vi/vs_refresh.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/am-utils/dist/amd/amfs_program.c diff -u src/external/bsd/am-utils/dist/amd/amfs_program.c:1.1.1.3 src/external/bsd/am-utils/dist/amd/amfs_program.c:1.2 --- src/external/bsd/am-utils/dist/amd/amfs_program.c:1.1.1.3 Sat Jan 17 16:34:15 2015 +++ src/external/bsd/am-utils/dist/amd/amfs_program.c Sun Feb 4 09:15:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: amfs_program.c,v 1.1.1.3 2015/01/17 16:34:15 christos Exp $ */ +/* $NetBSD: amfs_program.c,v 1.2 2018/02/04 09:15:44 mrg Exp $ */ /* * Copyright (c) 1997-2014 Erez Zadok @@ -144,10 +144,11 @@ amfs_program_exec(char *info) * Put stdout to stderr */ (void) fclose(stdout); - if (!logfp) + if (!logfp) { logfp = stderr; /* initialize before possible first use */ if (dup(fileno(logfp)) == -1) goto out; + } if (fileno(logfp) != fileno(stderr)) { (void) fclose(stderr); if (dup(fileno(logfp)) == -1) Index: src/external/bsd/flex/dist/src/main.c diff -u src/external/bsd/flex/dist/src/main.c:1.6 src/external/bsd/flex/dist/src/main.c:1.7 --- src/external/bsd/flex/dist/src/main.c:1.6 Tue Jan 3 01:56:03 2017 +++ src/external/bsd/flex/dist/src/main.c Sun Feb 4 09:15:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $ */ +/* $NetBSD: main.c,v 1.7 2018/02/04 09:15:45 mrg Exp $ */ /* flex - tool to generate fast lexical analyzers */ @@ -33,7 +33,7 @@ /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */ /* PURPOSE. */ #include "flexdef.h" -__RCSID("$NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.7 2018/02/04 09:15:45 mrg Exp $"); #include "version.h" @@ -313,8 +313,8 @@ void check_options (void) } } -if (extra_type) -buf_m4_define( _buf, "M4_EXTRA_TYPE_DEFS", extra_type); + if (extra_type) + buf_m4_define( _buf, "M4_EXTRA_TYPE_DEFS", extra_type); if (!use_stdout) { FILE *prev_stdout; @@ -497,12 +497,12 @@ void check_options (void) if (gen_line_dirs) outn("#line 0 \"M4_YY_OUTFILE_NAME\"\n"); - /* Dump the user defined preproc directives. */ - if (userdef_buf.elts) - outn ((char *) (userdef_buf.elts)); +/* Dump the user defined preproc directives. */ +if (userdef_buf.elts) +outn ((char *) (userdef_buf.elts)); - skelout (); - /* %% [1.0] */ +skelout (); +/* %% [1.0] */ } /* flexend - terminate flex Index: src/external/bsd/ntp/dist/ntpd/refclock_oncore.c diff -u src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.14 src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.15 --- src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.14 Thu Apr 13 20:17:42 2017 +++ src/external/bsd/ntp/dist/ntpd/refclock_oncore.c Sun Feb 4 09:15:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: refclock_oncore.c,v 1.14 2017/04/13 20:17:42 christos Exp $ */ +/* $NetBSD: refclock_oncore.c,v 1.15 2018/02/04 09:15:45 mrg Exp $ */ /* * @@ -3425,9 +3425,10 @@ oncore_check_leap_sec( instance->Bj_day = instance->BEHa[5]; if (instance->saw_Gj < 0) { /* -1 DONT have Gj use Bj */ - if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12)) + if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12)) { oncore_sendmsg(instance, oncore_cmd_Bj, sizeof(oncore_cmd_Bj)); oncore_sendmsg(instance, oncore_cmd_Bl, sizeof(oncore_cmd_Bl)); + } return; } @@ -3868,9 +3869,10
CVS commit: src
Module Name:src Committed By: mrg Date: Sun Feb 4 09:03:23 UTC 2018 Modified Files: src/libexec/identd: Makefile src/sbin/newfs_msdos: mkfs_msdos.c src/sbin/sysctl: sysctl.c Log Message: updates for GCC 6.4: identd has aliasing violations, use -fno-strict-aliasing. newfs_msdos's getbpbinfo() has missing {} issues. sysctl's kern_cp_id() has missing {} issues. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/libexec/identd/Makefile cvs rdiff -u -r1.13 -r1.14 src/sbin/newfs_msdos/mkfs_msdos.c cvs rdiff -u -r1.159 -r1.160 src/sbin/sysctl/sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/identd/Makefile diff -u src/libexec/identd/Makefile:1.15 src/libexec/identd/Makefile:1.16 --- src/libexec/identd/Makefile:1.15 Sun Dec 11 15:43:48 2016 +++ src/libexec/identd/Makefile Sun Feb 4 09:03:23 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2016/12/11 15:43:48 christos Exp $ +# $NetBSD: Makefile,v 1.16 2018/02/04 09:03:23 mrg Exp $ .include @@ -26,4 +26,7 @@ LDADD+=-lnpf -lprop DPADD+=${LIBNPF} ${LIBPROP} .endif +# XXX +COPTS+= -fno-strict-aliasing + .include Index: src/sbin/newfs_msdos/mkfs_msdos.c diff -u src/sbin/newfs_msdos/mkfs_msdos.c:1.13 src/sbin/newfs_msdos/mkfs_msdos.c:1.14 --- src/sbin/newfs_msdos/mkfs_msdos.c:1.13 Fri Apr 14 15:39:29 2017 +++ src/sbin/newfs_msdos/mkfs_msdos.c Sun Feb 4 09:03:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mkfs_msdos.c,v 1.13 2017/04/14 15:39:29 christos Exp $ */ +/* $NetBSD: mkfs_msdos.c,v 1.14 2018/02/04 09:03:23 mrg Exp $ */ /* * Copyright (c) 1998 Robert Nordier @@ -37,7 +37,7 @@ static const char rcsid[] = "$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $"; #else -__RCSID("$NetBSD: mkfs_msdos.c,v 1.13 2017/04/14 15:39:29 christos Exp $"); +__RCSID("$NetBSD: mkfs_msdos.c,v 1.14 2018/02/04 09:03:23 mrg Exp $"); #endif #endif /* not lint */ @@ -896,10 +896,11 @@ getbpbinfo(int fd, const char *fname, co return -1; bpb->spt = nsectors; } -if (!bpb->hds) +if (!bpb->hds) { if (ckgeom(fname, ntracks, "drive heads") == -1) return -1; bpb->hds = ntracks; +} if (!bpb->bsec) bpb->bsec = size; Index: src/sbin/sysctl/sysctl.c diff -u src/sbin/sysctl/sysctl.c:1.159 src/sbin/sysctl/sysctl.c:1.160 --- src/sbin/sysctl/sysctl.c:1.159 Thu Apr 13 14:46:32 2017 +++ src/sbin/sysctl/sysctl.c Sun Feb 4 09:03:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.159 2017/04/13 14:46:32 christos Exp $ */ +/* $NetBSD: sysctl.c,v 1.160 2018/02/04 09:03:23 mrg Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\ #if 0 static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: sysctl.c,v 1.159 2017/04/13 14:46:32 christos Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.160 2018/02/04 09:03:23 mrg Exp $"); #endif #endif /* not lint */ @@ -2454,12 +2454,13 @@ kern_cp_id(HANDLER_ARGS) sizeof(u_int64_t), DISPLAY_VALUE); else if (Aflag) { - for (i = 0; i < n; i++) + for (i = 0; i < n; i++) { (void)snprintf(s, sizeof(s), "%s%s%d", sname, sep, i); tname = s; display_number(, tname, _id[i], sizeof(u_int64_t), DISPLAY_VALUE); + } } else { if (xflag || rflag)
CVS commit: src/external/bsd/pkg_install/dist/lib
Module Name:src Committed By: maya Date: Sun Feb 4 09:00:51 UTC 2018 Modified Files: src/external/bsd/pkg_install/dist/lib: license.c pkcs7.c pkg_io.c version.h Log Message: Merge pkg_install-20171030 Bump version to 20171030 for netpgpverify fixes. Add zsh to default_acceptable_licenses. Undef bootstrap hack. Fix OpenSSL 1.1.0 build OpenSSL 1.1.0 makes xkusage and ex_flags opaque. Use X509_check_ca rather than a custom and nearly identical implementation. This is available since OpenSSL 0.9.8 (even in RHEL5). This is also done because we cannot implement it identically under OpenSSL 1.1.0 due to missing getters. Test EXFLAG_XKUSAGE rather than zero xkusage test no usage to avoid openssl 1.1.0 getter returning a different code on this case. Use getter for xkusage in the non-zero test case. Provide fallback definitions for getters. PR pkg/52298, PR pkg/52648 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pkg_install/dist/lib/license.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/lib/pkcs7.c \ src/external/bsd/pkg_install/dist/lib/pkg_io.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/pkg_install/dist/lib/version.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/pkg_install/dist/lib/license.c diff -u src/external/bsd/pkg_install/dist/lib/license.c:1.5 src/external/bsd/pkg_install/dist/lib/license.c:1.6 --- src/external/bsd/pkg_install/dist/lib/license.c:1.5 Thu Apr 20 13:18:23 2017 +++ src/external/bsd/pkg_install/dist/lib/license.c Sun Feb 4 09:00:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: license.c,v 1.5 2017/04/20 13:18:23 joerg Exp $ */ +/* $NetBSD: license.c,v 1.6 2018/02/04 09:00:51 maya Exp $ */ /*- * Copyright (c) 2009 Joerg Sonnenberger. @@ -92,7 +92,8 @@ const char *default_acceptable_licenses "w3c " "x11 " "zlib " -"zpl-2.0 zpl-2.1"; +"zpl-2.0 zpl-2.1 " +"zsh"; #ifdef DEBUG static size_t hash_collisions; Index: src/external/bsd/pkg_install/dist/lib/pkcs7.c diff -u src/external/bsd/pkg_install/dist/lib/pkcs7.c:1.2 src/external/bsd/pkg_install/dist/lib/pkcs7.c:1.3 --- src/external/bsd/pkg_install/dist/lib/pkcs7.c:1.2 Thu Apr 20 13:18:23 2017 +++ src/external/bsd/pkg_install/dist/lib/pkcs7.c Sun Feb 4 09:00:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pkcs7.c,v 1.2 2017/04/20 13:18:23 joerg Exp $ */ +/* $NetBSD: pkcs7.c,v 1.3 2018/02/04 09:00:51 maya Exp $ */ #if HAVE_CONFIG_H #include "config.h" #endif @@ -7,7 +7,7 @@ #include #endif -__RCSID("$NetBSD: pkcs7.c,v 1.2 2017/04/20 13:18:23 joerg Exp $"); +__RCSID("$NetBSD: pkcs7.c,v 1.3 2018/02/04 09:00:51 maya Exp $"); /*- * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc. @@ -55,25 +55,12 @@ __RCSID("$NetBSD: pkcs7.c,v 1.2 2017/04/ #define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA) #endif -static const unsigned int pkg_key_usage = XKU_CODE_SIGN | XKU_SMIME; +#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1010L) +#define X509_get_extended_key_usage(x) x->ex_xkusage +#define X509_get_extension_flags(x) x->ex_flags +#endif -static int -check_ca(X509 *cert) -{ - if ((cert->ex_flags & EXFLAG_KUSAGE) != 0 && - (cert->ex_kusage & KU_KEY_CERT_SIGN) != KU_KEY_CERT_SIGN) - return 0; - if ((cert->ex_flags & EXFLAG_BCONS) != 0) - return (cert->ex_flags & EXFLAG_CA) == EXFLAG_CA; - if ((cert->ex_flags & (EXFLAG_V1|EXFLAG_SS)) == (EXFLAG_V1|EXFLAG_SS)) - return 1; - if ((cert->ex_flags & EXFLAG_KUSAGE) != 0) - return 1; - if ((cert->ex_flags & EXFLAG_NSCERT) != 0 && - (cert->ex_nscert & NS_ANY_CA) != 0) - return 1; - return 0; -} +static const unsigned int pkg_key_usage = XKU_CODE_SIGN | XKU_SMIME; static STACK_OF(X509) * file_to_certs(const char *file) @@ -180,18 +167,18 @@ easy_pkcs7_verify(const char *content, s /* Compute ex_xkusage */ X509_check_purpose(sk_X509_value(signers, i), -1, -1); - if (check_ca(sk_X509_value(signers, i))) { + if (X509_check_ca(sk_X509_value(signers, i))) { warnx("CA keys are not valid for signatures"); goto cleanup; } if (is_pkg) { - if (sk_X509_value(signers, i)->ex_xkusage != pkg_key_usage) { + if (X509_get_extended_key_usage(sk_X509_value(signers, i)) != pkg_key_usage) { warnx("Certificate must have CODE SIGNING " "and EMAIL PROTECTION property"); goto cleanup; } } else { - if (sk_X509_value(signers, i)->ex_xkusage != 0) { + if (X509_get_extension_flags(sk_X509_value(signers, i)) & EXFLAG_XKUSAGE) { warnx("Certificate must not have any property"); goto cleanup; } @@ -271,12 +258,12 @@ easy_pkcs7_sign(const char *content, siz /* Compute ex_kusage */ X509_check_purpose(certificate, -1, 0); - if (check_ca(certificate)) { + if (X509_check_ca(certificate)) { warnx("CA keys are not valid for signatures"); goto cleanup; } - if
CVS commit: src
Module Name:src Committed By: mrg Date: Sun Feb 4 09:01:13 UTC 2018 Modified Files: src/usr.bin/mail: lex.c src/usr.bin/telnet: sys_bsd.c src/usr.sbin/isdn/isdnd: rc_config.c src/usr.sbin/isdn/isdntrace: q931_util.c src/usr.sbin/map-mbone: mapper.c src/usr.sbin/sysinst: partman.c src/usr.sbin/timed/timed: timed.c Log Message: fixes for GCC 6.4: mail's execute() needs a volatile for setjmp(). telnet has a missing {} issue. isdnd's print_config() has a missing/wrong {} issue, and its p_q931bc() has inconsistent indentation (but not any actual problem.) map-mbone's accept_neighbors2() compares a vs. a instead of a vs. b. sysinst's pm_cgd_check() has missing {} issue. timed's main() has missing {} issue. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/mail/lex.c cvs rdiff -u -r1.33 -r1.34 src/usr.bin/telnet/sys_bsd.c cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/isdn/isdnd/rc_config.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/isdn/isdntrace/q931_util.c cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/map-mbone/mapper.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/partman.c cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/timed/timed/timed.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mail/lex.c diff -u src/usr.bin/mail/lex.c:1.44 src/usr.bin/mail/lex.c:1.45 --- src/usr.bin/mail/lex.c:1.44 Thu Nov 9 20:27:50 2017 +++ src/usr.bin/mail/lex.c Sun Feb 4 09:01:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.44 2017/11/09 20:27:50 christos Exp $ */ +/* $NetBSD: lex.c,v 1.45 2018/02/04 09:01:12 mrg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95"; #else -__RCSID("$NetBSD: lex.c,v 1.44 2017/11/09 20:27:50 christos Exp $"); +__RCSID("$NetBSD: lex.c,v 1.45 2018/02/04 09:01:12 mrg Exp $"); #endif #endif /* not lint */ @@ -627,7 +627,7 @@ execute(char linebuf[], enum execute_con char *volatile cp; int retval; int c; - int e = 1; + volatile int e = 1; /* * Strip the white space away from the beginning Index: src/usr.bin/telnet/sys_bsd.c diff -u src/usr.bin/telnet/sys_bsd.c:1.33 src/usr.bin/telnet/sys_bsd.c:1.34 --- src/usr.bin/telnet/sys_bsd.c:1.33 Mon Jan 9 16:08:55 2012 +++ src/usr.bin/telnet/sys_bsd.c Sun Feb 4 09:01:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_bsd.c,v 1.33 2012/01/09 16:08:55 christos Exp $ */ +/* $NetBSD: sys_bsd.c,v 1.34 2018/02/04 09:01:12 mrg Exp $ */ /* * Copyright (c) 1988, 1990, 1993 @@ -34,7 +34,7 @@ #if 0 from: static char sccsid[] = "@(#)sys_bsd.c 8.4 (Berkeley) 5/30/95"; #else -__RCSID("$NetBSD: sys_bsd.c,v 1.33 2012/01/09 16:08:55 christos Exp $"); +__RCSID("$NetBSD: sys_bsd.c,v 1.34 2018/02/04 09:01:12 mrg Exp $"); #endif #endif /* not lint */ @@ -468,11 +468,12 @@ TerminalSpeeds(long *ispeed, long *ospee out = cfgetospeed(_tc); in = cfgetispeed(_tc); -if (in == 0) +if (in == 0) { in = out; *ispeed = in; *ospeed = out; +} } int Index: src/usr.sbin/isdn/isdnd/rc_config.c diff -u src/usr.sbin/isdn/isdnd/rc_config.c:1.26 src/usr.sbin/isdn/isdnd/rc_config.c:1.27 --- src/usr.sbin/isdn/isdnd/rc_config.c:1.26 Thu Mar 1 22:31:48 2012 +++ src/usr.sbin/isdn/isdnd/rc_config.c Sun Feb 4 09:01:12 2018 @@ -27,7 +27,7 @@ * i4b daemon - config file processing * --- * - * $Id: rc_config.c,v 1.26 2012/03/01 22:31:48 joerg Exp $ + * $Id: rc_config.c,v 1.27 2018/02/04 09:01:12 mrg Exp $ * * $FreeBSD$ * @@ -1564,20 +1564,19 @@ print_config(void) for (j = 0; j < cep->remote_numbers_count; j++) fprintf(PFILE, "remote-phone-dialout = %s\t\t# telephone number %d for dialing out to remote\n", cep->remote_numbers[j].number, j+1); -fprintf(PFILE, "remdial-handling = "); + fprintf(PFILE, "remdial-handling = "); -switch (cep->remote_numbers_handling) -{ -case RNH_NEXT: - fprintf(PFILE, "next\t\t# use next number after last successful for new dial\n"); - break; -case RNH_LAST: - fprintf(PFILE, "last\t\t# use last successful number for new dial\n"); - break; -case RNH_FIRST: - fprintf(PFILE, "first\t\t# always start with first number for new dial\n"); - break; -} + switch (cep->remote_numbers_handling) + { + case RNH_NEXT: +fprintf(PFILE, "next\t\t# use next number after last successful for new dial\n"); +break; + case RNH_LAST: +fprintf(PFILE, "last\t\t# use last successful number for new dial\n"); +break; + case RNH_FIRST: +fprintf(PFILE, "first\t\t# always start with first number for new dial\n"); +break; } if (cep->local_phone_dialout[0]) @@ -1752,6 +1751,7 @@ print_config(void) fprintf(PFILE, "downtime = %d\t\t# time device is switched off\n", cep->downtime); } } + } } fprintf(PFILE,
CVS commit: src/games
Module Name:src Committed By: mrg Date: Sun Feb 4 08:48:05 UTC 2018 Modified Files: src/games/battlestar: command3.c command7.c src/games/tetris: scores.c Log Message: fix issues found by GCC 6.4: battlestar was missing some {} in its insane printf()+puts() usage. this is a literal code sequence i found: printf("The blast catches "); printf("the goddess in the "); printf("stomach, knocking "); puts("her to the ground."); printf("She writhes in the "); printf("dirt as the agony of "); puts("death taunts her."); puts("She has stopped moving."); no lines inserted or removed. tetris' checkscores() had wrong and missing {} usage. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/games/battlestar/command3.c \ src/games/battlestar/command7.c cvs rdiff -u -r1.22 -r1.23 src/games/tetris/scores.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/battlestar/command3.c diff -u src/games/battlestar/command3.c:1.3 src/games/battlestar/command3.c:1.4 --- src/games/battlestar/command3.c:1.3 Fri Jul 1 06:04:54 2005 +++ src/games/battlestar/command3.c Sun Feb 4 08:48:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: command3.c,v 1.3 2005/07/01 06:04:54 jmc Exp $ */ +/* $NetBSD: command3.c,v 1.4 2018/02/04 08:48:05 mrg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)com3.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: command3.c,v 1.3 2005/07/01 06:04:54 jmc Exp $"); +__RCSID("$NetBSD: command3.c,v 1.4 2018/02/04 08:48:05 mrg Exp $"); #endif #endif/* not lint */ @@ -306,9 +306,10 @@ shoot(void) if (wintime) live(); break; - } else + } else { printf("I don't see any "); puts("goddess around here."); + } break; case TIMER: Index: src/games/battlestar/command7.c diff -u src/games/battlestar/command7.c:1.3 src/games/battlestar/command7.c:1.4 --- src/games/battlestar/command7.c:1.3 Fri Jul 1 06:04:54 2005 +++ src/games/battlestar/command7.c Sun Feb 4 08:48:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: command7.c,v 1.3 2005/07/01 06:04:54 jmc Exp $ */ +/* $NetBSD: command7.c,v 1.4 2018/02/04 08:48:05 mrg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)com7.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: command7.c,v 1.3 2005/07/01 06:04:54 jmc Exp $"); +__RCSID("$NetBSD: command7.c,v 1.4 2018/02/04 08:48:05 mrg Exp $"); #endif #endif/* not lint */ @@ -273,9 +273,10 @@ fighton: } if (lifeline >= strength) { printf("You have killed the %s.\n", objsht[enemy]); - if (enemy == ELF || enemy == DARK) + if (enemy == ELF || enemy == DARK) { printf("A watery black smoke consumes his body and "); puts("then vanishes with a peal of thunder!"); + } clearbit(location[position].objects, enemy); power += 2; notes[JINXED]++; Index: src/games/tetris/scores.c diff -u src/games/tetris/scores.c:1.22 src/games/tetris/scores.c:1.23 --- src/games/tetris/scores.c:1.22 Sat Mar 22 19:05:30 2014 +++ src/games/tetris/scores.c Sun Feb 4 08:48:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: scores.c,v 1.22 2014/03/22 19:05:30 dholland Exp $ */ +/* $NetBSD: scores.c,v 1.23 2018/02/04 08:48:05 mrg Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -830,7 +830,8 @@ checkscores(struct highscore *hs, int nu continue; } } -if (sp->hs_level < NLEVELS && sp->hs_level >= 0) + } +if (sp->hs_level < NLEVELS && sp->hs_level >= 0) { levelfound[sp->hs_level] = 1; i++, sp++; }
CVS commit: src/dist/pf/sbin/pfctl
Module Name:src Committed By: mrg Date: Sun Feb 4 08:44:36 UTC 2018 Modified Files: src/dist/pf/sbin/pfctl: pfctl_altq.c pfctl_optimize.c Log Message: fix two issues found by GCC 6.4: - cbq_compute_idletime() had a fprintf() not in the intended missing {}. - skip_cmp_dst_addr() compared a vs a instead of a vs b. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/dist/pf/sbin/pfctl/pfctl_altq.c cvs rdiff -u -r1.7 -r1.8 src/dist/pf/sbin/pfctl/pfctl_optimize.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/pf/sbin/pfctl/pfctl_altq.c diff -u src/dist/pf/sbin/pfctl/pfctl_altq.c:1.9 src/dist/pf/sbin/pfctl/pfctl_altq.c:1.10 --- src/dist/pf/sbin/pfctl/pfctl_altq.c:1.9 Mon Mar 1 00:14:08 2010 +++ src/dist/pf/sbin/pfctl/pfctl_altq.c Sun Feb 4 08:44:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pfctl_altq.c,v 1.9 2010/03/01 00:14:08 joerg Exp $ */ +/* $NetBSD: pfctl_altq.c,v 1.10 2018/02/04 08:44:36 mrg Exp $ */ /* $OpenBSD: pfctl_altq.c,v 1.92 2007/05/27 05:15:17 claudio Exp $ */ /* @@ -450,12 +450,13 @@ cbq_compute_idletime(struct pfctl *pf, s * this causes integer overflow in kernel! * (bandwidth < 6Kbps when max_pkt_size=1500) */ - if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) + if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) { warnx("queue bandwidth must be larger than %s", rate2str(ifnsPerByte * (double)opts->maxpktsize / (double)INT_MAX * (double)pa->ifbandwidth)); fprintf(stderr, "cbq: queue %s is too slow!\n", pa->qname); + } nsPerByte = (double)(INT_MAX / opts->maxpktsize); } Index: src/dist/pf/sbin/pfctl/pfctl_optimize.c diff -u src/dist/pf/sbin/pfctl/pfctl_optimize.c:1.7 src/dist/pf/sbin/pfctl/pfctl_optimize.c:1.8 --- src/dist/pf/sbin/pfctl/pfctl_optimize.c:1.7 Mon May 30 17:21:07 2016 +++ src/dist/pf/sbin/pfctl/pfctl_optimize.c Sun Feb 4 08:44:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pfctl_optimize.c,v 1.7 2016/05/30 17:21:07 dholland Exp $ */ +/* $NetBSD: pfctl_optimize.c,v 1.8 2018/02/04 08:44:36 mrg Exp $ */ /* $OpenBSD: pfctl_optimize.c,v 1.13 2006/10/31 14:17:45 mcbride Exp $ */ /* @@ -1084,7 +1084,7 @@ skip_cmp_dst_addr(struct pf_rule *a, str return (0); case PF_ADDR_DYNIFTL: if (strcmp(a->dst.addr.v.ifname, b->dst.addr.v.ifname) != 0 || - a->dst.addr.iflags != a->dst.addr.iflags || + a->dst.addr.iflags != b->dst.addr.iflags || memcmp(>dst.addr.v.a.mask, >dst.addr.v.a.mask, sizeof(a->dst.addr.v.a.mask))) return (1); @@ -1156,7 +1156,7 @@ skip_cmp_src_addr(struct pf_rule *a, str return (0); case PF_ADDR_DYNIFTL: if (strcmp(a->src.addr.v.ifname, b->src.addr.v.ifname) != 0 || - a->src.addr.iflags != a->src.addr.iflags || + a->src.addr.iflags != b->src.addr.iflags || memcmp(>src.addr.v.a.mask, >src.addr.v.a.mask, sizeof(a->src.addr.v.a.mask))) return (1);
CVS import: src/external/bsd/pkg_install/dist
Module Name:src Committed By: maya Date: Sun Feb 4 08:20:48 UTC 2018 Update of /cvsroot/src/external/bsd/pkg_install/dist In directory ivanova.netbsd.org:/tmp/cvs-serv23416 Log Message: Import pkg_install-20171030 Status: Vendor Tag: PKGSRC Release Tags: pkg_install-20171030 N src/external/bsd/pkg_install/dist/Makefile.in N src/external/bsd/pkg_install/dist/README N src/external/bsd/pkg_install/dist/config.guess N src/external/bsd/pkg_install/dist/config.sub N src/external/bsd/pkg_install/dist/configure N src/external/bsd/pkg_install/dist/configure.ac N src/external/bsd/pkg_install/dist/install-sh N src/external/bsd/pkg_install/dist/tkpkg N src/external/bsd/pkg_install/dist/add/Makefile.in U src/external/bsd/pkg_install/dist/add/add.h U src/external/bsd/pkg_install/dist/add/main.c U src/external/bsd/pkg_install/dist/add/perform.c U src/external/bsd/pkg_install/dist/add/pkg_add.1 N src/external/bsd/pkg_install/dist/add/pkg_add.cat N src/external/bsd/pkg_install/dist/admin/Makefile.in U src/external/bsd/pkg_install/dist/admin/admin.h U src/external/bsd/pkg_install/dist/admin/audit-packages.8 N src/external/bsd/pkg_install/dist/admin/audit-packages.cat U src/external/bsd/pkg_install/dist/admin/audit-packages.sh.in U src/external/bsd/pkg_install/dist/admin/audit.c U src/external/bsd/pkg_install/dist/admin/check.c U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.8 N src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.cat U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.sh.in U src/external/bsd/pkg_install/dist/admin/main.c U src/external/bsd/pkg_install/dist/admin/pkg_admin.1 N src/external/bsd/pkg_install/dist/admin/pkg_admin.cat N src/external/bsd/pkg_install/dist/create/Makefile.in U src/external/bsd/pkg_install/dist/create/build.c U src/external/bsd/pkg_install/dist/create/create.h U src/external/bsd/pkg_install/dist/create/main.c U src/external/bsd/pkg_install/dist/create/perform.c U src/external/bsd/pkg_install/dist/create/pkg_create.1 N src/external/bsd/pkg_install/dist/create/pkg_create.cat U src/external/bsd/pkg_install/dist/create/pl.c U src/external/bsd/pkg_install/dist/create/util.c N src/external/bsd/pkg_install/dist/delete/Makefile.in U src/external/bsd/pkg_install/dist/delete/pkg_delete.1 U src/external/bsd/pkg_install/dist/delete/pkg_delete.c N src/external/bsd/pkg_install/dist/delete/pkg_delete.cat N src/external/bsd/pkg_install/dist/info/Makefile.in U src/external/bsd/pkg_install/dist/info/info.h U src/external/bsd/pkg_install/dist/info/main.c U src/external/bsd/pkg_install/dist/info/perform.c U src/external/bsd/pkg_install/dist/info/pkg_info.1 N src/external/bsd/pkg_install/dist/info/pkg_info.cat U src/external/bsd/pkg_install/dist/info/show.c N src/external/bsd/pkg_install/dist/lib/Makefile.in U src/external/bsd/pkg_install/dist/lib/automatic.c U src/external/bsd/pkg_install/dist/lib/config.h.in U src/external/bsd/pkg_install/dist/lib/conflicts.c U src/external/bsd/pkg_install/dist/lib/defs.h U src/external/bsd/pkg_install/dist/lib/dewey.c U src/external/bsd/pkg_install/dist/lib/dewey.h U src/external/bsd/pkg_install/dist/lib/fexec.c U src/external/bsd/pkg_install/dist/lib/file.c U src/external/bsd/pkg_install/dist/lib/global.c U src/external/bsd/pkg_install/dist/lib/gpgsig.c U src/external/bsd/pkg_install/dist/lib/iterate.c U src/external/bsd/pkg_install/dist/lib/lib.h C src/external/bsd/pkg_install/dist/lib/license.c U src/external/bsd/pkg_install/dist/lib/lpkg.c U src/external/bsd/pkg_install/dist/lib/opattern.c U src/external/bsd/pkg_install/dist/lib/parse-config.c C src/external/bsd/pkg_install/dist/lib/pkcs7.c U src/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in N src/external/bsd/pkg_install/dist/lib/pkg_install.conf.cat.in C src/external/bsd/pkg_install/dist/lib/pkg_io.c U src/external/bsd/pkg_install/dist/lib/pkg_signature.c U src/external/bsd/pkg_install/dist/lib/pkg_summary.5 N src/external/bsd/pkg_install/dist/lib/pkg_summary.cat U src/external/bsd/pkg_install/dist/lib/pkgdb.c U src/external/bsd/pkg_install/dist/lib/pkgsrc.7 N src/external/bsd/pkg_install/dist/lib/pkgsrc.cat U src/external/bsd/pkg_install/dist/lib/plist.c U src/external/bsd/pkg_install/dist/lib/remove.c U src/external/bsd/pkg_install/dist/lib/str.c U src/external/bsd/pkg_install/dist/lib/var.c U src/external/bsd/pkg_install/dist/lib/version.c C src/external/bsd/pkg_install/dist/lib/version.h U src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c U src/external/bsd/pkg_install/dist/lib/xwrapper.c U src/external/bsd/pkg_install/dist/x509/pkgsrc.cnf U src/external/bsd/pkg_install/dist/x509/pkgsrc.sh U src/external/bsd/pkg_install/dist/x509/signing.txt 4 conflicts created by this import. Use the following command to help the merge: cvs checkout -jPKGSRC:yesterday -jPKGSRC src/external/bsd/pkg_install/dist
CVS commit: src
Module Name:src Committed By: mrg Date: Sun Feb 4 08:19:42 UTC 2018 Modified Files: src/external/bsd/ipf/bin/ipftest: bpf_filter.c src/external/bsd/ipf/dist: ip_fil.c src/external/bsd/ipf/dist/ipsend: ip.c ipresend.c ipsend.c ipsopt.c iptest.c iptests.c resend.c sbpf.c sock.c src/external/bsd/ipf/dist/lib: facpri.c getnattype.c ipft_hx.c ipft_pc.c ipft_tx.c kmem.c nat_setgroupmap.c printactiveaddr.c printactivenat.c printaps.c printnat.c printnataddr.c printproto.c src/external/bsd/ipf/dist/tools: ipf.c ipfcomp.c ipfs.c ipfstat.c ipftest.c ipmon.c ipnat.c src/sys/external/bsd/ipf/netinet: fil.c Log Message: apply __attribute__((__used__)) for rcsid, etc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/bin/ipftest/bpf_filter.c cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/dist/ip_fil.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ipf/dist/ipsend/ip.c \ src/external/bsd/ipf/dist/ipsend/sbpf.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ipf/dist/ipsend/ipresend.c \ src/external/bsd/ipf/dist/ipsend/ipsend.c \ src/external/bsd/ipf/dist/ipsend/ipsopt.c \ src/external/bsd/ipf/dist/ipsend/iptest.c \ src/external/bsd/ipf/dist/ipsend/resend.c cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/dist/ipsend/iptests.c \ src/external/bsd/ipf/dist/ipsend/sock.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ipf/dist/lib/facpri.c \ src/external/bsd/ipf/dist/lib/getnattype.c \ src/external/bsd/ipf/dist/lib/ipft_pc.c \ src/external/bsd/ipf/dist/lib/kmem.c \ src/external/bsd/ipf/dist/lib/nat_setgroupmap.c \ src/external/bsd/ipf/dist/lib/printactiveaddr.c \ src/external/bsd/ipf/dist/lib/printnataddr.c \ src/external/bsd/ipf/dist/lib/printproto.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ipf/dist/lib/ipft_hx.c \ src/external/bsd/ipf/dist/lib/ipft_tx.c \ src/external/bsd/ipf/dist/lib/printactivenat.c \ src/external/bsd/ipf/dist/lib/printnat.c cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/dist/lib/printaps.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ipf/dist/tools/ipf.c \ src/external/bsd/ipf/dist/tools/ipfs.c \ src/external/bsd/ipf/dist/tools/ipnat.c cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/dist/tools/ipfcomp.c cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ipf/dist/tools/ipfstat.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ipf/dist/tools/ipftest.c cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ipf/dist/tools/ipmon.c cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/ipf/netinet/fil.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/ipf/bin/ipftest/bpf_filter.c diff -u src/external/bsd/ipf/bin/ipftest/bpf_filter.c:1.1 src/external/bsd/ipf/bin/ipftest/bpf_filter.c:1.2 --- src/external/bsd/ipf/bin/ipftest/bpf_filter.c:1.1 Fri Mar 23 21:29:45 2012 +++ src/external/bsd/ipf/bin/ipftest/bpf_filter.c Sun Feb 4 08:19:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf_filter.c,v 1.1 2012/03/23 21:29:45 christos Exp $ */ +/* $NetBSD: bpf_filter.c,v 1.2 2018/02/04 08:19:42 mrg Exp $ */ /*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -41,7 +41,7 @@ */ #if !(defined(lint) || defined(KERNEL) || defined(_KERNEL)) -static const char rcsid[] = +static __attribute__((__used__)) const char rcsid[] = "@(#) Header: /devel/CVS/IP-Filter/bpf_filter.c,v 2.2.2.3 2006/10/03 11:25:56 darrenr Exp (LBL)"; #endif Index: src/external/bsd/ipf/dist/ip_fil.c diff -u src/external/bsd/ipf/dist/ip_fil.c:1.4 src/external/bsd/ipf/dist/ip_fil.c:1.5 --- src/external/bsd/ipf/dist/ip_fil.c:1.4 Sun Jul 22 14:27:35 2012 +++ src/external/bsd/ipf/dist/ip_fil.c Sun Feb 4 08:19:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_fil.c,v 1.4 2012/07/22 14:27:35 darrenr Exp $ */ +/* $NetBSD: ip_fil.c,v 1.5 2018/02/04 08:19:42 mrg Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -8,8 +8,8 @@ * Id: ip_fil.c,v 1.1.1.2 2012/07/22 13:44:12 darrenr Exp */ #if !defined(lint) -static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; -static const char rcsid[] = "@(#)Id: ip_fil.c,v 1.1.1.2 2012/07/22 13:44:12 darrenr Exp"; +static __attribute__((__used__)) const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; +static __attribute__((__used__)) const char rcsid[] = "@(#)Id: ip_fil.c,v 1.1.1.2 2012/07/22 13:44:12 darrenr Exp"; #endif #include "ipf.h" Index: src/external/bsd/ipf/dist/ipsend/ip.c diff -u src/external/bsd/ipf/dist/ipsend/ip.c:1.3 src/external/bsd/ipf/dist/ipsend/ip.c:1.4 --- src/external/bsd/ipf/dist/ipsend/ip.c:1.3 Sun Jul 22 14:27:35 2012 +++ src/external/bsd/ipf/dist/ipsend/ip.c Sun Feb 4 08:19:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip.c,v 1.3 2012/07/22 14:27:35 darrenr Exp $ */ +/* $NetBSD: ip.c,v 1.4 2018/02/04 08:19:42 mrg Exp $ */ /* * ip.c (C) 1995-1998 Darren Reed @@ -6,8 +6,8 @@