CVS commit: src/sys/gdbscripts
Module Name:src Committed By: mrg Date: Mon May 6 02:41:02 UTC 2019 Modified Files: src/sys/gdbscripts: procs Added Files: src/sys/gdbscripts: devs Log Message: add a 'devs' script to display a list of all devices by device_t, name, parent, private data. for procs, put the printf \n into the same line. non trivial speed up with large process table. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/gdbscripts/devs cvs rdiff -u -r1.2 -r1.3 src/sys/gdbscripts/procs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/gdbscripts/procs diff -u src/sys/gdbscripts/procs:1.2 src/sys/gdbscripts/procs:1.3 --- src/sys/gdbscripts/procs:1.2 Wed Nov 18 18:05:51 2009 +++ src/sys/gdbscripts/procs Mon May 6 02:41:02 2019 @@ -1,4 +1,4 @@ -# $NetBSD: procs,v 1.2 2009/11/18 18:05:51 eeh Exp $ +# $NetBSD: procs,v 1.3 2019/05/06 02:41:02 mrg Exp $ define procs set $i = 0 @@ -11,11 +11,10 @@ define procs printf "proc pid flag stat nlwpslwp comm\n" end while ($p) - printf "%16lx %5d %8x %4x %5d %16lx %s", \ + printf "%16lx %5d %8x %4x %5d %16lx %s\n", \ $p, $p->p_pid, \ $p->p_flag, $p->p_stat, $p->p_nlwps, $p->p_lwps.lh_first, \ (char *) $p->p_comm - printf "\n" set $p = $p->p_list.le_next end set $i++ Added files: Index: src/sys/gdbscripts/devs diff -u /dev/null src/sys/gdbscripts/devs:1.1 --- /dev/null Mon May 6 02:41:02 2019 +++ src/sys/gdbscripts/devs Mon May 6 02:41:02 2019 @@ -0,0 +1,20 @@ +# $NetBSD: devs,v 1.1 2019/05/06 02:41:02 mrg Exp $ + +define devs + set $i = 0 + + while ($i < 2) + if ($i == 0) + set $d = alldevs.tqh_first + end + if ($d) + printf "device_tparent private dv_xname\n" + end + while ($d) + printf "%16lx %16lx %16lx %s\n", \ +$d, $d->dv_parent, $d->dv_private, $d->dv_xname + set $d = $d->dv_list.tqe_next + end + set $i++ + end +end
CVS commit: src/sys/arch
Module Name:src Committed By: sevan Date: Mon May 6 02:24:37 UTC 2019 Modified Files: src/sys/arch/amd64/conf: GENERIC XEN3_DOM0 XEN3_DOMU src/sys/arch/i386/conf: GENERIC src/sys/arch/sgimips/conf: GENERIC32_IP12 GENERIC32_IP2x GENERIC32_IP3x src/sys/arch/sparc64/conf: GENERIC Log Message: Use filesystems.config to reduce duplication To generate a diff of this commit: cvs rdiff -u -r1.526 -r1.527 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.166 -r1.167 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.88 -r1.89 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.1205 -r1.1206 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sgimips/conf/GENERIC32_IP12 cvs rdiff -u -r1.116 -r1.117 src/sys/arch/sgimips/conf/GENERIC32_IP2x cvs rdiff -u -r1.125 -r1.126 src/sys/arch/sgimips/conf/GENERIC32_IP3x cvs rdiff -u -r1.215 -r1.216 src/sys/arch/sparc64/conf/GENERIC 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 diff -u src/sys/arch/amd64/conf/GENERIC:1.526 src/sys/arch/amd64/conf/GENERIC:1.527 --- src/sys/arch/amd64/conf/GENERIC:1.526 Fri Apr 26 21:40:28 2019 +++ src/sys/arch/amd64/conf/GENERIC Mon May 6 02:24:37 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.526 2019/04/26 21:40:28 sevan Exp $ +# $NetBSD: GENERIC,v 1.527 2019/05/06 02:24:37 sevan Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.526 $" +#ident "GENERIC-$Revision: 1.527 $" maxusers 64 # estimated number of users @@ -164,30 +164,7 @@ options DKWEDGE_METHOD_APPLE # Support #options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems -file-system FFS # UFS -file-system MFS # memory file system -file-system NFS # Network File System client -file-system TMPFS # Efficient memory file-system -file-system EXT2FS # second extended file system (linux) -file-system LFS # log-structured file system -file-system NTFS # Windows/NT file system (experimental) -file-system CD9660 # ISO 9660 + Rock Ridge file system -file-system MSDOSFS # MS-DOS file system -file-system FDESC # /dev/fd -file-system KERNFS # /kern -file-system NULLFS # loopback file system -file-system OVERLAY # overlay file system -file-system PROCFS # /proc -file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) -file-system SMBFS # experimental - CIFS; also needs nsmb (below) -file-system UMAPFS # NULLFS + uid and gid remapping -file-system UNION # union file system -file-system CODA # Coda File System; also needs vcoda (below) -file-system PTYFS # /dev/ptm support -#file-system UDF # experimental - OSTA UDF CD/DVD file-system -#file-system HFS # experimental - Apple HFS+ (read-only) -#file-system NILFS # experimental - NTT's NiLFS(2) -#file-system AUTOFS # experimental - Automounter Filesystem +include "conf/filesystems.config" # File system options # ffs @@ -1121,7 +1098,6 @@ options RAID_AUTOCONFIG # auto-configu #options RF_INCLUDE_PARITY_DECLUSTERING=1 #options RF_INCLUDE_PARITY_DECLUSTERING_DS=1 pseudo-device fss # file system snapshot device -pseudo-device putter # for puffs and pud pseudo-device md # memory disk device (ramdisk) options MEMORY_DISK_HOOKS # enable root ramdisk @@ -1174,15 +1150,6 @@ pseudo-device bcsp # BlueCore Serial P pseudo-device btuart # Bluetooth HCI UART (H4) #pseudo-device nvmm # NetBSD Virtual Machine Monitor -# a pseudo device needed for Coda # also needs CODA (above) -pseudo-device vcoda # coda minicache <-> venus comm. - -# a pseudo device needed for SMBFS -pseudo-device nsmb # experimental - SMB requester - -# a pseudo device needed for AUTOFS -#pseudo-device autofs # experimental - AUTOFS - # wscons pseudo-devices pseudo-device wsmux # mouse & keyboard multiplexor pseudo-device wsfont Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.166 src/sys/arch/amd64/conf/XEN3_DOM0:1.167 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.166 Mon Feb 11 14:59:32 2019 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Mon May 6 02:24:37 2019 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.166 2019/02/11 14:59:32 cherry Exp $ +# $NetBSD: XEN3_DOM0,v 1.167 2019/05/06 02:24:37 sevan Exp $ include "arch/amd64/conf/std.xen" @@ -11,7 +11,7 @@ options INCLUDE_CONFIG_FILE # embed con #options UVMHIST_PRINT #options SYSCALL_DEBUG -#ident "XEN3_DOM0-$Revision: 1.166 $" +#ident "XEN3_DOM0-$Revision: 1.167 $" maxusers 32 # estimated number of users @@ -85,27 +85,7 @@ options DKWEDGE_METHOD_APPLE # Support #options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems -file-system FFS # UFS -file-system EXT2FS # second extended file system (linux) -file-system LFS # log-structured
CVS commit: src/sys/conf
Module Name:src Committed By: sevan Date: Mon May 6 01:43:09 UTC 2019 Modified Files: src/sys/conf: filesystems.config Log Message: Add ADOSFS & FILECORE (both disabled) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/conf/filesystems.config 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/filesystems.config diff -u src/sys/conf/filesystems.config:1.8 src/sys/conf/filesystems.config:1.9 --- src/sys/conf/filesystems.config:1.8 Mon May 6 01:20:42 2019 +++ src/sys/conf/filesystems.config Mon May 6 01:43:09 2019 @@ -1,4 +1,5 @@ -# $NetBSD: filesystems.config,v 1.8 2019/05/06 01:20:42 sevan Exp $ +# $NetBSD: filesystems.config,v 1.9 2019/05/06 01:43:09 sevan Exp $ +#file-system ADOSFS # AmigaDOS-compatible file system #file-system AUTOFS # Automounter Filesystem #pseudo-device autofs # experimental - AUTOFS file-system CD9660 # ISO 9660 + Rock Ridge file system @@ -8,6 +9,7 @@ file-system EFS # Silicon Graphics Exte file-system EXT2FS # second extended file system (linux) file-system FDESC # /dev/fd file-system FFS # UFS +file-system FILECORE # Acorn filecore file system #file-system HFS # experimental - Apple HFS+ (read-only) file-system KERNFS # /kern file-system LFS # log-structured file system
CVS commit: src/sys/conf
Module Name:src Committed By: sevan Date: Mon May 6 01:20:42 UTC 2019 Modified Files: src/sys/conf: filesystems.config Log Message: Add V7FS (disabled) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/conf/filesystems.config 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/filesystems.config diff -u src/sys/conf/filesystems.config:1.7 src/sys/conf/filesystems.config:1.8 --- src/sys/conf/filesystems.config:1.7 Mon May 6 01:11:42 2019 +++ src/sys/conf/filesystems.config Mon May 6 01:20:42 2019 @@ -1,4 +1,4 @@ -# $NetBSD: filesystems.config,v 1.7 2019/05/06 01:11:42 sevan Exp $ +# $NetBSD: filesystems.config,v 1.8 2019/05/06 01:20:42 sevan Exp $ #file-system AUTOFS # Automounter Filesystem #pseudo-device autofs # experimental - AUTOFS file-system CD9660 # ISO 9660 + Rock Ridge file system @@ -28,3 +28,4 @@ file-system TMPFS # Efficient memory fi #file-system UDF # experimental - OSTA UDF CD/DVD file-system file-system UMAPFS # NULLFS + uid and gid remapping file-system UNION # union file system +#file-system V7FS # 7th Edition(V7) File System
CVS commit: src/sys/conf
Module Name:src Committed By: sevan Date: Mon May 6 01:11:42 UTC 2019 Modified Files: src/sys/conf: filesystems.config Log Message: Add autofs pseudo device (disabled) Add a description for existing pseudo devices To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/conf/filesystems.config 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/filesystems.config diff -u src/sys/conf/filesystems.config:1.6 src/sys/conf/filesystems.config:1.7 --- src/sys/conf/filesystems.config:1.6 Mon May 6 00:33:17 2019 +++ src/sys/conf/filesystems.config Mon May 6 01:11:42 2019 @@ -1,8 +1,9 @@ -# $NetBSD: filesystems.config,v 1.6 2019/05/06 00:33:17 sevan Exp $ +# $NetBSD: filesystems.config,v 1.7 2019/05/06 01:11:42 sevan Exp $ #file-system AUTOFS # Automounter Filesystem +#pseudo-device autofs # experimental - AUTOFS file-system CD9660 # ISO 9660 + Rock Ridge file system file-system CODA # Coda File System; also needs vcoda (below) -pseudo-device vcoda +pseudo-device vcoda # coda minicache <-> venus comm. file-system EFS # Silicon Graphics Extent File System file-system EXT2FS # second extended file system (linux) file-system FDESC # /dev/fd @@ -20,9 +21,9 @@ file-system OVERLAY # overlay file syst file-system PROCFS # /proc file-system PTYFS # /dev/ptm support file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) -pseudo-device putter +pseudo-device putter # for puffs and pud file-system SMBFS # experimental - CIFS; also needs nsmb (below) -pseudo-device nsmb +pseudo-device nsmb # experimental - SMB requester file-system TMPFS # Efficient memory file-system #file-system UDF # experimental - OSTA UDF CD/DVD file-system file-system UMAPFS # NULLFS + uid and gid remapping
CVS commit: src/lib/libc/sys
Module Name:src Committed By: christos Date: Mon May 6 00:50:26 UTC 2019 Modified Files: src/lib/libc/sys: poll.2 Log Message: document the EINVAL caused by a large nfds. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/poll.2 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/sys/poll.2 diff -u src/lib/libc/sys/poll.2:1.28 src/lib/libc/sys/poll.2:1.29 --- src/lib/libc/sys/poll.2:1.28 Mon Mar 22 15:30:55 2010 +++ src/lib/libc/sys/poll.2 Sun May 5 20:50:26 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: poll.2,v 1.28 2010/03/22 19:30:55 joerg Exp $ +.\" $NetBSD: poll.2,v 1.29 2019/05/06 00:50:26 christos Exp $ .\" .\" Copyright (c) 1998, 2005 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 8, 2006 +.Dd May 5, 2019 .Dt POLL 2 .Os .Sh NAME @@ -218,7 +218,9 @@ points outside the process's allocated a A signal was delivered before the time limit expired and before any of the selected events occurred. .It Bq Er EINVAL -The specified time limit is negative. +The specified time limit is negative or +the number of pollfd structures specified is larger the than the current +file descriptor resource limit. .El .Sh SEE ALSO .Xr accept 2 ,
CVS commit: src/sys/conf
Module Name:src Committed By: sevan Date: Mon May 6 00:33:17 UTC 2019 Modified Files: src/sys/conf: filesystems.config Log Message: Include EFS support. Tested on amd64 & macppc To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/conf/filesystems.config 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/filesystems.config diff -u src/sys/conf/filesystems.config:1.5 src/sys/conf/filesystems.config:1.6 --- src/sys/conf/filesystems.config:1.5 Sat Apr 27 00:37:40 2019 +++ src/sys/conf/filesystems.config Mon May 6 00:33:17 2019 @@ -1,8 +1,9 @@ -# $NetBSD: filesystems.config,v 1.5 2019/04/27 00:37:40 sevan Exp $ +# $NetBSD: filesystems.config,v 1.6 2019/05/06 00:33:17 sevan Exp $ #file-system AUTOFS # Automounter Filesystem file-system CD9660 # ISO 9660 + Rock Ridge file system file-system CODA # Coda File System; also needs vcoda (below) pseudo-device vcoda +file-system EFS # Silicon Graphics Extent File System file-system EXT2FS # second extended file system (linux) file-system FDESC # /dev/fd file-system FFS # UFS
CVS commit: src/share/misc
Module Name:src Committed By: sevan Date: Mon May 6 00:29:12 UTC 2019 Modified Files: src/share/misc: acronyms.comp Log Message: EFS To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.249 src/share/misc/acronyms.comp:1.250 --- src/share/misc/acronyms.comp:1.249 Wed Apr 24 14:15:35 2019 +++ src/share/misc/acronyms.comp Mon May 6 00:29:12 2019 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.249 2019/04/24 14:15:35 sevan Exp $ +$NetBSD: acronyms.comp,v 1.250 2019/05/06 00:29:12 sevan Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -466,6 +466,7 @@ EEPROM electrically erasable programmabl EFI extensible firmware interface EFL emitter follower logic EFM eight to fourteen modulation +EFS extent file system EGA Enhanced Graphics Adapter EGP exterior gateway protocol EH extension header
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: christos Date: Mon May 6 00:08:13 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_amd64_wait.h t_ptrace_i386_wait.h Log Message: fix unused variable warnings. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/sys/t_ptrace_i386_wait.h 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_amd64_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.8 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.9 --- src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.8 Sun May 5 14:16:39 2019 +++ src/tests/lib/libc/sys/t_ptrace_amd64_wait.h Sun May 5 20:08:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_amd64_wait.h,v 1.8 2019/05/05 18:16:39 mgorny Exp $ */ +/* $NetBSD: t_ptrace_amd64_wait.h,v 1.9 2019/05/06 00:08:13 christos Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -122,9 +122,9 @@ ATF_TC_HEAD(x86_64_regs_gp_read, tc) ATF_TC_BODY(x86_64_regs_gp_read, tc) { const int exitval = 5; - const int sigval = SIGTRAP; pid_t child, wpid; #if defined(TWAIT_HAVE_STATUS) + const int sigval = SIGTRAP; int status; #endif struct reg gpr; @@ -209,9 +209,9 @@ ATF_TC_HEAD(x86_64_regs_r8_read, tc) ATF_TC_BODY(x86_64_regs_r8_read, tc) { const int exitval = 5; - const int sigval = SIGTRAP; pid_t child, wpid; #if defined(TWAIT_HAVE_STATUS) + const int sigval = SIGTRAP; int status; #endif struct reg gpr; Index: src/tests/lib/libc/sys/t_ptrace_i386_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.6 src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.7 --- src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.6 Sun May 5 14:15:40 2019 +++ src/tests/lib/libc/sys/t_ptrace_i386_wait.h Sun May 5 20:08:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_i386_wait.h,v 1.6 2019/05/05 18:15:40 mgorny Exp $ */ +/* $NetBSD: t_ptrace_i386_wait.h,v 1.7 2019/05/06 00:08:13 christos Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -112,9 +112,9 @@ ATF_TC_HEAD(i386_regs_gp_read, tc) ATF_TC_BODY(i386_regs_gp_read, tc) { const int exitval = 5; - const int sigval = SIGTRAP; pid_t child, wpid; #if defined(TWAIT_HAVE_STATUS) + const int sigval = SIGTRAP; int status; #endif struct reg gpr; @@ -185,9 +185,9 @@ ATF_TC_HEAD(i386_regs_ebp_esp_read, tc) ATF_TC_BODY(i386_regs_ebp_esp_read, tc) { const int exitval = 5; - const int sigval = SIGTRAP; pid_t child, wpid; #if defined(TWAIT_HAVE_STATUS) + const int sigval = SIGTRAP; int status; #endif struct reg gpr;
CVS commit: src/usr.bin/vacation
Module Name:src Committed By: pgoyette Date: Sun May 5 23:08:37 UTC 2019 Modified Files: src/usr.bin/vacation: vacation.c Log Message: Also fix the error message when -T is used with something other than A or D To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/usr.bin/vacation/vacation.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/vacation/vacation.c diff -u src/usr.bin/vacation/vacation.c:1.36 src/usr.bin/vacation/vacation.c:1.37 --- src/usr.bin/vacation/vacation.c:1.36 Mon Jul 21 14:19:27 2008 +++ src/usr.bin/vacation/vacation.c Sun May 5 23:08:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vacation.c,v 1.36 2008/07/21 14:19:27 lukem Exp $ */ +/* $NetBSD: vacation.c,v 1.37 2019/05/05 23:08:37 pgoyette Exp $ */ /* * Copyright (c) 1983, 1987, 1993 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94"; #endif -__RCSID("$NetBSD: vacation.c,v 1.36 2008/07/21 14:19:27 lukem Exp $"); +__RCSID("$NetBSD: vacation.c,v 1.37 2019/05/05 23:08:37 pgoyette Exp $"); #endif /* not lint */ /* @@ -219,7 +219,7 @@ main(int argc, char **argv) tflag |= DELIVERED_TO; break; default: - errx(1, "Unknown -t option `%c'", *p); + errx(1, "Unknown -T option `%c'", *p); } break; case '?':
CVS commit: src/usr.bin/vacation
Module Name:src Committed By: pgoyette Date: Sun May 5 23:05:03 UTC 2019 Modified Files: src/usr.bin/vacation: vacation.1 Log Message: Fix the BUGS section. There is no ``-t A'' or ``-t D'' option ``-t'' requires an interval specification. The correct bug info is for the ``-T A'' and ``-T D'' options. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/vacation/vacation.1 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/vacation/vacation.1 diff -u src/usr.bin/vacation/vacation.1:1.30 src/usr.bin/vacation/vacation.1:1.31 --- src/usr.bin/vacation/vacation.1:1.30 Mon Jul 3 21:34:22 2017 +++ src/usr.bin/vacation/vacation.1 Sun May 5 23:05:03 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: vacation.1,v 1.30 2017/07/03 21:34:22 wiz Exp $ +.\" $NetBSD: vacation.1,v 1.31 2019/05/05 23:05:03 pgoyette Exp $ .\" .\" Copyright (c) 1985, 1987, 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)vacation.1 8.2 (Berkeley) 4/28/95 .\" -.Dd March 24, 2013 +.Dd May 6, 2019 .Dt VACATION 1 .Os .Sh NAME @@ -249,8 +249,8 @@ command appeared in .Bx 4.3 . .Sh BUGS Adding -.Fl t Ar A +.Fl T Ar A or -.Fl t Ar D +.Fl T Ar D should only be done for misconfigured or non-compliant MTAs. Doing so may auto-respond to messages that were not supposed to be replied to.
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: christos Date: Sun May 5 21:49:53 UTC 2019 Modified Files: src/external/gpl3/binutils/dist/bfd: elf32-arm.c Log Message: Ignore 0 size'd symbols when looking for CMSE veneers. XXX: Is this correct? To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/binutils/dist/bfd/elf32-arm.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/gpl3/binutils/dist/bfd/elf32-arm.c diff -u src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.13 src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.14 --- src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.13 Tue Nov 6 20:13:52 2018 +++ src/external/gpl3/binutils/dist/bfd/elf32-arm.c Sun May 5 17:49:53 2019 @@ -19661,7 +19661,7 @@ elf32_arm_swap_symbol_in (bfd * abfd, /* Mark CMSE special symbols. */ symtab_hdr = & elf_symtab_hdr (abfd); - if (symtab_hdr->sh_size) + if (symtab_hdr->sh_size && dst->st_size != 0) name = bfd_elf_sym_name (abfd, symtab_hdr, dst, NULL); if (name && CONST_STRNEQ (name, CMSE_PREFIX)) ARM_SET_SYM_CMSE_SPCL (dst->st_target_internal);
CVS commit: src/share/man/man4
Module Name:src Committed By: sevan Date: Sun May 5 21:01:01 UTC 2019 Modified Files: src/share/man/man4: options.4 Log Message: PTYFS is no longer considered experimental. Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.500 -r1.501 src/share/man/man4/options.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/options.4 diff -u src/share/man/man4/options.4:1.500 src/share/man/man4/options.4:1.501 --- src/share/man/man4/options.4:1.500 Wed Apr 10 10:09:23 2019 +++ src/share/man/man4/options.4 Sun May 5 21:01:01 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: options.4,v 1.500 2019/04/10 10:09:23 wiz Exp $ +.\" $NetBSD: options.4,v 1.501 2019/05/05 21:01:01 sevan Exp $ .\" .\" Copyright (c) 1996 .\" Perry E. Metzger. All rights reserved. @@ -30,7 +30,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd April 10, 2019 +.Dd May 5, 2019 .Dt OPTIONS 4 .Os .Sh NAME @@ -951,7 +951,6 @@ for details. You also need to enable the pseudo-device, nsmb, for the SMB file system to work. .It Cd file-system PTYFS -.Bq Em EXPERIMENTAL Includes code for a special file system (normally mounted on .Pa /dev/pts ) in which pseudo-terminal slave devices become visible in the file system.
CVS commit: src/external/gpl3/gdb/lib/libgdb/arch
Module Name:src Committed By: christos Date: Sun May 5 20:48:48 UTC 2019 Modified Files: src/external/gpl3/gdb/lib/libgdb/arch/aarch64: config.h src/external/gpl3/gdb/lib/libgdb/arch/alpha: config.h src/external/gpl3/gdb/lib/libgdb/arch/arm: config.h src/external/gpl3/gdb/lib/libgdb/arch/armeb: config.h src/external/gpl3/gdb/lib/libgdb/arch/coldfire: config.h src/external/gpl3/gdb/lib/libgdb/arch/hppa: config.h src/external/gpl3/gdb/lib/libgdb/arch/i386: config.h src/external/gpl3/gdb/lib/libgdb/arch/m68000: config.h src/external/gpl3/gdb/lib/libgdb/arch/m68k: config.h src/external/gpl3/gdb/lib/libgdb/arch/mips64eb: config.h src/external/gpl3/gdb/lib/libgdb/arch/mips64el: config.h src/external/gpl3/gdb/lib/libgdb/arch/mipseb: config.h src/external/gpl3/gdb/lib/libgdb/arch/mipsel: config.h src/external/gpl3/gdb/lib/libgdb/arch/powerpc: config.h src/external/gpl3/gdb/lib/libgdb/arch/powerpc64: config.h src/external/gpl3/gdb/lib/libgdb/arch/sh3eb: config.h src/external/gpl3/gdb/lib/libgdb/arch/sh3el: config.h src/external/gpl3/gdb/lib/libgdb/arch/sparc: config.h src/external/gpl3/gdb/lib/libgdb/arch/sparc64: config.h src/external/gpl3/gdb/lib/libgdb/arch/vax: config.h Log Message: Everyone has libexpat so enable it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gdb/lib/libgdb/arch/aarch64/config.h cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libgdb/arch/alpha/config.h cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/lib/libgdb/arch/arm/config.h cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libgdb/arch/armeb/config.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gdb/lib/libgdb/arch/coldfire/config.h cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/lib/libgdb/arch/hppa/config.h cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libgdb/arch/i386/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gdb/lib/libgdb/arch/m68000/config.h cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/gdb/lib/libgdb/arch/mips64el/config.h cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gdb/lib/libgdb/arch/mipseb/config.h cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gdb/lib/libgdb/arch/mipsel/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gdb/lib/libgdb/arch/powerpc/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gdb/lib/libgdb/arch/powerpc64/config.h cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/lib/libgdb/arch/sh3eb/config.h cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/lib/libgdb/arch/sh3el/config.h cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libgdb/arch/sparc/config.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gdb/lib/libgdb/arch/sparc64/config.h cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/lib/libgdb/arch/vax/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/gdb/lib/libgdb/arch/aarch64/config.h diff -u src/external/gpl3/gdb/lib/libgdb/arch/aarch64/config.h:1.1 src/external/gpl3/gdb/lib/libgdb/arch/aarch64/config.h:1.2 --- src/external/gpl3/gdb/lib/libgdb/arch/aarch64/config.h:1.1 Wed Jul 11 09:34:27 2018 +++ src/external/gpl3/gdb/lib/libgdb/arch/aarch64/config.h Sun May 5 16:48:46 2019 @@ -240,7 +240,7 @@ /* #undef HAVE_LIBDL */ /* Define if you have the expat library. */ -/* #undef HAVE_LIBEXPAT */ +#define HAVE_LIBEXPAT 1 /* Define to 1 if you have the `libiconvlist' function. */ /* #undef HAVE_LIBICONVLIST */ Index: src/external/gpl3/gdb/lib/libgdb/arch/alpha/config.h diff -u src/external/gpl3/gdb/lib/libgdb/arch/alpha/config.h:1.8 src/external/gpl3/gdb/lib/libgdb/arch/alpha/config.h:1.9 --- src/external/gpl3/gdb/lib/libgdb/arch/alpha/config.h:1.8 Wed Nov 29 13:15:32 2017 +++ src/external/gpl3/gdb/lib/libgdb/arch/alpha/config.h Sun May 5 16:48:46 2019 @@ -240,7 +240,7 @@ /* #undef HAVE_LIBDL */ /* Define if you have the expat library. */ -/* #undef HAVE_LIBEXPAT */ +#define HAVE_LIBEXPAT 1 /* Define to 1 if you have the `libiconvlist' function. */ /* #undef HAVE_LIBICONVLIST */ Index: src/external/gpl3/gdb/lib/libgdb/arch/arm/config.h diff -u src/external/gpl3/gdb/lib/libgdb/arch/arm/config.h:1.9 src/external/gpl3/gdb/lib/libgdb/arch/arm/config.h:1.10 --- src/external/gpl3/gdb/lib/libgdb/arch/arm/config.h:1.9 Wed Nov 29 17:39:59 2017 +++ src/external/gpl3/gdb/lib/libgdb/arch/arm/config.h Sun May 5 16:48:46 2019 @@ -240,7 +240,7 @@ /* #undef HAVE_LIBDL */ /* Define if you have the expat library. */ -/* #undef HAVE_LIBEXPAT */ +#define HAVE_LIBEXPAT 1 /* Define to 1 if you have the `libiconvlist' function. */ /* #undef HAVE_LIBICONVLIST */
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sun May 5 20:45:08 UTC 2019 Modified Files: src/sys/kern: sys_select.c Log Message: Remove the slop code. Suggested by mrg@ To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/kern/sys_select.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/sys_select.c diff -u src/sys/kern/sys_select.c:1.42 src/sys/kern/sys_select.c:1.43 --- src/sys/kern/sys_select.c:1.42 Sat May 4 11:46:58 2019 +++ src/sys/kern/sys_select.c Sun May 5 16:45:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_select.c,v 1.42 2019/05/04 15:46:58 christos Exp $ */ +/* $NetBSD: sys_select.c,v 1.43 2019/05/05 20:45:08 christos Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.42 2019/05/04 15:46:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.43 2019/05/05 20:45:08 christos Exp $"); #include #include @@ -488,14 +488,18 @@ pollcommon(register_t *retval, struct po int error; size_t ni; - if (nfds > MAX(1000 + curlwp->l_fd->fd_dt->dt_nfiles, - curlwp->l_proc->p_rlimit[RLIMIT_NOFILE].rlim_cur)) { + if (nfds > curlwp->l_proc->p_rlimit[RLIMIT_NOFILE].rlim_cur) { /* - * Either the user passed in a very sparse 'fds' or junk! - * The kmem_alloc() call below would be bad news. - * We could process the 'fds' array in chunks, but that + * Prevent userland from causing over-allocation. + * Raising the default limit too high can still cause + * a lot of memory to be allocated, but this also means + * that the file descriptor array will also be large. + * + * To reduce the memory requirements here, we could + * process the 'fds' array in chunks, but that * is a lot of code that isn't normally useful. * (Or just move the copyin/out into pollscan().) + * * Historically the code silently truncated 'fds' to * dt_nfiles entries - but that does cause issues. */
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Sun May 5 20:10:57 UTC 2019 Modified Files: src/share/man/man9: namei.9 Log Message: sync with reality To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/share/man/man9/namei.9 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/man9/namei.9 diff -u src/share/man/man9/namei.9:1.50 src/share/man/man9/namei.9:1.51 --- src/share/man/man9/namei.9:1.50 Mon Jul 3 17:28:48 2017 +++ src/share/man/man9/namei.9 Sun May 5 16:10:57 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: namei.9,v 1.50 2017/07/03 21:28:48 wiz Exp $ +.\" $NetBSD: namei.9,v 1.51 2019/05/05 20:10:57 christos Exp $ .\" .\" Copyright (c) 2001, 2005, 2006, 2017 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 March 18, 2017 +.Dd May 5, 2019 .Dt NAMEI 9 .Os .Sh NAME @@ -57,12 +57,12 @@ "struct vnode **ret" .Ft int .Fn relookup "struct vnode *dvp" "struct vnode **vpp" \ -"struct componentname *cnp" +"struct componentname *cnp" "int dummy" .Ft int .Fn lookup_for_nfsd "struct nameidata *ndp" "struct vnode *startdir" \ "int neverfollow" .Ft int -.Fn lookup_for_nfsd_index "struct nameidata *ndp" +.Fn lookup_for_nfsd_index "struct nameidata *ndp" "struct vnode *startdir" .Sh DESCRIPTION The .Nm @@ -647,7 +647,7 @@ except that the argument shall be a user pointer .Pq Dv UIO_USERSPACE rather than a kernel pointer. -.It Fn relookup "dvp" "vpp" "cnp" +.It Fn relookup "dvp" "vpp" "cnp" "dummy" Reacquire a path name component is a directory. This is a quicker way to lookup a pathname component when the parent directory is known. @@ -657,6 +657,9 @@ and the pathname component by .Fa cnp . The vnode of the pathname is returned in the address specified by .Fa vpp . +The +.Fa dummy +argument is unused. Note that one may only use .Fn relookup to repeat a lookup of a final path component previously done by @@ -678,11 +681,12 @@ is set, symbolic link (not just at the end of the path) will cause an error. Otherwise, it follows symlinks normally. It should not be used by new code. -.It Fn lookup_for_nfsd_index "ndp" +.It Fn lookup_for_nfsd_index "ndp" "startdir" This is a (second) private entry point into .Nm used by the NFS server code. -It looks up a single path component. +It looks up a single path component starting from +.Fa startdir . It should not be used by new code. .El .Sh INTERNALS
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Sun May 5 19:10:05 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: rk_gmac.c Log Message: RK3399: Skip setting RGMII TX/RX clock delayline parameters for now and rely on the settings configured by firmware. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/rockchip/rk_gmac.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/rockchip/rk_gmac.c diff -u src/sys/arch/arm/rockchip/rk_gmac.c:1.11 src/sys/arch/arm/rockchip/rk_gmac.c:1.12 --- src/sys/arch/arm/rockchip/rk_gmac.c:1.11 Thu Feb 28 03:05:46 2019 +++ src/sys/arch/arm/rockchip/rk_gmac.c Sun May 5 19:10:05 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rk_gmac.c,v 1.11 2019/02/28 03:05:46 msaitoh Exp $ */ +/* $NetBSD: rk_gmac.c,v 1.12 2019/05/05 19:10:05 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rk_gmac.c,v 1.11 2019/02/28 03:05:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rk_gmac.c,v 1.12 2019/05/05 19:10:05 jmcneill Exp $"); #include #include @@ -170,6 +170,7 @@ rk3399_gmac_set_mode_rgmii(struct dwc_gm (RK3399_GRF_SOC_CON5_RMII_MODE | RK3399_GRF_SOC_CON5_GMAC_PHY_INTF_SEL) << 16; const uint32_t con5 = __SHIFTIN(1, RK3399_GRF_SOC_CON5_GMAC_PHY_INTF_SEL); +#if notyet const uint32_t con6_mask = (RK3399_GRF_SOC_CON6_GMAC_RXCLK_DLY_ENA | RK3399_GRF_SOC_CON6_GMAC_TXCLK_DLY_ENA | @@ -180,10 +181,13 @@ rk3399_gmac_set_mode_rgmii(struct dwc_gm (rx_delay ? RK3399_GRF_SOC_CON6_GMAC_RXCLK_DLY_ENA : 0) | __SHIFTIN(rx_delay, RK3399_GRF_SOC_CON6_GMAC_CLK_RX_DL_CFG) | __SHIFTIN(tx_delay, RK3399_GRF_SOC_CON6_GMAC_CLK_TX_DL_CFG); +#endif syscon_lock(rk_sc->sc_syscon); syscon_write_4(rk_sc->sc_syscon, RK3399_GRF_SOC_CON5, con5 | con5_mask); +#if notyet syscon_write_4(rk_sc->sc_syscon, RK3399_GRF_SOC_CON6, con6 | con6_mask); +#endif syscon_unlock(rk_sc->sc_syscon); }
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: christos Date: Sun May 5 18:13:16 UTC 2019 Modified Files: src/sys/arch/mips/include: vmparam.h Log Message: PR/54133: Sevan Janiyan: Binaries fail to execute Define M{IN,AX}_PAGE_SHIFT to cover all page possibilities To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/mips/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.61 src/sys/arch/mips/include/vmparam.h:1.62 --- src/sys/arch/mips/include/vmparam.h:1.61 Thu May 31 18:26:36 2018 +++ src/sys/arch/mips/include/vmparam.h Sun May 5 14:13:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.61 2018/05/31 22:26:36 mrg Exp $ */ +/* $NetBSD: vmparam.h,v 1.62 2019/05/05 18:13:16 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -50,10 +50,6 @@ /* * Machine dependent VM constants for MIPS. */ -#if !defined(_RUMPKERNEL) && (defined(MODULAR) || defined(_MODULE)) -#define MAX_PAGE_SIZE 16384 -#define MIN_PAGE_SIZE 4096 -#endif /* * We normally use a 4K page but may use 16K on MIPS systems. @@ -70,6 +66,12 @@ #define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK (PAGE_SIZE - 1) +#define MIN_PAGE_SHIFT 12 +#define MAX_PAGE_SHIFT 14 + +#define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) +#define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) + /* * USRSTACK is the top (end) of the user stack. *
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: mgorny Date: Sun May 5 18:16:39 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_amd64_wait.h Log Message: Introduce tests for reading r8..r15 registers. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h 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_amd64_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.7 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.8 --- src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.7 Sun May 5 10:04:11 2019 +++ src/tests/lib/libc/sys/t_ptrace_amd64_wait.h Sun May 5 18:16:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_amd64_wait.h,v 1.7 2019/05/05 10:04:11 mgorny Exp $ */ +/* $NetBSD: t_ptrace_amd64_wait.h,v 1.8 2019/05/05 18:16:39 mgorny Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -198,12 +198,100 @@ ATF_TC_BODY(x86_64_regs_gp_read, tc) TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } +ATF_TC(x86_64_regs_r8_read); +ATF_TC_HEAD(x86_64_regs_r8_read, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Set r8..r15 reg values from debugged program and read " + "them via PT_GETREGS, comparing values against expected."); +} + +ATF_TC_BODY(x86_64_regs_r8_read, tc) +{ + const int exitval = 5; + const int sigval = SIGTRAP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg gpr; + + const uint64_t r8[] = { + 0x0001020304050607, + 0x1011121314151617, + 0x2021222324252627, + 0x3031323334353637, + 0x4041424344454647, + 0x5051525354555657, + 0x6061626364656667, + 0x7071727374757677, + }; + + DPRINTF("Before forking process PID=%d\n", getpid()); + SYSCALL_REQUIRE((child = fork()) != -1); + if (child == 0) { + DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + DPRINTF("Before running assembly from child\n"); + + __asm__ __volatile__( + "movq0x00(%%rbx), %%r8\n\t" + "movq0x08(%%rbx), %%r9\n\t" + "movq0x10(%%rbx), %%r10\n\t" + "movq0x18(%%rbx), %%r11\n\t" + "movq0x20(%%rbx), %%r12\n\t" + "movq0x28(%%rbx), %%r13\n\t" + "movq0x30(%%rbx), %%r14\n\t" + "movq0x38(%%rbx), %%r15\n\t" + "int3\n\t" + : + : "b"(r8) + : "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" + ); + + DPRINTF("Before exiting of the child process\n"); + _exit(exitval); + } + DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); + + validate_status_stopped(status, sigval); + + DPRINTF("Call GETREGS for the child process\n"); + SYSCALL_REQUIRE(ptrace(PT_GETREGS, child, , 0) != -1); + + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R8], r8[0]); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R9], r8[1]); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R10], r8[2]); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R11], r8[3]); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R12], r8[4]); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R13], r8[5]); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R14], r8[6]); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_R15], r8[7]); + + DPRINTF("Before resuming the child process where it left off and " + "without signal to be sent\n"); + SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); + + validate_status_exited(status, exitval); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); +} + /// #define ATF_TP_ADD_TCS_PTRACE_WAIT_AMD64() \ ATF_TP_ADD_TC_HAVE_GPREGS(tp, x86_64_regs1); \ - ATF_TP_ADD_TC_HAVE_GPREGS(tp, x86_64_regs_gp_read); + ATF_TP_ADD_TC_HAVE_GPREGS(tp, x86_64_regs_gp_read); \ + ATF_TP_ADD_TC_HAVE_GPREGS(tp, x86_64_regs_r8_read); #else #define ATF_TP_ADD_TCS_PTRACE_WAIT_AMD64() #endif
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: mgorny Date: Sun May 5 18:15:40 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_i386_wait.h Log Message: Reintroduce i386 tests for general-purpose registers, without MMX req Reintroduce the test for reading i386 general-purpose register values from the debugged program. This time it's split into one test for the six registers not normally used by the compiler (eax..edx, esi, edi), and another for ebp, esp. This leaves enough free registers for the latter to work without MMX. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/sys/t_ptrace_i386_wait.h 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_i386_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.5 src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.6 --- src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.5 Sun May 5 15:05:22 2019 +++ src/tests/lib/libc/sys/t_ptrace_i386_wait.h Sun May 5 18:15:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_i386_wait.h,v 1.5 2019/05/05 15:05:22 mgorny Exp $ */ +/* $NetBSD: t_ptrace_i386_wait.h,v 1.6 2019/05/05 18:15:40 mgorny Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -100,8 +100,158 @@ ATF_TC_BODY(i386_regs1, tc) DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } + +ATF_TC(i386_regs_gp_read); +ATF_TC_HEAD(i386_regs_gp_read, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Set general-purpose reg values from debugged program and read " + "them via PT_GETREGS, comparing values against expected."); +} + +ATF_TC_BODY(i386_regs_gp_read, tc) +{ + const int exitval = 5; + const int sigval = SIGTRAP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg gpr; + + const uint32_t eax = 0x00010203; + const uint32_t ebx = 0x10111213; + const uint32_t ecx = 0x20212223; + const uint32_t edx = 0x30313233; + const uint32_t esi = 0x40414243; + const uint32_t edi = 0x50515253; + + DPRINTF("Before forking process PID=%d\n", getpid()); + SYSCALL_REQUIRE((child = fork()) != -1); + if (child == 0) { + DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + DPRINTF("Before running assembly from child\n"); + + __asm__ __volatile__( + "int3\n\t" + : + : "a"(eax), "b"(ebx), "c"(ecx), "d"(edx), "S"(esi), "D"(edi) + : + ); + + DPRINTF("Before exiting of the child process\n"); + _exit(exitval); + } + DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); + + validate_status_stopped(status, sigval); + + DPRINTF("Call GETREGS for the child process\n"); + SYSCALL_REQUIRE(ptrace(PT_GETREGS, child, , 0) != -1); + + ATF_CHECK_EQ((uint32_t)gpr.r_eax, eax); + ATF_CHECK_EQ((uint32_t)gpr.r_ebx, ebx); + ATF_CHECK_EQ((uint32_t)gpr.r_ecx, ecx); + ATF_CHECK_EQ((uint32_t)gpr.r_edx, edx); + ATF_CHECK_EQ((uint32_t)gpr.r_esi, esi); + ATF_CHECK_EQ((uint32_t)gpr.r_edi, edi); + + DPRINTF("Before resuming the child process where it left off and " + "without signal to be sent\n"); + SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); + + validate_status_exited(status, exitval); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); +} + +ATF_TC(i386_regs_ebp_esp_read); +ATF_TC_HEAD(i386_regs_ebp_esp_read, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Set EBP & ESP reg values from debugged program and read " + "them via PT_GETREGS, comparing values against expected."); +} + +ATF_TC_BODY(i386_regs_ebp_esp_read, tc) +{ + const int exitval = 5; + const int sigval = SIGTRAP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg gpr; + + const uint32_t esp = 0x60616263; + const uint32_t ebp = 0x70717273; + + DPRINTF("Before forking process PID=%d\n", getpid()); + SYSCALL_REQUIRE((child = fork()) != -1); + if (child == 0) { + DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + DPRINTF("Before running assembly from child\n"); + + __asm__ __volatile__( + /* ebp & ebp are a bit tricky, we must not clobber them */ + "movl%%esp, %%eax\n\t" + "movl%%ebp, %%ebx\n\t" + "movl%0, %%esp\n\t" + "movl%1, %%ebp\n\t" + "\n\t" + "int3\n\t" + "\n\t" + "movl%%eax, %%esp\n\t" + "movl%%ebx, %%ebp\n\t" + : + : "ri"(esp), "ri"(ebp) + : "%eax", "%ebx" + ); + + DPRINTF("Before exiting of the child process\n"); +
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Sun May 5 18:14:19 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: PR/54133: Sevan Janiyan: Binaries fail to execute Prefer MAX_PAGE_SHIFT over PAGE_SHIFT To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.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/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.8 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.9 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.8 Fri Apr 26 19:57:00 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Sun May 5 14:14:19 2019 @@ -202,10 +202,10 @@ /* One page is 2^LG_PAGE bytes. */ #include -#if defined(PAGE_SHIFT) -#define LG_PAGE PAGE_SHIFT -#elif defined(MAX_PAGE_SHIFT) +#if defined(MAX_PAGE_SHIFT) #define LG_PAGE MAX_PAGE_SHIFT +#elif defined(PAGE_SHIFT) +#define LG_PAGE PAGE_SHIFT #else #error "PAGE_SHIFT is not defined" #endif
CVS commit: src/sys/conf
Module Name:src Committed By: mlelstv Date: Sun May 5 17:24:00 UTC 2019 Modified Files: src/sys/conf: majors Log Message: Now the real number for ipmi To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/conf/majors 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/majors diff -u src/sys/conf/majors:1.85 src/sys/conf/majors:1.86 --- src/sys/conf/majors:1.85 Sun May 5 17:22:31 2019 +++ src/sys/conf/majors Sun May 5 17:24:00 2019 @@ -1,4 +1,4 @@ -# $NetBSD: majors,v 1.85 2019/05/05 17:22:31 mlelstv Exp $ +# $NetBSD: majors,v 1.86 2019/05/05 17:24:00 mlelstv Exp $ # # Device majors for Machine-Independent drivers. # @@ -85,4 +85,4 @@ device-major spi char 347 spi # Major 351 is reserved for sys/modules/examples # Major 352 is reserved for external/cddl/osnet/dev/fbt/fbt.c # Major 353 is reserved for external/cddl/osnet/dev/sdt/sdt.c -# 348 is reserved for IPMI userland driver +# Major 354 is reserved for IPMI userland driver
CVS commit: src/sys/conf
Module Name:src Committed By: mlelstv Date: Sun May 5 17:22:31 UTC 2019 Modified Files: src/sys/conf: majors Log Message: reservation for IPMI driver To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/conf/majors 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/majors diff -u src/sys/conf/majors:1.84 src/sys/conf/majors:1.85 --- src/sys/conf/majors:1.84 Sat Mar 9 18:53:52 2019 +++ src/sys/conf/majors Sun May 5 17:22:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: majors,v 1.84 2019/03/09 18:53:52 kamil Exp $ +# $NetBSD: majors,v 1.85 2019/05/05 17:22:31 mlelstv Exp $ # # Device majors for Machine-Independent drivers. # @@ -85,3 +85,4 @@ device-major spi char 347 spi # Major 351 is reserved for sys/modules/examples # Major 352 is reserved for external/cddl/osnet/dev/fbt/fbt.c # Major 353 is reserved for external/cddl/osnet/dev/sdt/sdt.c +# 348 is reserved for IPMI userland driver
CVS commit: src/sys/arch/ia64
Module Name:src Committed By: scole Date: Sun May 5 16:45:34 UTC 2019 Modified Files: src/sys/arch/ia64: TODO Log Message: a little bit of clean up, sort ski items, and some notes about libunwind To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/TODO 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/ia64/TODO diff -u src/sys/arch/ia64/TODO:1.5 src/sys/arch/ia64/TODO:1.6 --- src/sys/arch/ia64/TODO:1.5 Wed Apr 3 21:03:06 2019 +++ src/sys/arch/ia64/TODO Sun May 5 16:45:34 2019 @@ -1,7 +1,7 @@ $ NetBSD: TODO,v 1.1 2018/04/14 12:06:03 scole Exp $ What works: - The ski simulator (pkgsrc/emulators/ski) works on NetBSD, can run + The ski simulator (pkgsrc/emulators/ski) works on NetBSD/i386, can run and step through in assembly. Netbooting may work on some machines, basically you need to boot @@ -13,32 +13,29 @@ What works: Also, a successful report of booting off the CD is here http://mail-index.netbsd.org/port-ia64/2009/06/18/msg000102.html -Tasks remaining, first couple seem most important: - -- pmap.c is getting compilation warnings (for gcc6 & gcc7) like - /var/tmp//cckQKcKn.s:7614: Warning: Use of 'st8' may violate RAW dependency 'RR#' (data) - ... - how to change compile flags for specific kernel file like "CFLAGS.pmap.c+= -O0" ? +Tasks remaining: - context switching and forking appear unfinished, vm_machdep.c::cpu_lwp_fork() appears incomplete -- pmap module, imported from freebsd but still needs more work and - testing +- pmap module, imported from freebsd but still needs more work and testing - IA64 Stack unwind code: Support remaining unwind descriptor types. (See arch/ia64/unwind/TODO). ddb() traces need to print line - information also. Seems like a lot of this could be re-used - from freebsd + information also. Seems like there are a few options: + 1) fix and finish current unwind that is minimal, incomplete, and buggy + 2) import FreeBSD/ia64 implementation, may be derived from HP originally: + http://lists.llvm.org/pipermail/cfe-dev/2016-September/050649.html + 3) import this version + https://www.nongnu.org/libunwind/man/libunwind-ia64(3).html + originally written by one of ia64 gurus but still looks maintained + and portable + 4) something else +- kernel with LOCKDEBUG option crashes in pmap startup somewhere - redo _regset.h in netbsd style with __greg_t __gregset_t -- some commands in ski are not yet implemented, 2 important ones - are still missing, "cstack" and "pm", which view the stack and - source code lines respectively -- create a ski network driver -- create a ski disk driver - implement ld.elf_so, MK_DYNAMICROOT - fix memory detection, on real hardware doesn't find all memory -- implement interrupts (sacpi & pci), can be mostly from freebsd? +- implement interrupts (sacpi & pci) - MKGDB for ia64 - implement fp[gs]etsticky, [make|get|set|swap]context -- floating point, fenv functions were imported from freebsd, but haven't been tested +- floating point, fenv functions were imported from freebsd, but only compile tested - implement core_machdep.c - implement __cloneS ptrace.S sbrk.S shmat.S - implement kvm_ia64.c @@ -48,10 +45,9 @@ Tasks remaining, first couple seem most mutex_spin_enter()/mutex_spin_exit() __HAVE_SPIN_MUTEX_STUBS - rwlock.h rw_enter(),rw_exit(),rw_tryenter() __HAVE_RW_STUBS, implemented already? - add efipart_dev to read gpt/ffs disks for bootloader -- fix printf of lx in bootloader/libsa ? -- sort out bootloader/loader.efi stuff, is freebsd one good enough or - do we want commands more like netbsd i386 bootloader? e.g., add - command to boot nfs from loader.efi instead of hack now +- sort out bootloader/loader.efi stuff, make it more like netbsd and + less like freebsd, command to boot nfs from loader.efi instead of + hack that exists now - ia64 implement __HAVE_FAST_SOFTINTS? - want or need __HAVE_CPU_UAREA_ROUTINES, cpu_uarea_alloc, cpu_uarea_free - fix all "[Nn]ot yet" and "XXX" functions everywhere @@ -65,9 +61,16 @@ Tasks remaining, first couple seem most - write console and/or X framebuffer driver. freebsd has vgapci device that may be portable - add ia32 emulation, port from freebsd -- create install EFI/cdrom/netbsd +- installation media for EFI/cdrom/usb + +ski emulator tasks: +- some commands in ski are not yet implemented. 2 important ones + are still missing, "cstack" and "pm", which view the stack and + source code lines respectively +- create a ski network driver +- create a ski disk driver - fix ski to run on other archs beside i386, or at least amd64 -Pie in the sky +Pie in the sky: - Xen and itanium! - qemu and itanium
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: christos Date: Sun May 5 15:07:12 UTC 2019 Modified Files: src/sys/ufs/ufs: dir.h ufs_lookup.c Log Message: Add more comments to explain what we are doing. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/ufs/ufs/dir.h cvs rdiff -u -r1.149 -r1.150 src/sys/ufs/ufs/ufs_lookup.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/ufs/dir.h diff -u src/sys/ufs/ufs/dir.h:1.26 src/sys/ufs/ufs/dir.h:1.27 --- src/sys/ufs/ufs/dir.h:1.26 Sat May 4 21:48:53 2019 +++ src/sys/ufs/ufs/dir.h Sun May 5 11:07:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.h,v 1.26 2019/05/05 01:48:53 christos Exp $ */ +/* $NetBSD: dir.h,v 1.27 2019/05/05 15:07:12 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -109,7 +109,9 @@ struct direct { * The UFS_DIRSIZ macro gives the minimum record length which will hold * the directory entry. This requires the amount of space in struct direct * without the d_name field, plus enough space for the name with a terminating - * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. + * NUL byte (dp->d_namlen+1), rounded up to a 4 byte boundary. + * The UFS_NAMEPAD macro gives the number bytes of padding needed including + * the NUL terminating byte. */ #define DIR_ROUNDUP 4 #define UFS_NAMEROUNDUP(namlen) (((namlen) + DIR_ROUNDUP) & ~(DIR_ROUNDUP - 1)) Index: src/sys/ufs/ufs/ufs_lookup.c diff -u src/sys/ufs/ufs/ufs_lookup.c:1.149 src/sys/ufs/ufs/ufs_lookup.c:1.150 --- src/sys/ufs/ufs/ufs_lookup.c:1.149 Sat May 4 21:48:53 2019 +++ src/sys/ufs/ufs/ufs_lookup.c Sun May 5 11:07:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_lookup.c,v 1.149 2019/05/05 01:48:53 christos Exp $ */ +/* $NetBSD: ufs_lookup.c,v 1.150 2019/05/05 15:07:12 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.149 2019/05/05 01:48:53 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.150 2019/05/05 15:07:12 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_ffs.h" @@ -799,7 +799,7 @@ ufs_makedirentry(struct inode *ip, struc newdirp->d_namlen = namelen; memcpy(newdirp->d_name, cnp->cn_nameptr, namelen); - /* Zero out padding */ + /* NUL terminate and zero out padding */ memset(>d_name[namelen], 0, UFS_NAMEPAD(namelen)); if (FSFMT(ITOV(ip)))
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: mgorny Date: Sun May 5 15:05:22 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_i386_wait.h Log Message: Revert i386_regs_gp_read as it fails on non-MMX systems. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/sys/t_ptrace_i386_wait.h 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_i386_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.4 src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.5 --- src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.4 Sun May 5 10:04:11 2019 +++ src/tests/lib/libc/sys/t_ptrace_i386_wait.h Sun May 5 15:05:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_i386_wait.h,v 1.4 2019/05/05 10:04:11 mgorny Exp $ */ +/* $NetBSD: t_ptrace_i386_wait.h,v 1.5 2019/05/05 15:05:22 mgorny Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -100,97 +100,8 @@ ATF_TC_BODY(i386_regs1, tc) DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } - -ATF_TC(i386_regs_gp_read); -ATF_TC_HEAD(i386_regs_gp_read, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Set general-purpose reg values from debugged program and read " - "them via PT_GETREGS, comparing values against expected."); -} - -ATF_TC_BODY(i386_regs_gp_read, tc) -{ - const int exitval = 5; - const int sigval = SIGTRAP; - pid_t child, wpid; -#if defined(TWAIT_HAVE_STATUS) - int status; -#endif - struct reg gpr; - - const uint32_t eax = 0x00010203; - const uint32_t ebx = 0x10111213; - const uint32_t ecx = 0x20212223; - const uint32_t edx = 0x30313233; - const uint32_t esi = 0x40414243; - const uint32_t edi = 0x50515253; - const uint32_t esp = 0x60616263; - const uint32_t ebp = 0x70717273; - - DPRINTF("Before forking process PID=%d\n", getpid()); - SYSCALL_REQUIRE((child = fork()) != -1); - if (child == 0) { - DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); - FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); - - DPRINTF("Before running assembly from child\n"); - - __asm__ __volatile__( - /* ebp & ebp are a bit tricky, we must not clobber them */ - "movd%%esp, %%mm0\n\t" - "movd%%ebp, %%mm1\n\t" - "movd%6, %%esp\n\t" - "movd%7, %%ebp\n\t" - "\n\t" - "int3\n\t" - "\n\t" - "movd%%mm0, %%esp\n\t" - "movd%%mm1, %%ebp\n\t" - : - : "a"(eax), "b"(ebx), "c"(ecx), "d"(edx), "S"(esi), "D"(edi), - "y"(esp), "y"(ebp) - : "%mm0", "%mm1" - ); - - DPRINTF("Before exiting of the child process\n"); - _exit(exitval); - } - DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_stopped(status, sigval); - - DPRINTF("Call GETREGS for the child process\n"); - SYSCALL_REQUIRE(ptrace(PT_GETREGS, child, , 0) != -1); - - ATF_CHECK_EQ((uint32_t)gpr.r_eax, eax); - ATF_CHECK_EQ((uint32_t)gpr.r_ebx, ebx); - ATF_CHECK_EQ((uint32_t)gpr.r_ecx, ecx); - ATF_CHECK_EQ((uint32_t)gpr.r_edx, edx); - ATF_CHECK_EQ((uint32_t)gpr.r_esi, esi); - ATF_CHECK_EQ((uint32_t)gpr.r_edi, edi); - ATF_CHECK_EQ((uint32_t)gpr.r_esp, esp); - ATF_CHECK_EQ((uint32_t)gpr.r_ebp, ebp); - - DPRINTF("Before resuming the child process where it left off and " - "without signal to be sent\n"); - SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_exited(status, exitval); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); -} - #define ATF_TP_ADD_TCS_PTRACE_WAIT_I386() \ - ATF_TP_ADD_TC_HAVE_GPREGS(tp, i386_regs1); \ - ATF_TP_ADD_TC_HAVE_GPREGS(tp, i386_regs_gp_read); + ATF_TP_ADD_TC_HAVE_GPREGS(tp, i386_regs1); #else #define ATF_TP_ADD_TCS_PTRACE_WAIT_I386() #endif
CVS commit: src/sbin/fsck_ffs
Module Name:src Committed By: christos Date: Sun May 5 14:59:07 UTC 2019 Modified Files: src/sbin/fsck_ffs: dir.c fsck.h fsck_ffs.8 main.c Log Message: Add a -z flag to zero out the up to 4 bytes of padding in directory entry names (including the terminating NUL), as well as directory entries with extra free space (d->d_reclen > UFS_DIRSIZ(d)). Inspired from FreeBSD: https://svnweb.freebsd.org/base?view=revision=347066 While the kernel has been fixed to deal with the padding bytes (new kernels will correctly zero out all the padding after the name), it appears that there is still an issue with directory entries with extra free space, since a newly created and populated filesystem gets modified with "fsck_ffs -z". To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sbin/fsck_ffs/dir.c cvs rdiff -u -r1.52 -r1.53 src/sbin/fsck_ffs/fsck.h cvs rdiff -u -r1.50 -r1.51 src/sbin/fsck_ffs/fsck_ffs.8 cvs rdiff -u -r1.84 -r1.85 src/sbin/fsck_ffs/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ffs/dir.c diff -u src/sbin/fsck_ffs/dir.c:1.60 src/sbin/fsck_ffs/dir.c:1.61 --- src/sbin/fsck_ffs/dir.c:1.60 Sun May 5 09:24:19 2019 +++ src/sbin/fsck_ffs/dir.c Sun May 5 10:59:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.60 2019/05/05 13:24:19 christos Exp $ */ +/* $NetBSD: dir.c,v 1.61 2019/05/05 14:59:06 christos Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: dir.c,v 1.60 2019/05/05 13:24:19 christos Exp $"); +__RCSID("$NetBSD: dir.c,v 1.61 2019/05/05 14:59:06 christos Exp $"); #endif #endif /* not lint */ @@ -85,7 +85,7 @@ struct odirtemplate odirhead = { }; static int chgino(struct inodesc *); -static int dircheck(struct inodesc *, struct direct *); +static int dircheck(struct inodesc *, struct direct *, struct bufarea *); static int expanddir(union dinode *, char *); static void freedir(ino_t, ino_t); static struct direct *fsck_readdir(struct inodesc *); @@ -251,7 +251,7 @@ fsck_readdir(struct inodesc *idesc) if (idesc->id_loc % dirblksiz == 0 && idesc->id_filesize > 0 && idesc->id_loc < blksiz) { dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - if (dircheck(idesc, dp)) + if (dircheck(idesc, dp, bp)) goto dpok; if (idesc->id_fix == IGNORE) return (0); @@ -282,7 +282,7 @@ dpok: return (dp); ndp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); if (idesc->id_loc < blksiz && idesc->id_filesize > 0 && - dircheck(idesc, ndp) == 0) { + dircheck(idesc, ndp, bp) == 0) { size = dirblksiz - (idesc->id_loc % dirblksiz); idesc->id_loc += size; idesc->id_filesize -= size; @@ -303,24 +303,25 @@ dpok: /* * Verify that a directory entry is valid. * This is a superset of the checks made in the kernel. + * Returns: + * 1: good + * 0: bad */ static int -dircheck(struct inodesc *idesc, struct direct *dp) +dircheck(struct inodesc *idesc, struct direct *dp, struct bufarea *bp) { - int size; + uint8_t namlen, type; + uint16_t reclen; + uint32_t ino; char *cp; - u_char namlen, type; - int spaceleft; + int size, spaceleft, modified, unused, i; + modified = 0; spaceleft = dirblksiz - (idesc->id_loc % dirblksiz); - if (iswap32(dp->d_ino) >= maxino || - dp->d_reclen == 0 || - iswap16(dp->d_reclen) > spaceleft || - (iswap16(dp->d_reclen) & 0x3) != 0) - return (0); - if (dp->d_ino == 0) - return (1); - size = UFS_DIRSIZ(!newinofmt, dp, needswap); + + /* fill in the correct info for our fields */ + ino = iswap32(dp->d_ino); + reclen = iswap16(dp->d_reclen); if (!newinofmt && NEEDSWAP) { type = dp->d_namlen; namlen = dp->d_type; @@ -328,17 +329,84 @@ dircheck(struct inodesc *idesc, struct d namlen = dp->d_namlen; type = dp->d_type; } - if (iswap16(dp->d_reclen) < size || - idesc->id_filesize < size || + + if (ino >= maxino || + reclen == 0 || reclen > spaceleft || (reclen & 0x3) != 0) + goto bad; + + size = UFS_DIRSIZ(!newinofmt, dp, needswap); + if (ino == 0) { + /* + * Special case of an unused directory entry. Normally + * the kernel would coalesce unused space with the previous + * entry by extending its d_reclen, but there are situations + * (e.g. fsck) where that doesn't occur. + * If we're clearing out directory cruft (-z flag), then make + * sure this entry gets fully cleared as well. + */ + if (!zflag || fswritefd < 0) + return 1; + + if (dp->d_type != 0) { + dp->d_type = 0; + modified = 1; + } + if (dp->d_namlen != 0) { + dp->d_namlen = 0; + modified = 1; + } + if (dp->d_name[0] != '\0') { + dp->d_name[0] = '\0'; + modified = 1; + } + goto good; + } + + if (reclen < size || idesc->id_filesize < size || /* namlen > MAXNAMLEN || */ type > 15) - return (0); - for (cp = dp->d_name, size = 0; size <
CVS commit: src/sbin/fsck_ffs
Module Name:src Committed By: christos Date: Sun May 5 13:24:19 UTC 2019 Modified Files: src/sbin/fsck_ffs: dir.c Log Message: simplify the endian byte-swapping code. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sbin/fsck_ffs/dir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ffs/dir.c diff -u src/sbin/fsck_ffs/dir.c:1.59 src/sbin/fsck_ffs/dir.c:1.60 --- src/sbin/fsck_ffs/dir.c:1.59 Thu Nov 8 01:34:40 2018 +++ src/sbin/fsck_ffs/dir.c Sun May 5 09:24:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.59 2018/11/08 06:34:40 msaitoh Exp $ */ +/* $NetBSD: dir.c,v 1.60 2019/05/05 13:24:19 christos Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: dir.c,v 1.59 2018/11/08 06:34:40 msaitoh Exp $"); +__RCSID("$NetBSD: dir.c,v 1.60 2019/05/05 13:24:19 christos Exp $"); #endif #endif /* not lint */ @@ -144,6 +144,23 @@ reparent(ino_t inumber, ino_t parent) propagate(inumber); } +#if (BYTE_ORDER == LITTLE_ENDIAN) +# define NEEDSWAP (!needswap) +#else +# define NEEDSWAP (needswap) +#endif + +static void +dirswap(void *dbuf) +{ + struct direct *tdp = (struct direct *)dbuf; + u_char tmp; + + tmp = tdp->d_namlen; + tdp->d_namlen = tdp->d_type; + tdp->d_type = tmp; +} + /* * Scan each entry in a directory block. */ @@ -201,33 +218,12 @@ dirscan(struct inodesc *idesc) if (dsize > (int)sizeof dbuf) dsize = sizeof dbuf; memmove(dbuf, dp, (size_t)dsize); -# if (BYTE_ORDER == LITTLE_ENDIAN) - if (!newinofmt && !needswap) { -# else - if (!newinofmt && needswap) { -# endif -struct direct *tdp = (struct direct *)dbuf; -u_char tmp; - -tmp = tdp->d_namlen; -tdp->d_namlen = tdp->d_type; -tdp->d_type = tmp; - } + if (!newinofmt && NEEDSWAP) + dirswap(dbuf); idesc->id_dirp = (struct direct *)dbuf; if ((n = (*idesc->id_func)(idesc)) & ALTERED) { -# if (BYTE_ORDER == LITTLE_ENDIAN) -if (!newinofmt && !doinglevel2 && !needswap) { -# else -if (!newinofmt && !doinglevel2 && needswap) { -# endif - struct direct *tdp; - u_char tmp; - - tdp = (struct direct *)dbuf; - tmp = tdp->d_namlen; - tdp->d_namlen = tdp->d_type; - tdp->d_type = tmp; -} + if (!newinofmt && !doinglevel2 && NEEDSWAP) +dirswap(dbuf); bp = getdirblk(idesc->id_blkno, blksiz); memmove(bp->b_un.b_buf + idesc->id_loc - dsize, dbuf, (size_t)dsize); @@ -325,17 +321,13 @@ dircheck(struct inodesc *idesc, struct d if (dp->d_ino == 0) return (1); size = UFS_DIRSIZ(!newinofmt, dp, needswap); -# if (BYTE_ORDER == LITTLE_ENDIAN) - if (!newinofmt && !needswap) { -# else - if (!newinofmt && needswap) { -# endif - type = dp->d_namlen; - namlen = dp->d_type; - } else { - namlen = dp->d_namlen; - type = dp->d_type; - } + if (!newinofmt && NEEDSWAP) { + type = dp->d_namlen; + namlen = dp->d_type; + } else { + namlen = dp->d_namlen; + type = dp->d_type; + } if (iswap16(dp->d_reclen) < size || idesc->id_filesize < size || /* namlen > MAXNAMLEN || */ @@ -469,23 +461,14 @@ mkentry(struct inodesc *idesc) dirp->d_type = 0; dirp->d_namlen = newent.d_namlen; memmove(dirp->d_name, idesc->id_name, (size_t)newent.d_namlen + 1); -# if (BYTE_ORDER == LITTLE_ENDIAN) - /* - * If the entry was split, dirscan() will only reverse the byte - * order of the original entry, and not the new one, before - * writing it back out. So, we reverse the byte order here if - * necessary. - */ - if (oldlen != 0 && !newinofmt && !doinglevel2 && !needswap) { -# else - if (oldlen != 0 && !newinofmt && !doinglevel2 && needswap) { -# endif - u_char tmp; - - tmp = dirp->d_namlen; - dirp->d_namlen = dirp->d_type; - dirp->d_type = tmp; - } + /* + * If the entry was split, dirscan() will only reverse the byte + * order of the original entry, and not the new one, before + * writing it back out. So, we reverse the byte order here if + * necessary. + */ + if (oldlen != 0 && !newinofmt && !doinglevel2 && NEEDSWAP) + dirswap(dirp); return (ALTERED|STOP); }
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: mgorny Date: Sun May 5 10:04:11 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_amd64_wait.h t_ptrace_i386_wait.h Log Message: Add tests for reading pre-set general purpose register values via PT_GETREGS. Add new tests verifying that PT_GETREGS provides correct register values from the underlying program. The test uses inline assembly in the child program to set registers to well-known constants, then compares the results obtained via PT_GETREGS against them. Reviewed by kamil. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_ptrace_i386_wait.h 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_amd64_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.6 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.7 --- src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.6 Sun Feb 10 02:13:45 2019 +++ src/tests/lib/libc/sys/t_ptrace_amd64_wait.h Sun May 5 10:04:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_amd64_wait.h,v 1.6 2019/02/10 02:13:45 kamil Exp $ */ +/* $NetBSD: t_ptrace_amd64_wait.h,v 1.7 2019/05/05 10:04:11 mgorny Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -111,11 +111,99 @@ ATF_TC_BODY(x86_64_regs1, tc) TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } +ATF_TC(x86_64_regs_gp_read); +ATF_TC_HEAD(x86_64_regs_gp_read, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Set general-purpose reg values from debugged program and read " + "them via PT_GETREGS, comparing values against expected."); +} + +ATF_TC_BODY(x86_64_regs_gp_read, tc) +{ + const int exitval = 5; + const int sigval = SIGTRAP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg gpr; + + const uint64_t rax = 0x0001020304050607; + const uint64_t rbx = 0x1011121314151617; + const uint64_t rcx = 0x2021222324252627; + const uint64_t rdx = 0x3031323334353637; + const uint64_t rsi = 0x4041424344454647; + const uint64_t rdi = 0x5051525354555657; + const uint64_t rsp = 0x6061626364656667; + const uint64_t rbp = 0x7071727374757677; + + DPRINTF("Before forking process PID=%d\n", getpid()); + SYSCALL_REQUIRE((child = fork()) != -1); + if (child == 0) { + DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + DPRINTF("Before running assembly from child\n"); + + __asm__ __volatile__( + /* rbp & rbp are a bit tricky, we must not clobber them */ + "movq%%rsp, %%r8\n\t" + "movq%%rbp, %%r9\n\t" + "movq%6, %%rsp\n\t" + "movq%7, %%rbp\n\t" + "\n\t" + "int3\n\t" + "\n\t" + "movq%%r8, %%rsp\n\t" + "movq%%r9, %%rbp\n\t" + : + : "a"(rax), "b"(rbx), "c"(rcx), "d"(rdx), "S"(rsi), "D"(rdi), + "i"(rsp), "i"(rbp) + : "%r8", "%r9" + ); + + DPRINTF("Before exiting of the child process\n"); + _exit(exitval); + } + DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); + + validate_status_stopped(status, sigval); + + DPRINTF("Call GETREGS for the child process\n"); + SYSCALL_REQUIRE(ptrace(PT_GETREGS, child, , 0) != -1); + + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RAX], rax); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RBX], rbx); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RCX], rcx); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RDX], rdx); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RSI], rsi); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RDI], rdi); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RSP], rsp); + ATF_CHECK_EQ((uint64_t)gpr.regs[_REG_RBP], rbp); + + DPRINTF("Before resuming the child process where it left off and " + "without signal to be sent\n"); + SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); + + validate_status_exited(status, exitval); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); +} + /// #define ATF_TP_ADD_TCS_PTRACE_WAIT_AMD64() \ - ATF_TP_ADD_TC_HAVE_GPREGS(tp, x86_64_regs1); + ATF_TP_ADD_TC_HAVE_GPREGS(tp, x86_64_regs1); \ + ATF_TP_ADD_TC_HAVE_GPREGS(tp, x86_64_regs_gp_read); #else #define ATF_TP_ADD_TCS_PTRACE_WAIT_AMD64() #endif Index: src/tests/lib/libc/sys/t_ptrace_i386_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.3 src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.4 --- src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.3 Sun Feb 10 02:13:45 2019 +++ src/tests/lib/libc/sys/t_ptrace_i386_wait.h Sun
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Sun May 5 09:12:01 UTC 2019 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Tickets #1693 and #1694 To generate a diff of this commit: cvs rdiff -u -r1.1.2.141 -r1.1.2.142 src/doc/CHANGES-7.0.3 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-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.141 src/doc/CHANGES-7.0.3:1.1.2.142 --- src/doc/CHANGES-7.0.3:1.1.2.141 Wed May 1 09:43:37 2019 +++ src/doc/CHANGES-7.0.3 Sun May 5 09:12:01 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.141 2019/05/01 09:43:37 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.142 2019/05/05 09:12:01 martin Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5797,3 +5797,15 @@ external/bsd/dhcpcd/dist/src/dhcpcd.h Use consttime_memequal(3) to compare hashes. [roy, ticket #1690] +sys/arch/amd64/amd64/copy.S 1.33 +sys/arch/i386/i386/copy.S 1.31 + + Don't forget to clear the direction flag if kcopy fails. + [maxv, ticket #1693] + +external/bsd/dhcpcd/dist/src/dhcp6.c (apply patch) + + DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE. + [roy, ticket #1694] + +
CVS commit: [netbsd-7-0] src/external/bsd/dhcpcd/dist
Module Name:src Committed By: martin Date: Sun May 5 09:09:51 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist [netbsd-7-0]: dhcp6.c Log Message: Apply patch, requested by roy in ticket #1695: external/bsd/dhcpcd/dist/src/dhcp6.c DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE To generate a diff of this commit: cvs rdiff -u -r1.1.1.13.2.2 -r1.1.1.13.2.2.2.1 \ src/external/bsd/dhcpcd/dist/dhcp6.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/dhcpcd/dist/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/dhcp6.c:1.1.1.13.2.2 src/external/bsd/dhcpcd/dist/dhcp6.c:1.1.1.13.2.2.2.1 --- src/external/bsd/dhcpcd/dist/dhcp6.c:1.1.1.13.2.2 Thu Feb 5 15:13:12 2015 +++ src/external/bsd/dhcpcd/dist/dhcp6.c Sun May 5 09:09:50 2019 @@ -1,5 +1,5 @@ #include - __RCSID("$NetBSD: dhcp6.c,v 1.1.1.13.2.2 2015/02/05 15:13:12 martin Exp $"); + __RCSID("$NetBSD: dhcp6.c,v 1.1.1.13.2.2.2.1 2019/05/05 09:09:50 martin Exp $"); /* * dhcpcd - DHCP client daemon @@ -1856,38 +1856,39 @@ dhcp6_findpd(struct interface *ifp, cons ex = dhcp6_findoption(D6_OPTION_PD_EXCLUDE, p, ol); a->prefix_exclude_len = 0; memset(>prefix_exclude, 0, sizeof(a->prefix_exclude)); -#if 0 - if (ex == NULL) { - struct dhcp6_option *w; - uint8_t *wp; - - w = calloc(1, 128); - w->len = htons(2); - wp = D6_OPTION_DATA(w); - *wp++ = 64; - *wp++ = 0x78; - ex = w; - } -#endif if (ex == NULL) continue; + ol = ntohs(ex->len); - if (ol < 2) { - syslog(LOG_ERR, "%s: truncated PD Exclude", - ifp->name); + + /* RFC 6603 4.2 says option length MUST be between 2 and 17. + * This allows 1 octet for prefix length and 16 for the + * subnet ID. */ + if (ol < 2 || ol > 17) { + syslog(LOG_ERR, + "%s: invalid PD Exclude option", ifp->name); continue; } + op = D6_COPTION_DATA(ex); - a->prefix_exclude_len = *op++; + /* RFC 6603 4.2 says prefix length MUST be between the + * length of the IAPREFIX prefix length + 1 and 128. */ + if (*op < a->prefix_len + 1 || *op > 128) { + syslog(LOG_ERR, + "%s: invalid PD Exclude length", ifp->name); + continue; + } + + /* Check option length matches prefix length. */ ol--; - if (((a->prefix_exclude_len - a->prefix_len - 1) / NBBY) + 1 - != ol) - { - syslog(LOG_ERR, "%s: PD Exclude length mismatch", - ifp->name); + if (((*op - a->prefix_len - 1) / NBBY) + 1 != ol) { + syslog(LOG_ERR, + "%s: PD Exclude length mismatch", ifp->name); a->prefix_exclude_len = 0; continue; } + a->prefix_exclude_len = *op++; + u8 = a->prefix_len % NBBY; memcpy(>prefix_exclude, >prefix, sizeof(a->prefix_exclude));
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Sun May 5 09:09:04 UTC 2019 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.3 Log Message: Tickets #1693 and #1694 To generate a diff of this commit: cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-7.1.3 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-7.1.3 diff -u src/doc/CHANGES-7.1.3:1.1.2.48 src/doc/CHANGES-7.1.3:1.1.2.49 --- src/doc/CHANGES-7.1.3:1.1.2.48 Wed May 1 09:43:22 2019 +++ src/doc/CHANGES-7.1.3 Sun May 5 09:09:04 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.3,v 1.1.2.48 2019/05/01 09:43:22 martin Exp $ +# $NetBSD: CHANGES-7.1.3,v 1.1.2.49 2019/05/05 09:09:04 martin Exp $ A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3 release: @@ -489,4 +489,15 @@ external/bsd/dhcpcd/dist/src/dhcpcd.h Use consttime_memequal(3) to compare hashes. [roy, ticket #1690] +sys/arch/amd64/amd64/copy.S 1.33 +sys/arch/i386/i386/copy.S 1.31 + + Don't forget to clear the direction flag if kcopy fails. + [maxv, ticket #1693] + +external/bsd/dhcpcd/dist/src/dhcp6.c (apply patch) + + DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE. + [roy, ticket #1694] +
CVS commit: [netbsd-7-1] src/external/bsd/dhcpcd/dist
Module Name:src Committed By: martin Date: Sun May 5 09:07:17 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist [netbsd-7-1]: dhcp6.c Log Message: Apply patch, requested by roy in ticket #1695: external/bsd/dhcpcd/dist/src/dhcp6.c DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE To generate a diff of this commit: cvs rdiff -u -r1.1.1.13.2.2 -r1.1.1.13.2.2.6.1 \ src/external/bsd/dhcpcd/dist/dhcp6.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/dhcpcd/dist/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/dhcp6.c:1.1.1.13.2.2 src/external/bsd/dhcpcd/dist/dhcp6.c:1.1.1.13.2.2.6.1 --- src/external/bsd/dhcpcd/dist/dhcp6.c:1.1.1.13.2.2 Thu Feb 5 15:13:12 2015 +++ src/external/bsd/dhcpcd/dist/dhcp6.c Sun May 5 09:07:17 2019 @@ -1,5 +1,5 @@ #include - __RCSID("$NetBSD: dhcp6.c,v 1.1.1.13.2.2 2015/02/05 15:13:12 martin Exp $"); + __RCSID("$NetBSD: dhcp6.c,v 1.1.1.13.2.2.6.1 2019/05/05 09:07:17 martin Exp $"); /* * dhcpcd - DHCP client daemon @@ -1856,38 +1856,39 @@ dhcp6_findpd(struct interface *ifp, cons ex = dhcp6_findoption(D6_OPTION_PD_EXCLUDE, p, ol); a->prefix_exclude_len = 0; memset(>prefix_exclude, 0, sizeof(a->prefix_exclude)); -#if 0 - if (ex == NULL) { - struct dhcp6_option *w; - uint8_t *wp; - - w = calloc(1, 128); - w->len = htons(2); - wp = D6_OPTION_DATA(w); - *wp++ = 64; - *wp++ = 0x78; - ex = w; - } -#endif if (ex == NULL) continue; + ol = ntohs(ex->len); - if (ol < 2) { - syslog(LOG_ERR, "%s: truncated PD Exclude", - ifp->name); + + /* RFC 6603 4.2 says option length MUST be between 2 and 17. + * This allows 1 octet for prefix length and 16 for the + * subnet ID. */ + if (ol < 2 || ol > 17) { + syslog(LOG_ERR, + "%s: invalid PD Exclude option", ifp->name); continue; } + op = D6_COPTION_DATA(ex); - a->prefix_exclude_len = *op++; + /* RFC 6603 4.2 says prefix length MUST be between the + * length of the IAPREFIX prefix length + 1 and 128. */ + if (*op < a->prefix_len + 1 || *op > 128) { + syslog(LOG_ERR, + "%s: invalid PD Exclude length", ifp->name); + continue; + } + + /* Check option length matches prefix length. */ ol--; - if (((a->prefix_exclude_len - a->prefix_len - 1) / NBBY) + 1 - != ol) - { - syslog(LOG_ERR, "%s: PD Exclude length mismatch", - ifp->name); + if (((*op - a->prefix_len - 1) / NBBY) + 1 != ol) { + syslog(LOG_ERR, + "%s: PD Exclude length mismatch", ifp->name); a->prefix_exclude_len = 0; continue; } + a->prefix_exclude_len = *op++; + u8 = a->prefix_len % NBBY; memcpy(>prefix_exclude, >prefix, sizeof(a->prefix_exclude));
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sun May 5 09:04:48 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1693 and #1695 To generate a diff of this commit: cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-7.3 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-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.50 src/doc/CHANGES-7.3:1.1.2.51 --- src/doc/CHANGES-7.3:1.1.2.50 Wed May 1 09:50:53 2019 +++ src/doc/CHANGES-7.3 Sun May 5 09:04:48 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.50 2019/05/01 09:50:53 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.51 2019/05/05 09:04:48 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -556,4 +556,14 @@ sys/kern/sys_pipe.c1.147,1.148 Handle half-closed pipes in FIONWRITE and FIONSPACE. [mlelstv, ticket #1692] +sys/arch/amd64/amd64/copy.S 1.33 +sys/arch/i386/i386/copy.S 1.31 + + Don't forget to clear the direction flag if kcopy fails. + [maxv, ticket #1693] + +external/bsd/dhcpcd/dist/src/dhcp6.c (apply patch) + + DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE. + [roy, ticket #1695]
CVS commit: [netbsd-7] src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: martin Date: Sun May 5 09:02:45 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src [netbsd-7]: dhcp6.c Log Message: Apply patch, requested by roy in ticket #1695: external/bsd/dhcpcd/dist/src/dhcp6.c DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE To generate a diff of this commit: cvs rdiff -u -r1.1.1.12.4.4 -r1.1.1.12.4.5 \ src/external/bsd/dhcpcd/dist/src/dhcp6.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/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.4 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.5 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.4 Fri Apr 26 19:47:23 2019 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Sun May 5 09:02:45 2019 @@ -2152,40 +2152,38 @@ dhcp6_findpd(struct interface *ifp, cons state->expire = a->prefix_vltime; i++; - o = dhcp6_findoption(o, ol, D6_OPTION_PD_EXCLUDE, ); a->prefix_exclude_len = 0; memset(>prefix_exclude, 0, sizeof(a->prefix_exclude)); -#if 0 - if (ex == NULL) { - struct dhcp6_option *w; - uint8_t *wp; - - w = calloc(1, 128); - w->len = htons(2); - wp = D6_OPTION_DATA(w); - *wp++ = 64; - *wp++ = 0x78; - ex = w; - } -#endif + o = dhcp6_findoption(o, ol, D6_OPTION_PD_EXCLUDE, ); if (o == NULL) continue; - if (ol < 2) { - logerrx("%s: truncated PD Exclude", ifp->name); + + /* RFC 6603 4.2 says option length MUST be between 2 and 17. + * This allows 1 octet for prefix length and 16 for the + * subnet ID. */ + if (ol < 2 || ol > 17) { + logerrx("%s: invalid PD Exclude option", ifp->name); continue; } - a->prefix_exclude_len = *o++; + + /* RFC 6603 4.2 says prefix length MUST be between the + * length of the IAPREFIX prefix length + 1 and 128. */ + if (*o < a->prefix_len + 1 || *o > 128) { + logerrx("%s: invalid PD Exclude length", ifp->name); + continue; + } + ol--; - if (((a->prefix_exclude_len - a->prefix_len - 1) / NBBY) + 1 - != ol) - { + /* Check option length matches prefix length. */ + if (((*o - a->prefix_len - 1) / NBBY) + 1 != ol) { logerrx("%s: PD Exclude length mismatch", ifp->name); - a->prefix_exclude_len = 0; continue; } - nb = a->prefix_len % NBBY; + a->prefix_exclude_len = *o++; + memcpy(>prefix_exclude, >prefix, sizeof(a->prefix_exclude)); + nb = a->prefix_len % NBBY; if (nb) ol--; pw = a->prefix_exclude.s6_addr +
CVS commit: [netbsd-7-0] src/sys/arch
Module Name:src Committed By: martin Date: Sun May 5 08:49:19 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [netbsd-7-0]: copy.S src/sys/arch/i386/i386 [netbsd-7-0]: copy.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1693): sys/arch/amd64/amd64/copy.S: revision 1.33 sys/arch/i386/i386/copy.S: revision 1.31 Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas overlap, but doesn't clear it if the copy faults. If this happens, we return to the caller with DF=1, and each future memory copy will be backwards. I wonder if there really are places where kcopy() is called with overlapping areas. To generate a diff of this commit: cvs rdiff -u -r1.18.38.1 -r1.18.38.2 src/sys/arch/amd64/amd64/copy.S cvs rdiff -u -r1.23 -r1.23.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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.18.38.1 src/sys/arch/amd64/amd64/copy.S:1.18.38.2 --- src/sys/arch/amd64/amd64/copy.S:1.18.38.1 Sat Dec 24 04:07:00 2016 +++ src/sys/arch/amd64/amd64/copy.S Sun May 5 08:49:18 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.18.38.1 2016/12/24 04:07:00 snj Exp $ */ +/* $NetBSD: copy.S,v 1.18.38.2 2019/05/05 08:49:18 martin Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -233,6 +233,7 @@ NENTRY(copy_efault) */ NENTRY(kcopy_fault) + cld ret NENTRY(copy_fault) Index: src/sys/arch/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.23 src/sys/arch/i386/i386/copy.S:1.23.8.1 --- src/sys/arch/i386/i386/copy.S:1.23 Fri Jan 10 16:47:07 2014 +++ src/sys/arch/i386/i386/copy.S Sun May 5 08:49:18 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $ */ +/* $NetBSD: copy.S,v 1.23.8.1 2019/05/05 08:49:18 martin Exp $ */ /* NetBSD: locore.S,v 1.34 2005/04/01 11:59:31 yamt Exp $ */ /*- @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23.8.1 2019/05/05 08:49:18 martin Exp $"); #include "assym.h" @@ -308,6 +308,7 @@ NENTRY(copy_efault) */ /* LINTSTUB: Ignore */ NENTRY(kcopy_fault) + cld popl %edi popl %esi ret
CVS commit: [netbsd-7] src/sys/arch
Module Name:src Committed By: martin Date: Sun May 5 08:48:13 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [netbsd-7]: copy.S src/sys/arch/i386/i386 [netbsd-7]: copy.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1693): sys/arch/amd64/amd64/copy.S: revision 1.33 sys/arch/i386/i386/copy.S: revision 1.31 Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas overlap, but doesn't clear it if the copy faults. If this happens, we return to the caller with DF=1, and each future memory copy will be backwards. I wonder if there really are places where kcopy() is called with overlapping areas. To generate a diff of this commit: cvs rdiff -u -r1.18.34.1 -r1.18.34.2 src/sys/arch/amd64/amd64/copy.S cvs rdiff -u -r1.23 -r1.23.4.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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.18.34.1 src/sys/arch/amd64/amd64/copy.S:1.18.34.2 --- src/sys/arch/amd64/amd64/copy.S:1.18.34.1 Sat Dec 24 04:07:25 2016 +++ src/sys/arch/amd64/amd64/copy.S Sun May 5 08:48:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.18.34.1 2016/12/24 04:07:25 snj Exp $ */ +/* $NetBSD: copy.S,v 1.18.34.2 2019/05/05 08:48:13 martin Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -233,6 +233,7 @@ NENTRY(copy_efault) */ NENTRY(kcopy_fault) + cld ret NENTRY(copy_fault) Index: src/sys/arch/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.23 src/sys/arch/i386/i386/copy.S:1.23.4.1 --- src/sys/arch/i386/i386/copy.S:1.23 Fri Jan 10 16:47:07 2014 +++ src/sys/arch/i386/i386/copy.S Sun May 5 08:48:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $ */ +/* $NetBSD: copy.S,v 1.23.4.1 2019/05/05 08:48:13 martin Exp $ */ /* NetBSD: locore.S,v 1.34 2005/04/01 11:59:31 yamt Exp $ */ /*- @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23.4.1 2019/05/05 08:48:13 martin Exp $"); #include "assym.h" @@ -308,6 +308,7 @@ NENTRY(copy_efault) */ /* LINTSTUB: Ignore */ NENTRY(kcopy_fault) + cld popl %edi popl %esi ret
CVS commit: [netbsd-7-1] src/sys/arch
Module Name:src Committed By: martin Date: Sun May 5 08:48:40 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [netbsd-7-1]: copy.S src/sys/arch/i386/i386 [netbsd-7-1]: copy.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1693): sys/arch/amd64/amd64/copy.S: revision 1.33 sys/arch/i386/i386/copy.S: revision 1.31 Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas overlap, but doesn't clear it if the copy faults. If this happens, we return to the caller with DF=1, and each future memory copy will be backwards. I wonder if there really are places where kcopy() is called with overlapping areas. To generate a diff of this commit: cvs rdiff -u -r1.18.34.1 -r1.18.34.1.2.1 src/sys/arch/amd64/amd64/copy.S cvs rdiff -u -r1.23 -r1.23.12.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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.18.34.1 src/sys/arch/amd64/amd64/copy.S:1.18.34.1.2.1 --- src/sys/arch/amd64/amd64/copy.S:1.18.34.1 Sat Dec 24 04:07:25 2016 +++ src/sys/arch/amd64/amd64/copy.S Sun May 5 08:48:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.18.34.1 2016/12/24 04:07:25 snj Exp $ */ +/* $NetBSD: copy.S,v 1.18.34.1.2.1 2019/05/05 08:48:40 martin Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -233,6 +233,7 @@ NENTRY(copy_efault) */ NENTRY(kcopy_fault) + cld ret NENTRY(copy_fault) Index: src/sys/arch/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.23 src/sys/arch/i386/i386/copy.S:1.23.12.1 --- src/sys/arch/i386/i386/copy.S:1.23 Fri Jan 10 16:47:07 2014 +++ src/sys/arch/i386/i386/copy.S Sun May 5 08:48:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $ */ +/* $NetBSD: copy.S,v 1.23.12.1 2019/05/05 08:48:40 martin Exp $ */ /* NetBSD: locore.S,v 1.34 2005/04/01 11:59:31 yamt Exp $ */ /*- @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23.12.1 2019/05/05 08:48:40 martin Exp $"); #include "assym.h" @@ -308,6 +308,7 @@ NENTRY(copy_efault) */ /* LINTSTUB: Ignore */ NENTRY(kcopy_fault) + cld popl %edi popl %esi ret
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun May 5 08:43:44 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1255 - #1257 To generate a diff of this commit: cvs rdiff -u -r1.1.2.138 -r1.1.2.139 src/doc/CHANGES-8.1 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.1 diff -u src/doc/CHANGES-8.1:1.1.2.138 src/doc/CHANGES-8.1:1.1.2.139 --- src/doc/CHANGES-8.1:1.1.2.138 Wed May 1 09:13:31 2019 +++ src/doc/CHANGES-8.1 Sun May 5 08:43:44 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.138 2019/05/01 09:13:31 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.139 2019/05/05 08:43:44 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -3064,3 +3064,31 @@ sys/kern/sys_pipe.c1.147,1.148 Handle half-closed pipes in FIONWRITE and FIONSPACE. [mlelstv, ticket #1253] +sys/dev/pci/pucdata.c1.104 + + Add entries for NetMos NM9912. + [jdolecek, ticket #1255] + +external/bsd/dhcpcd/dist/src/bpf.c up to 1.9 +external/bsd/dhcpcd/dist/src/defs.h up to 1.1.1.21 +external/bsd/dhcpcd/dist/src/dhcp.c up to 1.19 +external/bsd/dhcpcd/dist/src/dhcp6.cup to 1.7 +external/bsd/dhcpcd/dist/src/dhcpcd.c up to 1.19 +external/bsd/dhcpcd/dist/src/dhcpcd.h up to 1.1.1.10 +external/bsd/dhcpcd/dist/src/if-bsd.c up to 1.7 +external/bsd/dhcpcd/dist/src/if-linux.c up to 1.1.1.13 +external/bsd/dhcpcd/dist/src/if-options.c up to 1.14 +external/bsd/dhcpcd/dist/src/if-sun.c up to 1.1.1.8 +external/bsd/dhcpcd/dist/src/if.c up to 1.1.1.13 +external/bsd/dhcpcd/dist/src/if.h up to 1.1.1.8 +doc/3RDPARTY (manually adjusted) + + Import dhcpcd-7.2.2 + [roy, ticket #1256] + +sys/arch/amd64/amd64/copy.S 1.33 +sys/arch/i386/i386/copy.S 1.31 + + Don't forget to clear the direction flag if kcopy fails. + [maxv, ticket #1257] +
CVS commit: [netbsd-8] src/sys/arch
Module Name:src Committed By: martin Date: Sun May 5 08:34:16 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [netbsd-8]: copy.S src/sys/arch/i386/i386 [netbsd-8]: copy.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1257): sys/arch/amd64/amd64/copy.S: revision 1.33 sys/arch/i386/i386/copy.S: revision 1.31 Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas overlap, but doesn't clear it if the copy faults. If this happens, we return to the caller with DF=1, and each future memory copy will be backwards. I wonder if there really are places where kcopy() is called with overlapping areas. To generate a diff of this commit: cvs rdiff -u -r1.20.10.3 -r1.20.10.4 src/sys/arch/amd64/amd64/copy.S cvs rdiff -u -r1.25.8.1 -r1.25.8.2 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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.20.10.3 src/sys/arch/amd64/amd64/copy.S:1.20.10.4 --- src/sys/arch/amd64/amd64/copy.S:1.20.10.3 Sat Apr 14 10:11:49 2018 +++ src/sys/arch/amd64/amd64/copy.S Sun May 5 08:34:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.20.10.3 2018/04/14 10:11:49 martin Exp $ */ +/* $NetBSD: copy.S,v 1.20.10.4 2019/05/05 08:34:16 martin Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -242,6 +242,7 @@ NENTRY(copy_efault) END(copy_efault) NENTRY(kcopy_fault) + cld ret END(kcopy_fault) Index: src/sys/arch/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.25.8.1 src/sys/arch/i386/i386/copy.S:1.25.8.2 --- src/sys/arch/i386/i386/copy.S:1.25.8.1 Sun Feb 4 12:40:31 2018 +++ src/sys/arch/i386/i386/copy.S Sun May 5 08:34:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.25.8.1 2018/02/04 12:40:31 martin Exp $ */ +/* $NetBSD: copy.S,v 1.25.8.2 2019/05/05 08:34:16 martin Exp $ */ /* * Copyright (c) 1998, 2000, 2004, 2008 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.25.8.1 2018/02/04 12:40:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.25.8.2 2019/05/05 08:34:16 martin Exp $"); #include "assym.h" @@ -305,6 +305,7 @@ END(copy_efault) */ NENTRY(kcopy_fault) + cld popl %edi popl %esi ret
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun May 5 08:26:23 UTC 2019 Modified Files: src/doc [netbsd-8]: 3RDPARTY Log Message: Update dhcpcd entry for ticket #1256 To generate a diff of this commit: cvs rdiff -u -r1.1444.2.20 -r1.1444.2.21 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1444.2.20 src/doc/3RDPARTY:1.1444.2.21 --- src/doc/3RDPARTY:1.1444.2.20 Wed Jan 2 15:48:00 2019 +++ src/doc/3RDPARTY Sun May 5 08:26:23 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1444.2.20 2019/01/02 15:48:00 martin Exp $ +# $NetBSD: 3RDPARTY,v 1.1444.2.21 2019/05/05 08:26:23 martin Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -334,8 +334,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 7.0.8 -Current Vers: 7.0.8 +Version: 7.2.2 +Current Vers: 7.2.2 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/
CVS commit: [netbsd-8] src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: martin Date: Sun May 5 08:24:04 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src [netbsd-8]: bpf.c defs.h dhcp.c dhcp6.c dhcpcd.c dhcpcd.h if-bsd.c if-linux.c if-options.c if-sun.c if.c if.h Log Message: Sync to current, requested by roy in ticket #1256: external/bsd/dhcpcd/dist/src/bpf.c up to 1.9 external/bsd/dhcpcd/dist/src/defs.h up to 1.1.1.21 external/bsd/dhcpcd/dist/src/dhcp.c up to 1.19 external/bsd/dhcpcd/dist/src/dhcp6.cup to 1.7 external/bsd/dhcpcd/dist/src/dhcpcd.c up to 1.19 external/bsd/dhcpcd/dist/src/dhcpcd.h up to 1.1.1.10 external/bsd/dhcpcd/dist/src/if-bsd.c up to 1.7 external/bsd/dhcpcd/dist/src/if-linux.c up to 1.1.1.13 external/bsd/dhcpcd/dist/src/if-options.c up to 1.14 external/bsd/dhcpcd/dist/src/if-sun.c up to 1.1.1.8 external/bsd/dhcpcd/dist/src/if.c up to 1.1.1.13 external/bsd/dhcpcd/dist/src/if.h up to 1.1.1.8 Import dhcpcd-7.2.2 with the following changes: * DHCP: Ensure dhcp is running on the interface received from * BSD: Link handling has been simplified, however it is expected that if an interface supports SIOCGIFMEDIA then it reports the correct link status via route(4) for reliable operations * BPF: ARP filter is more robust * BSD: Validate RTM message lengths This security issue has been addressed: * DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE Many thanks to Maxime Villard for discovering this issue. To generate a diff of this commit: cvs rdiff -u -r1.3.8.3 -r1.3.8.4 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.1.1.4.2.7 -r1.1.1.4.2.8 \ src/external/bsd/dhcpcd/dist/src/defs.h cvs rdiff -u -r1.1.1.3.8.6 -r1.1.1.3.8.7 \ src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.1.1.4.2.5 -r1.1.1.4.2.6 \ src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.4.2.5 -r1.4.2.6 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.1.1.3.2.3 -r1.1.1.3.2.4 \ src/external/bsd/dhcpcd/dist/src/dhcpcd.h cvs rdiff -u -r1.1.1.3.2.5 -r1.1.1.3.2.6 \ src/external/bsd/dhcpcd/dist/src/if-bsd.c \ src/external/bsd/dhcpcd/dist/src/if-linux.c cvs rdiff -u -r1.4.2.4 -r1.4.2.5 \ src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.1.1.2.2.3 -r1.1.1.2.2.4 \ src/external/bsd/dhcpcd/dist/src/if-sun.c \ src/external/bsd/dhcpcd/dist/src/if.h cvs rdiff -u -r1.1.1.3.2.4 -r1.1.1.3.2.5 \ src/external/bsd/dhcpcd/dist/src/if.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/dhcpcd/dist/src/bpf.c diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.3.8.3 src/external/bsd/dhcpcd/dist/src/bpf.c:1.3.8.4 --- src/external/bsd/dhcpcd/dist/src/bpf.c:1.3.8.3 Fri Apr 26 19:18:22 2019 +++ src/external/bsd/dhcpcd/dist/src/bpf.c Sun May 5 08:24:04 2019 @@ -301,6 +301,7 @@ bpf_close(struct interface *ifp, int fd) /* Normally this is needed by bootp. * Once that uses this again, the ARP guard here can be removed. */ #ifdef ARP +#define BPF_CMP_HWADDR_LEN HWADDR_LEN / 4) + 2) * 2) + 1) static unsigned int bpf_cmp_hwaddr(struct bpf_insn *bpf, size_t bpf_len, size_t off, bool equal, uint8_t *hwaddr, size_t hwaddr_len) @@ -414,7 +415,7 @@ static const struct bpf_insn bpf_arp_eth sizeof(((struct ether_arp *)0)->arp_sha), 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), }; -#define bpf_arp_ether_len __arraycount(bpf_arp_ether) +#define BPF_ARP_ETHER_LEN __arraycount(bpf_arp_ether) static const struct bpf_insn bpf_arp_filter [] = { /* Make sure this is for IP. */ @@ -425,21 +426,25 @@ static const struct bpf_insn bpf_arp_fil BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_op)), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REQUEST, 2, 0), /* or ARP REPLY. */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 1, 1), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), /* Make sure the protocol length matches. */ BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct arphdr, ar_pln)), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, sizeof(in_addr_t), 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), }; -#define bpf_arp_filter_len __arraycount(bpf_arp_filter) -#define bpf_arp_extra ARP_ADDRS_MAX + 1) * 2) * 2) + 2) -#define bpf_arp_hw HWADDR_LEN / 4) + 2) * 2) + 1) +#define BPF_ARP_FILTER_LEN __arraycount(bpf_arp_filter) + +#define BPF_ARP_ADDRS_LEN 1 + (ARP_ADDRS_MAX * 2) + 3 + \ +(ARP_ADDRS_MAX * 2) + 1 + +#define BPF_ARP_LEN BPF_ARP_ETHER_LEN + BPF_ARP_FILTER_LEN + \ +BPF_CMP_HWADDR_LEN + BPF_ARP_ADDRS_LEN int bpf_arp(struct interface *ifp, int fd) { - struct bpf_insn bpf[3+ bpf_arp_filter_len + bpf_arp_hw +
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun May 5 08:20:08 UTC 2019 Modified Files: src/sys/dev/pci [netbsd-8]: pucdata.c Log Message: Pull up following revision(s) (requested by jdolecek in ticket #1255): sys/dev/pci/pucdata.c: revision 1.104 add NetMos NM9912 entries PR kern/54149 by Mouse To generate a diff of this commit: cvs rdiff -u -r1.99.8.3 -r1.99.8.4 src/sys/dev/pci/pucdata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pucdata.c diff -u src/sys/dev/pci/pucdata.c:1.99.8.3 src/sys/dev/pci/pucdata.c:1.99.8.4 --- src/sys/dev/pci/pucdata.c:1.99.8.3 Thu Jun 7 18:12:17 2018 +++ src/sys/dev/pci/pucdata.c Sun May 5 08:20:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pucdata.c,v 1.99.8.3 2018/06/07 18:12:17 martin Exp $ */ +/* $NetBSD: pucdata.c,v 1.99.8.4 2019/05/05 08:20:08 martin Exp $ */ /* * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.99.8.3 2018/06/07 18:12:17 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.99.8.4 2019/05/05 08:20:08 martin Exp $"); #include #include @@ -999,6 +999,23 @@ const struct puc_device_description puc_ }, }, + /* NetMos PCIe NM9912 */ + { "NetMos NM9912 Dual PCI-E UART and 1284 Printer Port", + { PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9912, 0, 0x1000 }, + { 0x, 0x, 0, 0x }, + { + { PUC_PORT_TYPE_COM, 0x10, 0x, 0 }, + }, + }, + + { "NetMos NM9912 Dual PCI-E UART and 1284 Printer Port", + { PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9912, 0, 0x2000 }, + { 0x, 0x, 0, 0x }, + { + { PUC_PORT_TYPE_LPT, 0x10, 0x, 0 }, + }, + }, + /* NetMos PCIe NM9922 (PCI multi function): 2S */ { "NetMos NM9922 UART", { PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9922, 0, 0 },