CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kre Date: Fri Jun 1 05:48:29 UTC 2018 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: 80 column police. Some KNF and whitespace corrections (until I got bored...) NFCI. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.60 src/tests/lib/libc/sys/t_ptrace_wait.c:1.61 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.60 Wed May 30 05:09:11 2018 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Fri Jun 1 05:48:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.60 2018/05/30 05:09:11 kre Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.61 2018/06/01 05:48:29 kre Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.60 2018/05/30 05:09:11 kre Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.61 2018/06/01 05:48:29 kre Exp $"); #include #include @@ -60,16 +60,20 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.60 #include "msg.h" #define PARENT_TO_CHILD(info, fds, msg) \ -SYSCALL_REQUIRE(msg_write_child(info " to child " # fds, , , sizeof(msg)) == 0) +SYSCALL_REQUIRE(msg_write_child(info " to child " # fds, , , \ + sizeof(msg)) == 0) #define CHILD_FROM_PARENT(info, fds, msg) \ -FORKEE_ASSERT(msg_read_parent(info " from parent " # fds, , , sizeof(msg)) == 0) +FORKEE_ASSERT(msg_read_parent(info " from parent " # fds, , , \ + sizeof(msg)) == 0) #define CHILD_TO_PARENT(info, fds, msg) \ -FORKEE_ASSERT(msg_write_parent(info " to parent " # fds, , , sizeof(msg)) == 0) +FORKEE_ASSERT(msg_write_parent(info " to parent " # fds, , , \ + sizeof(msg)) == 0) #define PARENT_FROM_CHILD(info, fds, msg) \ -SYSCALL_REQUIRE(msg_read_child(info " from parent " # fds, , , sizeof(msg)) == 0) +SYSCALL_REQUIRE(msg_read_child(info " from parent " # fds, , , \ + sizeof(msg)) == 0) #define SYSCALL_REQUIRE(expr) ATF_REQUIRE_MSG(expr, "%s: %s", # expr, \ strerror(errno)) @@ -127,15 +131,15 @@ traceme_raise(int sigval) validate_status_stopped(status, sigval); DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for " - "child\n"); + "child\n"); SYSCALL_REQUIRE(ptrace(PT_GET_SIGINFO, child, , - sizeof(info)) != -1); + sizeof(info)) != -1); DPRINTF("Signal traced to lwpid=%d\n", info.psi_lwpid); DPRINTF("Signal properties: si_signo=%#x si_code=%#x " - "si_errno=%#x\n", - info.psi_siginfo.si_signo, info.psi_siginfo.si_code, - info.psi_siginfo.si_errno); + "si_errno=%#x\n", + info.psi_siginfo.si_signo, info.psi_siginfo.si_code, + info.psi_siginfo.si_errno); ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP); @@ -146,7 +150,7 @@ traceme_raise(int sigval) DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), - child); + child); break; } @@ -154,18 +158,18 @@ traceme_raise(int sigval) TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } -#define TRACEME_RAISE(test, sig) \ -ATF_TC(test); \ -ATF_TC_HEAD(test, tc)\ -{ \ - atf_tc_set_md_var(tc, "descr", \ - "Verify " #sig " followed by _exit(2) in a child"); \ -} \ - \ -ATF_TC_BODY(test, tc)\ -{ \ - \ - traceme_raise(sig); \ +#define TRACEME_RAISE(test, sig) \ +ATF_TC(test);\ +ATF_TC_HEAD(test, tc) \ +{ \ + atf_tc_set_md_var(tc, "descr", \ + "Verify " #sig " followed by _exit(2) in a child"); \ +} \ + \ +ATF_TC_BODY(test, tc) \ +{ \ + \ + traceme_raise(sig); \ } TRACEME_RAISE(traceme_raise1, SIGKILL) /* non-maskable */ @@ -184,6 +188,7 @@ traceme_crash(int sig) int status; #endif struct ptrace_siginfo info; + memset(, 0, sizeof(info)); DPRINTF("Before forking process PID=%d\n", getpid()); @@ -225,12 +230,13 @@ traceme_crash(int sig) validate_status_stopped(status, sig); DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child"); - SYSCALL_REQUIRE(ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); + SYSCALL_REQUIRE( + ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); DPRINTF("Signal traced to lwpid=%d\n", info.psi_lwpid); DPRINTF("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n", - info.psi_siginfo.si_signo, info.psi_siginfo.si_code, - info.psi_siginfo.si_errno); + info.psi_siginfo.si_signo, info.psi_siginfo.si_code, + info.psi_siginfo.si_errno); ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sig); switch (sig) { @@
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kre Date: Fri Jun 1 05:48:29 UTC 2018 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: 80 column police. Some KNF and whitespace corrections (until I got bored...) NFCI. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg/lib/xkeyboard-config
Module Name:src Committed By: christos Date: Fri Jun 1 01:21:02 UTC 2018 Modified Files: src/external/mit/xorg/lib/xkeyboard-config: Makefile.xkbdata src/external/mit/xorg/lib/xkeyboard-config/rules: Makefile Log Message: Generate xml files properly. Noted by youri. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/mit/xorg/lib/xkeyboard-config/Makefile.xkbdata cvs rdiff -u -r1.3 -r1.4 \ src/external/mit/xorg/lib/xkeyboard-config/rules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/xkeyboard-config/Makefile.xkbdata diff -u src/external/mit/xorg/lib/xkeyboard-config/Makefile.xkbdata:1.3 src/external/mit/xorg/lib/xkeyboard-config/Makefile.xkbdata:1.4 --- src/external/mit/xorg/lib/xkeyboard-config/Makefile.xkbdata:1.3 Mon Feb 13 01:11:01 2017 +++ src/external/mit/xorg/lib/xkeyboard-config/Makefile.xkbdata Thu May 31 21:21:02 2018 @@ -1,7 +1,13 @@ -# $NetBSD: Makefile.xkbdata,v 1.3 2017/02/13 06:11:01 snj Exp $ +# $NetBSD: Makefile.xkbdata,v 1.4 2018/06/01 01:21:02 christos Exp $ XKBDISTDIR= ${X11SRCDIR.xkeyboard-config}/${XKBNAME} .PATH: ${XKBDISTDIR} +.SUFFIXES: .in + +.in: + ${TOOL_SED} -e 's,<_,<,g' -e 's, ${.TARGET} + + FILESDIR= ${X11LIBDIR}/xkb/${XKBNAME} Index: src/external/mit/xorg/lib/xkeyboard-config/rules/Makefile diff -u src/external/mit/xorg/lib/xkeyboard-config/rules/Makefile:1.3 src/external/mit/xorg/lib/xkeyboard-config/rules/Makefile:1.4 --- src/external/mit/xorg/lib/xkeyboard-config/rules/Makefile:1.3 Sat May 29 03:58:24 2010 +++ src/external/mit/xorg/lib/xkeyboard-config/rules/Makefile Thu May 31 21:21:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/05/29 07:58:24 ghen Exp $ +# $NetBSD: Makefile,v 1.4 2018/06/01 01:21:02 christos Exp $ # # When upgrading, re-assemble the files base, base.lst, evdev and # evdev.lst by running ./configure && make in the dist directory, @@ -7,14 +7,14 @@ .include XKBNAME= rules -FILES= README base base.lst base.extras.xml.in base.xml.in \ - evdev evdev.lst evdev.extras.xml.in evdev.xml.in \ - xfree98 xkb.dtd - -FILESNAME_base.xml.in= base.xml -FILESNAME_base.extras.xml.in= base.extras.xml -FILESNAME_evdev.xml.in= evdev.xml -FILESNAME_evdev.extras.xml.in= evdev.extras.xml +GENFILES= base.extras.xml base.xml evdev.extras.xml evdev.xml +FILES= README base base.lst evdev evdev.lst xfree98 xkb.dtd +FILES+= ${GENFILES} +CLEAN+= ${GENFILES} + +.for i in ${GENFILES} +FILESBUILD_${i}= yes +.endfor SYMLINKS= base ${FILESDIR}/xorg \ base.lst ${FILESDIR}/xorg.lst \
CVS commit: src/external/mit/xorg/lib/xkeyboard-config
Module Name:src Committed By: christos Date: Fri Jun 1 01:21:02 UTC 2018 Modified Files: src/external/mit/xorg/lib/xkeyboard-config: Makefile.xkbdata src/external/mit/xorg/lib/xkeyboard-config/rules: Makefile Log Message: Generate xml files properly. Noted by youri. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/mit/xorg/lib/xkeyboard-config/Makefile.xkbdata cvs rdiff -u -r1.3 -r1.4 \ src/external/mit/xorg/lib/xkeyboard-config/rules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sun2/conf
Module Name:src Committed By: mrg Date: Fri Jun 1 01:19:06 UTC 2018 Modified Files: src/sys/arch/sun2/conf: FOURMEG Log Message: disable a few more things and return another 1% of memory. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sun2/conf/FOURMEG Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sun2/conf
Module Name:src Committed By: mrg Date: Fri Jun 1 01:19:06 UTC 2018 Modified Files: src/sys/arch/sun2/conf: FOURMEG Log Message: disable a few more things and return another 1% of memory. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sun2/conf/FOURMEG 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/sun2/conf/FOURMEG diff -u src/sys/arch/sun2/conf/FOURMEG:1.61 src/sys/arch/sun2/conf/FOURMEG:1.62 --- src/sys/arch/sun2/conf/FOURMEG:1.61 Thu Sep 14 07:58:43 2017 +++ src/sys/arch/sun2/conf/FOURMEG Fri Jun 1 01:19:06 2018 @@ -1,4 +1,4 @@ -# $NetBSD: FOURMEG,v 1.61 2017/09/14 07:58:43 mrg Exp $ +# $NetBSD: FOURMEG,v 1.62 2018/06/01 01:19:06 mrg Exp $ # FOURMEG Sun2 (2/120, 2/170, 2/50, ...) # Supports root on: ie0, sd*, ... @@ -7,9 +7,9 @@ include "arch/sun2/conf/std.sun2" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "FOURMEG-$Revision: 1.61 $" +#ident "FOURMEG-$Revision: 1.62 $" -makeoptions COPTS="-Os" # optimize for size +makeoptions COPTS="-Os -fno-inline-small-functions" # optimize for size # Machines to be supported by this kernel #options FPU_EMULATE @@ -18,12 +18,12 @@ makeoptions COPTS="-Os" # optimize for s maxusers 4 # Standard system options -options KTRACE # system call tracing +#options KTRACE # system call tracing #options SYSVMSG # System V message queues #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options INSECURE # disable kernel security level -options USERCONF # userconf(4) support +#options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel @@ -43,7 +43,7 @@ options PIPE_SOCKETPAIR # smaller, but #options SCSIVERBOSE # Verbose SCSI errors # Compatibility options -include "conf/compat_netbsd70.config" +#include "conf/compat_netbsd16.config" #options COMPAT_SUNOS # can run SunOS 4.1.1 executables #options COMPAT_AOUT_M68K # support for NetBSD a.out executables #options EXEC_AOUT # support for a.out executables @@ -223,3 +223,8 @@ pseudo-device pty # pseudo-terminals #options RAID_AUTOCONFIG # auto-configuration of RAID components #pseudo-device fss # file system snapshot device pseudo-device clockctl # user control of clock subsystem + +no options AIO +no options BUFQ_FCFS +no options RFC2292 +no options MQUEUE
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: kre Date: Fri Jun 1 00:56:19 UTC 2018 Modified Files: src/external/cddl/osnet/sys/sys: opentypes.h time.h types.h Log Message: Avoid duplicate typedefs so these headers can be used as part of tools build, when the base system compiler does not allow duplicate type definitions. Someone please fix this some better way than this! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/sys/opentypes.h cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/sys/sys/time.h cvs rdiff -u -r1.18 -r1.19 src/external/cddl/osnet/sys/sys/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/sys/sys/opentypes.h diff -u src/external/cddl/osnet/sys/sys/opentypes.h:1.2 src/external/cddl/osnet/sys/sys/opentypes.h:1.3 --- src/external/cddl/osnet/sys/sys/opentypes.h:1.2 Mon May 28 21:05:10 2018 +++ src/external/cddl/osnet/sys/sys/opentypes.h Fri Jun 1 00:56:19 2018 @@ -5,8 +5,11 @@ #define FMNAMESZ 8 #if defined(__APPLE__) || defined(HAVE_NBTOOL_CONFIG_H) +#ifndef __defined_ll_t +#define __defined_ll_t typedef long long longlong_t; typedef unsigned long long u_longlong_t; +#endif typedef unsigned long vsize_t; #endif @@ -14,7 +17,10 @@ typedef unsigned int size32_t; typedef unsigned int caddr32_t; typedef struct timespec timestruc_t; +#ifndef __defined_ts_t +#define __defined_ts_t typedef struct timespec timespec_t; +#endif typedef unsigned int uint_t; typedef unsigned char uchar_t; typedef unsigned short ushort_t; @@ -30,7 +36,10 @@ typedef id_t ctid_t; #define B_TRUE 1 typedef int boolean_t; +#ifndef __defined_hr_t +#define __defined_hr_t typedef longlong_t hrtime_t; +#endif typedef int32_t t_scalar_t; typedef uint32_t t_uscalar_t; #if defined(_KERNEL) || defined(_KERNTYPES) @@ -61,7 +70,10 @@ typedef __caddr_t caddr_t; /* core addre typedef longlong_t offset_t; typedef u_longlong_t u_offset_t; typedef uint64_t upad64_t; +#ifndef __defined_ts_t +#define __defined_ts_t typedef struct timespec timespec_t; +#endif typedef int32_t daddr32_t; typedef int32_t time32_t; Index: src/external/cddl/osnet/sys/sys/time.h diff -u src/external/cddl/osnet/sys/sys/time.h:1.9 src/external/cddl/osnet/sys/sys/time.h:1.10 --- src/external/cddl/osnet/sys/sys/time.h:1.9 Mon May 28 21:05:10 2018 +++ src/external/cddl/osnet/sys/sys/time.h Fri Jun 1 00:56:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: time.h,v 1.9 2018/05/28 21:05:10 chs Exp $ */ +/* $NetBSD: time.h,v 1.10 2018/06/01 00:56:19 kre Exp $ */ /*- * Copyright (c) 2007 Pawel Jakub Dawidek @@ -45,7 +45,10 @@ #define NSEC2SEC(n) ((n) / (NANOSEC / SEC)) #define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC)) +#ifndef __defined_hr_t +#define __defined_hr_t typedef longlong_t hrtime_t; +#endif #if defined(__i386__) || defined(__powerpc__) #define TIMESPEC_OVERFLOW(ts) \ Index: src/external/cddl/osnet/sys/sys/types.h diff -u src/external/cddl/osnet/sys/sys/types.h:1.18 src/external/cddl/osnet/sys/sys/types.h:1.19 --- src/external/cddl/osnet/sys/sys/types.h:1.18 Mon May 28 21:05:10 2018 +++ src/external/cddl/osnet/sys/sys/types.h Fri Jun 1 00:56:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.18 2018/05/28 21:05:10 chs Exp $ */ +/* $NetBSD: types.h,v 1.19 2018/06/01 00:56:19 kre Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -83,8 +83,11 @@ #endif #undef longlong_t #undef u_longlong_t +#ifndef __defined_ll_t +#define __defined_ll_t typedef long long longlong_t; typedef unsigned long long u_longlong_t; +#endif #ifndef _KERNEL #include
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: kre Date: Fri Jun 1 00:56:19 UTC 2018 Modified Files: src/external/cddl/osnet/sys/sys: opentypes.h time.h types.h Log Message: Avoid duplicate typedefs so these headers can be used as part of tools build, when the base system compiler does not allow duplicate type definitions. Someone please fix this some better way than this! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/sys/opentypes.h cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/sys/sys/time.h cvs rdiff -u -r1.18 -r1.19 src/external/cddl/osnet/sys/sys/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mpl/dhcp/dist/common
Module Name:src Committed By: christos Date: Fri Jun 1 00:42:49 UTC 2018 Modified Files: src/external/mpl/dhcp/dist/common: bpf.c Log Message: PR/50893: Bruce Lilly: Handle carp interfaces. XXX: pullup-8 (in src/external/bsd/dhcp/dist/common/bpf.c) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/mpl/dhcp/dist/common/bpf.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/mpl/dhcp/dist/common/bpf.c diff -u src/external/mpl/dhcp/dist/common/bpf.c:1.2 src/external/mpl/dhcp/dist/common/bpf.c:1.3 --- src/external/mpl/dhcp/dist/common/bpf.c:1.2 Sat Apr 7 18:37:29 2018 +++ src/external/mpl/dhcp/dist/common/bpf.c Thu May 31 20:42:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.2 2018/04/07 22:37:29 christos Exp $ */ +/* $NetBSD: bpf.c,v 1.3 2018/06/01 00:42:49 christos Exp $ */ /* bpf.c @@ -35,7 +35,7 @@ */ #include -__RCSID("$NetBSD: bpf.c,v 1.2 2018/04/07 22:37:29 christos Exp $"); +__RCSID("$NetBSD: bpf.c,v 1.3 2018/06/01 00:42:49 christos Exp $"); #include "dhcpd.h" #if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE) \ @@ -674,6 +674,9 @@ get_hw_addr(const char *name, struct har */ switch (sa->sdl_type) { case IFT_ETHER: +#ifdef IFT_CARP + case IFT_CARP: +#endif #if defined (IFT_L2VLAN) case IFT_L2VLAN: #endif
CVS commit: src/external/mpl/dhcp/dist/common
Module Name:src Committed By: christos Date: Fri Jun 1 00:42:49 UTC 2018 Modified Files: src/external/mpl/dhcp/dist/common: bpf.c Log Message: PR/50893: Bruce Lilly: Handle carp interfaces. XXX: pullup-8 (in src/external/bsd/dhcp/dist/common/bpf.c) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/mpl/dhcp/dist/common/bpf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Thu May 31 23:46:59 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: the previous change doubled the check for pascal. fix it so that we only check for later maxwell and pascal once each, as intended. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/drm2/nouveau/nouveau_pci.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/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.10 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.11 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.10 Thu May 31 09:18:31 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Thu May 31 23:46:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.11 2018/05/31 23:46:59 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.11 2018/05/31 23:46:59 mrg Exp $"); #include #include @@ -93,30 +93,6 @@ nouveau_pci_match(device_t parent, cfdat #define IS_BETWEEN(x,y) \ (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) - - /* - * NetBSD drm2 doesn't support Pascal-based cards: - * 0x1580-0x15ff GP100 - * 0x1b00-0x1b7f GP102 - * 0x1b80-0x1bff GP104 - * 0x1c00-0x1c7f GP106 - * 0x1c80-0x1cff GP107 - * 0x1d00-0x1d7f GP108 - * 0x1d80-0x1dff GV100 - */ - - if (IS_BETWEEN(0x1580, 0x15ff) || - IS_BETWEEN(0x1b00, 0x1b7f) || - IS_BETWEEN(0x1b80, 0x1bff) || - IS_BETWEEN(0x1c00, 0x1c7f) || - IS_BETWEEN(0x1c80, 0x1cff) || - IS_BETWEEN(0x1d00, 0x1d7f) || - IS_BETWEEN(0x1d80, 0x1dff)) - return 0; -#undef IS_BETWEEN - -#define IS_BETWEEN(x,y) \ - (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) /* * NetBSD drm2 needs missing-so-far firmware for Maxwell-based cards: * 0x1380-0x13bf GM107
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Thu May 31 23:46:59 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: the previous change doubled the check for pascal. fix it so that we only check for later maxwell and pascal once each, as intended. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Thu May 31 23:22:50 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: aarch64_reboot.c src/sys/arch/arm/arm32: arm32_reboot.c Log Message: docpureset() doesn't return anything, so mark it void. (probably could also be __dead.) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/aarch64/aarch64_reboot.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm32/arm32_reboot.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/aarch64/aarch64/aarch64_reboot.c diff -u src/sys/arch/aarch64/aarch64/aarch64_reboot.c:1.1 src/sys/arch/aarch64/aarch64/aarch64_reboot.c:1.2 --- src/sys/arch/aarch64/aarch64/aarch64_reboot.c:1.1 Sun Apr 1 04:35:03 2018 +++ src/sys/arch/aarch64/aarch64/aarch64_reboot.c Thu May 31 23:22:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: aarch64_reboot.c,v 1.1 2018/04/01 04:35:03 ryo Exp $ */ +/* $NetBSD: aarch64_reboot.c,v 1.2 2018/05/31 23:22:50 mrg Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -122,7 +122,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aarch64_reboot.c,v 1.1 2018/04/01 04:35:03 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aarch64_reboot.c,v 1.2 2018/05/31 23:22:50 mrg Exp $"); #include #include @@ -142,7 +142,7 @@ void (*cpu_reset_address0)(void); void (*cpu_reset_address)(void); void (*cpu_powerdown_address)(void); -static int +static void docpureset(int howto) { if ((howto & RB_POWERDOWN) == RB_POWERDOWN) { Index: src/sys/arch/arm/arm32/arm32_reboot.c diff -u src/sys/arch/arm/arm32/arm32_reboot.c:1.10 src/sys/arch/arm/arm32/arm32_reboot.c:1.11 --- src/sys/arch/arm/arm32/arm32_reboot.c:1.10 Wed Nov 11 14:50:08 2015 +++ src/sys/arch/arm/arm32/arm32_reboot.c Thu May 31 23:22:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_reboot.c,v 1.10 2015/11/11 14:50:08 jmcneill Exp $ */ +/* $NetBSD: arm32_reboot.c,v 1.11 2018/05/31 23:22:50 mrg Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -122,7 +122,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.10 2015/11/11 14:50:08 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.11 2018/05/31 23:22:50 mrg Exp $"); #include #include @@ -138,7 +138,7 @@ __KERNEL_RCSID(0, "$NetBSD: arm32_reboot void (*cpu_powerdown_address)(void); -static int +static void docpureset(int howto) { if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Thu May 31 23:22:50 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: aarch64_reboot.c src/sys/arch/arm/arm32: arm32_reboot.c Log Message: docpureset() doesn't return anything, so mark it void. (probably could also be __dead.) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/aarch64/aarch64_reboot.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm32/arm32_reboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: mrg Date: Thu May 31 22:44:13 UTC 2018 Modified Files: src/sys/arch/sparc/sparc: locore.s Log Message: convert Lfp_null_fpstate (which is invoked if savefpstate() is called with NULL) into a panic for DIAGNOSTIC kernels. To generate a diff of this commit: cvs rdiff -u -r1.270 -r1.271 src/sys/arch/sparc/sparc/locore.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/sparc/sparc/locore.s diff -u src/sys/arch/sparc/sparc/locore.s:1.270 src/sys/arch/sparc/sparc/locore.s:1.271 --- src/sys/arch/sparc/sparc/locore.s:1.270 Fri Mar 16 09:29:24 2018 +++ src/sys/arch/sparc/sparc/locore.s Thu May 31 22:44:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.270 2018/03/16 09:29:24 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.271 2018/05/31 22:44:13 mrg Exp $ */ /* * Copyright (c) 1996 Paul Kranenburg @@ -5754,24 +5754,20 @@ Lfp_finish: retl std %f30, [%o0 + FS_REGS + (4*30)] -/* - * We really should panic here but while we figure out what the bug is - * that a remote CPU gets a NULL struct fpstate *, this lets the system - * work at least seemingly stably. - */ +/* Handle NULL fpstate argument for savefpstate */ Lfp_null_fpstate: -#if 1 +#ifdef DIAGNOSTIC + ld [%o5 + CPUINFO_CPUNO], %o1 + sethi %hi(Lpanic_savefpstate), %o0 + call _C_LABEL(panic) + or %o0, %lo(Lpanic_savefpstate), %o0 +#else sethi %hi(CPUINFO_VA), %o5 ldd [%o5 + CPUINFO_SAVEFPSTATE_NULL], %o2 inccc %o3 addx%o2, 0, %o2 retl std %o2, [%o5 + CPUINFO_SAVEFPSTATE_NULL] -#else - ld [%o5 + CPUINFO_CPUNO], %o1 - sethi %hi(Lpanic_savefpstate), %o0 - call _C_LABEL(panic) - or %o0, %lo(Lpanic_savefpstate), %o0 #endif /*
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: mrg Date: Thu May 31 22:44:13 UTC 2018 Modified Files: src/sys/arch/sparc/sparc: locore.s Log Message: convert Lfp_null_fpstate (which is invoked if savefpstate() is called with NULL) into a panic for DIAGNOSTIC kernels. To generate a diff of this commit: cvs rdiff -u -r1.270 -r1.271 src/sys/arch/sparc/sparc/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Thu May 31 22:26:37 UTC 2018 Modified Files: src/sys/arch/mips/include: vmparam.h src/sys/arch/riscv/include: vmparam.h Log Message: it's called VM_MAXUSER_ADDRESS32 not VM_MAXUSER32_ADDRESS. fixes mips64 builds, and likely fixes riscv when it happens again. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/mips/include/vmparam.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/include/vmparam.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/mips/include/vmparam.h diff -u src/sys/arch/mips/include/vmparam.h:1.60 src/sys/arch/mips/include/vmparam.h:1.61 --- src/sys/arch/mips/include/vmparam.h:1.60 Thu Sep 7 06:36:24 2017 +++ src/sys/arch/mips/include/vmparam.h Thu May 31 22:26:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.60 2017/09/07 06:36:24 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.61 2018/05/31 22:26:36 mrg Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -79,7 +79,7 @@ * in an instruction. */ #define USRSTACK (VM_MAXUSER_ADDRESS-0x8000) /* Start of user stack */ -#define USRSTACK32 ((uint32_t)VM_MAXUSER32_ADDRESS-0x8000) +#define USRSTACK32 ((uint32_t)VM_MAXUSER_ADDRESS32-0x8000) /* * Virtual memory related constants, all in bytes @@ -177,7 +177,7 @@ #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)-0x4000) /* 0xC000 */ #endif #endif -#define VM_MAXUSER32_ADDRESS ((vaddr_t)(1UL << 31)) /* 0x8000 */ +#define VM_MAXUSER_ADDRESS32 ((vaddr_t)(1UL << 31)) /* 0x8000 */ /* * The address to which unspecified mapping requests default Index: src/sys/arch/riscv/include/vmparam.h diff -u src/sys/arch/riscv/include/vmparam.h:1.3 src/sys/arch/riscv/include/vmparam.h:1.4 --- src/sys/arch/riscv/include/vmparam.h:1.3 Sat Jun 24 13:43:36 2017 +++ src/sys/arch/riscv/include/vmparam.h Thu May 31 22:26:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.3 2017/06/24 13:43:36 joerg Exp $ */ +/* $NetBSD: vmparam.h,v 1.4 2018/05/31 22:26:36 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ * page-aligned. */ #define USRSTACK (VM_MAXUSER_ADDRESS-PAGE_SIZE) /* Start of user stack */ -#define USRSTACK32 ((uint32_t)VM_MAXUSER32_ADDRESS-PAGE_SIZE) +#define USRSTACK32 ((uint32_t)VM_MAXUSER_ADDRESS32-PAGE_SIZE) /* * Virtual memory related constants, all in bytes @@ -129,7 +129,7 @@ #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)-0x4000) /* 0xC000 */ #endif #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS -#define VM_MAXUSER32_ADDRESS ((vaddr_t)(1UL << 31))/* 0x8000 */ +#define VM_MAXUSER_ADDRESS32 ((vaddr_t)(1UL << 31))/* 0x8000 */ /* * The address to which unspecified mapping requests default
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Thu May 31 22:26:37 UTC 2018 Modified Files: src/sys/arch/mips/include: vmparam.h src/sys/arch/riscv/include: vmparam.h Log Message: it's called VM_MAXUSER_ADDRESS32 not VM_MAXUSER32_ADDRESS. fixes mips64 builds, and likely fixes riscv when it happens again. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/mips/include/vmparam.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/include/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Thu May 31 20:52:53 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_gpio.c Log Message: sunxi_gpio_release: hold lock around call to sunxi_gpio_ctl To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/sunxi/sunxi_gpio.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/arm/sunxi/sunxi_gpio.c diff -u src/sys/arch/arm/sunxi/sunxi_gpio.c:1.20 src/sys/arch/arm/sunxi/sunxi_gpio.c:1.21 --- src/sys/arch/arm/sunxi/sunxi_gpio.c:1.20 Tue Apr 3 16:01:25 2018 +++ src/sys/arch/arm/sunxi/sunxi_gpio.c Thu May 31 20:52:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_gpio.c,v 1.20 2018/04/03 16:01:25 bouyer Exp $ */ +/* $NetBSD: sunxi_gpio.c,v 1.21 2018/05/31 20:52:53 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_soc.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.20 2018/04/03 16:01:25 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.21 2018/05/31 20:52:53 jmcneill Exp $"); #include #include @@ -328,9 +328,12 @@ sunxi_gpio_acquire(device_t dev, const v static void sunxi_gpio_release(device_t dev, void *priv) { + struct sunxi_gpio_softc * const sc = device_private(dev); struct sunxi_gpio_pin *pin = priv; + mutex_enter(>sc_lock); sunxi_gpio_ctl(pin->pin_sc, pin->pin_def, GPIO_PIN_INPUT); + mutex_exit(>sc_lock); kmem_free(pin, sizeof(*pin)); }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Thu May 31 20:52:53 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_gpio.c Log Message: sunxi_gpio_release: hold lock around call to sunxi_gpio_ctl To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/sunxi/sunxi_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
"Chuck Silvers" wrote: >Module Name:src >Committed By: chs >Date: Mon May 28 21:05:12 UTC 2018 > >Modified Files: [snip] >src/usr.bin/kdump: Makefile.ioctl-c mkioctls [snip] Building with clang and MKDTRACE=no, MKCTF=no, I get: In file included from kdump-ioctl.c:23: In file included from /u1/src/sys/net/if.h:82: /u1/src/sys/sys/mutex.h:155:23: error: redefinition of typedef 'kmutex_t' is a C 11 feature [-Werror,-Wtypedef-redefinition] typedef struct kmutex kmutex_t; ^ kdump-ioctl.c:10:23: note: previous definition is here typedef struct kmutex kmutex_t; ^
Re: CVS commit: src/sys/compat/svr4
Le 31/05/2018 à 17:41, Maxime Villard a écrit : Module Name:src Committed By: maxv Date: Thu May 31 15:41:11 UTC 2018 Modified Files: src/sys/compat/svr4: svr4_stream.c Log Message: Add XXX for NULL deref. Not sure how to fix it, not sure we care either... To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/compat/svr4/svr4_stream.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. I've said it once, I've said it a hundred times: compat_svr4, and all the related crap, should be removed from the kernel, plain and simple
CVS commit: src/sys/compat/svr4
Module Name:src Committed By: maxv Date: Thu May 31 15:41:11 UTC 2018 Modified Files: src/sys/compat/svr4: svr4_stream.c Log Message: Add XXX for NULL deref. Not sure how to fix it, not sure we care either... To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/compat/svr4/svr4_stream.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/compat/svr4/svr4_stream.c diff -u src/sys/compat/svr4/svr4_stream.c:1.93 src/sys/compat/svr4/svr4_stream.c:1.94 --- src/sys/compat/svr4/svr4_stream.c:1.93 Sat May 5 02:09:40 2018 +++ src/sys/compat/svr4/svr4_stream.c Thu May 31 15:41:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_stream.c,v 1.93 2018/05/05 02:09:40 christos Exp $ */ +/* $NetBSD: svr4_stream.c,v 1.94 2018/05/31 15:41:11 maxv Exp $ */ /*- * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_stream.c,v 1.93 2018/05/05 02:09:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_stream.c,v 1.94 2018/05/31 15:41:11 maxv Exp $"); #include #include @@ -1791,6 +1791,10 @@ svr4_sys_getmsg(struct lwp *l, const str sc.cmd = SVR4_TI_RECVFROM_IND; + /* + * XXX: name = NULL? + */ + switch (st->s_family) { case AF_INET: sc.len = sizeof (struct sockaddr_in);
CVS commit: src/sys/compat/svr4
Module Name:src Committed By: maxv Date: Thu May 31 15:41:11 UTC 2018 Modified Files: src/sys/compat/svr4: svr4_stream.c Log Message: Add XXX for NULL deref. Not sure how to fix it, not sure we care either... To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/compat/svr4/svr4_stream.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 15:34:25 UTC 2018 Modified Files: src/sys/netipsec: ipsec_mbuf.c Log Message: Clarify, remove superfluous things. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/netipsec/ipsec_mbuf.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/netipsec/ipsec_mbuf.c diff -u src/sys/netipsec/ipsec_mbuf.c:1.27 src/sys/netipsec/ipsec_mbuf.c:1.28 --- src/sys/netipsec/ipsec_mbuf.c:1.27 Sat Apr 28 14:39:34 2018 +++ src/sys/netipsec/ipsec_mbuf.c Thu May 31 15:34:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_mbuf.c,v 1.27 2018/04/28 14:39:34 maxv Exp $ */ +/* $NetBSD: ipsec_mbuf.c,v 1.28 2018/05/31 15:34:25 maxv Exp $ */ /* * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.27 2018/04/28 14:39:34 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.28 2018/05/31 15:34:25 maxv Exp $"); /* * IPsec-specific mbuf routines. @@ -65,25 +65,15 @@ m_clone(struct mbuf *m0) for (m = m0; m != NULL; m = mprev->m_next) { /* * Regular mbufs are ignored unless there's a cluster - * in front of it that we can use to coalesce. We do - * the latter mainly so later clusters can be coalesced - * also w/o having to handle them specially (i.e. convert - * mbuf+cluster -> cluster). This optimization is heavily - * influenced by the assumption that we're running over - * Ethernet where MCLBYTES is large enough that the max - * packet size will permit lots of coalescing into a - * single cluster. This in turn permits efficient - * crypto operations, especially when using hardware. + * in front of it that we can use to coalesce. */ if ((m->m_flags & M_EXT) == 0) { if (mprev && (mprev->m_flags & M_EXT) && m->m_len <= M_TRAILINGSPACE(mprev)) { -/* XXX: this ignores mbuf types */ memcpy(mtod(mprev, char *) + mprev->m_len, - mtod(m, char *), m->m_len); +mtod(m, char *), m->m_len); mprev->m_len += m->m_len; -mprev->m_next = m->m_next; /* unlink from chain */ -m_free(m); /* reclaim mbuf */ +mprev->m_next = m_free(m); IPSEC_STATINC(IPSEC_STAT_MBCOALESCED); } else { mprev = m; @@ -92,7 +82,7 @@ m_clone(struct mbuf *m0) } /* - * Writable mbufs are left alone (for now). + * Writable mbufs are left alone. */ if (!M_READONLY(m)) { mprev = m; @@ -105,16 +95,14 @@ m_clone(struct mbuf *m0) * it anyway, we try to reduce the number of mbufs and * clusters so that future work is easier). */ - KASSERTMSG(m->m_flags & M_EXT, "m_flags 0x%x", m->m_flags); - /* NB: we only coalesce into a cluster or larger */ + + /* We only coalesce into a cluster. */ if (mprev != NULL && (mprev->m_flags & M_EXT) && m->m_len <= M_TRAILINGSPACE(mprev)) { - /* XXX: this ignores mbuf types */ memcpy(mtod(mprev, char *) + mprev->m_len, - mtod(m, char *), m->m_len); + mtod(m, char *), m->m_len); mprev->m_len += m->m_len; - mprev->m_next = m->m_next; /* unlink from chain */ - m_free(m); /* reclaim mbuf */ + mprev->m_next = m_free(m); IPSEC_STATINC(IPSEC_STAT_CLCOALESCED); continue; } @@ -123,12 +111,6 @@ m_clone(struct mbuf *m0) * Allocate new space to hold the copy... */ if (mprev == NULL && (m->m_flags & M_PKTHDR)) { - /* - * NB: if a packet header is present we must - * allocate the mbuf separately from any cluster - * because M_MOVE_PKTHDR will smash the data - * pointer and drop the M_EXT marker. - */ MGETHDR(n, M_DONTWAIT, m->m_type); if (n == NULL) { m_freem(m0); @@ -162,7 +144,7 @@ m_clone(struct mbuf *m0) mfirst = n; mlast = NULL; for (;;) { - int cc = min(len, MCLBYTES); + const int cc = min(len, MCLBYTES); memcpy(mtod(n, char *), mtod(m, char *) + off, cc); n->m_len = cc; if (mlast != NULL)
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 15:34:25 UTC 2018 Modified Files: src/sys/netipsec: ipsec_mbuf.c Log Message: Clarify, remove superfluous things. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/netipsec/ipsec_mbuf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 15:06:45 UTC 2018 Modified Files: src/sys/netipsec: ipsec_output.c Log Message: Adapt rev1.75, suggested by Alexander Bluhm. Relax the checks to allow protocols smaller than two bytes (only IPPROTO_NONE). While here style. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/netipsec/ipsec_output.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/netipsec/ipsec_output.c diff -u src/sys/netipsec/ipsec_output.c:1.79 src/sys/netipsec/ipsec_output.c:1.80 --- src/sys/netipsec/ipsec_output.c:1.79 Thu May 31 07:03:57 2018 +++ src/sys/netipsec/ipsec_output.c Thu May 31 15:06:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_output.c,v 1.79 2018/05/31 07:03:57 maxv Exp $ */ +/* $NetBSD: ipsec_output.c,v 1.80 2018/05/31 15:06:45 maxv Exp $ */ /* * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.79 2018/05/31 07:03:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.80 2018/05/31 15:06:45 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -624,39 +624,39 @@ compute_ipsec_pos(struct mbuf *m, int *i * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload] */ while (1) { - if (*i + sizeof(ip6e) > m->m_pkthdr.len) { - return EINVAL; - } - switch (nxt) { case IPPROTO_AH: case IPPROTO_ESP: case IPPROTO_IPCOMP: - /* - * we should not skip security header added - * beforehand. - */ + /* + * We should not skip security header added + * beforehand. + */ return 0; case IPPROTO_HOPOPTS: case IPPROTO_DSTOPTS: case IPPROTO_ROUTING: - /* - * if we see 2nd destination option header, - * we should stop there. - */ + if (*i + sizeof(ip6e) > m->m_pkthdr.len) { +return EINVAL; + } + + /* + * If we see 2nd destination option header, + * we should stop there. + */ if (nxt == IPPROTO_DSTOPTS && dstopt) return 0; if (nxt == IPPROTO_DSTOPTS) { /* - * seen 1st or 2nd destination option. + * Seen 1st or 2nd destination option. * next time we see one, it must be 2nd. */ dstopt = 1; } else if (nxt == IPPROTO_ROUTING) { /* - * if we see destination option next + * If we see destination option next * time, it must be dest2. */ dstopt = 2; @@ -667,6 +667,9 @@ compute_ipsec_pos(struct mbuf *m, int *i nxt = ip6e.ip6e_nxt; *off = *i + offsetof(struct ip6_ext, ip6e_nxt); *i += (ip6e.ip6e_len + 1) << 3; + if (*i > m->m_pkthdr.len) { +return EINVAL; + } break; default: return 0;
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 15:06:45 UTC 2018 Modified Files: src/sys/netipsec: ipsec_output.c Log Message: Adapt rev1.75, suggested by Alexander Bluhm. Relax the checks to allow protocols smaller than two bytes (only IPPROTO_NONE). While here style. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/netipsec/ipsec_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Thu May 31 13:51:57 UTC 2018 Modified Files: src/sys/netinet: udp_usrreq.c Log Message: Remove the non-IKE part of the computation, too. To generate a diff of this commit: cvs rdiff -u -r1.253 -r1.254 src/sys/netinet/udp_usrreq.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/netinet/udp_usrreq.c diff -u src/sys/netinet/udp_usrreq.c:1.253 src/sys/netinet/udp_usrreq.c:1.254 --- src/sys/netinet/udp_usrreq.c:1.253 Thu May 31 07:03:57 2018 +++ src/sys/netinet/udp_usrreq.c Thu May 31 13:51:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.253 2018/05/31 07:03:57 maxv Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.254 2018/05/31 13:51:56 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.253 2018/05/31 07:03:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.254 2018/05/31 13:51:56 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1259,11 +1259,7 @@ udp4_espinudp(struct mbuf **mp, int off, struct mbuf *m = *mp; uint32_t *marker; - /* - * Collapse the mbuf chain if the first mbuf is too short. - * The longest case is: UDP + max(Non-ESP, Non-IKE) + ESP. - */ - minlen = off + 2 * sizeof(uint32_t) + sizeof(struct esp); + minlen = off + sizeof(struct esp); if (minlen > m->m_pkthdr.len) minlen = m->m_pkthdr.len;
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Thu May 31 13:51:57 UTC 2018 Modified Files: src/sys/netinet: udp_usrreq.c Log Message: Remove the non-IKE part of the computation, too. To generate a diff of this commit: cvs rdiff -u -r1.253 -r1.254 src/sys/netinet/udp_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/top/dist/machine
Module Name:src Committed By: kamil Date: Thu May 31 10:14:21 UTC 2018 Modified Files: src/external/bsd/top/dist/machine: m_netbsd.c Log Message: Fix read of unitialized array elements in top(1) The cp_old array is allocated with malloc(3) and its pointer is passed to percentages64(). In this function there happens a calculation of total_change, which value depends on the value inside the unitialized cp_old[] array. ==26662==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x268a2c in percentages64 /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 #1 0x26748b in get_system_info /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:6 #2 0x25518e in do_display /usr/src/external/bsd/top/bin/../dist/top.c:507:5 #3 0x253038 in main /usr/src/external/bsd/top/bin/../dist/top.c:975:2 #4 0x21cad1 in ___start (/usr/bin/top+0x1cad1) SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64 Exiting Fix this issue by changling malloc(3) with calloc(3). Detected with Memory Sanitizer during the integration of sanitizers with the NetBSD basesystem. Reported by To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/bsd/top/dist/machine/m_netbsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/top/dist/machine
Module Name:src Committed By: kamil Date: Thu May 31 10:14:21 UTC 2018 Modified Files: src/external/bsd/top/dist/machine: m_netbsd.c Log Message: Fix read of unitialized array elements in top(1) The cp_old array is allocated with malloc(3) and its pointer is passed to percentages64(). In this function there happens a calculation of total_change, which value depends on the value inside the unitialized cp_old[] array. ==26662==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x268a2c in percentages64 /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 #1 0x26748b in get_system_info /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:6 #2 0x25518e in do_display /usr/src/external/bsd/top/bin/../dist/top.c:507:5 #3 0x253038 in main /usr/src/external/bsd/top/bin/../dist/top.c:975:2 #4 0x21cad1 in ___start (/usr/bin/top+0x1cad1) SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64 Exiting Fix this issue by changling malloc(3) with calloc(3). Detected with Memory Sanitizer during the integration of sanitizers with the NetBSD basesystem. Reported by To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/bsd/top/dist/machine/m_netbsd.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/top/dist/machine/m_netbsd.c diff -u src/external/bsd/top/dist/machine/m_netbsd.c:1.19 src/external/bsd/top/dist/machine/m_netbsd.c:1.20 --- src/external/bsd/top/dist/machine/m_netbsd.c:1.19 Mon Dec 26 12:46:31 2016 +++ src/external/bsd/top/dist/machine/m_netbsd.c Thu May 31 10:14:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: m_netbsd.c,v 1.19 2016/12/26 12:46:31 leot Exp $ */ +/* $NetBSD: m_netbsd.c,v 1.20 2018/05/31 10:14:21 kamil Exp $ */ /* * top - a top users display for Unix @@ -37,12 +37,12 @@ * Andrew Doran * * - * $Id: m_netbsd.c,v 1.19 2016/12/26 12:46:31 leot Exp $ + * $Id: m_netbsd.c,v 1.20 2018/05/31 10:14:21 kamil Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: m_netbsd.c,v 1.19 2016/12/26 12:46:31 leot Exp $"); +__RCSID("$NetBSD: m_netbsd.c,v 1.20 2018/05/31 10:14:21 kamil Exp $"); #endif #include @@ -335,7 +335,7 @@ machine_init(statics) ncpu = 1; cpu_states = malloc(sizeof(cpu_states[0]) * CPUSTATES * ncpu); - cp_old = malloc(sizeof(cp_old[0]) * CPUSTATES * ncpu); + cp_old = calloc(CPUSTATES * ncpu, sizeof(cp_old[0])); cp_diff = malloc(sizeof(cp_diff[0]) * CPUSTATES * ncpu); if (cpu_states == NULL || cp_time == NULL || cp_old == NULL || cp_diff == NULL) {
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Thu May 31 09:37:16 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: db_interface.c Log Message: implement properly branch_taken() and inst_unconditional_flow_transfer(). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/db_interface.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/aarch64/aarch64/db_interface.c diff -u src/sys/arch/aarch64/aarch64/db_interface.c:1.2 src/sys/arch/aarch64/aarch64/db_interface.c:1.3 --- src/sys/arch/aarch64/aarch64/db_interface.c:1.2 Sun Apr 1 04:35:03 2018 +++ src/sys/arch/aarch64/aarch64/db_interface.c Thu May 31 09:37:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.2 2018/04/01 04:35:03 ryo Exp $ */ +/* $NetBSD: db_interface.c,v 1.3 2018/05/31 09:37:16 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.2 2018/04/01 04:35:03 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.3 2018/05/31 09:37:16 ryo Exp $"); #include #include @@ -128,17 +128,82 @@ db_write_bytes(vaddr_t addr, size_t size } } +/* + * return register value of $X0..$X30, $SP or 0($XZR) + */ +static uint64_t +db_fetch_reg(unsigned int reg, db_regs_t *regs, bool use_sp) +{ + if (reg >= 32) + panic("db_fetch_reg: botch"); + + if (reg == 31) { + /* $SP or $XZR */ + return use_sp ? regs->tf_sp : 0; + } + return regs->tf_reg[reg]; +} + +static inline uint64_t +SignExtend(int bitwidth, uint64_t imm, unsigned int multiply) +{ + const uint64_t signbit = (1 << (bitwidth - 1)); + const uint64_t immmax = signbit << 1; + + if (imm & signbit) + imm -= immmax; + return imm * multiply; +} + db_addr_t db_branch_taken(db_expr_t inst, db_addr_t pc, db_regs_t *regs) { - /* XXX */ - return pc + 4; +#define INSN_FMT_RN(insn) (((insn) >> 5) & 0x1f) +#define INSN_FMT_IMM26(insn) ((insn) & 0x03ff) +#define INSN_FMT_IMM19(insn) (((insn) >> 5) & 0x7) +#define INSN_FMT_IMM14(insn) (((insn) >> 5) & 0x3fff) + + if (((inst & 0xfc1f) == 0xd65f) || /* ret xN */ + ((inst & 0xfc1f) == 0xd63f) || /* blr xN */ + ((inst & 0xfc1f) == 0xd61f)) { /* br xN */ + return db_fetch_reg(INSN_FMT_RN(inst), regs, false); + } + + if (((inst & 0xfc00) == 0x9400) || /* bl imm */ + ((inst & 0xfc00) == 0x1400)) { /* b imm */ + return SignExtend(26, INSN_FMT_IMM26(inst), 4) + pc; + } + + if (((inst & 0xff10) == 0x5400) || /* b.cond */ + ((inst & 0x7f00) == 0x3500) || /* cbnz */ + ((inst & 0x7f00) == 0x3400)) { /* cbz */ + return SignExtend(19, INSN_FMT_IMM19(inst), 4) + pc; + } + + if (((inst & 0x7f00) == 0x3700) || /* tbnz */ + ((inst & 0x7f00) == 0x3600)) { /* tbz */ + return SignExtend(14, INSN_FMT_IMM14(inst), 4) + pc; + } + + panic("branch_taken: botch"); } bool db_inst_unconditional_flow_transfer(db_expr_t inst) { - /* XXX */ + if (((inst & 0xfc1f) == 0xd65f) || /* ret xN */ + ((inst & 0xfc00) == 0x9400) || /* bl */ + ((inst & 0xfc1f) == 0xd63f) || /* blr */ + ((inst & 0xfc00) == 0x1400) || /* b imm */ + ((inst & 0xfc1f) == 0xd61f)) /* br */ + return true; + +#define INSN_FMT_COND(insn) ((insn) & 0xf) +#define CONDITION_AL 14 + + if (((inst & 0xff10) == 0x5400) && /* b.cond */ + (INSN_FMT_COND(inst) == CONDITION_AL)) /* always? */ + return true; + return false; } -
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Thu May 31 09:37:16 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: db_interface.c Log Message: implement properly branch_taken() and inst_unconditional_flow_transfer(). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/db_interface.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg
Module Name:src Committed By: mrg Date: Thu May 31 09:31:39 UTC 2018 Modified Files: src/external/mit/xorg: xorg-pkg-ver.mk Log Message: fix XORG_PKG_PACKAGE_NAME to not include multiple quotes for PACKAGE_NAME, and add a XORG_PKG_RELEASE_DATE to define RELEASE_DATE. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/mit/xorg/xorg-pkg-ver.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/xorg-pkg-ver.mk diff -u src/external/mit/xorg/xorg-pkg-ver.mk:1.9 src/external/mit/xorg/xorg-pkg-ver.mk:1.10 --- src/external/mit/xorg/xorg-pkg-ver.mk:1.9 Sun May 27 01:14:51 2018 +++ src/external/mit/xorg/xorg-pkg-ver.mk Thu May 31 09:31:39 2018 @@ -1,4 +1,4 @@ -# $NetBSD: xorg-pkg-ver.mk,v 1.9 2018/05/27 01:14:51 christos Exp $ +# $NetBSD: xorg-pkg-ver.mk,v 1.10 2018/05/31 09:31:39 mrg Exp $ # when including this make sure PROG is set so that $X11SRCDIR.$PROG # is a valid setting. set XORG_PKG_VER_PROG if PROG is wrong. @@ -35,7 +35,7 @@ CPPFLAGS+= -DPACKAGE_STRING=\"${XORG_PKG XORG_PKG_PACKAGE_NAME!= \ ${TOOL_AWK} -F= '/^PACKAGE_NAME=/ { \ - match($$2, "'"'"'[-_a-zA-Z0-9]+'"'"'"); \ + match($$2, "[-_a-zA-Z0-9]+"); \ name = substr($$2, RSTART, RLENGTH); \ print name; \ exit 0; \ @@ -44,4 +44,15 @@ XORG_PKG_PACKAGE_NAME!= \ CPPFLAGS+= -DPACKAGE_NAME=\"${XORG_PKG_PACKAGE_NAME:Q}\" .endif +XORG_PKG_RELEASE_DATE!= \ + ${TOOL_AWK} -F= '/^RELEASE_DATE=/ { \ + match($$2, "[-_a-zA-Z0-9]+"); \ + name = substr($$2, RSTART, RLENGTH); \ + print name; \ + exit 0; \ + }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure +.if !empty(XORG_PKG_RELEASE_DATE) +CPPFLAGS+= -DRELEASE_DATE=\"${XORG_PKG_RELEASE_DATE:Q}\" +.endif + .endif
CVS commit: src/external/mit/xorg
Module Name:src Committed By: mrg Date: Thu May 31 09:31:39 UTC 2018 Modified Files: src/external/mit/xorg: xorg-pkg-ver.mk Log Message: fix XORG_PKG_PACKAGE_NAME to not include multiple quotes for PACKAGE_NAME, and add a XORG_PKG_RELEASE_DATE to define RELEASE_DATE. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/mit/xorg/xorg-pkg-ver.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/top/dist
Module Name:src Committed By: kamil Date: Thu May 31 09:20:05 UTC 2018 Modified Files: src/external/bsd/top/dist: top.c Log Message: Fix unitialized signal mask passed to sigaction(2) in top(1) Detected with Memory Sanitizer during the integration of sanitizers with the NetBSD basesystem. Reported by To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/top/dist/top.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/top/dist/top.c diff -u src/external/bsd/top/dist/top.c:1.9 src/external/bsd/top/dist/top.c:1.10 --- src/external/bsd/top/dist/top.c:1.9 Fri Mar 23 14:46:05 2012 +++ src/external/bsd/top/dist/top.c Thu May 31 09:20:05 2018 @@ -135,6 +135,7 @@ set_signal(int sig, RETSIGTYPE (*handler #ifdef HAVE_SIGACTION struct sigaction action; +sigemptyset(_mask); action.sa_handler = handler; action.sa_flags = 0; (void) sigaction(sig, , NULL);
CVS commit: src/external/bsd/top/dist
Module Name:src Committed By: kamil Date: Thu May 31 09:20:05 UTC 2018 Modified Files: src/external/bsd/top/dist: top.c Log Message: Fix unitialized signal mask passed to sigaction(2) in top(1) Detected with Memory Sanitizer during the integration of sanitizers with the NetBSD basesystem. Reported by To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/top/dist/top.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Thu May 31 09:18:31 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: disable matching nouveau on pascal and the second generation of maxwell cards that are not supported by this version of drm. this should fix various modern systems vs nvidia issues, eg PR 53188. XXX: pullup-7, pullup-8. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/nouveau/nouveau_pci.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/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.9 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.10 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.9 Mon May 21 08:58:47 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Thu May 31 09:18:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.9 2018/05/21 08:58:47 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.9 2018/05/21 08:58:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $"); #include #include @@ -115,6 +115,36 @@ nouveau_pci_match(device_t parent, cfdat return 0; #undef IS_BETWEEN +#define IS_BETWEEN(x,y) \ + (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) + /* + * NetBSD drm2 needs missing-so-far firmware for Maxwell-based cards: + * 0x1380-0x13bf GM107 + */ + if (IS_BETWEEN(0x1380, 0x13bf)) + return 0; + + /* + * NetBSD drm2 doesn't support Pascal-based cards: + * 0x1580-0x15ff GP100 + * 0x1b00-0x1b7f GP102 + * 0x1b80-0x1bff GP104 + * 0x1c00-0x1c7f GP106 + * 0x1c80-0x1cff GP107 + * 0x1d00-0x1d7f GP108 + * 0x1d80-0x1dff GV100 + */ + + if (IS_BETWEEN(0x1580, 0x15ff) || + IS_BETWEEN(0x1b00, 0x1b7f) || + IS_BETWEEN(0x1b80, 0x1bff) || + IS_BETWEEN(0x1c00, 0x1c7f) || + IS_BETWEEN(0x1c80, 0x1cff) || + IS_BETWEEN(0x1d00, 0x1d7f) || + IS_BETWEEN(0x1d80, 0x1dff)) + return 0; +#undef IS_BETWEEN + return 6; /* XXX Beat genfb_pci... */ }
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Thu May 31 09:18:31 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: disable matching nouveau on pascal and the second generation of maxwell cards that are not supported by this version of drm. this should fix various modern systems vs nvidia issues, eg PR 53188. XXX: pullup-7, pullup-8. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Thu May 31 09:12:12 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: regen. To generate a diff of this commit: cvs rdiff -u -r1.1329 -r1.1330 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1328 -r1.1329 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Thu May 31 09:11:47 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: add a bunch of nvidia devices from various generations. To generate a diff of this commit: cvs rdiff -u -r1.1338 -r1.1339 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1338 src/sys/dev/pci/pcidevs:1.1339 --- src/sys/dev/pci/pcidevs:1.1338 Thu May 31 02:50:14 2018 +++ src/sys/dev/pci/pcidevs Thu May 31 09:11:47 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1338 2018/05/31 02:50:14 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1339 2018/05/31 09:11:47 mrg Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -6244,9 +6244,50 @@ product NVIDIA GEFORCE_610M 0x1058 GeFor product NVIDIA GEFORCE_610M2 0x1059 GeForce 610M product NVIDIA GT610M 0x105A GeForce GT 610M product NVIDIA GF116 0x1244 GeForce GTX 550 Ti +product NVIDIA TESLA_12G 0x15f7 Tesla P100 PCIe 12GB +product NVIDIA TESLA_16G 0x15f8 Tesla P100 PCIe 16GB +product NVIDIA TESLA_16G_SXM2 0x15f9 Tesla P100 SXM2 16GB +product NVIDIA GF_TITAN_X 0x1b00 GeForce TITAN X +product NVIDIA GF_GTX1080_TI 0x1b06 GeForce GTX 1080 Ti +product NVIDIA QUADRO_P6000 0x1b30 Quadro P6000 +product NVIDIA TESLA_P40 0x1b38 Tesla P40 +product NVIDIA GF_GTX1080 0x1b80 GeForce GTX 1080 +product NVIDIA GF_GTX1070 0x1b81 GeForce GTX 1070 +product NVIDIA GF_GTX1060 0x1b84 GeForce GTX 1060 3GB +product NVIDIA GF_GTX1080M 0x1ba0 GeForce GTX 1080 Mobile +product NVIDIA GF_GTX1070M 0x1ba1 GeForce GTX 1070 Mobile +product NVIDIA QUADRO_P5000 0x1bb0 Quadro P5000 +product NVIDIA TESLA_P4 0x1bb3 Tesla P4 +product NVIDIA QUADRO_P5000M 0x1bb6 Quadro P5000 Mobile +product NVIDIA QUADRO_P4000M 0x1bb7 Quadro P4000 Mobile +product NVIDIA QUADRO_P3000M 0x1bb8 Quadro P3000 Mobile +product NVIDIA GF_GTX1080M_2 0x1be0 GeForce GTX 1080 Mobile +product NVIDIA GF_GTX1070M_2 0x1be1 GeForce GTX 1070 Mobile +product NVIDIA GF_GTX1060_3 0x1c02 GeForce GTX 1060 3GB +product NVIDIA GF_GTX1060_6 0x1c03 GeForce GTX 1060 6GB +product NVIDIA GF_GTX1060M 0x1c20 GeForce GTX 1060 Mobile +product NVIDIA GF_GTX1060M_2 0x1c60 GeForce GTX 1060 Mobile +product NVIDIA GF_GTX1060_TiM 0x1c61 GeForce GTX 1060 Ti Mobile +product NVIDIA GF_GTX1060_M 0x1c62 GeForce GTX 1060 Mobile +product NVIDIA GF_GTX1050_X 0x1c81 GeForce GTX 1050 +product NVIDIA GF_GTX1050_Ti 0x1c82 GeForce GTX 1050 Ti +product NVIDIA GF_GTX1050_TiM 0x1c8c GeForce GTX 1050 Ti Mobile +product NVIDIA GF_GTX1050_M 0x1c8d GeForce GTX 1050 Mobile + +product NVIDIA GF_GTX1030 0x1d01 GeForce GT 1030 +product NVIDIA GF_MX150 0x1d10 GeForce MX150 + +product NVIDIA TITAN_V 0x1d81 GV100 TITAN V +product NVIDIA TESLA_V100SXM16 0x1db1 Tesla V100 SXM2 16GB +product NVIDIA TESLA_V100PCI16 0x1db4 Tesla V100 PCIe 16GB +product NVIDIA TESLA_V100SXM32 0x1db5 Tesla V100 SXM2 32GB +product NVIDIA TESLA_V100PCI32 0x1db6 Tesla V100 PCIe 32GB +product NVIDIA QUADRO_GV100 0x1dba Quadro GV100 + /* Nvidia & SGS-Thomson Microelectronics */ product NVIDIA_SGS RIVA128 0x0018 Riva 128 +product NVIDIA_SGS RIVA128_ZX 0x0019 Riva 128 ZX /* Oak Technologies products */ product OAKTECH OTI1007 0x0107 OTI107 @@ -6750,8 +6791,9 @@ product SGI RAD1 0x0005 PsiTech RAD1 product SGI TIGON 0x0009 Tigon Gigabit Ethernet /* SGS-Thomson products */ -product SGSTHOMSON 2000 0x0008 STG 2000X -product SGSTHOMSON 1764 0x1746 STG 1764X +product SGSTHOMSON 2000 0x0008 STG 2000X +product SGSTHOMSON 2000_VGA 0x0009 STG 2000X VGA +product SGSTHOMSON 1764 0x1746 STG 1764X /* Broadcom (SiByte) products */ product SIBYTE BCM1250_PCIHB 0x0001 BCM1250 PCI Host Bridge
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Thu May 31 09:11:47 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: add a bunch of nvidia devices from various generations. To generate a diff of this commit: cvs rdiff -u -r1.1338 -r1.1339 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg/share/fonts
Module Name:src Committed By: mrg Date: Thu May 31 09:09:32 UTC 2018 Modified Files: src/external/mit/xorg/share/fonts: Makefile Log Message: remove unused include. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/share/fonts/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/share/fonts/Makefile diff -u src/external/mit/xorg/share/fonts/Makefile:1.5 src/external/mit/xorg/share/fonts/Makefile:1.6 --- src/external/mit/xorg/share/fonts/Makefile:1.5 Thu Jun 18 06:36:59 2009 +++ src/external/mit/xorg/share/fonts/Makefile Thu May 31 09:09:32 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2009/06/18 06:36:59 mrg Exp $ +# $NetBSD: Makefile,v 1.6 2018/05/31 09:09:32 mrg Exp $ .include @@ -8,8 +8,6 @@ SUBDIR= encodings .WAIT \ font-alias font-util \ 100dpi 75dpi Type1 TTF misc -.include "${NETBSDSRCDIR}/external/mit/xorg/tools/fc-cache/Makefile.fc-cache" - .endif .include
CVS commit: src/external/mit/xorg/share/fonts
Module Name:src Committed By: mrg Date: Thu May 31 09:09:32 UTC 2018 Modified Files: src/external/mit/xorg/share/fonts: Makefile Log Message: remove unused include. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/share/fonts/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: mrg Date: Thu May 31 09:08:26 UTC 2018 Modified Files: src/external/bsd/acpica/bin/iasl: Makefile src/external/bsd/libpcap/lib: Makefile src/external/bsd/unbound/sbin: Makefile.inc src/external/gpl2/dtc/usr.bin/dtc: Makefile src/tests/usr.bin/nbperf: Makefile Log Message: make 'clean' and/or 'cleandir' actually clean all the things. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/external/bsd/acpica/bin/iasl/Makefile cvs rdiff -u -r1.15 -r1.16 src/external/bsd/libpcap/lib/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/unbound/sbin/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/dtc/usr.bin/dtc/Makefile cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/nbperf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/acpica/bin/iasl/Makefile diff -u src/external/bsd/acpica/bin/iasl/Makefile:1.18 src/external/bsd/acpica/bin/iasl/Makefile:1.19 --- src/external/bsd/acpica/bin/iasl/Makefile:1.18 Sat Apr 7 15:49:50 2018 +++ src/external/bsd/acpica/bin/iasl/Makefile Thu May 31 09:08:25 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2018/04/07 15:49:50 christos Exp $ +# $NetBSD: Makefile,v 1.19 2018/05/31 09:08:25 mrg Exp $ .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") PROG= iasl @@ -325,6 +325,8 @@ CLEANFILES+= aslcompilerparse.y aslcomp prparserparse.h\ prparserlex.l prparserlex.c \ prparser.y.h prparserparse.output \ + \ + y.output y.tab.h .include Index: src/external/bsd/libpcap/lib/Makefile diff -u src/external/bsd/libpcap/lib/Makefile:1.15 src/external/bsd/libpcap/lib/Makefile:1.16 --- src/external/bsd/libpcap/lib/Makefile:1.15 Tue Jan 24 23:26:58 2017 +++ src/external/bsd/libpcap/lib/Makefile Thu May 31 09:08:25 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2017/01/24 23:26:58 christos Exp $ +# $NetBSD: Makefile,v 1.16 2018/05/31 09:08:25 mrg Exp $ USE_SHLIBDIR=yes .include @@ -153,7 +153,7 @@ scanner.d scanner.o: tokdefs.h tokdefs.h: grammar.h cp $? $@ -CLEANFILES+= tokdefs.h +CLEANFILES+= tokdefs.h scanner.h COPTS.bpf_image.c = -Wno-format-nonliteral .include Index: src/external/bsd/unbound/sbin/Makefile.inc diff -u src/external/bsd/unbound/sbin/Makefile.inc:1.4 src/external/bsd/unbound/sbin/Makefile.inc:1.5 --- src/external/bsd/unbound/sbin/Makefile.inc:1.4 Tue Mar 13 03:07:51 2018 +++ src/external/bsd/unbound/sbin/Makefile.inc Thu May 31 09:08:25 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2018/03/13 03:07:51 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.5 2018/05/31 09:08:25 mrg Exp $ .include "../Makefile.inc" @@ -28,6 +28,6 @@ ${PROG}.8: ${PROG}.8.in __subst .if defined(SCRIPTS) .PATH: ${UNBOUND}/smallapp -CLEANFILES+=${SCRIPTS}.sh +CLEANFILES+=${SCRIPTS}.sh ${SCRIPTS} ${SCRIPTS}.sh: ${SCRIPTS}.sh.in __subst .endif Index: src/external/gpl2/dtc/usr.bin/dtc/Makefile diff -u src/external/gpl2/dtc/usr.bin/dtc/Makefile:1.2 src/external/gpl2/dtc/usr.bin/dtc/Makefile:1.3 --- src/external/gpl2/dtc/usr.bin/dtc/Makefile:1.2 Thu Jun 8 18:57:21 2017 +++ src/external/gpl2/dtc/usr.bin/dtc/Makefile Thu May 31 09:08:25 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2017/06/08 18:57:21 skrll Exp $ +# $NetBSD: Makefile,v 1.3 2018/05/31 09:08:25 mrg Exp $ NOMAN= # defined @@ -15,6 +15,7 @@ CPPFLAGS+= -I${LIBFDTDIST} SRCS+= ${DTC_SRCS} dtc-lexer.l dtc-parser.y YFLAGS+= -d -L +CLEANFILES+= dtc-parser.h .PATH: ${DTCDIST} Index: src/tests/usr.bin/nbperf/Makefile diff -u src/tests/usr.bin/nbperf/Makefile:1.1 src/tests/usr.bin/nbperf/Makefile:1.2 --- src/tests/usr.bin/nbperf/Makefile:1.1 Sun Jul 22 20:38:20 2012 +++ src/tests/usr.bin/nbperf/Makefile Thu May 31 09:08:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2012/07/22 20:38:20 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2018/05/31 09:08:26 mrg Exp $ NOMAN= # defined @@ -10,6 +10,7 @@ TESTS_SH= t_nbperf SCRIPTSDIR= ${TESTSDIR} SCRIPTS+= h_nbperf +CLEANFILES+= h_nbperf FILESDIR= ${TESTSDIR} FILES= hash_driver.c
CVS commit: src
Module Name:src Committed By: mrg Date: Thu May 31 09:08:26 UTC 2018 Modified Files: src/external/bsd/acpica/bin/iasl: Makefile src/external/bsd/libpcap/lib: Makefile src/external/bsd/unbound/sbin: Makefile.inc src/external/gpl2/dtc/usr.bin/dtc: Makefile src/tests/usr.bin/nbperf: Makefile Log Message: make 'clean' and/or 'cleandir' actually clean all the things. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/external/bsd/acpica/bin/iasl/Makefile cvs rdiff -u -r1.15 -r1.16 src/external/bsd/libpcap/lib/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/unbound/sbin/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/dtc/usr.bin/dtc/Makefile cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/nbperf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu May 31 07:37:45 UTC 2018 Modified Files: src/share/man/man4: envsys.4 Log Message: Remove superfluous Pp. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/share/man/man4/envsys.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/envsys.4 diff -u src/share/man/man4/envsys.4:1.52 src/share/man/man4/envsys.4:1.53 --- src/share/man/man4/envsys.4:1.52 Thu May 31 07:36:25 2018 +++ src/share/man/man4/envsys.4 Thu May 31 07:37:45 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: envsys.4,v 1.52 2018/05/31 07:36:25 pgoyette Exp $ +.\" $NetBSD: envsys.4,v 1.53 2018/05/31 07:37:45 wiz Exp $ .\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -65,7 +65,6 @@ for communication between kernel and use The following .Xr ioctl 2 types are available: -.Pp .Bl -tag -width XX .It Dv ENVSYS_GETDICTIONARY Pq prop_dictionary_t .Pp @@ -87,7 +86,6 @@ with one entry for sensor and all available properties set on it, plus another entry for the .Dq device-properties dictionary (which contains specific properties for a device): -.Pp .Bd -literal \&device0\&<\&/key\&> \&
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu May 31 07:37:45 UTC 2018 Modified Files: src/share/man/man4: envsys.4 Log Message: Remove superfluous Pp. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/share/man/man4/envsys.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Thu May 31 07:36:25 UTC 2018 Modified Files: src/share/man/man4: envsys.4 Log Message: Fix a typo in the example properties To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/share/man/man4/envsys.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/envsys.4 diff -u src/share/man/man4/envsys.4:1.51 src/share/man/man4/envsys.4:1.52 --- src/share/man/man4/envsys.4:1.51 Mon Jul 3 21:30:58 2017 +++ src/share/man/man4/envsys.4 Thu May 31 07:36:25 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: envsys.4,v 1.51 2017/07/03 21:30:58 wiz Exp $ +.\" $NetBSD: envsys.4,v 1.52 2018/05/31 07:36:25 pgoyette Exp $ .\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -110,7 +110,7 @@ dictionary (which contains specific prop \&CPU Temp\&<\&/string\&> \&high-capacity\&<\&/key\&> \&21417\&<\&/integer\&> - \&index\&<\&/string\&> + \&index\&<\&/key\&> \&sensor0\&<\&/string\&> \&max-value\&<\&/key\&> \&3894000\&<\&/integer\&>
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Thu May 31 07:36:25 UTC 2018 Modified Files: src/share/man/man4: envsys.4 Log Message: Fix a typo in the example properties To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/share/man/man4/envsys.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libipsec
Module Name:src Committed By: maxv Date: Thu May 31 07:16:17 UTC 2018 Modified Files: src/lib/libipsec: config.h Log Message: Disable draft_00 in racoon, discussed on tech-net@ and now in PR/53334. While here clarify the comments, no #undef. No need to increase the library version I guess, since draft_00 is not used in libipsec. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libipsec/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/lib/libipsec/config.h diff -u src/lib/libipsec/config.h:1.7 src/lib/libipsec/config.h:1.8 --- src/lib/libipsec/config.h:1.7 Wed Jan 4 16:09:42 2012 +++ src/lib/libipsec/config.h Thu May 31 07:16:16 2018 @@ -17,46 +17,46 @@ #define ENABLE_NATT /* Enable NAT-Traversal draft 00 */ -#define ENABLE_NATT_00 +/* #define ENABLE_NATT_00 */ /* Enable NAT-Traversal draft 01 */ -/* #undef ENABLE_NATT_01 */ +/* #define ENABLE_NATT_01 */ /* Enable NAT-Traversal draft 02 */ #define ENABLE_NATT_02 /* Enable NAT-Traversal draft 03 */ -/* #undef ENABLE_NATT_03 */ +/* #define ENABLE_NATT_03 */ /* Enable NAT-Traversal draft 04 */ -/* #undef ENABLE_NATT_04 */ +/* #define ENABLE_NATT_04 */ /* Enable NAT-Traversal draft 05 */ -/* #undef ENABLE_NATT_05 */ +/* #define ENABLE_NATT_05 */ /* Enable NAT-Traversal draft 06 */ -/* #undef ENABLE_NATT_06 */ +/* #define ENABLE_NATT_06 */ /* Enable NAT-Traversal draft 07 */ -/* #undef ENABLE_NATT_07 */ +/* #define ENABLE_NATT_07 */ /* Enable NAT-Traversal draft 08 */ -/* #undef ENABLE_NATT_08 */ +/* #define ENABLE_NATT_08 */ /* Enable NAT-Traversal RFC version */ #define ENABLE_NATT_RFC /* Enable samode-unspec */ -/* #undef ENABLE_SAMODE_UNSPECIFIED */ +/* #define ENABLE_SAMODE_UNSPECIFIED */ /* Enable statictics */ -/* #undef ENABLE_STATS */ +/* #define ENABLE_STATS */ /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ +/* #define HAVE_DOPRNT */ /* Have __func__ macro */ #define HAVE_FUNC_MACRO @@ -75,7 +75,7 @@ #define HAVE_INTTYPES_H 1 /* Have ipsec_policy_t */ -/* #undef HAVE_IPSEC_POLICY_T */ +/* #define HAVE_IPSEC_POLICY_T */ /* Hybrid authentication uses PAM */ /* NetBSD build: -DHAVE_LIBPAM is already supplied on the command line */ @@ -101,25 +101,25 @@ #define HAVE_OPENSSL_ENGINE_H 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_IDEA_H */ +/* #define HAVE_OPENSSL_IDEA_H */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_RC5_H */ +/* #define HAVE_OPENSSL_RC5_H */ /* Define to 1 if you have the `pam_start' function. */ #define HAVE_PAM_START 1 /* Are PF_KEY policy priorities supported? */ -/* #undef HAVE_PFKEY_POLICY_PRIORITY */ +/* #define HAVE_PFKEY_POLICY_PRIORITY */ /* Have forward policy */ -/* #undef HAVE_POLICY_FWD */ +/* #define HAVE_POLICY_FWD */ /* Define to 1 if you have the `rad_create_request' function. */ #define HAVE_RAD_CREATE_REQUEST 1 /* Is readline available? */ -/* #undef HAVE_READLINE */ +/* #define HAVE_READLINE */ /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 @@ -128,7 +128,7 @@ #define HAVE_SHA2_IN_SHA_H 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_SHADOW_H */ +/* #define HAVE_SHADOW_H */ /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 @@ -182,7 +182,7 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_VARARGS_H */ +/* #define HAVE_VARARGS_H */ /* Define to 1 if you have the `vprintf' function. */ #define HAVE_VPRINTF 1 @@ -222,7 +222,7 @@ #define TIME_WITH_SYS_TIME 1 /* Define to 1 if your declares `struct tm'. */ -/* #undef TM_IN_SYS_TIME */ +/* #define TM_IN_SYS_TIME */ /* A 'va_copy' style function */ #define VA_COPY va_copy @@ -238,12 +238,12 @@ #define YYTEXT_POINTER 1 /* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ +/* #define const */ /* Define to `int' if does not define. */ -/* #undef pid_t */ +/* #define pid_t */ /* Define to `unsigned' if does not define. */ -/* #undef size_t */ +/* #define size_t */ #define PATH_IPSEC_H
CVS commit: src/lib/libipsec
Module Name:src Committed By: maxv Date: Thu May 31 07:16:17 UTC 2018 Modified Files: src/lib/libipsec: config.h Log Message: Disable draft_00 in racoon, discussed on tech-net@ and now in PR/53334. While here clarify the comments, no #undef. No need to increase the library version I guess, since draft_00 is not used in libipsec. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libipsec/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: maxv Date: Thu May 31 07:03:57 UTC 2018 Modified Files: src/share/man/man4: udp.4 src/sys/netinet: in_pcb.h udp_usrreq.c src/sys/netipsec: ipsec_output.c ipsecif.c Log Message: Remove support for non-IKE markers in the kernel. Discussed on tech-net@, and now in PR/53334. Basically non-IKE markers come from a deprecated draft, and our kernel code for them has never worked. Setsockopt will now reject UDP_ENCAP_ESPINUDP_NON_IKE. Perhaps we should also add a check in key_handle_natt_info(), to make sure we also reject UDP_ENCAP_ESPINUDP_NON_IKE in the SADB. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/udp.4 cvs rdiff -u -r1.65 -r1.66 src/sys/netinet/in_pcb.h cvs rdiff -u -r1.252 -r1.253 src/sys/netinet/udp_usrreq.c cvs rdiff -u -r1.78 -r1.79 src/sys/netipsec/ipsec_output.c cvs rdiff -u -r1.9 -r1.10 src/sys/netipsec/ipsecif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: maxv Date: Thu May 31 07:03:57 UTC 2018 Modified Files: src/share/man/man4: udp.4 src/sys/netinet: in_pcb.h udp_usrreq.c src/sys/netipsec: ipsec_output.c ipsecif.c Log Message: Remove support for non-IKE markers in the kernel. Discussed on tech-net@, and now in PR/53334. Basically non-IKE markers come from a deprecated draft, and our kernel code for them has never worked. Setsockopt will now reject UDP_ENCAP_ESPINUDP_NON_IKE. Perhaps we should also add a check in key_handle_natt_info(), to make sure we also reject UDP_ENCAP_ESPINUDP_NON_IKE in the SADB. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/udp.4 cvs rdiff -u -r1.65 -r1.66 src/sys/netinet/in_pcb.h cvs rdiff -u -r1.252 -r1.253 src/sys/netinet/udp_usrreq.c cvs rdiff -u -r1.78 -r1.79 src/sys/netipsec/ipsec_output.c cvs rdiff -u -r1.9 -r1.10 src/sys/netipsec/ipsecif.c 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/udp.4 diff -u src/share/man/man4/udp.4:1.14 src/share/man/man4/udp.4:1.15 --- src/share/man/man4/udp.4:1.14 Mon Nov 12 05:13:28 2012 +++ src/share/man/man4/udp.4 Thu May 31 07:03:57 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: udp.4,v 1.14 2012/11/12 05:13:28 christos Exp $ +.\" $NetBSD: udp.4,v 1.15 2018/05/31 07:03:57 maxv Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)udp.4 8.1 (Berkeley) 6/5/93 .\" -.Dd June 20, 2012 +.Dd May 31, 2018 .Dt UDP 4 .Os .Sh NAME @@ -111,11 +111,9 @@ option can be used to encapsulate .Tn ESP packets in .Tn UDP . -There are two valid encapsulation options: -.Tn UDP_ENCAP_ESPINUDP_NON_IKE -from draft-ietf-ipsec-nat-t-ike-00/01 and +There is one valid encapsulation option: .Tn UDP_ENCAP_ESPINUDP -from draft-ietf-ipsec-udp-encaps-06 +from RFC3948 defined in .In netinet/udp.h . .Pp Index: src/sys/netinet/in_pcb.h diff -u src/sys/netinet/in_pcb.h:1.65 src/sys/netinet/in_pcb.h:1.66 --- src/sys/netinet/in_pcb.h:1.65 Mon Jan 1 00:51:36 2018 +++ src/sys/netinet/in_pcb.h Thu May 31 07:03:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.h,v 1.65 2018/01/01 00:51:36 christos Exp $ */ +/* $NetBSD: in_pcb.h,v 1.66 2018/05/31 07:03:57 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -113,7 +113,6 @@ struct inpcb { /* XXX should move to an UDP control block */ #define INP_ESPINUDP 0x0100 /* ESP over UDP for NAT-T */ #define INP_ESPINUDP_NON_IKE 0x0200 /* ESP over UDP for NAT-T */ -#define INP_ESPINUDP_ALL (INP_ESPINUDP|INP_ESPINUDP_NON_IKE) #define INP_NOHEADER 0x0400 /* Kernel removes IP header * before feeding a packet * to the raw socket user. Index: src/sys/netinet/udp_usrreq.c diff -u src/sys/netinet/udp_usrreq.c:1.252 src/sys/netinet/udp_usrreq.c:1.253 --- src/sys/netinet/udp_usrreq.c:1.252 Fri May 18 18:58:51 2018 +++ src/sys/netinet/udp_usrreq.c Thu May 31 07:03:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.252 2018/05/18 18:58:51 maxv Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.253 2018/05/31 07:03:57 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.252 2018/05/18 18:58:51 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.253 2018/05/31 07:03:57 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -598,7 +598,7 @@ udp4_realinput(struct sockaddr_in *src, #ifdef IPSEC /* Handle ESP over UDP */ - if (inp->inp_flags & INP_ESPINUDP_ALL) { + if (inp->inp_flags & INP_ESPINUDP) { switch (udp4_espinudp(mp, off, inp->inp_socket)) { case -1: /* Error, m was freed */ rcvcnt = -1; @@ -732,18 +732,13 @@ udp_ctloutput(int op, struct socket *so, switch(optval) { case 0: -inp->inp_flags &= ~INP_ESPINUDP_ALL; +inp->inp_flags &= ~INP_ESPINUDP; break; case UDP_ENCAP_ESPINUDP: -inp->inp_flags &= ~INP_ESPINUDP_ALL; inp->inp_flags |= INP_ESPINUDP; break; - case UDP_ENCAP_ESPINUDP_NON_IKE: -inp->inp_flags &= ~INP_ESPINUDP_ALL; -inp->inp_flags |= INP_ESPINUDP_NON_IKE; -break; default: error = EINVAL; break; @@ -1241,10 +1236,8 @@ udp_statinc(u_int stat) * Handle ESP-in-UDP packets (RFC3948). * * We need to distinguish between ESP packets and IKE packets. We do so by - * looking at the Non-ESP and Non-IKE markers. - * - * If IKE, we process the UDP packet as usual. Otherwise, ESP, we invoke - * IPsec. + * looking at the Non-ESP marker. If IKE, we process the UDP packet as usual. + * Otherwise, ESP, we invoke IPsec. * * Returns: * 1 if the packet was processed @@ -1254,10 +1247,9 @@ udp_statinc(u_int stat) static int udp4_espinudp(struct mbuf **mp, int off, struct socket *so) { + const size_t skip = sizeof(struct udphdr);
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 06:25:41 UTC 2018 Modified Files: src/sys/netipsec: xform_ah.c Log Message: Constify ipseczeroes, and remove one use of it. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/netipsec/xform_ah.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/netipsec/xform_ah.c diff -u src/sys/netipsec/xform_ah.c:1.105 src/sys/netipsec/xform_ah.c:1.106 --- src/sys/netipsec/xform_ah.c:1.105 Wed May 30 18:02:40 2018 +++ src/sys/netipsec/xform_ah.c Thu May 31 06:25:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ah.c,v 1.105 2018/05/30 18:02:40 maxv Exp $ */ +/* $NetBSD: xform_ah.c,v 1.106 2018/05/31 06:25:41 maxv Exp $ */ /* $FreeBSD: xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ /* @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.105 2018/05/30 18:02:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.106 2018/05/31 06:25:41 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -104,7 +104,7 @@ percpu_t *ahstat_percpu; int ah_enable = 1; /* control flow of packets with AH */ int ip4_ah_cleartos = 1; /* clear ip_tos when doing AH calc */ -static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */ +static const char ipseczeroes[256]; int ah_max_authsize; /* max authsize over all algorithms */ @@ -375,7 +375,7 @@ ah_massage_headers(struct mbuf **m0, int default: /* Zeroize all other options. */ -memcpy(ptr + off, ipseczeroes, optlen); +memset(ptr + off, 0, optlen); break; }
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 06:25:41 UTC 2018 Modified Files: src/sys/netipsec: xform_ah.c Log Message: Constify ipseczeroes, and remove one use of it. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/netipsec/xform_ah.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 06:14:18 UTC 2018 Modified Files: src/sys/netipsec: xform_esp.c Log Message: Add a comment and a KASSERT. I remember wondering whether this check was a problem, since ARC4 has a blocksize of one. Normally ARC4 can't be used in IPsec. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/netipsec/xform_esp.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/netipsec/xform_esp.c diff -u src/sys/netipsec/xform_esp.c:1.95 src/sys/netipsec/xform_esp.c:1.96 --- src/sys/netipsec/xform_esp.c:1.95 Thu May 31 05:52:09 2018 +++ src/sys/netipsec/xform_esp.c Thu May 31 06:14:18 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_esp.c,v 1.95 2018/05/31 05:52:09 maxv Exp $ */ +/* $NetBSD: xform_esp.c,v 1.96 2018/05/31 06:14:18 maxv Exp $ */ /* $FreeBSD: xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.95 2018/05/31 05:52:09 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.96 2018/05/31 06:14:18 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -337,14 +337,14 @@ esp_input(struct mbuf *m, struct secasva alen = esph ? esph->authsize : 0; /* - * Verify payload length is multiple of encryption algorithm - * block size. + * Verify payload length is multiple of encryption algorithm block + * size. * - * NB: This works for the null algorithm because the blocksize - * is 4 and all packets must be 4-byte aligned regardless - * of the algorithm. + * The payload must also be 4-byte-aligned. This is implicitly + * verified here too, since the blocksize is always 4-byte-aligned. */ plen = m->m_pkthdr.len - (skip + hlen + alen); + KASSERT((espx->blocksize & 3) == 0); if ((plen & (espx->blocksize - 1)) || (plen <= 0)) { char buf[IPSEC_ADDRSTRLEN]; DPRINTF(("%s: payload of %d octets not a multiple of %d octets,"
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Thu May 31 06:14:18 UTC 2018 Modified Files: src/sys/netipsec: xform_esp.c Log Message: Add a comment and a KASSERT. I remember wondering whether this check was a problem, since ARC4 has a blocksize of one. Normally ARC4 can't be used in IPsec. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/netipsec/xform_esp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.