CVS commit: src/share/misc
Module Name:src Committed By: kamil Date: Thu Jan 21 18:09:10 UTC 2021 Modified Files: src/share/misc: acronyms.comp Log Message: Add SRTP (Secure Real-time Transport Protocol) To generate a diff of this commit: cvs rdiff -u -r1.318 -r1.319 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.318 src/share/misc/acronyms.comp:1.319 --- src/share/misc/acronyms.comp:1.318 Thu Jan 21 17:58:56 2021 +++ src/share/misc/acronyms.comp Thu Jan 21 18:09:10 2021 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.318 2021/01/21 17:58:56 kamil Exp $ +$NetBSD: acronyms.comp,v 1.319 2021/01/21 18:09:10 kamil Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1548,6 +1548,7 @@ SRAM static random access memory SRC sample rate conversion SRP SCSI RDMA protocol SRR shaped round robin +SRTP Secure Real-time Transport Protocol SS self-snoop SS stack segment SSA static single assignment
CVS commit: src/share/misc
Module Name:src Committed By: kamil Date: Thu Jan 21 17:58:56 UTC 2021 Modified Files: src/share/misc: acronyms.comp Log Message: Add RTP (Real-time Transport Protocol) To generate a diff of this commit: cvs rdiff -u -r1.317 -r1.318 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.317 src/share/misc/acronyms.comp:1.318 --- src/share/misc/acronyms.comp:1.317 Thu Jan 21 17:53:05 2021 +++ src/share/misc/acronyms.comp Thu Jan 21 17:58:56 2021 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.317 2021/01/21 17:53:05 kamil Exp $ +$NetBSD: acronyms.comp,v 1.318 2021/01/21 17:58:56 kamil Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1385,6 +1385,7 @@ RTL register transfer language RTL resistor-transistor logic RTL right to left RTOS real time operating system +RTP Real-time Transport Protocol RTS request to send RTT round trip time RUP rational unified process
CVS commit: src/share/misc
Module Name:src Committed By: kamil Date: Thu Jan 21 17:53:05 UTC 2021 Modified Files: src/share/misc: acronyms.comp Log Message: Add PBX (private branch exchange) To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.317 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.316 src/share/misc/acronyms.comp:1.317 --- src/share/misc/acronyms.comp:1.316 Tue Nov 17 19:56:42 2020 +++ src/share/misc/acronyms.comp Thu Jan 21 17:53:05 2021 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.316 2020/11/17 19:56:42 maya Exp $ +$NetBSD: acronyms.comp,v 1.317 2021/01/21 17:53:05 kamil Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1156,6 +1156,7 @@ PAX portable archive exchange PBE pending break encoding PBE programming by example PBR partition boot record +PBX private branch exchange PC personal computer PC program counter PCB printed circuit board
CVS commit: src/etc
Module Name:src Committed By: kamil Date: Mon Nov 30 14:27:23 UTC 2020 Modified Files: src/etc: man.conf Log Message: man.conf(5): Drop support for .me files The .me troff macros are unused for any known man-pages. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/etc/man.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/man.conf diff -u src/etc/man.conf:1.37 src/etc/man.conf:1.38 --- src/etc/man.conf:1.37 Thu Mar 1 06:12:09 2018 +++ src/etc/man.conf Mon Nov 30 14:27:23 2020 @@ -1,4 +1,4 @@ -# $NetBSD: man.conf,v 1.37 2018/03/01 06:12:09 snj Exp $ +# $NetBSD: man.conf,v 1.38 2020/11/30 14:27:23 kamil Exp $ # Sheer, raging paranoia... _version BSD.2 @@ -28,8 +28,6 @@ _build .tbl.bz2 /usr/bin/bzcat %s | /us _build .tbl.gz /usr/bin/zcat %s | /usr/bin/mandoc _build .tbl.xz /usr/bin/xzcat %s | /usr/bin/mandoc -_build .me /usr/bin/nroff -msafer -me %s 2>/dev/null | cat -s - _crunch .Z /usr/bin/compress -c > %s _crunch .bz2 /usr/bin/bzip2 -c > %s _crunch .gz /usr/bin/gzip -c > %s
CVS commit: src/lib/libc/sys
Module Name:src Committed By: kamil Date: Fri Nov 27 16:42:00 UTC 2020 Modified Files: src/lib/libc/sys: pipe.2 Log Message: Refine the documentation Sort includes. Correct the historical note, pipe first appeared in AT UNIX v3. Document ENOMEM. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libc/sys/pipe.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/pipe.2 diff -u src/lib/libc/sys/pipe.2:1.31 src/lib/libc/sys/pipe.2:1.32 --- src/lib/libc/sys/pipe.2:1.31 Wed Oct 25 17:44:50 2017 +++ src/lib/libc/sys/pipe.2 Fri Nov 27 16:42:00 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: pipe.2,v 1.31 2017/10/25 17:44:50 abhinav Exp $ +.\" $NetBSD: pipe.2,v 1.32 2020/11/27 16:42:00 kamil Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)pipe.2 8.1 (Berkeley) 6/4/93 .\" -.Dd January 23, 2012 +.Dd November 27, 2020 .Dt PIPE 2 .Os .Sh NAME @@ -42,8 +42,8 @@ .In unistd.h .Ft int .Fn pipe "int fildes[2]" -.In unistd.h .In fcntl.h +.In unistd.h .Ft int .Fn pipe2 "int fildes[2]" "int flags" .Sh DESCRIPTION @@ -59,7 +59,7 @@ The first descriptor connects to the .Em read end of the pipe, and the second connects to the -.Em write end , +.Em write end , so that data written to .Fa fildes[1] appears on (i.e., can be read from) @@ -130,6 +130,8 @@ address violation. Too many descriptors are active. .It Bq Er ENFILE The system file table is full. +.It Bq Er ENOMEM +Not enough kernel memory to establish a pipe. .El .Pp .Fn pipe2 @@ -154,7 +156,11 @@ function conforms to A .Fn pipe function call appeared in -.At v6 . +.At v3 . +Since +.At v4 , +it allocates two distinct file descriptors. +.Pp The .Fn pipe2 function is inspired from Linux and appeared in
CVS commit: src/games/warp
Module Name:src Committed By: kamil Date: Wed Nov 11 11:54:42 UTC 2020 Modified Files: src/games/warp: warp.c Log Message: Fix the old leftover license note Larry Wall: "I outgrew commercial-free licensing about 30 years ago." To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/games/warp/warp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/warp.c diff -u src/games/warp/warp.c:1.5 src/games/warp/warp.c:1.6 --- src/games/warp/warp.c:1.5 Tue Nov 10 22:52:32 2020 +++ src/games/warp/warp.c Wed Nov 11 11:54:42 2020 @@ -5,17 +5,33 @@ char rcsid[] = "@(#)Header: warp.c,v 7.0 * helpers: Jonathan and Mark Biggar, and Dan Faigin * special thanks to my sweetie Gloria who suggested the Planet Crusher * - * Copyright (C) 1986, Larry Wall - * - * This program may be copied as long as this copyright notice is - * included, and as long as it is not being copied for purposes - * of profit. If you want to modify this program in any way other - * than normal configuration changes, common decency would suggest - * that you also modify the name of the program so that my good name - * (what there is of it) is not impugned. (Calling it something like - * "warpx" or "superwarp" would be fine.) Also, give it another - * WARPDIR so that the scoreboards don't get confused. - * + * Copyright (c) 2020 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Larry Wall. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * * version 5.0 04/20/83 * 5.1 05/05/83 various tidbits * 5.2 05/12/83 VAX -> vax, ifdef'ed a SIGCONT
CVS commit: src
Module Name:src Committed By: kamil Date: Tue Nov 10 21:47:49 UTC 2020 Modified Files: src: BUILDING src/distrib/sets: comments deps descrs sets.subr src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/games: mi src/distrib/sets/lists/man: mi src/distrib/sets/lists/text: mi src/distrib/sets/lists/xbase: mi src/distrib/sets/lists/xcomp: mi src/distrib/sets/lists/xserver: md.alpha md.amd64 md.amiga md.bebox md.cats md.dreamcast md.evbarm md.evbmips md.ews4800mips md.hp300 md.hpcarm md.hpcmips md.hpcsh md.hppa md.i386 md.ibmnws md.luna68k md.mac68k md.macppc md.netwinder md.newsmips md.ofppc md.prep md.sgimips md.shark md.sparc md.sparc64 md.sun3 md.vax md.x68k md.zaurus mi src/distrib/syspkg/sets/comp: Makefile src/distrib/syspkg/sets/games: Makefile src/distrib/syspkg/sets/man: Makefile src/distrib/syspkg/sets/text: Makefile src/distrib/syspkg/sets/text/text-groff-man: DESCR src/doc: BUILDING.mdoc src/etc/mtree: NetBSD.dist.Xorg NetBSD.dist.base src/share/man/man5: mk.conf.5 src/share/mk: bsd.README bsd.man.mk bsd.own.mk Added Files: src/distrib/syspkg/sets/comp/comp-c-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-cvs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-cxx-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-debug-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-fortran-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-sys-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-sysutil-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-util-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/games/games-games-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/games/games-utils-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-adosfs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-amd-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-audio-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-bind-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-bootserver-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-c-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-cron-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-crypto-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-debug-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-dhcpd-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ext2fs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-filecorefs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-games-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-gnats-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-groff-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-hesiod-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ipf-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-krb5-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-locale-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-lpr-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-mail-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-mailwrapper-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-man-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-miscfs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-net-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-netutil-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-nfsclient-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-nfsserver-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-nis-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ntfs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ntp-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-pkgutil-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-postfix-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ppp-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-rc-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-rcs-catman: COMMENT DESCR Makefile
CVS commit: src/games/warp
Module Name:src Committed By: kamil Date: Tue Nov 10 11:29:29 UTC 2020 Removed Files: src/games/warp: smap.0 smap.1 smap.2 smap.3 smap.4 smap.5 smap.6 smap.7 Log Message: Remove the smap.* files They are generated during the build. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/games/warp/smap.0 src/games/warp/smap.1 \ src/games/warp/smap.2 src/games/warp/smap.3 src/games/warp/smap.4 \ src/games/warp/smap.5 src/games/warp/smap.6 src/games/warp/smap.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/mtree
Module Name:src Committed By: kamil Date: Tue Nov 10 10:31:48 UTC 2020 Modified Files: src/etc/mtree: NetBSD.dist.base Log Message: + ./usr/share/games/warp To generate a diff of this commit: cvs rdiff -u -r1.226 -r1.227 src/etc/mtree/NetBSD.dist.base Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.226 src/etc/mtree/NetBSD.dist.base:1.227 --- src/etc/mtree/NetBSD.dist.base:1.226 Mon Nov 9 01:07:04 2020 +++ src/etc/mtree/NetBSD.dist.base Tue Nov 10 10:31:48 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.226 2020/11/09 01:07:04 kamil Exp $ +# $NetBSD: NetBSD.dist.base,v 1.227 2020/11/10 10:31:48 kamil Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -426,6 +426,7 @@ ./usr/share/games/fortune ./usr/share/games/larn ./usr/share/games/quiz.db +./usr/share/games/warp ./usr/share/gdb ./usr/share/gdb/syscalls ./usr/share/gnats
CVS commit: src
Module Name:src Committed By: kamil Date: Tue Nov 10 08:49:09 UTC 2020 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/debug: mi src/distrib/sets/lists/games: mi src/games: Makefile src/games/warp: Makefile config.h intrp.c score.c sig.c sig.h sm.c term.c term.h util.c util.h version.c warp.c warp.h warp.news Log Message: Integrate Warp Kit into the NetBSD build Fix the build and make it install and run with minimal required changes. To generate a diff of this commit: cvs rdiff -u -r1.1268 -r1.1269 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.342 -r1.343 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.57 -r1.58 src/distrib/sets/lists/games/mi cvs rdiff -u -r1.29 -r1.30 src/games/Makefile cvs rdiff -u -r1.1 -r1.2 src/games/warp/Makefile src/games/warp/config.h \ src/games/warp/warp.news cvs rdiff -u -r1.2 -r1.3 src/games/warp/intrp.c src/games/warp/score.c \ src/games/warp/sig.c src/games/warp/sig.h src/games/warp/sm.c \ src/games/warp/term.c src/games/warp/term.h src/games/warp/util.c \ src/games/warp/util.h src/games/warp/version.c src/games/warp/warp.c \ src/games/warp/warp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1268 src/distrib/sets/lists/base/mi:1.1269 --- src/distrib/sets/lists/base/mi:1.1268 Mon Nov 9 01:05:51 2020 +++ src/distrib/sets/lists/base/mi Tue Nov 10 08:49:08 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1268 2020/11/09 01:05:51 kamil Exp $ +# $NetBSD: mi,v 1.1269 2020/11/10 08:49:08 kamil Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -2366,6 +2366,7 @@ ./usr/share/games/fortune base-games-share ./usr/share/games/larnbase-games-share ./usr/share/games/quiz.db base-games-share +./usr/share/games/warpbase-games-share ./usr/share/gdb base-util-share ./usr/share/gdb/syscalls base-util-share ./usr/share/gnatsbase-gnats-share Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.342 src/distrib/sets/lists/debug/mi:1.343 --- src/distrib/sets/lists/debug/mi:1.342 Sun Oct 18 10:10:18 2020 +++ src/distrib/sets/lists/debug/mi Tue Nov 10 08:49:09 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.342 2020/10/18 10:10:18 rin Exp $ +# $NetBSD: mi,v 1.343 2020/11/10 08:49:09 kamil Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -939,6 +939,7 @@ ./usr/libdata/debug/usr/games/tetris.debug comp-games-debug debug ./usr/libdata/debug/usr/games/trek.debug comp-games-debug debug ./usr/libdata/debug/usr/games/unstr.debug comp-utils-debug debug +./usr/libdata/debug/usr/games/warp.debug comp-games-debug debug ./usr/libdata/debug/usr/games/worm.debug comp-games-debug debug ./usr/libdata/debug/usr/games/worms.debug comp-games-debug debug ./usr/libdata/debug/usr/games/wump.debug comp-games-debug debug Index: src/distrib/sets/lists/games/mi diff -u src/distrib/sets/lists/games/mi:1.57 src/distrib/sets/lists/games/mi:1.58 --- src/distrib/sets/lists/games/mi:1.57 Mon Nov 9 01:05:51 2020 +++ src/distrib/sets/lists/games/mi Tue Nov 10 08:49:09 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.57 2020/11/09 01:05:51 kamil Exp $ +# $NetBSD: mi,v 1.58 2020/11/10 08:49:09 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -89,6 +89,7 @@ ./usr/games/trekgames-games-bin ./usr/games/unstrgames-utils-bin ./usr/games/wargamesgames-games-bin +./usr/games/warpgames-games-bin ./usr/games/wormgames-games-bin ./usr/games/wormsgames-games-bin ./usr/games/wtf games-utils-bin @@ -254,6 +255,17 @@ ./usr/share/man/cat8/dm.0 games-obsolete obsolete ./usr/share/man/cat8/strfile.0 games-obsolete obsolete ./usr/share/man/cat8/unstr.0 games-obsolete obsolete +./usr/share/games/warp/README games-games-share share +./usr/share/games/warp/smap.0 games-games-share share +./usr/share/games/warp/smap.1 games-games-share share +./usr/share/games/warp/smap.2 games-games-share share +./usr/share/games/warp/smap.3 games-games-share share +./usr/share/games/warp/smap.4 games-games-share share +./usr/share/games/warp/smap.5 games-games-share share +./usr/share/games/warp/smap.6 games-games-share share +./usr/share/games/warp/smap.7 games-games-share share +./usr/share/games/warp/warp.doc games-games-share share +./usr/share/games/warp/warp.news games-games-share share ./usr/share/man/html5/dm.conf.html games-games-htmlman html ./usr/share/man/html6/adventure.html games-games-htmlman html ./usr/share/man/html6/arithmetic.html games-games-htmlman html @@ -302,6 +314,7 @@ ./usr/share/man/html6/tetris.html
CVS commit: src/games/warp
Module Name:src Committed By: kamil Date: Tue Nov 10 00:02:11 UTC 2020 Modified Files: src/games/warp: EXTERN.h INTERN.h bang.c bang.h init.c init.h intrp.c intrp.h move.c move.h object.c object.h play.c play.h score.c score.h sig.c sig.h sm.c term.c term.h them.c them.h us.c us.h util.c util.h version.c version.h warp.c warp.h weapon.c weapon.h Log Message: Reset CVS keywords To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/games/warp/EXTERN.h src/games/warp/INTERN.h \ src/games/warp/bang.c src/games/warp/bang.h src/games/warp/init.c \ src/games/warp/init.h src/games/warp/intrp.c src/games/warp/intrp.h \ src/games/warp/move.c src/games/warp/move.h src/games/warp/object.c \ src/games/warp/object.h src/games/warp/play.c src/games/warp/play.h \ src/games/warp/score.c src/games/warp/score.h src/games/warp/sig.c \ src/games/warp/sig.h src/games/warp/sm.c src/games/warp/term.c \ src/games/warp/term.h src/games/warp/them.c src/games/warp/them.h \ src/games/warp/us.c src/games/warp/us.h src/games/warp/util.c \ src/games/warp/util.h src/games/warp/version.c src/games/warp/version.h \ src/games/warp/warp.c src/games/warp/warp.h src/games/warp/weapon.c \ src/games/warp/weapon.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/EXTERN.h diff -u src/games/warp/EXTERN.h:1.1 src/games/warp/EXTERN.h:1.2 --- src/games/warp/EXTERN.h:1.1 Mon Nov 9 23:37:05 2020 +++ src/games/warp/EXTERN.h Tue Nov 10 00:02:11 2020 @@ -1,24 +1,6 @@ -/* $Header: /cvsroot/src/games/warp/EXTERN.h,v 1.1 2020/11/09 23:37:05 kamil Exp $ - * - * $Log: EXTERN.h,v $ - * Revision 1.1 2020/11/09 23:37:05 kamil - * Add Warp Kit, Version 7.0 by Larry Wall - * - * Warp is a real-time space war game that doesn't get boring very quickly. - * Read warp.doc and the manual page for more information. - * - * games/warp originally distributed with 4.3BSD-Reno, is back to the BSD - * world via NetBSD. Its remnants were still mentioned in games/Makefile. - * - * Larry Wall, the original author and the copyright holder, generously - * donated the game and copyright to The NetBSD Foundation, Inc. - * - * Import the game sources as-is from 4.3BSD-Reno, with the cession - * of the copyright and license to BSD-2-clause NetBSD-style. - * - * Signed-off-by: Larry Wall - * Signed-off-by: Kamil Rytarowski +/* Header: EXTERN.h,v 7.0.1.1 86/12/12 16:46:50 lwall Exp * + * Log: EXTERN.h,v * Revision 7.0.1.1 86/12/12 16:46:50 lwall * Guarded the undefs. * Index: src/games/warp/INTERN.h diff -u src/games/warp/INTERN.h:1.1 src/games/warp/INTERN.h:1.2 --- src/games/warp/INTERN.h:1.1 Mon Nov 9 23:37:05 2020 +++ src/games/warp/INTERN.h Tue Nov 10 00:02:11 2020 @@ -1,24 +1,6 @@ -/* $Header: /cvsroot/src/games/warp/INTERN.h,v 1.1 2020/11/09 23:37:05 kamil Exp $ - * - * $Log: INTERN.h,v $ - * Revision 1.1 2020/11/09 23:37:05 kamil - * Add Warp Kit, Version 7.0 by Larry Wall - * - * Warp is a real-time space war game that doesn't get boring very quickly. - * Read warp.doc and the manual page for more information. - * - * games/warp originally distributed with 4.3BSD-Reno, is back to the BSD - * world via NetBSD. Its remnants were still mentioned in games/Makefile. - * - * Larry Wall, the original author and the copyright holder, generously - * donated the game and copyright to The NetBSD Foundation, Inc. - * - * Import the game sources as-is from 4.3BSD-Reno, with the cession - * of the copyright and license to BSD-2-clause NetBSD-style. - * - * Signed-off-by: Larry Wall - * Signed-off-by: Kamil Rytarowski +/* Header: INTERN.h,v 7.0.1.1 86/12/12 16:51:45 lwall Exp * + * Log: INTERN.h,v * Revision 7.0.1.1 86/12/12 16:51:45 lwall * Guarded the undefs. * Index: src/games/warp/bang.c diff -u src/games/warp/bang.c:1.1 src/games/warp/bang.c:1.2 --- src/games/warp/bang.c:1.1 Mon Nov 9 23:37:05 2020 +++ src/games/warp/bang.c Tue Nov 10 00:02:11 2020 @@ -1,24 +1,6 @@ -/* $Header: /cvsroot/src/games/warp/bang.c,v 1.1 2020/11/09 23:37:05 kamil Exp $ */ +/* Header: bang.c,v 7.0.1.3 86/12/12 16:57:00 lwall Exp */ -/* $Log: bang.c,v $ -/* Revision 1.1 2020/11/09 23:37:05 kamil -/* Add Warp Kit, Version 7.0 by Larry Wall -/* -/* Warp is a real-time space war game that doesn't get boring very quickly. -/* Read warp.doc and the manual page for more information. -/* -/* games/warp originally distributed with 4.3BSD-Reno, is back to the BSD -/* world via NetBSD. Its remnants were still mentioned in games/Makefile. -/* -/* Larry Wall, the original author and the copyright holder, generously -/* donated the game and copyright to The NetBSD Foundation, Inc. -/* -/* Import the game sources as-is from 4.3BSD-Reno, with the cession -/* of the copyright and license to BSD-2-clause NetBSD-style. -/* -/* Signed-off-by: Larry Wall -/* Signed-off-by: Kamil
CVS commit: src/distrib/syspkg/sets
Module Name:src Committed By: kamil Date: Mon Nov 9 12:12:17 UTC 2020 Modified Files: src/distrib/syspkg/sets/comp: Makefile src/distrib/syspkg/sets/games: Makefile src/distrib/syspkg/sets/man: Makefile src/distrib/syspkg/sets/text: Makefile src/distrib/syspkg/sets/text/text-groff-man: DESCR Removed Files: src/distrib/syspkg/sets/comp/comp-c-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-cvs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-cxx-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-debug-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-fortran-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-sys-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-sysutil-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/comp/comp-util-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/games/games-games-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/games/games-utils-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-adosfs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-amd-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-audio-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-bind-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-bootserver-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-c-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-cron-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-crypto-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-debug-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-dhcpd-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ext2fs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-filecorefs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-games-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-gnats-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-groff-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-hesiod-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ipf-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-krb5-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-locale-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-lpr-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-mail-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-mailwrapper-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-man-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-miscfs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-net-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-netutil-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-nfsclient-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-nfsserver-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-nis-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ntfs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ntp-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-pkgutil-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-postfix-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-ppp-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-rc-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-rcs-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-reference-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-router-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-secsh-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-sendmail-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-shlib-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-slip-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-sup-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-sys-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-sysutil-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-timed-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-util-catman: COMMENT DESCR Makefile src/distrib/syspkg/sets/man/man-uucp-catman: COMMENT DESCR Makefile
CVS commit: src/etc/mtree
Module Name:src Committed By: kamil Date: Mon Nov 9 01:07:04 UTC 2020 Modified Files: src/etc/mtree: NetBSD.dist.Xorg NetBSD.dist.base Log Message: Remove the catman directories No longer relevant after the MKCATPAGES removal. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/etc/mtree/NetBSD.dist.Xorg cvs rdiff -u -r1.225 -r1.226 src/etc/mtree/NetBSD.dist.base Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.Xorg diff -u src/etc/mtree/NetBSD.dist.Xorg:1.26 src/etc/mtree/NetBSD.dist.Xorg:1.27 --- src/etc/mtree/NetBSD.dist.Xorg:1.26 Sun Jan 19 00:58:14 2020 +++ src/etc/mtree/NetBSD.dist.Xorg Mon Nov 9 01:07:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.Xorg,v 1.26 2020/01/19 00:58:14 jmcneill Exp $ +# $NetBSD: NetBSD.dist.Xorg,v 1.27 2020/11/09 01:07:04 kamil Exp $ ./usr/X11R7 ./usr/X11R7/bin ./usr/X11R7/include @@ -155,13 +155,6 @@ ./usr/X11R7/lib/xorg ./usr/X11R7/libexec ./usr/X11R7/man -./usr/X11R7/man/cat1 -./usr/X11R7/man/cat3 -./usr/X11R7/man/cat4 -./usr/X11R7/man/cat4/evbarm -./usr/X11R7/man/cat4/x86 -./usr/X11R7/man/cat5 -./usr/X11R7/man/cat7 ./usr/X11R7/man/html1 ./usr/X11R7/man/html3 ./usr/X11R7/man/html4 Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.225 src/etc/mtree/NetBSD.dist.base:1.226 --- src/etc/mtree/NetBSD.dist.base:1.225 Sat Oct 24 07:03:00 2020 +++ src/etc/mtree/NetBSD.dist.base Mon Nov 9 01:07:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.225 2020/10/24 07:03:00 kamil Exp $ +# $NetBSD: NetBSD.dist.base,v 1.226 2020/11/09 01:07:04 kamil Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -883,114 +883,6 @@ ./usr/share/lua ./usr/share/lua/5.3 ./usr/share/man -./usr/share/man/cat1 -./usr/share/man/cat1/atari -./usr/share/man/cat1/hp300 -./usr/share/man/cat1/x68k -./usr/share/man/cat2 -./usr/share/man/cat3 -./usr/share/man/cat3lua -./usr/share/man/cat4 -./usr/share/man/cat4/acorn32 -./usr/share/man/cat4/alpha -./usr/share/man/cat4/amiga -./usr/share/man/cat4/arc -./usr/share/man/cat4/atari -./usr/share/man/cat4/cobalt -./usr/share/man/cat4/dreamcast -./usr/share/man/cat4/emips -./usr/share/man/cat4/evbarm -./usr/share/man/cat4/evbmips -./usr/share/man/cat4/evbppc -./usr/share/man/cat4/hp300 -./usr/share/man/cat4/hpcarm -./usr/share/man/cat4/hpcmips -./usr/share/man/cat4/hpcsh -./usr/share/man/cat4/hppa -./usr/share/man/cat4/i386 -./usr/share/man/cat4/mac68k -./usr/share/man/cat4/macppc -./usr/share/man/cat4/mvme68k -./usr/share/man/cat4/pmax -./usr/share/man/cat4/prep -./usr/share/man/cat4/sandpoint -./usr/share/man/cat4/sgimips -./usr/share/man/cat4/sparc -./usr/share/man/cat4/sparc64 -./usr/share/man/cat4/sun2 -./usr/share/man/cat4/sun3 -./usr/share/man/cat4/vax -./usr/share/man/cat4/x68k -./usr/share/man/cat4/x86 -./usr/share/man/cat5 -./usr/share/man/cat6 -./usr/share/man/cat7 -./usr/share/man/cat8 -./usr/share/man/cat8/acorn32 -./usr/share/man/cat8/algor -./usr/share/man/cat8/alpha -./usr/share/man/cat8/amd64 -./usr/share/man/cat8/amiga -./usr/share/man/cat8/arc -./usr/share/man/cat8/atari -./usr/share/man/cat8/bebox -./usr/share/man/cat8/cats -./usr/share/man/cat8/cesfic -./usr/share/man/cat8/cobalt -./usr/share/man/cat8/dreamcast -./usr/share/man/cat8/emips -./usr/share/man/cat8/evbarm -./usr/share/man/cat8/evbmips -./usr/share/man/cat8/evbppc -./usr/share/man/cat8/evbsh3 -./usr/share/man/cat8/hp300 -./usr/share/man/cat8/hpcarm -./usr/share/man/cat8/hpcmips -./usr/share/man/cat8/hpcsh -./usr/share/man/cat8/hppa -./usr/share/man/cat8/i386 -./usr/share/man/cat8/ibmnws -./usr/share/man/cat8/luna68k -./usr/share/man/cat8/mac68k -./usr/share/man/cat8/macppc -./usr/share/man/cat8/mipsco -./usr/share/man/cat8/mmeye -./usr/share/man/cat8/mvme68k -./usr/share/man/cat8/mvmeppc -./usr/share/man/cat8/netwinder -./usr/share/man/cat8/news68k -./usr/share/man/cat8/newsmips -./usr/share/man/cat8/next68k -./usr/share/man/cat8/ofppc -./usr/share/man/cat8/playstation2 -./usr/share/man/cat8/pmax -./usr/share/man/cat8/prep -./usr/share/man/cat8/sandpoint -./usr/share/man/cat8/sbmips -./usr/share/man/cat8/sgimips -./usr/share/man/cat8/shark -./usr/share/man/cat8/sparc -./usr/share/man/cat8/sparc64 -./usr/share/man/cat8/sun2 -./usr/share/man/cat8/sun3 -./usr/share/man/cat8/vax -./usr/share/man/cat8/x68k -./usr/share/man/cat8/x86 -./usr/share/man/cat9 -./usr/share/man/cat9lua -./usr/share/man/cat9/alpha -./usr/share/man/cat9/amiga -./usr/share/man/cat9/atari -./usr/share/man/cat9/emips -./usr/share/man/cat9/hp300 -./usr/share/man/cat9/i386 -./usr/share/man/cat9/mac68k -./usr/share/man/cat9/pmax -./usr/share/man/cat9/sparc -./usr/share/man/cat9/sun3 -./usr/share/man/cat9/vax -./usr/share/man/cat9/x68k -./usr/share/man/cat9/x86 ./usr/share/man/html1 ./usr/share/man/html1/atari ./usr/share/man/html1/hp300
CVS commit: src/distrib/sets
Module Name:src Committed By: kamil Date: Mon Nov 9 01:05:52 UTC 2020 Modified Files: src/distrib/sets: comments deps descrs src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/games: mi src/distrib/sets/lists/man: mi src/distrib/sets/lists/text: mi src/distrib/sets/lists/xbase: mi src/distrib/sets/lists/xcomp: mi src/distrib/sets/lists/xserver: md.alpha md.amd64 md.amiga md.bebox md.cats md.dreamcast md.evbarm md.evbmips md.ews4800mips md.hp300 md.hpcarm md.hpcmips md.hpcsh md.hppa md.i386 md.ibmnws md.luna68k md.mac68k md.macppc md.netwinder md.newsmips md.ofppc md.prep md.sgimips md.shark md.sparc md.sparc64 md.sun3 md.vax md.x68k md.zaurus mi Log Message: Remove catman pages support No longer relevant after the MKCATPAGES removal. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/distrib/sets/comments cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/deps cvs rdiff -u -r1.26 -r1.27 src/distrib/sets/descrs cvs rdiff -u -r1.1267 -r1.1268 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.2364 -r1.2365 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.56 -r1.57 src/distrib/sets/lists/games/mi cvs rdiff -u -r1.1709 -r1.1710 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.48 -r1.49 src/distrib/sets/lists/text/mi cvs rdiff -u -r1.161 -r1.162 src/distrib/sets/lists/xbase/mi cvs rdiff -u -r1.221 -r1.222 src/distrib/sets/lists/xcomp/mi cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/xserver/md.alpha cvs rdiff -u -r1.113 -r1.114 src/distrib/sets/lists/xserver/md.amd64 cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/xserver/md.amiga cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/xserver/md.bebox \ src/distrib/sets/lists/xserver/md.luna68k \ src/distrib/sets/lists/xserver/md.vax cvs rdiff -u -r1.61 -r1.62 src/distrib/sets/lists/xserver/md.cats \ src/distrib/sets/lists/xserver/md.sgimips cvs rdiff -u -r1.28 -r1.29 src/distrib/sets/lists/xserver/md.dreamcast cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/xserver/md.evbarm \ src/distrib/sets/lists/xserver/md.x68k cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xserver/md.evbmips cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/xserver/md.ews4800mips \ src/distrib/sets/lists/xserver/md.hp300 \ src/distrib/sets/lists/xserver/md.prep \ src/distrib/sets/lists/xserver/md.zaurus cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/xserver/md.hpcarm cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/lists/xserver/md.hpcmips cvs rdiff -u -r1.26 -r1.27 src/distrib/sets/lists/xserver/md.hpcsh cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/xserver/md.hppa cvs rdiff -u -r1.129 -r1.130 src/distrib/sets/lists/xserver/md.i386 cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/xserver/md.ibmnws cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/xserver/md.mac68k \ src/distrib/sets/lists/xserver/md.newsmips cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/xserver/md.macppc cvs rdiff -u -r1.40 -r1.41 src/distrib/sets/lists/xserver/md.netwinder cvs rdiff -u -r1.31 -r1.32 src/distrib/sets/lists/xserver/md.ofppc cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/xserver/md.shark cvs rdiff -u -r1.72 -r1.73 src/distrib/sets/lists/xserver/md.sparc cvs rdiff -u -r1.69 -r1.70 src/distrib/sets/lists/xserver/md.sparc64 cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/xserver/md.sun3 cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/xserver/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/games/fortune/datfiles
Module Name:src Committed By: kamil Date: Mon Nov 9 00:46:00 UTC 2020 Modified Files: src/games/fortune/datfiles: fortunes Log Message: Revert to the original phrasing, but remove the man 8 section reference. catman is a historical Unix tool. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/games/fortune/datfiles/fortunes Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/datfiles/fortunes diff -u src/games/fortune/datfiles/fortunes:1.94 src/games/fortune/datfiles/fortunes:1.95 --- src/games/fortune/datfiles/fortunes:1.94 Sun Nov 8 17:37:29 2020 +++ src/games/fortune/datfiles/fortunes Mon Nov 9 00:46:00 2020 @@ -16177,7 +16177,7 @@ be named Eustace Clarence Scrubb. % Never leave a macassar and an antimacassar in the same room together. % -Why did the furry install Unix? Because it supported catman(8). +Why did the furry install Unix? Because it supports catman. % Many people don't realize that trailhead doggerel is illegal -- but surely you've heard of "hike rhymes and misdemeanors"...
CVS commit: src/games/fortune/datfiles
Module Name:src Committed By: kamil Date: Sun Nov 8 17:37:30 UTC 2020 Modified Files: src/games/fortune/datfiles: fortunes Log Message: catman(8) is a past thing To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/games/fortune/datfiles/fortunes Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/datfiles/fortunes diff -u src/games/fortune/datfiles/fortunes:1.93 src/games/fortune/datfiles/fortunes:1.94 --- src/games/fortune/datfiles/fortunes:1.93 Fri Oct 30 04:56:32 2020 +++ src/games/fortune/datfiles/fortunes Sun Nov 8 17:37:29 2020 @@ -16177,7 +16177,7 @@ be named Eustace Clarence Scrubb. % Never leave a macassar and an antimacassar in the same room together. % -Why did the furry install Unix? Because it supports catman(8). +Why did the furry install Unix? Because it supported catman(8). % Many people don't realize that trailhead doggerel is illegal -- but surely you've heard of "hike rhymes and misdemeanors"...
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: kamil Date: Sun Nov 8 16:47:59 UTC 2020 Modified Files: src/distrib/sets/lists/comp: mi Log Message: Move the html9/psref* files from comp-sys-catman to comp-sys-htmlman To generate a diff of this commit: cvs rdiff -u -r1.2363 -r1.2364 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2363 src/distrib/sets/lists/comp/mi:1.2364 --- src/distrib/sets/lists/comp/mi:1.2363 Sat Oct 31 22:43:01 2020 +++ src/distrib/sets/lists/comp/mi Sun Nov 8 16:47:59 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2363 2020/10/31 22:43:01 uwe Exp $ +# $NetBSD: mi,v 1.2364 2020/11/08 16:47:59 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -20199,15 +20199,15 @@ ./usr/share/man/html9/pserialize_read_exit.html comp-sys-htmlman html ./usr/share/man/html9/psignal.html comp-sys-htmlman html ./usr/share/man/html9/pslist.html comp-sys-htmlman html -./usr/share/man/html9/psref.html comp-sys-catman html -./usr/share/man/html9/psref_acquire.html comp-sys-catman html -./usr/share/man/html9/psref_class_create.html comp-sys-catman html -./usr/share/man/html9/psref_class_destroy.html comp-sys-catman html -./usr/share/man/html9/psref_copy.html comp-sys-catman html -./usr/share/man/html9/psref_held.html comp-sys-catman html -./usr/share/man/html9/psref_release.html comp-sys-catman html -./usr/share/man/html9/psref_target_destroy.html comp-sys-catman html -./usr/share/man/html9/psref_target_init.html comp-sys-catman html +./usr/share/man/html9/psref.html comp-sys-htmlman html +./usr/share/man/html9/psref_acquire.html comp-sys-htmlman html +./usr/share/man/html9/psref_class_create.html comp-sys-htmlman html +./usr/share/man/html9/psref_class_destroy.html comp-sys-htmlman html +./usr/share/man/html9/psref_copy.html comp-sys-htmlman html +./usr/share/man/html9/psref_held.html comp-sys-htmlman html +./usr/share/man/html9/psref_release.html comp-sys-htmlman html +./usr/share/man/html9/psref_target_destroy.html comp-sys-htmlman html +./usr/share/man/html9/psref_target_init.html comp-sys-htmlman html ./usr/share/man/html9/ptoa.html comp-sys-htmlman html ./usr/share/man/html9/putiobuf.html comp-sys-htmlman html ./usr/share/man/html9/putter.html comp-sys-htmlman html
CVS commit: src/share/mk
Module Name:src Committed By: kamil Date: Sun Nov 8 15:19:18 UTC 2020 Modified Files: src/share/mk: bsd.README Log Message: Stop mentioning the support for cat pages To generate a diff of this commit: cvs rdiff -u -r1.413 -r1.414 src/share/mk/bsd.README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.413 src/share/mk/bsd.README:1.414 --- src/share/mk/bsd.README:1.413 Sun Nov 8 14:52:35 2020 +++ src/share/mk/bsd.README Sun Nov 8 15:19:18 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.413 2020/11/08 14:52:35 kamil Exp $ +# $NetBSD: bsd.README,v 1.414 2020/11/08 15:19:18 kamil Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -350,9 +350,9 @@ MKMAN If "no", don't build or install t Default: yes MKMANDOC If "yes", mandoc is built as tool and used to compile - catman or html pages. A directory can be exempted by - defining NOMANDOC. Individual man pages are exempted - if NOMANDOC.${target} is set to "yes". + html pages. A directory can be exempted by defining NOMANDOC. + Individual man pages are exempted if NOMANDOC.${target} is set + to "yes". Default: yes MKMANZ If not "no", compress manual pages at installation time. @@ -459,8 +459,8 @@ MKSANITIZER if "yes", use the selected s MKSHARE If "no", act as "MKDOC=no MKHTML=no MKINFO=no MKMAN=no MKNLS=no". - I.e, don't build catman pages, documentation, Info - documentation, man pages, NLS files, ... + I.e, don't build documentation, Info documentation, man pages, + NLS files, ... Default: yes MKSKEY If "no", disables building of S/key authentication @@ -717,7 +717,7 @@ BINMODE Binary mode. [555] NONBINMODE Mode for non-executable files. [444] -MANDIR Base path for manual installation. [/usr/share/man/cat] +MANDIR Base path for manual installation. [/usr/share/man] MANGRP Manual group. [wheel]
CVS commit: src/share/mk
Module Name:src Committed By: kamil Date: Sun Nov 8 14:55:26 UTC 2020 Modified Files: src/share/mk: bsd.own.mk Log Message: Remove the MKCATPAGES remnants To generate a diff of this commit: cvs rdiff -u -r1.1231 -r1.1232 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1231 src/share/mk/bsd.own.mk:1.1232 --- src/share/mk/bsd.own.mk:1.1231 Sun Nov 8 14:52:35 2020 +++ src/share/mk/bsd.own.mk Sun Nov 8 14:55:25 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1231 2020/11/08 14:52:35 kamil Exp $ +# $NetBSD: bsd.own.mk,v 1.1232 2020/11/08 14:55:25 kamil Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1273,7 +1273,7 @@ _MKVARS.no= \ MKARGON2 \ MKARZERO \ MKBSDGREP \ - MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \ + MKCOMPATTESTS MKCOMPATX11 MKCTF \ MKDEBUG MKDEBUGLIB MKDTB MKDTRACE \ MKEXTSRC \ MKFIRMWARE \ @@ -1350,7 +1350,6 @@ MKKYUA:= no .endif .if ${MKMAN} == "no" -MKCATPAGES:= no MKHTML:= no .endif @@ -1374,7 +1373,6 @@ MKOBJDIRS:= no .endif .if ${MKSHARE} == "no" -MKCATPAGES:= no MKDOC:= no MKINFO:= no MKHTML:= no
CVS commit: src
Module Name:src Committed By: kamil Date: Sun Nov 8 14:52:36 UTC 2020 Modified Files: src: BUILDING src/distrib/sets: sets.subr src/doc: BUILDING.mdoc src/share/man/man5: mk.conf.5 src/share/mk: bsd.README bsd.man.mk bsd.own.mk Log Message: Remove the support for MKCATPAGES It was optional since 1999 and disabled by default since 2012. Proposed on tech-userlevel@. To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/BUILDING cvs rdiff -u -r1.193 -r1.194 src/distrib/sets/sets.subr cvs rdiff -u -r1.131 -r1.132 src/doc/BUILDING.mdoc cvs rdiff -u -r1.81 -r1.82 src/share/man/man5/mk.conf.5 cvs rdiff -u -r1.412 -r1.413 src/share/mk/bsd.README cvs rdiff -u -r1.120 -r1.121 src/share/mk/bsd.man.mk cvs rdiff -u -r1.1230 -r1.1231 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/BUILDING diff -u src/BUILDING:1.138 src/BUILDING:1.139 --- src/BUILDING:1.138 Tue Oct 13 01:59:32 2020 +++ src/BUILDING Sun Nov 8 14:52:35 2020 @@ -247,11 +247,6 @@ CONFIGURATION Default: 2 - MKCATPAGES Can be set to "yes" or "no". Indicates whether preformatted - plaintext manual pages will be created during a build. - - Default: "no" - MKCROSSGDB Can be set to "yes" or "no". Create a cross-gdb as a host tool. @@ -385,9 +380,8 @@ CONFIGURATION MKSHARE Can be set to "yes" or "no". Indicates whether files destined to reside in DESTDIR/usr/share will be built and - installed during a build. If set to "no", then all of - MKCATPAGES, MKDOC, MKINFO, MKMAN, and MKNLS will be set to - "no" unconditionally. + installed during a build. If set to "no", then all of MKDOC, + MKINFO, MKMAN, and MKNLS will be set to "no" unconditionally. Default: "yes" Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.193 src/distrib/sets/sets.subr:1.194 --- src/distrib/sets/sets.subr:1.193 Sat Sep 26 17:49:49 2020 +++ src/distrib/sets/sets.subr Sun Nov 8 14:52:35 2020 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.193 2020/09/26 17:49:49 jmcneill Exp $ +# $NetBSD: sets.subr,v 1.194 2020/11/08 14:52:35 kamil Exp $ # # @@ -192,7 +192,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.193 2020/09/26 17:49:49 jmcneill Exp $ +# # $NetBSD: sets.subr,v 1.194 2020/11/08 14:52:35 kamil Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -250,9 +250,6 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # endian= = value of ${TARGET_ENDIANNESS} # # -# .cat if ${MKMANZ} != "no" && ${MKCATPAGES} != "no" -# automatically append ".gz" to the filename -# # .man if ${MKMANZ} != "no" && ${MKMAN} != "no" # automatically append ".gz" to the filename # @@ -354,8 +351,6 @@ list_set_files() if ("uefi" in wanted) { wanted["uefi=" "'"${HAVE_UEFI}"'"] = 1 } - if (("man" in wanted) && ("catpages" in wanted)) -wanted[".cat"] = 1 if (("man" in wanted) && ("manpages" in wanted)) wanted[".man"] = 1 if ("endian" in wanted) Index: src/doc/BUILDING.mdoc diff -u src/doc/BUILDING.mdoc:1.131 src/doc/BUILDING.mdoc:1.132 --- src/doc/BUILDING.mdoc:1.131 Tue Oct 13 01:59:32 2020 +++ src/doc/BUILDING.mdoc Sun Nov 8 14:52:35 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: BUILDING.mdoc,v 1.131 2020/10/13 01:59:32 thorpej Exp $ +.\" $NetBSD: BUILDING.mdoc,v 1.132 2020/11/08 14:52:35 kamil Exp $ .\" .\" Copyright (c) 2001-2011 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -360,7 +360,7 @@ either the process environment or the configuration file specified by .Sy MAKECONF . . -.Bl -tag -width "MKCATPAGES" +.Bl -tag -width "MK" . .It Sy BUILDID Identifier for the build. @@ -500,12 +500,6 @@ flag. .DFLT 2 . -.It Sy MKCATPAGES -.YorN -Indicates whether preformatted plaintext manual pages will be created -during a build. -.DFLTn -. .It Sy MKCROSSGDB .YorN Create a cross-gdb as a host tool. @@ -698,7 +692,7 @@ will be built and installed during a bui If set to .Dq no , then all of -.Sy MKCATPAGES , MKDOC , MKINFO , MKMAN , +.Sy MKDOC , MKINFO , MKMAN , and .Sy MKNLS will be set to Index: src/share/man/man5/mk.conf.5 diff -u src/share/man/man5/mk.conf.5:1.81 src/share/man/man5/mk.conf.5:1.82 --- src/share/man/man5/mk.conf.5:1.81 Tue Oct 27 06:33:38 2020 +++ src/share/man/man5/mk.conf.5 Sun Nov 8 14:52:35 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: mk.conf.5,v 1.81 2020/10/27 06:33:38 rin Exp $ +.\" $NetBSD: mk.conf.5,v 1.82 2020/11/08 14:52:35 kamil Exp $ .\" .\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@
CVS commit: src/etc/mtree
Module Name:src Committed By: kamil Date: Sat Oct 24 07:03:01 UTC 2020 Modified Files: src/etc/mtree: NetBSD.dist.base Log Message: Register the usr/share/gdb dir To generate a diff of this commit: cvs rdiff -u -r1.224 -r1.225 src/etc/mtree/NetBSD.dist.base Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.224 src/etc/mtree/NetBSD.dist.base:1.225 --- src/etc/mtree/NetBSD.dist.base:1.224 Wed Sep 9 06:50:33 2020 +++ src/etc/mtree/NetBSD.dist.base Sat Oct 24 07:03:00 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.224 2020/09/09 06:50:33 mrg Exp $ +# $NetBSD: NetBSD.dist.base,v 1.225 2020/10/24 07:03:00 kamil Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -426,6 +426,8 @@ ./usr/share/games/fortune ./usr/share/games/larn ./usr/share/games/quiz.db +./usr/share/gdb +./usr/share/gdb/syscalls ./usr/share/gnats ./usr/share/groff_font ./usr/share/groff_font/devX100
CVS commit: src
Module Name:src Committed By: kamil Date: Sat Oct 24 05:01:58 UTC 2020 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi src/external/gpl3/gdb/bin/gdb: Makefile Log Message: Install the NetBSD XML syscall definitions To generate a diff of this commit: cvs rdiff -u -r1.1266 -r1.1267 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.2361 -r1.2362 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gdb/bin/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1266 src/distrib/sets/lists/base/mi:1.1267 --- src/distrib/sets/lists/base/mi:1.1266 Thu Oct 8 14:22:21 2020 +++ src/distrib/sets/lists/base/mi Sat Oct 24 05:01:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1266 2020/10/08 14:22:21 skrll Exp $ +# $NetBSD: mi,v 1.1267 2020/10/24 05:01:57 kamil Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -2366,6 +2366,8 @@ ./usr/share/games/fortune base-games-share ./usr/share/games/larnbase-games-share ./usr/share/games/quiz.db base-games-share +./usr/share/gdb base-util-share +./usr/share/gdb/syscalls base-util-share ./usr/share/gnatsbase-gnats-share ./usr/share/gnats/netbsd base-gnats-share share ./usr/share/gnats/send-pr.el base-gnats-share share Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2361 src/distrib/sets/lists/comp/mi:1.2362 --- src/distrib/sets/lists/comp/mi:1.2361 Sat Oct 3 18:33:52 2020 +++ src/distrib/sets/lists/comp/mi Sat Oct 24 05:01:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2361 2020/10/03 18:33:52 christos Exp $ +# $NetBSD: mi,v 1.2362 2020/10/24 05:01:57 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -4154,6 +4154,7 @@ ./usr/sbin/gspahextoccomp-obsolete obsolete ./usr/sbin/kgmoncomp-debug-sbin ./usr/share/examples/openssl/CA.sh comp-obsolete openssl=11,obsolete +./usr/share/gdb/syscalls/netbsd.xml comp-debug-bin gdb=1100 ./usr/share/ldscripts/elf32_sparc.x comp-obsolete obsolete ./usr/share/ldscripts/elf32_sparc.xbn comp-obsolete obsolete ./usr/share/ldscripts/elf32_sparc.xn comp-obsolete obsolete Index: src/external/gpl3/gdb/bin/gdb/Makefile diff -u src/external/gpl3/gdb/bin/gdb/Makefile:1.18 src/external/gpl3/gdb/bin/gdb/Makefile:1.19 --- src/external/gpl3/gdb/bin/gdb/Makefile:1.18 Thu Sep 17 20:26:22 2020 +++ src/external/gpl3/gdb/bin/gdb/Makefile Sat Oct 24 05:01:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2020/09/17 20:26:22 christos Exp $ +# $NetBSD: Makefile,v 1.19 2020/10/24 05:01:57 kamil Exp $ NOCTF= .include @@ -41,6 +41,9 @@ gdb-cfg.texi: ${DIST}/gdb/doc/all-cfg.te CLEANFILES+= GDBvn.texi gdb-cfg.texi stabs.info gdb.info: gdb-cfg.texi GDBvn.texi +FILES= netbsd.xml +FILESDIR= /usr/share/gdb/syscalls + .include "../../Makefile.inc" .include @@ -109,4 +112,5 @@ CC:= ${CXX} CFLAGS:= ${CXXFLAGS} -std=gnu++11 -Wno-error=stack-protector .PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \ -${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${GDB_MACHINE_ARCH} +${DIST}/gdb/signals ${DIST}/gdb/syscalls ${DIST}/gdb/doc \ +${.CURDIR}/../arch/${GDB_MACHINE_ARCH}
CVS commit: src
Module Name:src Committed By: kamil Date: Tue Oct 20 23:27:58 UTC 2020 Modified Files: src/share/man/man3: queue.3 src/sys/sys: queue.h Log Message: Remove the CIRCLEQ API from queue(3) It was marked deprecated in NetBSD 7 and already removed from FreeBSD in 2000 and OpenBSD in 2015. Proposed on tech-kern@. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/share/man/man3/queue.3 cvs rdiff -u -r1.74 -r1.75 src/sys/sys/queue.h 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/man3/queue.3 diff -u src/share/man/man3/queue.3:1.60 src/share/man/man3/queue.3:1.61 --- src/share/man/man3/queue.3:1.60 Mon Jun 18 02:48:56 2018 +++ src/share/man/man3/queue.3 Tue Oct 20 23:27:57 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: queue.3,v 1.60 2018/06/18 02:48:56 eadler Exp $ +.\" $NetBSD: queue.3,v 1.61 2020/10/20 23:27:57 kamil Exp $ .\" .\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1091,3 +1091,13 @@ and .Nm STAILQ functions first appeared in .Fx 2.1.5 . +.Pp +The +.Nm CIRCLEQ +functions first appeared in +.Bx 4.4 +and were deprecated in +.Nx 7 +and removed in +.Nx 10 +due to the pointer aliasing violations. Index: src/sys/sys/queue.h diff -u src/sys/sys/queue.h:1.74 src/sys/sys/queue.h:1.75 --- src/sys/sys/queue.h:1.74 Sat Mar 23 12:01:18 2019 +++ src/sys/sys/queue.h Tue Oct 20 23:27:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: queue.h,v 1.74 2019/03/23 12:01:18 maxv Exp $ */ +/* $NetBSD: queue.h,v 1.75 2020/10/20 23:27:58 kamil Exp $ */ /* * Copyright (c) 1991, 1993 @@ -69,14 +69,6 @@ * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * - * A circle queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or after - * an existing element, at the head of the list, or at the end of the list. - * A circle queue may be traversed in either direction, but has a more - * complex end of list detection. - * * For details on the use of these macros, see the queue(3) manual page. */ @@ -663,192 +655,4 @@ struct {\ ((struct type *)(void *)\ ((char *)((head)->stqh_last) - offsetof(struct type, field - -#ifndef _KERNEL -/* - * Circular queue definitions. Do not use. We still keep the macros - * for compatibility but because of pointer aliasing issues their use - * is discouraged! - */ - -/* - * __launder_type(): We use this ugly hack to work around the compiler - * noticing that two types may not alias each other and elide tests in code. - * We hit this in the CIRCLEQ macros when comparing 'struct name *' and - * 'struct type *' (see CIRCLEQ_HEAD()). Modern compilers (such as GCC - * 4.8) declare these comparisons as always false, causing the code to - * not run as designed. - * - * This hack is only to be used for comparisons and thus can be fully const. - * Do not use for assignment. - * - * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix - * this by changing the head/tail sentinal values, but see the note above - * this one. - */ -static __inline const void * __launder_type(const void *); -static __inline const void * -__launder_type(const void *__x) -{ - __asm __volatile("" : "+r" (__x)); - return __x; -} - -#if defined(QUEUEDEBUG) -#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field)\ - if ((head)->cqh_first != CIRCLEQ_ENDC(head) && \ - (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head)) \ - QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head), \ - __FILE__, __LINE__);\ - if ((head)->cqh_last != CIRCLEQ_ENDC(head) && \ - (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head)) \ - QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head), \ - __FILE__, __LINE__); -#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \ - if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) { \ - if ((head)->cqh_last != (elm))\ - QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d", \ - (elm), __FILE__, __LINE__); \ - } else { \ - if ((elm)->field.cqe_next->field.cqe_prev != (elm)) \ - QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d", \ - (elm), __FILE__, __LINE__); \ - }\ - if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) { \ - if ((head)->cqh_first != (elm))\ - QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d", \ - (elm), __FILE__, __LINE__); \ - } else { \ - if ((elm)->field.cqe_prev->field.cqe_next != (elm)) \ - QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d", \ - (elm), __FILE__, __LINE__); \ - } -#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) \ - (elm)->field.cqe_next = (void *)1L;\ - (elm)->field.cqe_prev
CVS commit: src/lib/libc/arch/aarch64/sys
Module Name:src Committed By: kamil Date: Mon Oct 19 22:33:53 UTC 2020 Modified Files: src/lib/libc/arch/aarch64/sys: __sigtramp2.S Log Message: Restore SP from mcontext Improves unwinding of multiple frames without frame pointer. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/aarch64/sys/__sigtramp2.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/aarch64/sys/__sigtramp2.S diff -u src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.3 src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.4 --- src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.3 Sat Oct 17 15:44:59 2020 +++ src/lib/libc/arch/aarch64/sys/__sigtramp2.S Mon Oct 19 22:33:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: __sigtramp2.S,v 1.3 2020/10/17 15:44:59 skrll Exp $ */ +/* $NetBSD: __sigtramp2.S,v 1.4 2020/10/19 22:33:53 kamil Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ .cfi_offset x28, _UC_REGS_X28 .cfi_offset x29, _UC_REGS_X29 .cfi_offset lr, _UC_REGS_LR - /* The unwinder will use the CFA to restore X31 (SP). */ + .cfi_offset sp, _UC_REGS_SP nop ENTRY_NP(__sigtramp_siginfo_2) mov x0, x28/* set the arg */
CVS commit: src/share/legal
Module Name:src Committed By: kamil Date: Mon Oct 19 15:25:58 UTC 2020 Modified Files: src/share/legal: COPYRIGHT Log Message: Remove advertising clause from the code distributed from UCB Follow ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/legal/COPYRIGHT Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/legal/COPYRIGHT diff -u src/share/legal/COPYRIGHT:1.2 src/share/legal/COPYRIGHT:1.3 --- src/share/legal/COPYRIGHT:1.2 Sat Feb 6 10:40:58 2016 +++ src/share/legal/COPYRIGHT Mon Oct 19 15:25:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: COPYRIGHT,v 1.2 2016/02/06 10:40:58 mlelstv Exp $ +# $NetBSD: COPYRIGHT,v 1.3 2020/10/19 15:25:57 kamil Exp $ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite @@ -15,11 +15,7 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: -This product includes software developed by the University of -California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors +3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -128,4 +124,3 @@ Except as contained in this notice, the shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. -
CVS commit: src/sys/kern
Module Name:src Committed By: kamil Date: Mon Oct 19 15:07:47 UTC 2020 Modified Files: src/sys/kern: sys_ptrace.c Log Message: This file does not contain any code written by cgd@ Delete the BSD 4-clause license. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/kern/sys_ptrace.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_ptrace.c diff -u src/sys/kern/sys_ptrace.c:1.8 src/sys/kern/sys_ptrace.c:1.9 --- src/sys/kern/sys_ptrace.c:1.8 Mon Oct 19 14:52:19 2020 +++ src/sys/kern/sys_ptrace.c Mon Oct 19 15:07:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace.c,v 1.8 2020/10/19 14:52:19 kamil Exp $ */ +/* $NetBSD: sys_ptrace.c,v 1.9 2020/10/19 15:07:47 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -68,46 +68,8 @@ * from: @(#)sys_process.c 8.1 (Berkeley) 6/10/93 */ -/*- - * Copyright (c) 1993 Jan-Simon Pendry. - * Copyright (c) 1994 Christopher G. Demetriou. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Jan-Simon Pendry. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)sys_process.c 8.1 (Berkeley) 6/10/93 - */ - #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c,v 1.8 2020/10/19 14:52:19 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c,v 1.9 2020/10/19 15:07:47 kamil Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h"
CVS commit: src/sys/kern
Module Name:src Committed By: kamil Date: Mon Oct 19 14:52:19 UTC 2020 Modified Files: src/sys/kern: sys_ptrace.c sys_ptrace_common.c Log Message: Rollback unintended changes in the previous commit To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/kern/sys_ptrace.c cvs rdiff -u -r1.85 -r1.86 src/sys/kern/sys_ptrace_common.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_ptrace.c diff -u src/sys/kern/sys_ptrace.c:1.7 src/sys/kern/sys_ptrace.c:1.8 --- src/sys/kern/sys_ptrace.c:1.7 Mon Oct 19 14:47:01 2020 +++ src/sys/kern/sys_ptrace.c Mon Oct 19 14:52:19 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace.c,v 1.7 2020/10/19 14:47:01 kamil Exp $ */ +/* $NetBSD: sys_ptrace.c,v 1.8 2020/10/19 14:52:19 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -106,9 +106,8 @@ * from: @(#)sys_process.c 8.1 (Berkeley) 6/10/93 */ - #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c,v 1.7 2020/10/19 14:47:01 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c,v 1.8 2020/10/19 14:52:19 kamil Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -129,6 +128,7 @@ __KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c #include #include #include +#include #include @@ -214,3 +214,26 @@ sys_ptrace(struct lwp *l, const struct s return do_ptrace(_ptm, l, SCARG(uap, req), SCARG(uap, pid), SCARG(uap, addr), SCARG(uap, data), retval); } + +#define DEPS "ptrace_common" + +MODULE(MODULE_CLASS_EXEC, ptrace, DEPS); + +static int +ptrace_modcmd(modcmd_t cmd, void *arg) +{ + int error; + + switch (cmd) { + case MODULE_CMD_INIT: + error = syscall_establish(_netbsd, ptrace_syscalls); + break; + case MODULE_CMD_FINI: + error = syscall_disestablish(_netbsd, ptrace_syscalls); + break; + default: + error = ENOTTY; + break; + } + return error; +} Index: src/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.85 src/sys/kern/sys_ptrace_common.c:1.86 --- src/sys/kern/sys_ptrace_common.c:1.85 Mon Oct 19 14:47:01 2020 +++ src/sys/kern/sys_ptrace_common.c Mon Oct 19 14:52:19 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.85 2020/10/19 14:47:01 kamil Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.86 2020/10/19 14:52:19 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -106,9 +106,8 @@ * from: @(#)sys_process.c 8.1 (Berkeley) 6/10/93 */ - #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.85 2020/10/19 14:47:01 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.86 2020/10/19 14:52:19 kamil Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -135,6 +134,7 @@ __KERNEL_RCSID(0, "$NetBSD: sys_ptrace_c #include #include #include +#include #include #include #include @@ -1785,3 +1785,25 @@ process_auxv_offset(struct proc *p, stru return 0; } #endif /* PTRACE */ + +MODULE(MODULE_CLASS_EXEC, ptrace_common, NULL); + +static int +ptrace_common_modcmd(modcmd_t cmd, void *arg) +{ +int error; + +switch (cmd) { +case MODULE_CMD_INIT: +error = ptrace_init(); +break; +case MODULE_CMD_FINI: +error = ptrace_fini(); +break; +default: + ptrace_hooks(); +error = ENOTTY; +break; +} +return error; +}
CVS commit: src/sys/kern
Module Name:src Committed By: kamil Date: Mon Oct 19 14:47:01 UTC 2020 Modified Files: src/sys/kern: sys_ptrace.c sys_ptrace_common.c Log Message: Remove obsolete references to 4.4BSD papers To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/kern/sys_ptrace.c cvs rdiff -u -r1.84 -r1.85 src/sys/kern/sys_ptrace_common.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_ptrace.c diff -u src/sys/kern/sys_ptrace.c:1.6 src/sys/kern/sys_ptrace.c:1.7 --- src/sys/kern/sys_ptrace.c:1.6 Tue Dec 24 14:50:59 2019 +++ src/sys/kern/sys_ptrace.c Mon Oct 19 14:47:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace.c,v 1.6 2019/12/24 14:50:59 kamil Exp $ */ +/* $NetBSD: sys_ptrace.c,v 1.7 2020/10/19 14:47:01 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -106,19 +106,9 @@ * from: @(#)sys_process.c 8.1 (Berkeley) 6/10/93 */ -/* - * References: - * (1) Bach's "The Design of the UNIX Operating System", - * (2) sys/miscfs/procfs from UCB's 4.4BSD-Lite distribution, - * (3) the "4.4BSD Programmer's Reference Manual" published - * by USENIX and O'Reilly & Associates. - * The 4.4BSD PRM does a reasonably good job of documenting what the various - * ptrace() requests should actually do, and its text is quoted several times - * in this file. - */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c,v 1.6 2019/12/24 14:50:59 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c,v 1.7 2020/10/19 14:47:01 kamil Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -139,7 +129,6 @@ __KERNEL_RCSID(0, "$NetBSD: sys_ptrace.c #include #include #include -#include #include @@ -225,26 +214,3 @@ sys_ptrace(struct lwp *l, const struct s return do_ptrace(_ptm, l, SCARG(uap, req), SCARG(uap, pid), SCARG(uap, addr), SCARG(uap, data), retval); } - -#define DEPS "ptrace_common" - -MODULE(MODULE_CLASS_EXEC, ptrace, DEPS); - -static int -ptrace_modcmd(modcmd_t cmd, void *arg) -{ - int error; - - switch (cmd) { - case MODULE_CMD_INIT: - error = syscall_establish(_netbsd, ptrace_syscalls); - break; - case MODULE_CMD_FINI: - error = syscall_disestablish(_netbsd, ptrace_syscalls); - break; - default: - error = ENOTTY; - break; - } - return error; -} Index: src/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.84 src/sys/kern/sys_ptrace_common.c:1.85 --- src/sys/kern/sys_ptrace_common.c:1.84 Thu Oct 15 17:37:36 2020 +++ src/sys/kern/sys_ptrace_common.c Mon Oct 19 14:47:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.84 2020/10/15 17:37:36 mgorny Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.85 2020/10/19 14:47:01 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -106,19 +106,9 @@ * from: @(#)sys_process.c 8.1 (Berkeley) 6/10/93 */ -/* - * References: - * (1) Bach's "The Design of the UNIX Operating System", - * (2) sys/miscfs/procfs from UCB's 4.4BSD-Lite distribution, - * (3) the "4.4BSD Programmer's Reference Manual" published - * by USENIX and O'Reilly & Associates. - * The 4.4BSD PRM does a reasonably good job of documenting what the various - * ptrace() requests should actually do, and its text is quoted several times - * in this file. - */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.84 2020/10/15 17:37:36 mgorny Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.85 2020/10/19 14:47:01 kamil Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -145,7 +135,6 @@ __KERNEL_RCSID(0, "$NetBSD: sys_ptrace_c #include #include #include -#include #include #include #include @@ -1796,25 +1785,3 @@ process_auxv_offset(struct proc *p, stru return 0; } #endif /* PTRACE */ - -MODULE(MODULE_CLASS_EXEC, ptrace_common, NULL); - -static int -ptrace_common_modcmd(modcmd_t cmd, void *arg) -{ -int error; - -switch (cmd) { -case MODULE_CMD_INIT: -error = ptrace_init(); -break; -case MODULE_CMD_FINI: -error = ptrace_fini(); -break; -default: - ptrace_hooks(); -error = ENOTTY; -break; -} -return error; -}
CVS commit: src/lib/libc/arch/i386/sys
Module Name:src Committed By: kamil Date: Mon Oct 19 11:31:02 UTC 2020 Modified Files: src/lib/libc/arch/i386/sys: __sigtramp2.S Log Message: Restore ESP from mcontext Improves unwinding of multiple frames without base pointer. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/i386/sys/__sigtramp2.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/i386/sys/__sigtramp2.S diff -u src/lib/libc/arch/i386/sys/__sigtramp2.S:1.6 src/lib/libc/arch/i386/sys/__sigtramp2.S:1.7 --- src/lib/libc/arch/i386/sys/__sigtramp2.S:1.6 Mon Oct 12 23:56:08 2020 +++ src/lib/libc/arch/i386/sys/__sigtramp2.S Mon Oct 19 11:31:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: __sigtramp2.S,v 1.6 2020/10/12 23:56:08 kamil Exp $ */ +/* $NetBSD: __sigtramp2.S,v 1.7 2020/10/19 11:31:01 kamil Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ .cfi_offset ecx, UC_GREGS_ECX .cfi_offset edx, UC_GREGS_EDX .cfi_offset ebx, UC_GREGS_EBX - /* The unwinder will use the CFA to restore ESP. */ + .cfi_offset esp, UC_GREGS_ESP .cfi_offset ebp, UC_GREGS_EBP .cfi_offset esi, UC_GREGS_ESI .cfi_offset edi, UC_GREGS_EDI
CVS commit: src/lib/libc/arch/x86_64/sys
Module Name:src Committed By: kamil Date: Mon Oct 19 11:29:26 UTC 2020 Modified Files: src/lib/libc/arch/x86_64/sys: __sigtramp2.S Log Message: Restore RSP from mcontext Fixes unwinding of multiple frames without base pointer. Patch by: Nikhil Benesch via PR lib/55719 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/x86_64/sys/__sigtramp2.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/x86_64/sys/__sigtramp2.S diff -u src/lib/libc/arch/x86_64/sys/__sigtramp2.S:1.8 src/lib/libc/arch/x86_64/sys/__sigtramp2.S:1.9 --- src/lib/libc/arch/x86_64/sys/__sigtramp2.S:1.8 Mon Oct 12 17:55:54 2020 +++ src/lib/libc/arch/x86_64/sys/__sigtramp2.S Mon Oct 19 11:29:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: __sigtramp2.S,v 1.8 2020/10/12 17:55:54 kamil Exp $ */ +/* $NetBSD: __sigtramp2.S,v 1.9 2020/10/19 11:29:26 kamil Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -58,7 +58,7 @@ .cfi_offset rsi, UC_GREGS_RSI .cfi_offset rdi, UC_GREGS_RDI .cfi_offset rbp, UC_GREGS_RBP - /* The unwinder will use the CFA to restore RSP. */ + .cfi_offset rsp, UC_GREGS_RSP .cfi_offset r8, UC_GREGS_R8 .cfi_offset r9, UC_GREGS_R9 .cfi_offset r10, UC_GREGS_R10
CVS commit: src/external/gpl3/gdb/dist/gdb/nat
Module Name:src Committed By: kamil Date: Wed Oct 14 14:02:43 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/gdb/nat: fork-inferior.c Log Message: Limit the switch_to_thread() calls in startup_inferior() Do not jump over the threads during the startup unless we encounter TARGET_WAITKIND_STOPPED with SIGTRAP or TARGET_WAITKIND_EXECD. Otherwise whenever a startup-with-shell processes signals on the startup stage, it might indicate to switch to a non-existing thread or a special-thread number (target lwp=0 on NetBSD means that a signal was directed to all threads within a process). This caused a crash with tcsh on NetBSD, where the tcsh shell runs startup detection of the hostname. This action involves spwaning a new process through fork. GDB crashes this way: $ SHELL=tcsh /usr/bin/gdb echo (gdb) r Starting program: /bin/echo /usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309: internal-error: void switch_to_thread(thread_info*): Assertion `thr != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. This patch has been submitted upstream for review: https://sourceware.org/pipermail/gdb-patches/2020-October/172558.html To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.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/gdb/dist/gdb/nat/fork-inferior.c diff -u src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.1.1.2 src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.2 --- src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.1.1.2 Tue Sep 15 01:43:40 2020 +++ src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c Wed Oct 14 14:02:43 2020 @@ -503,7 +503,6 @@ startup_inferior (process_stratum_target case TARGET_WAITKIND_SYSCALL_ENTRY: case TARGET_WAITKIND_SYSCALL_RETURN: /* Ignore gracefully during startup of the inferior. */ - switch_to_thread (proc_target, event_ptid); break; case TARGET_WAITKIND_SIGNALLED: @@ -536,7 +535,9 @@ startup_inferior (process_stratum_target case TARGET_WAITKIND_STOPPED: resume_signal = ws.value.sig; - switch_to_thread (proc_target, event_ptid); + /* Ignore gracefully the !TRAP signals intercepted from the shell. */ + if (resume_signal == GDB_SIGNAL_TRAP) + switch_to_thread (proc_target, event_ptid); break; }
CVS commit: src/usr.sbin/ypserv/ypserv
Module Name:src Committed By: kamil Date: Tue Oct 13 13:56:34 UTC 2020 Modified Files: src/usr.sbin/ypserv/ypserv: ypserv_db.c Log Message: Convert the CIRCLEQ (from sys/queue.h) usage to TAILQ The CIRCLEQ API from sys/queue.h is deprecated since NetBSD 7 and is already gone from FreeBSD and OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/ypserv/ypserv/ypserv_db.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.sbin/ypserv/ypserv/ypserv_db.c diff -u src/usr.sbin/ypserv/ypserv/ypserv_db.c:1.22 src/usr.sbin/ypserv/ypserv/ypserv_db.c:1.23 --- src/usr.sbin/ypserv/ypserv/ypserv_db.c:1.22 Tue Feb 1 21:00:25 2011 +++ src/usr.sbin/ypserv/ypserv/ypserv_db.c Tue Oct 13 13:56:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ypserv_db.c,v 1.22 2011/02/01 21:00:25 chuck Exp $ */ +/* $NetBSD: ypserv_db.c,v 1.23 2020/10/13 13:56:34 kamil Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ypserv_db.c,v 1.22 2011/02/01 21:00:25 chuck Exp $"); +__RCSID("$NetBSD: ypserv_db.c,v 1.23 2020/10/13 13:56:34 kamil Exp $"); #endif /* @@ -65,7 +65,7 @@ __RCSID("$NetBSD: ypserv_db.c,v 1.22 201 LIST_HEAD(domainlist, opt_domain); /* LIST of domains */ LIST_HEAD(maplist, opt_map); /* LIST of maps (in a domain) */ -CIRCLEQ_HEAD(mapq, opt_map); /* CIRCLEQ of maps (LRU) */ +TAILQ_HEAD(mapq, opt_map); /* TAILQ of maps (LRU) */ struct opt_map { char *map; /* map name (malloc'd) */ @@ -76,7 +76,7 @@ struct opt_map { dev_t dbdev; /* device db is on */ ino_t dbino; /* inode of db */ time_t dbmtime; /* time of last db modification */ - CIRCLEQ_ENTRY(opt_map) mapsq; /* map queue pointers */ + TAILQ_ENTRY(opt_map) mapsq; /* map queue pointers */ LIST_ENTRY(opt_map) mapsl; /* map list pointers */ }; @@ -106,7 +106,7 @@ ypdb_init(void) { LIST_INIT(); - CIRCLEQ_INIT(); + TAILQ_INIT(); } /* @@ -161,7 +161,7 @@ yp_private(datum key, int ypprivate) void ypdb_close_map(struct opt_map *map) { - CIRCLEQ_REMOVE(, map, mapsq); /* remove from LRU circleq */ + TAILQ_REMOVE(, map, mapsq); /* remove from LRU tailq */ LIST_REMOVE(map, mapsl); /* remove from domain list */ #ifdef DEBUG @@ -182,13 +182,14 @@ ypdb_close_map(struct opt_map *map) void ypdb_close_last(void) { - struct opt_map *last = maps.cqh_last; + struct opt_map *last; - if (last == (void *) ) { + if (TAILQ_EMPTY()) { syslog(LOG_ERR, "ypdb_close_last: LRU list is empty!"); return; } + last = TAILQ_LAST(, mapq); ypdb_close_map(last); } @@ -203,7 +204,7 @@ ypdb_close_all(void) syslog(LOG_DEBUG, "ypdb_close_all(): start"); #endif - while (maps.cqh_first != (void *) ) + while (!TAILQ_EMPTY()) ypdb_close_last(); #ifdef DEBUG @@ -326,8 +327,8 @@ ypdb_open_db(const char *domain, const c */ if (finfo.st_dev == m->dbdev && finfo.st_ino == m->dbino && finfo.st_mtime == m->dbmtime) { - CIRCLEQ_REMOVE(, m, mapsq); /* adjust LRU queue */ - CIRCLEQ_INSERT_HEAD(, m, mapsq); + TAILQ_REMOVE(, m, mapsq); /* adjust LRU queue */ + TAILQ_INSERT_HEAD(, m, mapsq); if (map_info) *map_info = m; return (m->db); @@ -423,7 +424,7 @@ retryopen: m->dbdev = finfo.st_dev; m->dbino = finfo.st_ino; m->dbmtime = finfo.st_mtime; - CIRCLEQ_INSERT_HEAD(, m, mapsq); + TAILQ_INSERT_HEAD(, m, mapsq); LIST_INSERT_HEAD(>dmaps, m, mapsl); if (strcmp(map, YP_HOSTNAME) == 0 || strcmp(map, YP_HOSTADDR) == 0) { if (!usedns) {
CVS commit: src/lib/libc/arch/aarch64
Module Name:src Committed By: kamil Date: Tue Oct 13 01:59:55 UTC 2020 Modified Files: src/lib/libc/arch/aarch64: genassym.cf src/lib/libc/arch/aarch64/sys: __sigtramp2.S Log Message: Decorate the aarch64 signal trampoline with CFI attributes easing unwinding Now, the unwinders (in backtrace(3) and similar) can unwind properly the stack from a signal handler. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/aarch64/genassym.cf cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/sys/__sigtramp2.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/aarch64/genassym.cf diff -u src/lib/libc/arch/aarch64/genassym.cf:1.2 src/lib/libc/arch/aarch64/genassym.cf:1.3 --- src/lib/libc/arch/aarch64/genassym.cf:1.2 Sun May 10 14:05:59 2020 +++ src/lib/libc/arch/aarch64/genassym.cf Tue Oct 13 01:59:55 2020 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.2 2020/05/10 14:05:59 skrll Exp $ +# $NetBSD: genassym.cf,v 1.3 2020/10/13 01:59:55 kamil Exp $ #- # Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -34,6 +34,36 @@ include include define _UC_REGS_X0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X0]) +define _UC_REGS_X1 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X1]) +define _UC_REGS_X2 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X2]) +define _UC_REGS_X3 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X3]) +define _UC_REGS_X4 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X4]) +define _UC_REGS_X5 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X5]) +define _UC_REGS_X6 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X6]) +define _UC_REGS_X7 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X7]) +define _UC_REGS_X8 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X8]) +define _UC_REGS_X9 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X9]) +define _UC_REGS_X10 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X10]) +define _UC_REGS_X11 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X11]) +define _UC_REGS_X12 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X12]) +define _UC_REGS_X13 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X13]) +define _UC_REGS_X14 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X14]) +define _UC_REGS_X15 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X15]) +define _UC_REGS_X16 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X16]) +define _UC_REGS_X17 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X17]) +define _UC_REGS_X18 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X18]) +define _UC_REGS_X19 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X19]) +define _UC_REGS_X20 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X20]) +define _UC_REGS_X21 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X21]) +define _UC_REGS_X22 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X22]) +define _UC_REGS_X23 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X23]) +define _UC_REGS_X24 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X24]) +define _UC_REGS_X25 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X25]) +define _UC_REGS_X26 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X26]) +define _UC_REGS_X27 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X27]) +define _UC_REGS_X28 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X28]) +define _UC_REGS_X29 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X29]) +define _UC_REGS_X30 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X30]) define _UC_REGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP]) define _UC_REGS_PC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC]) Index: src/lib/libc/arch/aarch64/sys/__sigtramp2.S diff -u src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.1 src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.2 --- src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.1 Sun Aug 10 05:47:37 2014 +++ src/lib/libc/arch/aarch64/sys/__sigtramp2.S Tue Oct 13 01:59:55 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: __sigtramp2.S,v 1.1 2014/08/10 05:47:37 matt Exp $ */ +/* $NetBSD: __sigtramp2.S,v 1.2 2020/10/13 01:59:55 kamil Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,6 +30,7 @@ */ #include "SYS.h" +#include "assym.h" /* * The ARM signal trampoline is invoked only to return from @@ -40,11 +41,54 @@ * ucontext structure * sp-> siginfo structure * and x28 points to the ucontext + * + * The unwind entry includes the one byte prior to the trampoline + * because the unwinder will look up (return PC - 1) while unwinding. + * Normally (return PC - 1) computes an address inside the call + * instruction that created the child frame, but here there is no call + * instruction so we have to manually add padding. */ + .cfi_startproc simple + .cfi_signal_frame + .cfi_def_cfa x28, 0 + .cfi_offset x0, _UC_REGS_X0 + .cfi_offset x1, _UC_REGS_X1 + .cfi_offset x2, _UC_REGS_X2 + .cfi_offset x3, _UC_REGS_X3 + .cfi_offset x4, _UC_REGS_X4 + .cfi_offset x5, _UC_REGS_X5 + .cfi_offset x6, _UC_REGS_X6 + .cfi_offset x7, _UC_REGS_X7 +
CVS commit: src/lib/libc/arch/i386
Module Name:src Committed By: kamil Date: Mon Oct 12 23:58:14 UTC 2020 Modified Files: src/lib/libc/arch/i386: genassym.cf Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/i386/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/i386/genassym.cf diff -u src/lib/libc/arch/i386/genassym.cf:1.1 src/lib/libc/arch/i386/genassym.cf:1.2 --- src/lib/libc/arch/i386/genassym.cf:1.1 Mon Oct 12 23:56:08 2020 +++ src/lib/libc/arch/i386/genassym.cf Mon Oct 12 23:58:14 2020 @@ -1,10 +1,10 @@ -# $NetBSD: genassym.cf,v 1.1 2020/10/12 23:56:08 kamil Exp $ +# $NetBSD: genassym.cf,v 1.2 2020/10/12 23:58:14 kamil Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation -# by Kamil Rytarowski or Moritz Systems Technology Company Sp. z o.o. +# by Kamil Rytarowski for Moritz Systems Technology Company Sp. z o.o. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions
CVS commit: src/lib/libc/arch/i386
Module Name:src Committed By: kamil Date: Mon Oct 12 23:56:08 UTC 2020 Modified Files: src/lib/libc/arch/i386: Makefile.inc src/lib/libc/arch/i386/sys: __sigtramp2.S Added Files: src/lib/libc/arch/i386: genassym.cf Log Message: Decorate the i386 signal trampoline with CFI attributes easing unwinding Now, the unwinders (in backtrace(3) and similar) can unwind properly the stack from a signal handler. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/arch/i386/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/i386/genassym.cf cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/i386/sys/__sigtramp2.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/i386/Makefile.inc diff -u src/lib/libc/arch/i386/Makefile.inc:1.21 src/lib/libc/arch/i386/Makefile.inc:1.22 --- src/lib/libc/arch/i386/Makefile.inc:1.21 Wed Jul 15 14:27:49 2015 +++ src/lib/libc/arch/i386/Makefile.inc Mon Oct 12 23:56:08 2020 @@ -1,5 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.21 2015/07/15 14:27:49 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.22 2020/10/12 23:56:08 kamil Exp $ .if ${RUMPRUN} != "yes" SRCS+= __sigaction14_sigtramp.c __sigtramp2.S .endif + +CPPFLAGS+= -I. Index: src/lib/libc/arch/i386/sys/__sigtramp2.S diff -u src/lib/libc/arch/i386/sys/__sigtramp2.S:1.5 src/lib/libc/arch/i386/sys/__sigtramp2.S:1.6 --- src/lib/libc/arch/i386/sys/__sigtramp2.S:1.5 Fri May 23 02:34:19 2014 +++ src/lib/libc/arch/i386/sys/__sigtramp2.S Mon Oct 12 23:56:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: __sigtramp2.S,v 1.5 2014/05/23 02:34:19 uebayasi Exp $ */ +/* $NetBSD: __sigtramp2.S,v 1.6 2020/10/12 23:56:08 kamil Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,6 +30,7 @@ */ #include "SYS.h" +#include "assym.h" /* * The i386 signal trampoline is invoked only to return from @@ -42,7 +43,26 @@ * pointer to ucontext structure [8] * pointer to siginfo structure [4] * sp-> signal number[0] + * + * The unwind entry includes the one byte prior to the trampoline + * because the unwinder will look up (return PC - 1) while unwinding. + * Normally (return PC - 1) computes an address inside the call + * instruction that created the child frame, but here there is no call + * instruction so we have to manually add padding. */ + .cfi_startproc simple + .cfi_signal_frame + .cfi_def_cfa esp, 140 + .cfi_offset eax, UC_GREGS_EAX + .cfi_offset ecx, UC_GREGS_ECX + .cfi_offset edx, UC_GREGS_EDX + .cfi_offset ebx, UC_GREGS_EBX + /* The unwinder will use the CFA to restore ESP. */ + .cfi_offset ebp, UC_GREGS_EBP + .cfi_offset esi, UC_GREGS_ESI + .cfi_offset edi, UC_GREGS_EDI + .cfi_offset eip, UC_GREGS_EIP + nop NENTRY(__sigtramp_siginfo_2) leal 12+128(%esp),%eax /* get address of ucontext */ movl %eax,4(%esp) /* put it in the argument slot */ @@ -50,4 +70,5 @@ NENTRY(__sigtramp_siginfo_2) SYSTRAP(setcontext) /* do setcontext */ movl $-1,4(%esp) /* if we return here, something is wrong */ SYSTRAP(exit) /* exit */ + .cfi_endproc END(__sigtramp_siginfo_2) Added files: Index: src/lib/libc/arch/i386/genassym.cf diff -u /dev/null src/lib/libc/arch/i386/genassym.cf:1.1 --- /dev/null Mon Oct 12 23:56:08 2020 +++ src/lib/libc/arch/i386/genassym.cf Mon Oct 12 23:56:08 2020 @@ -0,0 +1,41 @@ +# $NetBSD: genassym.cf,v 1.1 2020/10/12 23:56:08 kamil Exp $ +# +# Copyright (c) 2020 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Kamil Rytarowski or Moritz Systems Technology Company Sp. z o.o. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
CVS commit: src/lib/libc/arch/x86_64
Module Name:src Committed By: kamil Date: Mon Oct 12 21:33:46 UTC 2020 Modified Files: src/lib/libc/arch/x86_64: genassym.cf Log Message: Add CVS Id To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/x86_64/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/x86_64/genassym.cf diff -u src/lib/libc/arch/x86_64/genassym.cf:1.1 src/lib/libc/arch/x86_64/genassym.cf:1.2 --- src/lib/libc/arch/x86_64/genassym.cf:1.1 Mon Oct 12 17:55:53 2020 +++ src/lib/libc/arch/x86_64/genassym.cf Mon Oct 12 21:33:46 2020 @@ -1,3 +1,4 @@ +# $NetBSD: genassym.cf,v 1.2 2020/10/12 21:33:46 kamil Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved.
CVS commit: src/lib/libc/arch/x86_64
Module Name:src Committed By: kamil Date: Mon Oct 12 17:55:54 UTC 2020 Modified Files: src/lib/libc/arch/x86_64: Makefile.inc src/lib/libc/arch/x86_64/sys: __sigtramp2.S Added Files: src/lib/libc/arch/x86_64: genassym.cf Log Message: Decorate the x86_64 signal trampoline with CFI attributes easing unwinding Combine the approach provided by Nikhil Benesch and Andrew Cagney. Now, the unwinders (in gccgo, backtrace(3), etc) can unwind properly the stack from a signal handler. Fixes lib/55719 by Nikhil Benesch To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/x86_64/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/x86_64/genassym.cf cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/x86_64/sys/__sigtramp2.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/x86_64/Makefile.inc diff -u src/lib/libc/arch/x86_64/Makefile.inc:1.6 src/lib/libc/arch/x86_64/Makefile.inc:1.7 --- src/lib/libc/arch/x86_64/Makefile.inc:1.6 Wed Jul 15 14:27:49 2015 +++ src/lib/libc/arch/x86_64/Makefile.inc Mon Oct 12 17:55:53 2020 @@ -1,5 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.6 2015/07/15 14:27:49 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.7 2020/10/12 17:55:53 kamil Exp $ .if ${RUMPRUN} != "yes" SRCS+= __sigaction14_sigtramp.c __sigtramp2.S .endif + +CPPFLAGS+= -I. Index: src/lib/libc/arch/x86_64/sys/__sigtramp2.S diff -u src/lib/libc/arch/x86_64/sys/__sigtramp2.S:1.7 src/lib/libc/arch/x86_64/sys/__sigtramp2.S:1.8 --- src/lib/libc/arch/x86_64/sys/__sigtramp2.S:1.7 Mon Dec 2 01:38:54 2019 +++ src/lib/libc/arch/x86_64/sys/__sigtramp2.S Mon Oct 12 17:55:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: __sigtramp2.S,v 1.7 2019/12/02 01:38:54 christos Exp $ */ +/* $NetBSD: __sigtramp2.S,v 1.8 2020/10/12 17:55:54 kamil Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,14 +36,40 @@ */ #include "SYS.h" +#include "assym.h" /* * The x86-64 signal trampoline is invoked only to return from * the signal; the kernel calls the signal handler directly. + * + * The unwind entry includes the one byte prior to the trampoline + * because the unwinder will look up (return PC - 1) while unwinding. + * Normally (return PC - 1) computes an address inside the call + * instruction that created the child frame, but here there is no call + * instruction so we have to manually add padding. */ + .cfi_startproc simple + .cfi_signal_frame + .cfi_def_cfa r15, 0 + .cfi_offset rax, UC_GREGS_RAX + .cfi_offset rdx, UC_GREGS_RDX + .cfi_offset rcx, UC_GREGS_RCX + .cfi_offset rbx, UC_GREGS_RBX + .cfi_offset rsi, UC_GREGS_RSI + .cfi_offset rdi, UC_GREGS_RDI + .cfi_offset rbp, UC_GREGS_RBP + /* The unwinder will use the CFA to restore RSP. */ + .cfi_offset r8, UC_GREGS_R8 + .cfi_offset r9, UC_GREGS_R9 + .cfi_offset r10, UC_GREGS_R10 + .cfi_offset r11, UC_GREGS_R11 + .cfi_offset r12, UC_GREGS_R12 + .cfi_offset r13, UC_GREGS_R13 + .cfi_offset r14, UC_GREGS_R14 + .cfi_offset r15, UC_GREGS_R15 + .cfi_offset rip, UC_GREGS_RIP + nop NENTRY(__sigtramp_siginfo_2) - .cfi_startproc - .cfi_def_cfa rsp, 8 movq %r15,%rdi movq $SYS_setcontext, %rax syscall Added files: Index: src/lib/libc/arch/x86_64/genassym.cf diff -u /dev/null src/lib/libc/arch/x86_64/genassym.cf:1.1 --- /dev/null Mon Oct 12 17:55:54 2020 +++ src/lib/libc/arch/x86_64/genassym.cf Mon Oct 12 17:55:53 2020 @@ -0,0 +1,45 @@ +# +# Copyright (c) 2020 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +include + +define UC_GREGS_RAX offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RAX]) +define UC_GREGS_RDX offsetof(ucontext_t,
CVS commit: src/external/gpl3/gdb/dist/bfd
Module Name:src Committed By: kamil Date: Tue Oct 6 23:28:13 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/bfd: config.bfd Log Message: Replace local patches adding NetBSD/aarch64 support with the upstream one Cherry-pick: >From c0b313441717b65569edb01bf9984d2066d899de Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 5 Oct 2020 14:56:42 +0100 Subject: [PATCH] Add NetBSD AArch64 Little Endian and Big Endian BFD support. bfd * config.bfd (aarch64-*-netbsd*, aarch64_be-*-netbsd*): Add target. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gdb/dist/bfd/config.bfd 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/dist/bfd/config.bfd diff -u src/external/gpl3/gdb/dist/bfd/config.bfd:1.22 src/external/gpl3/gdb/dist/bfd/config.bfd:1.23 --- src/external/gpl3/gdb/dist/bfd/config.bfd:1.22 Tue Sep 15 02:05:16 2020 +++ src/external/gpl3/gdb/dist/bfd/config.bfd Tue Oct 6 23:28:13 2020 @@ -247,11 +247,6 @@ case "${targ}" in targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec" want64=true ;; - aarch64-*-netbsd*) -targ_defvec=aarch64_elf64_le_vec -targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec" -want64=true -;; aarch64-*-fuchsia*) targ_defvec=aarch64_elf64_le_vec targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec" @@ -262,22 +257,12 @@ case "${targ}" in targ_selvecs=aarch64_elf64_be_cloudabi_vec want64=true ;; - aarch64-*-linux*) -targ_defvec=aarch64_elf64_le_vec -targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec" -want64=true -;; - aarch64_be-*-linux*) -targ_defvec=aarch64_elf64_be_vec -targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec" -want64=true -;; - aarch64-*-netbsd*) + aarch64-*-linux* | aarch64-*-netbsd*) targ_defvec=aarch64_elf64_le_vec targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec" want64=true ;; - aarch64_be-*-netbsd*) + aarch64_be-*-linux* | aarch64_be-*-netbsd*) targ_defvec=aarch64_elf64_be_vec targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec" want64=true
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: kamil Date: Tue Oct 6 23:14:47 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/gdb: inf-ptrace.c nbsd-nat.c Log Message: Undo local patches They are no longer needed (and are wrong). To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gdb/dist/gdb/nbsd-nat.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/gdb/dist/gdb/inf-ptrace.c diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.21 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.22 --- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.21 Tue Sep 15 02:05:18 2020 +++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c Tue Oct 6 23:14:47 2020 @@ -263,12 +263,10 @@ get_ptrace_pid (ptid_t ptid) { pid_t pid; -#ifndef __NetBSD__ /* If we have an LWPID to work with, use it. Otherwise, we're dealing with a non-threaded program/target. */ pid = ptid.lwp (); if (pid == 0) -#endif pid = ptid.pid (); return pid; } @@ -293,7 +291,6 @@ inf_ptrace_target::resume (ptid_t ptid, else request = PT_CONTINUE; - int sig; if (step) { /* If this system does not support PT_STEP, a higher level @@ -302,23 +299,13 @@ inf_ptrace_target::resume (ptid_t ptid, all possible successor instructions), so we don't have to worry about that here. */ request = PT_STEP; -#if __NetBSD__ - /* - * On NetBSD the data field of PT_STEP contains the thread - * to be stepped; all other threads are continued if this value is > 0 - */ - sig = ptid.lwp (); -#else - sig = 0; -#endif -} else - sig = gdb_signal_to_host (signal); +} /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from where it was. If GDB wanted it to start some other way, we have already written a new program counter value to the child. */ errno = 0; - gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, sig); + gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, gdb_signal_to_host (signal)); if (errno != 0) perror_with_name (("ptrace")); } @@ -476,15 +463,6 @@ inf_ptrace_target::xfer_partial (enum ta /* If the PT_IO request is somehow not supported, fallback on using PT_WRITE_D/PT_READ_D. Otherwise we will return zero to indicate failure. */ - if (errno == EACCES) - { - fprintf_unfiltered (gdb_stderr, "Cannot %s process at %p (%s). " -"Is PaX MPROTECT active? See security(7), " -"sysctl(7), paxctl(8)\n", writebuf ? "write to" : -"read from", piod.piod_offs, -strerror(errno)); - return TARGET_XFER_E_IO; /* Some other error perhaps? */ - } if (errno != EINVAL) return TARGET_XFER_EOF; } Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.17 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.18 --- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.17 Sat Sep 19 21:45:45 2020 +++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c Tue Oct 6 23:14:47 2020 @@ -587,9 +587,6 @@ nbsd_nat_target::wait (ptid_t ptid, stru siginfo_t *si = _siginfo; int lwp = psi.psi_lwpid; - // XXX: should the kernel return this? - if (lwp == 0) -lwp = pid; int signo = si->si_signo; const int code = si->si_code;
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: kamil Date: Tue Oct 6 22:17:42 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/gdb: nbsd-tdep.c Log Message: Remove NFC local delta To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/nbsd-tdep.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/gdb/dist/gdb/nbsd-tdep.c diff -u src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.5 src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.6 --- src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.5 Tue Sep 15 02:05:18 2020 +++ src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c Tue Oct 6 22:17:42 2020 @@ -3,9 +3,9 @@ Copyright (C) 2002-2020 Free Software Foundation, Inc. Contributed by Wasabi Systems, Inc. - + This file is part of GDB. - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: kamil Date: Tue Oct 6 22:14:41 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/gdb: ppc-nbsd-tdep.c Log Message: Fix typo Remove delta with upstream. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.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/gdb/dist/gdb/ppc-nbsd-tdep.c diff -u src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.5 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.6 --- src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.5 Tue Sep 15 02:05:18 2020 +++ src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c Tue Oct 6 22:14:41 2020 @@ -199,7 +199,7 @@ _initialize_ppcnbsd_tdep () ppcnbsd_init_abi); /* Avoid initializing the register offsets again if they were - already initailized by ppcnbsd-nat.c. */ + already initialized by ppcnbsd-nat.c. */ if (ppcnbsd_reg_offsets.pc_offset == 0) { /* General-purpose registers. */
CVS commit: src/external/gpl3/gdb/dist/gdbsupport
Module Name:src Committed By: kamil Date: Tue Oct 6 22:04:09 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/gdbsupport: agent.cc Log Message: Replace local patch with fix from upstream Cherry-pick: >From e2a2a24a8e78427ff8667d625f5befbe88c328bb Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Wed, 23 Sep 2020 04:20:05 +0200 Subject: [PATCH] Preinitialize the sockaddr_un variable to zero Don't pass random sun_len for the BSD's, zero the whole structure as recommended for portability. Reported by Coverity. gdbsupport/ChangeLog: * agent.cc (gdb_connect_sync_socket): Preinitialize addr with zeros. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdbsupport/agent.cc 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/dist/gdbsupport/agent.cc diff -u src/external/gpl3/gdb/dist/gdbsupport/agent.cc:1.2 src/external/gpl3/gdb/dist/gdbsupport/agent.cc:1.3 --- src/external/gpl3/gdb/dist/gdbsupport/agent.cc:1.2 Sun Sep 20 21:18:45 2020 +++ src/external/gpl3/gdb/dist/gdbsupport/agent.cc Tue Oct 6 22:04:09 2020 @@ -138,7 +138,7 @@ static int gdb_connect_sync_socket (int pid) { #ifdef HAVE_SYS_UN_H - struct sockaddr_un addr; + struct sockaddr_un addr = {}; int res, fd; char path[UNIX_PATH_MAX]; @@ -153,7 +153,6 @@ gdb_connect_sync_socket (int pid) return -1; } - memset(, 0, sizeof(addr)); addr.sun_family = AF_UNIX; res = xsnprintf (addr.sun_path, UNIX_PATH_MAX, "%s", path);
CVS commit: src/external/gpl3/gdb/dist/gnulib/import/m4
Module Name:src Committed By: kamil Date: Tue Oct 6 21:54:01 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/gnulib/import/m4: mbrtowc.m4 Log Message: Undo local NFC patch To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/mbrtowc.m4 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/dist/gnulib/import/m4/mbrtowc.m4 diff -u src/external/gpl3/gdb/dist/gnulib/import/m4/mbrtowc.m4:1.3 src/external/gpl3/gdb/dist/gnulib/import/m4/mbrtowc.m4:1.4 --- src/external/gpl3/gdb/dist/gnulib/import/m4/mbrtowc.m4:1.3 Sun Sep 20 16:00:56 2020 +++ src/external/gpl3/gdb/dist/gnulib/import/m4/mbrtowc.m4 Tue Oct 6 21:54:01 2020 @@ -754,6 +754,7 @@ changequote(,)dnl case "$host_os" in # Guess no on AIX and glibc systems. aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; + # Guess yes on native Windows. mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; *)gl_cv_func_mbrtowc_empty_input="guessing yes" ;; esac
CVS commit: src/external/gpl3/gdb/dist/libiberty
Module Name:src Committed By: kamil Date: Tue Oct 6 21:49:22 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/libiberty: make-temp-file.c Log Message: Undo local patch having no impact /tmp is picked from P_tmpdir earlier. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gdb/dist/libiberty/make-temp-file.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/gdb/dist/libiberty/make-temp-file.c diff -u src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.6 src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.7 --- src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.6 Tue Sep 15 02:05:28 2020 +++ src/external/gpl3/gdb/dist/libiberty/make-temp-file.c Tue Oct 6 21:49:22 2020 @@ -129,10 +129,10 @@ choose_tmpdir (void) base = try_dir (P_tmpdir, base); #endif - /* Try /tmp, /var/tmp, then /usr/tmp. */ - base = try_dir (tmp, base); + /* Try /var/tmp, /usr/tmp, then /tmp. */ base = try_dir (vartmp, base); base = try_dir (usrtmp, base); + base = try_dir (tmp, base); /* If all else fails, use the current directory! */ if (base == 0)
CVS commit: src/external/gpl3/gdb/dist/bfd
Module Name:src Committed By: kamil Date: Tue Oct 6 21:39:53 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/bfd: netbsd-core.c Log Message: Undo local NFC patch To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/bfd/netbsd-core.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/gdb/dist/bfd/netbsd-core.c diff -u src/external/gpl3/gdb/dist/bfd/netbsd-core.c:1.8 src/external/gpl3/gdb/dist/bfd/netbsd-core.c:1.9 --- src/external/gpl3/gdb/dist/bfd/netbsd-core.c:1.8 Tue Sep 15 02:05:16 2020 +++ src/external/gpl3/gdb/dist/bfd/netbsd-core.c Tue Oct 6 21:39:53 2020 @@ -275,7 +275,7 @@ const bfd_target core_netbsd_vec = 0,/* Symbol prefix. */ ' ', /* ar_pad_char. */ 16,/* ar_max_namelen. */ -0,/* match priority. */ +0,/* Match priority. */ NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data. */ NO_GET, NO_GETS, NO_PUT, /* 32 bit data. */ NO_GET, NO_GETS, NO_PUT, /* 16 bit data. */
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Oct 2 14:36:54 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux_libcdep.cc Log Message: Do not assume that _lwp_getprivate() returns unbiased private pointer Cherry-pick and adapt: >From 2a9ce60de98e53198047daaeeec3cf09ece4e693 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Fri, 2 Oct 2020 16:13:09 +0200 Subject: [PATCH] [compiler-rt] [netbsd] Improve the portability of ThreadSelfTlsTcb Use __lwp_gettcb_fast() and __lwp_getprivate_fast(), as _lwp_getprivate() can be a biased pointer and invalid for use in this function on all CPUs. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.16 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.17 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.16 Thu Sep 10 12:53:05 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc Fri Oct 2 14:36:54 2020 @@ -25,6 +25,10 @@ #include "sanitizer_placement_new.h" #include "sanitizer_procmaps.h" +#if SANITIZER_NETBSD +#define _RTLD_SOURCE // for __lwp_gettcb_fast() / __lwp_getprivate_fast() +#endif + #include // for dlsym() #include #include @@ -418,7 +422,13 @@ uptr ThreadSelf() { #if SANITIZER_NETBSD static struct tls_tcb * ThreadSelfTlsTcb() { - return (struct tls_tcb *)_lwp_getprivate(); + struct tls_tcb *tcb = nullptr; +#ifdef __HAVE___LWP_GETTCB_FAST + tcb = (struct tls_tcb *)__lwp_gettcb_fast(); +#elif defined(__HAVE___LWP_GETPRIVATE_FAST) + tcb = (struct tls_tcb *)__lwp_getprivate_fast(); +#endif + return tcb; } uptr ThreadSelf() {
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Thu Oct 1 18:34:06 UTC 2020 Modified Files: src/doc: RESPONSIBLE Log Message: Reset the entries for drochner and dsl i386 and amd64 are now maintained by core. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/doc/RESPONSIBLE Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/RESPONSIBLE diff -u src/doc/RESPONSIBLE:1.125 src/doc/RESPONSIBLE:1.126 --- src/doc/RESPONSIBLE:1.125 Sat Apr 4 16:25:17 2020 +++ src/doc/RESPONSIBLE Thu Oct 1 18:34:06 2020 @@ -1,4 +1,4 @@ -# $NetBSD: RESPONSIBLE,v 1.125 2020/04/04 16:25:17 jdolecek Exp $ +# $NetBSD: RESPONSIBLE,v 1.126 2020/10/01 18:34:06 kamil Exp $ List of sections of the system, and who is responsible for them (or at least considered an expert on them). @@ -60,7 +60,7 @@ ppp(async) christos ppp(sync) martin? racoon manu routed christos -sh christos, dsl, kre +sh christos, kre sort jdolecek sysctl atatat* talk/talkd dholland @@ -263,7 +263,7 @@ Portmasters: [should be synced with src/distrib/notes/common/main] acorn32 reinoud -amd64 dsl +amd64 core algor core alpha matt amiga is @@ -272,7 +272,7 @@ arc soda atari jdc bebox core cats core -cesfic drochner +cesfic core cobalt core emips pooka evbarm core @@ -285,7 +285,7 @@ hpcarm core hpcmips core hpcsh uwe hppa skrll -i386 dsl +i386 core ibmnws matt iyonix gavan landisk uwe @@ -323,7 +323,7 @@ xen bouyer MD Misc: hpcboot uwe -i386 bootblocks dsl, drochner, fvdl*, christos +i386 bootblocks fvdl*, christos amiga pci rkujawa
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Thu Oct 1 18:23:29 UTC 2020 Removed Files: src/doc: TODO.sanitizers Log Message: Remove To generate a diff of this commit: cvs rdiff -u -r1.14 -r0 src/doc/TODO.sanitizers Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Thu Oct 1 18:21:11 UTC 2020 Removed Files: src/doc: TODO.ptrace Log Message: Drop TODO.ptrace The remaining issues are mostly tracked in the ATF ptrace tests and GDB or LLDB test-suite. To generate a diff of this commit: cvs rdiff -u -r1.32 -r0 src/doc/TODO.ptrace Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Thu Oct 1 18:19:20 UTC 2020 Modified Files: src/doc: TODO.sanitizers Log Message: Drop TODO.sanitizers The LLVM work is merged mostly to GCC. The remaining work is not worth tracking here and is restricted mostly to fixing bugs from various 'make check-*' targets in LLVM. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/doc/TODO.sanitizers Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.sanitizers diff -u src/doc/TODO.sanitizers:1.13 src/doc/TODO.sanitizers:1.14 --- src/doc/TODO.sanitizers:1.13 Thu Apr 2 11:18:23 2020 +++ src/doc/TODO.sanitizers Thu Oct 1 18:19:20 2020 @@ -15,9 +15,6 @@ Long term: * DFSan. - port HWASan -- aarch64 specific, needs hardware or emulator - pkgsrc integration with sanitizers and MKSANITIZER (PKGSANITIZER?) - - port what possible to !amd64 - - fixes with the signal code - - make compiler-rt buildable with GCC - merge of the libFuzzer integration with the basesystem - oom-killer ATF tests and fixes - utime(3) allow changing actime regardless of noatime mount property
CVS commit: src/external/gpl3/gdb/bin/gdbserver
Module Name:src Committed By: kamil Date: Thu Sep 24 03:06:01 UTC 2020 Modified Files: src/external/gpl3/gdb/bin/gdbserver: Makefile Log Message: Make gdbserver almost work The only missing thing is the lack of generated version.c. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/bin/gdbserver/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/bin/gdbserver/Makefile diff -u src/external/gpl3/gdb/bin/gdbserver/Makefile:1.1 src/external/gpl3/gdb/bin/gdbserver/Makefile:1.2 --- src/external/gpl3/gdb/bin/gdbserver/Makefile:1.1 Wed Sep 23 23:36:59 2020 +++ src/external/gpl3/gdb/bin/gdbserver/Makefile Thu Sep 24 03:06:01 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2020/09/23 23:36:59 christos Exp $ +# $NetBSD: Makefile,v 1.2 2020/09/24 03:06:01 kamil Exp $ NOCTF= NOMAN= @@ -7,7 +7,10 @@ NOMAN= PROG= gdbserver -SERVER_SRCS= server.cc +SERVER_SRCS+= ax.cc debug.cc dll.cc hostio.cc hostio-errno.cc inferiors.cc mem-break.cc notif.cc +SERVER_SRCS+= regcache.cc remote-utils.cc server.cc symbol.cc target.cc +SERVER_SRCS+= tdesc.cc tracepoint.cc utils.cc waitstatus.c # version.c + NETBSD_SRCS= netbsd-low.cc fork-child.cc fork-inferior.c netbsd-nat.c ARCH_SRCS= netbsd-${MACHINE}-low.cc ${MACHINE}.c SRCS= ${SERVER_SRCS} ${NETBSD_SRCS} ${ARCH_SRCS} @@ -30,25 +33,20 @@ CPPFLAGS+= -I${.CURDIR} \ .include "../../Makefile.inc" .include -LIBGDB!= cd ${.CURDIR}/../../lib/libgdb && ${PRINTOBJDIR} LIBBFD!= cd ${.CURDIR}/../../lib/libbfd && ${PRINTOBJDIR} LIBGNULIBDIR!= cd ${.CURDIR}/../../lib/libgnulib && ${PRINTOBJDIR} LIBGDBSUPPORTDIR!= cd ${.CURDIR}/../../lib/libgdbsupport && ${PRINTOBJDIR} LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR} -LDADD+= -L${LIBGDB} -lgdb \ - -L${LIBGDBSUPPORTDIR} -lgdbsupport \ +LDADD+= -L${LIBGDBSUPPORTDIR} -lgdbsupport \ -L${LIBGNULIBDIR} -lgnulib \ - -L${LIBBFD} -lbfd \ -L${LIBIBERTYDIR} -liberty \ - -lintl -lz + -lintl -DPADD+= ${LIBGDB}/libgdb.a \ - ${LIBGDBSUPPORTDIR}/libgdbsupport.a \ +DPADD+= ${LIBGDBSUPPORTDIR}/libgdbsupport.a \ ${LIBGNULIBDIR}/libgnulib.a \ - ${LIBBFD}/libbfd.a \ ${LIBIBERTYDIR}/libiberty.a \ - ${LIBINTL} ${LIBZ} + ${LIBINTL} .include @@ -58,4 +56,5 @@ HOST_CC:= ${HOST_CXX} CC:= ${CXX} CFLAGS:= ${CXXFLAGS} -std=gnu++11 -Wno-error=stack-protector -pthread -.PATH: ${DIST}/gdbserver ${DIST}/gdb/nat ${DIST}/gdb/arch +.PATH: ${DIST}/gdbserver ${DIST}/gdb/nat ${DIST}/gdb/arch ${DIST}/gdb/target \ + ${DIST}/../lib/libgdbsupport/arch/${GDB_MACHINE_ARCH}
CVS commit: src/share/mk
Module Name:src Committed By: kamil Date: Wed Sep 23 23:39:18 UTC 2020 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch GDB on i386 to 1100 Confirmed to build and work. To generate a diff of this commit: cvs rdiff -u -r1.1220 -r1.1221 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1220 src/share/mk/bsd.own.mk:1.1221 --- src/share/mk/bsd.own.mk:1.1220 Sun Sep 20 14:42:29 2020 +++ src/share/mk/bsd.own.mk Wed Sep 23 23:39:18 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1220 2020/09/20 14:42:29 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1221 2020/09/23 23:39:18 kamil Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -106,7 +106,7 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # # What GDB is used? # -.if ${MACHINE_ARCH} == "x86_64" +.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" HAVE_GDB?= 1100 .else HAVE_GDB?= 830
CVS commit: src/include
Module Name:src Committed By: kamil Date: Tue Sep 22 01:52:16 UTC 2020 Modified Files: src/include: link_elf.h Log Message: Remove duplicate word in a comment To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/include/link_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/link_elf.h diff -u src/include/link_elf.h:1.12 src/include/link_elf.h:1.13 --- src/include/link_elf.h:1.12 Mon Sep 21 16:08:57 2020 +++ src/include/link_elf.h Tue Sep 22 01:52:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: link_elf.h,v 1.12 2020/09/21 16:08:57 kamil Exp $ */ +/* $NetBSD: link_elf.h,v 1.13 2020/09/22 01:52:16 kamil Exp $ */ #ifndef _LINK_ELF_H_ #define _LINK_ELF_H_ @@ -15,7 +15,7 @@ typedef struct link_map { #endif const char *l_name; /* Absolute Path to Library */ void *l_ld; /* Pointer to .dynamic in memory */ - struct link_map *l_next; /* linked list of of mapped libs */ + struct link_map *l_next; /* linked list of mapped libs */ struct link_map *l_prev; } Link_map;
CVS commit: src
Module Name:src Committed By: kamil Date: Tue Sep 22 01:09:33 UTC 2020 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/tests/libexec/ld.elf_so: Makefile Added Files: src/tests/libexec/ld.elf_so: t_rtld_r_debug.c Log Message: Add new RTLD test file for r_debug New tests: - self - dlopen Both check whether the r_debug structure seems to be well-formed, without and with a dlopen(3) call. To generate a diff of this commit: cvs rdiff -u -r1.337 -r1.338 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.924 -r1.925 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.10 -r1.11 src/tests/libexec/ld.elf_so/Makefile cvs rdiff -u -r0 -r1.1 src/tests/libexec/ld.elf_so/t_rtld_r_debug.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.337 src/distrib/sets/lists/debug/mi:1.338 --- src/distrib/sets/lists/debug/mi:1.337 Tue Sep 15 07:00:04 2020 +++ src/distrib/sets/lists/debug/mi Tue Sep 22 01:09:32 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.337 2020/09/15 07:00:04 mrg Exp $ +# $NetBSD: mi,v 1.338 2020/09/22 01:09:32 kamil Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -2359,6 +2359,7 @@ ./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlerror-false.debug tests-libexec-debug debug,atf,pic,compattestfile ./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlinfo.debug tests-libexec-debug debug,atf,pic,compattestfile ./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlvsym.debug tests-libexec-debug debug,atf,pic,compattestfile +./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_rtld_r_debug.debug tests-libexec-debug debug,atf,pic,compattestfile ./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_ifunc.debug tests-libexec-debug debug,atf,pic,compattestfile ./usr/libdata/debug/usr/tests/modules/k_helper3.debug tests-sys-debug debug,atf,rump ./usr/libdata/debug/usr/tests/modules/t_builtin.debug tests-sys-debug debug,atf,rump Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.924 src/distrib/sets/lists/tests/mi:1.925 --- src/distrib/sets/lists/tests/mi:1.924 Mon Sep 14 06:44:50 2020 +++ src/distrib/sets/lists/tests/mi Tue Sep 22 01:09:33 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.924 2020/09/14 06:44:50 rillig Exp $ +# $NetBSD: mi,v 1.925 2020/09/22 01:09:33 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3768,6 +3768,7 @@ ./usr/tests/libexec/ld.elf_so/t_dlinfo tests-libexec-tests compattestfile,atf,pic ./usr/tests/libexec/ld.elf_so/t_dlvsym tests-libexec-tests compattestfile,atf,pic ./usr/tests/libexec/ld.elf_so/t_ifunc tests-libexec-tests compattestfile,atf,pic +./usr/tests/libexec/ld.elf_so/t_rtld_r_debug tests-libexec-tests compattestfile,atf,pic ./usr/tests/libexec/ld.elf_so/t_thread_local_dtor tests-libexec-tests compattestfile,atf,pic ./usr/tests/modules tests-sys-tests compattestfile,atf ./usr/tests/net tests-net-tests compattestfile,atf Index: src/tests/libexec/ld.elf_so/Makefile diff -u src/tests/libexec/ld.elf_so/Makefile:1.10 src/tests/libexec/ld.elf_so/Makefile:1.11 --- src/tests/libexec/ld.elf_so/Makefile:1.10 Tue May 14 19:07:07 2019 +++ src/tests/libexec/ld.elf_so/Makefile Tue Sep 22 01:09:32 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/05/14 19:07:07 christos Exp $ +# $NetBSD: Makefile,v 1.11 2020/09/22 01:09:32 kamil Exp $ # NOMAN= # defined @@ -17,6 +17,9 @@ SUBDIR+= helper_dso1 helper_dso3 .WAIT h TESTSDIR= ${TESTSBASE}/libexec/ld.elf_so TESTS_C+= t_dlerror-cleared t_dlerror-false t_dlinfo t_dlvsym t_ifunc +TESTS_C+= t_rtld_r_debug + +COPTS.t_rtld_r_debug.c += ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :} LDADD.t_dlerror-false= -Wl,-rpath,/var/nonexistent/lib LDADD.t_dlvsym= -Wl,-rpath,${TESTSDIR}/h_helper_symver_dso2 Added files: Index: src/tests/libexec/ld.elf_so/t_rtld_r_debug.c diff -u /dev/null src/tests/libexec/ld.elf_so/t_rtld_r_debug.c:1.1 --- /dev/null Tue Sep 22 01:09:33 2020 +++ src/tests/libexec/ld.elf_so/t_rtld_r_debug.c Tue Sep 22 01:09:32 2020 @@ -0,0 +1,164 @@ +/* $NetBSD: t_rtld_r_debug.c,v 1.1 2020/09/22 01:09:32 kamil Exp $ */ + +/* + * Copyright (c) 2020 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: kamil Date: Tue Sep 22 00:41:28 UTC 2020 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: Correct r_ldbase valuse It shall be the relocbase value, not linkmap. To generate a diff of this commit: cvs rdiff -u -r1.206 -r1.207 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.206 src/libexec/ld.elf_so/rtld.c:1.207 --- src/libexec/ld.elf_so/rtld.c:1.206 Mon Sep 21 16:08:57 2020 +++ src/libexec/ld.elf_so/rtld.c Tue Sep 22 00:41:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.206 2020/09/21 16:08:57 kamil Exp $ */ +/* $NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.206 2020/09/21 16:08:57 kamil Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $"); #endif /* not lint */ #include @@ -397,7 +397,7 @@ _rtld_init(caddr_t mapbase, caddr_t relo _rtld_debug.r_version = R_DEBUG_VERSION; _rtld_debug.r_brk = _rtld_debug_state; _rtld_debug.r_state = RT_CONSISTENT; - _rtld_debug.r_ldbase = &_rtld_objself.linkmap; + _rtld_debug.r_ldbase = _rtld_objself.relocbase; ehdr = (Elf_Ehdr *)mapbase; _rtld_objself.phdr = (Elf_Phdr *)((char *)mapbase + ehdr->e_phoff);
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Mon Sep 21 16:12:16 UTC 2020 Modified Files: src/doc: CHANGES Log Message: ld.so(1): Upgrade r_debug to the protocol version 1. To generate a diff of this commit: cvs rdiff -u -r1.2740 -r1.2741 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2740 src/doc/CHANGES:1.2741 --- src/doc/CHANGES:1.2740 Sat Sep 19 03:33:15 2020 +++ src/doc/CHANGES Mon Sep 21 16:12:16 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2740 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2741 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -287,3 +287,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: enabled. Improved performance of TLB operations in pmap module. Implemented fast-soft-interrupts. Enabled MULTIPROCESSOR in GENERIC. [thorpej 20200918] + ld.so(1): Upgrade r_debug to the protocol version 1. [kamil 20200921]
CVS commit: src
Module Name:src Committed By: kamil Date: Mon Sep 21 16:08:57 UTC 2020 Modified Files: src/include: link_elf.h src/libexec/ld.elf_so: load.c rtld.c rtld.h Log Message: Upgrade the SVR4 RTLD r_debug protocol to version 1 Changes: - Add a new field r_ldbase in the r_debug struct. - Set r_version to 1. This harmonizes the support with OpenBSD and Linux. FreeBSD uses version 0 (or no version). Solaris uses version 2 that is not implemented elsewhere and relies on SVR4 specific design and interfaces. Update the code comments as r_debug and link_map is used by other software than GDB, namely: sanitizers, rump, LLDB. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/include/link_elf.h cvs rdiff -u -r1.48 -r1.49 src/libexec/ld.elf_so/load.c cvs rdiff -u -r1.205 -r1.206 src/libexec/ld.elf_so/rtld.c cvs rdiff -u -r1.140 -r1.141 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/link_elf.h diff -u src/include/link_elf.h:1.11 src/include/link_elf.h:1.12 --- src/include/link_elf.h:1.11 Mon Sep 21 02:20:27 2020 +++ src/include/link_elf.h Mon Sep 21 16:08:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: link_elf.h,v 1.11 2020/09/21 02:20:27 kamil Exp $ */ +/* $NetBSD: link_elf.h,v 1.12 2020/09/21 16:08:57 kamil Exp $ */ #ifndef _LINK_ELF_H_ #define _LINK_ELF_H_ @@ -6,6 +6,8 @@ #include #include +#define R_DEBUG_VERSION 1 /* SVR4 Protocol version */ + typedef struct link_map { caddr_t l_addr; /* Base Address of library */ #ifdef __mips__ @@ -43,6 +45,7 @@ struct r_debug { RT_ADD, /* adding a shared library */ RT_DELETE /* removing a shared library */ } r_state; + void *r_ldbase; /* base address of RTLD */ }; struct dl_phdr_info Index: src/libexec/ld.elf_so/load.c diff -u src/libexec/ld.elf_so/load.c:1.48 src/libexec/ld.elf_so/load.c:1.49 --- src/libexec/ld.elf_so/load.c:1.48 Tue Jan 10 21:08:48 2017 +++ src/libexec/ld.elf_so/load.c Mon Sep 21 16:08:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: load.c,v 1.48 2017/01/10 21:08:48 christos Exp $ */ +/* $NetBSD: load.c,v 1.49 2020/09/21 16:08:57 kamil Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: load.c,v 1.48 2017/01/10 21:08:48 christos Exp $"); +__RCSID("$NetBSD: load.c,v 1.49 2020/09/21 16:08:57 kamil Exp $"); #endif /* not lint */ #include @@ -180,7 +180,7 @@ _rtld_load_object(const char *filepath, _rtld_objcount++; _rtld_objloads++; #ifdef RTLD_LOADER - _rtld_linkmap_add(obj); /* for GDB */ + _rtld_linkmap_add(obj); /* for the debugger */ #endif dbg((" %p .. %p: %s", obj->mapbase, obj->mapbase + obj->mapsize - 1, obj->path)); Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.205 src/libexec/ld.elf_so/rtld.c:1.206 --- src/libexec/ld.elf_so/rtld.c:1.205 Sun Apr 19 01:06:15 2020 +++ src/libexec/ld.elf_so/rtld.c Mon Sep 21 16:08:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.205 2020/04/19 01:06:15 joerg Exp $ */ +/* $NetBSD: rtld.c,v 1.206 2020/09/21 16:08:57 kamil Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.205 2020/04/19 01:06:15 joerg Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.206 2020/09/21 16:08:57 kamil Exp $"); #endif /* not lint */ #include @@ -81,7 +81,7 @@ Elf_Addr_rtld(Elf_Addr *, Elf_Ad */ static char*error_message; /* Message for dlopen(), or NULL */ -struct r_debug _rtld_debug; /* for GDB; */ +struct r_debug _rtld_debug; /* The SVR4 interface for the debugger */ bool_rtld_trust; /* False for setuid and setgid programs */ Obj_Entry *_rtld_objlist; /* Head of linked list of shared objects */ Obj_Entry **_rtld_objtail; /* Link field of last object in list */ @@ -394,8 +394,10 @@ _rtld_init(caddr_t mapbase, caddr_t relo _rtld_objtail = &_rtld_objlist; _rtld_objcount = 0; + _rtld_debug.r_version = R_DEBUG_VERSION; _rtld_debug.r_brk = _rtld_debug_state; _rtld_debug.r_state = RT_CONSISTENT; + _rtld_debug.r_ldbase = &_rtld_objself.linkmap; ehdr = (Elf_Ehdr *)mapbase; _rtld_objself.phdr = (Elf_Phdr *)((char *)mapbase + ehdr->e_phoff); @@ -676,8 +678,8 @@ _rtld(Elf_Addr *sp, Elf_Addr relocbase) /* * Get the actual dynamic linker pathname from the executable if * possible. (It should always be possible.) That ensures that - * gdb will find the right dynamic linker even if a non-standard - * one is being used. + * the debugger will find the right dynamic linker even if a + * non-standard one is being used. */ if (_rtld_objmain->interp != NULL && strcmp(_rtld_objmain->interp, _rtld_objself.path) != 0) { @@ -774,7 +776,7 @@ _rtld(Elf_Addr *sp, Elf_Addr relocbase) if (real___mainprog_obj) *real___mainprog_obj = _rtld_objmain; - _rtld_debug_state(); /* say hello to gdb! */ +
CVS commit: src/include
Module Name:src Committed By: kamil Date: Mon Sep 21 02:20:27 UTC 2020 Modified Files: src/include: link_elf.h Log Message: Refine the documentation of r_debug Obtained from OpenBSD link.h r.1.15. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/include/link_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/link_elf.h diff -u src/include/link_elf.h:1.10 src/include/link_elf.h:1.11 --- src/include/link_elf.h:1.10 Sat Oct 16 10:27:06 2010 +++ src/include/link_elf.h Mon Sep 21 02:20:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: link_elf.h,v 1.10 2010/10/16 10:27:06 skrll Exp $ */ +/* $NetBSD: link_elf.h,v 1.11 2020/09/21 02:20:27 kamil Exp $ */ #ifndef _LINK_ELF_H_ #define _LINK_ELF_H_ @@ -18,13 +18,27 @@ typedef struct link_map { } Link_map; /* - * This only exists for GDB. + * Debug rendezvous struct. Pointer to this is set up in the + * target code pointed by the DT_DEBUG tag. If it is + * defined. */ struct r_debug { - int r_version; /* not used */ + int r_version; /* protocol version */ struct link_map *r_map; /* list of loaded images */ + + /* + * This is the address of a function internal to the run-time linker, + * that will always be called when the linker begins to map in a + * library or unmap it, and again when the mapping change is complete. + * The debugger can set a breakpoint at this address if it wants to + * notice shared object mapping changes. + */ void (*r_brk)(void); /* pointer to break point */ enum { + /* + * This state value describes the mapping change taking place + * when the `r_brk' address is called. + */ RT_CONSISTENT, /* things are stable */ RT_ADD, /* adding a shared library */ RT_DELETE /* removing a shared library */
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Thu Sep 17 15:43:24 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_stoptheworld_netbsd_libcdep.cc Log Message: Use internal_ptrace() instead of ptrace() Cherry-pick: commit 0008fb343704bafc3469703be930b8a65d7c47fa Author: Kamil Rytarowski Date: Mon Sep 14 10:10:49 2020 +0200 [compiler-rt] [netbsd] Use internal_ptrace() instead of ptrace() To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.5 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.4 Thu Sep 17 15:42:17 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc Thu Sep 17 15:43:24 2020 @@ -131,7 +131,7 @@ bool ThreadSuspender::SuspendAllThreads( pl.pl_lwpid = 0; int val; - while ((val = ptrace(op, pid_, (void *), sizeof(pl))) != -1 && + while ((val = internal_ptrace(op, pid_, (void *), sizeof(pl))) != -1 && pl.pl_lwpid != 0) { suspended_threads_list_.Append(pl.pl_lwpid); VReport(2, "Appended thread %d in process %d.\n", pl.pl_lwpid, pid_);
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Thu Sep 17 15:42:17 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_stoptheworld_netbsd_libcdep.cc Log Message: Undo setting _KERNTYPES The sparc ptrace(2) headers were fixed to work without defined _KERNTYPES. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.3 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.4 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.3 Sun Sep 13 08:51:58 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc Thu Sep 17 15:42:17 2020 @@ -18,7 +18,6 @@ #if SANITIZER_NETBSD -#define _KERNTYPES /* we want register_t for some ptrace functions */ #include "sanitizer_stoptheworld.h" #include "sanitizer_atomic.h"
CVS commit: src/tests/usr.bin
Module Name:src Committed By: kamil Date: Mon Sep 14 15:17:53 UTC 2020 Modified Files: src/tests/usr.bin/c++: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh t_tsan_thread_leak.sh t_tsan_vptr_race.sh src/tests/usr.bin/cc: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh t_tsan_thread_leak.sh Log Message: Enable TSan tests for GCC and >32bit address space environments To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/c++/t_tsan_data_race.sh \ src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh \ src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh \ src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh \ src/tests/usr.bin/c++/t_tsan_signal_errno.sh \ src/tests/usr.bin/c++/t_tsan_thread_leak.sh \ src/tests/usr.bin/c++/t_tsan_vptr_race.sh cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/cc/t_tsan_data_race.sh \ src/tests/usr.bin/cc/t_tsan_heap_use_after_free.sh \ src/tests/usr.bin/cc/t_tsan_lock_order_inversion.sh \ src/tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh \ src/tests/usr.bin/cc/t_tsan_signal_errno.sh \ src/tests/usr.bin/cc/t_tsan_thread_leak.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/c++/t_tsan_data_race.sh diff -u src/tests/usr.bin/c++/t_tsan_data_race.sh:1.2 src/tests/usr.bin/c++/t_tsan_data_race.sh:1.3 --- src/tests/usr.bin/c++/t_tsan_data_race.sh:1.2 Fri Aug 23 06:39:54 2019 +++ src/tests/usr.bin/c++/t_tsan_data_race.sh Mon Sep 14 15:17:53 2020 @@ -29,12 +29,16 @@ test_target() { SUPPORT='n' - if uname -m | grep -q "amd64" && command -v c++ >/dev/null 2>&1 && \ - ! echo __clang__ | c++ -E - | grep -q __clang__; then - # only clang with major version newer than 7 is supported - CLANG_MAJOR=`echo __clang_major__ | c++ -E - | grep -o '^[[:digit:]]'` - if [ "$CLANG_MAJOR" -ge "7" ]; then - SUPPORT='y' + # Detect address space larger than 32 bits + maxaddress=`sysctl vm.maxaddress|awk '{print $3}'` + if [ $maxaddress -gt 4294967295 ]; then + if command -v cc >/dev/null 2>&1; then + if ! echo __clang__ | cc -E - | grep -q __clang__; then +SUPPORT='y' + elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \ +awk -F '.' '($0+0) > 9 {exit 1}'; then +SUPPORT='y' + fi fi fi } Index: src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh diff -u src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.2 src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.3 --- src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.2 Fri Aug 23 06:39:54 2019 +++ src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh Mon Sep 14 15:17:53 2020 @@ -29,12 +29,16 @@ test_target() { SUPPORT='n' - if uname -m | grep -q "amd64" && command -v c++ >/dev/null 2>&1 && \ - ! echo __clang__ | c++ -E - | grep -q __clang__; then - # only clang with major version newer than 7 is supported - CLANG_MAJOR=`echo __clang_major__ | c++ -E - | grep -o '^[[:digit:]]'` - if [ "$CLANG_MAJOR" -ge "7" ]; then - SUPPORT='y' + # Detect address space larger than 32 bits + maxaddress=`sysctl vm.maxaddress|awk '{print $3}'` + if [ $maxaddress -gt 4294967295 ]; then + if command -v cc >/dev/null 2>&1; then + if ! echo __clang__ | cc -E - | grep -q __clang__; then +SUPPORT='y' + elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \ +awk -F '.' '($0+0) > 9 {exit 1}'; then +SUPPORT='y' + fi fi fi } Index: src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh diff -u src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.2 src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.3 --- src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.2 Fri Aug 23 06:39:54 2019 +++ src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh Mon Sep 14 15:17:53 2020 @@ -29,12 +29,16 @@ test_target() { SUPPORT='n' - if uname -m | grep -q "amd64" && command -v c++ >/dev/null 2>&1 && \ - ! echo __clang__ | c++ -E - | grep -q __clang__; then - # only clang with major version newer than 7 is supported - CLANG_MAJOR=`echo __clang_major__ | c++ -E - | grep -o '^[[:digit:]]'` - if [ "$CLANG_MAJOR" -ge "7" ]; then - SUPPORT='y' + # Detect address space larger than 32 bits + maxaddress=`sysctl vm.maxaddress|awk '{print $3}'` + if [ $maxaddress -gt 4294967295 ]; then + if command -v cc >/dev/null 2>&1; then + if ! echo __clang__ | cc -E - | grep -q __clang__; then +SUPPORT='y' + elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \ +awk -F '.' '($0+0) > 9 {exit 1}'; then +SUPPORT='y' + fi fi fi } Index: src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh diff -u src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh:1.2
CVS commit: src/external/gpl3/gcc/lib
Module Name:src Committed By: kamil Date: Mon Sep 14 15:01:58 UTC 2020 Modified Files: src/external/gpl3/gcc/lib/libasan: Makefile src/external/gpl3/gcc/lib/liblsan: Makefile src/external/gpl3/gcc/lib/libtsan: Makefile src/external/gpl3/gcc/lib/libubsan: Makefile Log Message: Consistently, always link sanitizer runtime with libm and libpthread This reflects the behavior from LLVM and avoids issues with dlsym(3) APIs. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/lib/libasan/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/liblsan/Makefile cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/libtsan/Makefile cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gcc/lib/libubsan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libasan/Makefile diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.32 src/external/gpl3/gcc/lib/libasan/Makefile:1.33 --- src/external/gpl3/gcc/lib/libasan/Makefile:1.32 Mon Sep 7 09:09:40 2020 +++ src/external/gpl3/gcc/lib/libasan/Makefile Mon Sep 14 15:01:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2020/09/07 09:09:40 mrg Exp $ +# $NetBSD: Makefile,v 1.33 2020/09/14 15:01:57 kamil Exp $ UNSUPPORTED_COMPILER.clang= # defined NOSANITIZER= # defined @@ -46,6 +46,7 @@ LIB= asan SRCS+= ${ASAN_SRCS} lsan_common.cc lsan_common_linux.cc LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm +LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread CPPFLAGS+=-DCAN_SANITIZE_UB=0 .if ${MACHINE_ARCH} == "vax" Index: src/external/gpl3/gcc/lib/liblsan/Makefile diff -u src/external/gpl3/gcc/lib/liblsan/Makefile:1.7 src/external/gpl3/gcc/lib/liblsan/Makefile:1.8 --- src/external/gpl3/gcc/lib/liblsan/Makefile:1.7 Fri May 15 14:29:53 2020 +++ src/external/gpl3/gcc/lib/liblsan/Makefile Mon Sep 14 15:01:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2020/05/15 14:29:53 joerg Exp $ +# $NetBSD: Makefile,v 1.8 2020/09/14 15:01:57 kamil Exp $ .include @@ -23,7 +23,9 @@ COPTS.sanitizer_file.cc += -O1 LIB= lsan SRCS+= ${LSAN_SRCS} +LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt +LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread CWARNFLAGS.clang+= -Wno-error=unused-private-field Index: src/external/gpl3/gcc/lib/libtsan/Makefile diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.14 src/external/gpl3/gcc/lib/libtsan/Makefile:1.15 --- src/external/gpl3/gcc/lib/libtsan/Makefile:1.14 Mon Sep 14 14:33:01 2020 +++ src/external/gpl3/gcc/lib/libtsan/Makefile Mon Sep 14 15:01:58 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2020/09/14 14:33:01 kamil Exp $ +# $NetBSD: Makefile,v 1.15 2020/09/14 15:01:58 kamil Exp $ UNSUPPORTED_COMPILER.clang= # defined NOSANITIZER=# defined @@ -64,6 +64,7 @@ LIB= tsan SRCS+= ${TSAN_SRCS} LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm +LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread CPPFLAGS+=-DCAN_SANITIZE_UB=0 COPTS.tsan_interceptors.cc += -Wno-unused-function Index: src/external/gpl3/gcc/lib/libubsan/Makefile diff -u src/external/gpl3/gcc/lib/libubsan/Makefile:1.17 src/external/gpl3/gcc/lib/libubsan/Makefile:1.18 --- src/external/gpl3/gcc/lib/libubsan/Makefile:1.17 Sat Sep 5 09:50:15 2020 +++ src/external/gpl3/gcc/lib/libubsan/Makefile Mon Sep 14 15:01:58 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2020/09/05 09:50:15 mrg Exp $ +# $NetBSD: Makefile,v 1.18 2020/09/14 15:01:58 kamil Exp $ UNSUPPORTED_COMPILER.clang= # defined LIBISCXX = yes @@ -32,7 +32,9 @@ COPTS.sanitizer_file.cc += -O1 LIB= ubsan SRCS+= ${UBSAN_SRCS} +LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt +LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread CPPFLAGS+=-DCAN_SANITIZE_UB=1 .include
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/tsan
Module Name:src Committed By: kamil Date: Mon Sep 14 14:56:43 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_rtl_amd64.S Log Message: Undo local patch adding GNU-stack This is unneeded on NetBSD. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S:1.8 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S:1.9 --- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S:1.8 Sat Sep 5 09:12:32 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S Mon Sep 14 14:56:43 2020 @@ -397,7 +397,7 @@ ASM_SYMBOL_INTERCEPTOR(__sigsetjmp): ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(__sigsetjmp)) #endif // !defined(__APPLE__) && !defined(__NetBSD__) -#if defined(__FreeBSD__) || defined(__linux__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__linux__) /* We do not need executable stack. */ /* This note is not needed on NetBSD. */ .section.note.GNU-stack,"",@progbits
CVS commit: src/external/gpl3/gcc/lib/libtsan
Module Name:src Committed By: kamil Date: Mon Sep 14 14:33:01 UTC 2020 Modified Files: src/external/gpl3/gcc/lib/libtsan: Makefile Removed Files: src/external/gpl3/gcc/lib/libtsan: tsan_rtl_unimpl.cc Log Message: Avoid using dummy tsan_rtl_unimpl.cc Instead of providing broken support, error during build to catch the problem quickly. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/lib/libtsan/Makefile cvs rdiff -u -r1.1 -r0 src/external/gpl3/gcc/lib/libtsan/tsan_rtl_unimpl.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libtsan/Makefile diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.13 src/external/gpl3/gcc/lib/libtsan/Makefile:1.14 --- src/external/gpl3/gcc/lib/libtsan/Makefile:1.13 Sun Sep 13 02:37:32 2020 +++ src/external/gpl3/gcc/lib/libtsan/Makefile Mon Sep 14 14:33:01 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2020/09/13 02:37:32 kamil Exp $ +# $NetBSD: Makefile,v 1.14 2020/09/14 14:33:01 kamil Exp $ UNSUPPORTED_COMPILER.clang= # defined NOSANITIZER=# defined @@ -48,11 +48,16 @@ TSAN_SRCS= \ tsan_symbolize.cc \ tsan_sync.cc -# XXX ${MACHINE} won't match mips64 or ppc64 -.if exists(${SANITIZER}/tsan/tsan_rtl_${MACHINE}.S) -TSAN_SRCS+= tsan_rtl_${MACHINE}.S +.if ${MACHINE_ARCH} == "x86_64" +TSAN_SRCS+= tsan_rtl_amd64.S +.elif ${MACHINE_ARCH} == "aarch64" +TSAN_SRCS+= tsan_rtl_aarch64.S +.elif ${MACHINE_ARCH} == "mips64el" +TSAN_SRCS+= tsan_rtl_mips64.S +.elif ${MACHINE_ARCH} == "powerpc64" +TSAN_SRCS+= tsan_rtl_ppc64.S .else -TSAN_SRCS+= tsan_rtl_unimpl.cc +.error Unsupported .endif LIB= tsan
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/tsan
Module Name:src Committed By: kamil Date: Mon Sep 14 11:56:01 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc Log Message: Catch unsupported LONG_JMP_SP_ENV_SLOT A variation of this patch is pending upstream: https://reviews.llvm.org/D87602 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.11 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.12 --- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.11 Sat Sep 12 22:23:57 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc Mon Sep 14 11:56:01 2020 @@ -497,12 +497,16 @@ static void SetJmp(ThreadState *thr, upt } static void LongJmp(ThreadState *thr, uptr *env) { -#ifdef __powerpc__ +#if SANITIZER_NETBSD +# ifdef __x86_64__ + uptr mangled_sp = env[6]; +# else +# error Unsupported +# endif +#elif defined(__powerpc__) uptr mangled_sp = env[0]; #elif SANITIZER_FREEBSD uptr mangled_sp = env[2]; -#elif SANITIZER_NETBSD - uptr mangled_sp = env[6]; #elif SANITIZER_MAC # ifdef __aarch64__ uptr mangled_sp =
CVS commit: src/sys/arch/sparc/include
Module Name:src Committed By: kamil Date: Mon Sep 14 09:47:43 UTC 2020 Modified Files: src/sys/arch/sparc/include: ptrace.h Log Message: Switch from register_t to unsigned long int Removes dependency on _KERNTYPES. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc/include/ptrace.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/sparc/include/ptrace.h diff -u src/sys/arch/sparc/include/ptrace.h:1.15 src/sys/arch/sparc/include/ptrace.h:1.16 --- src/sys/arch/sparc/include/ptrace.h:1.15 Tue Dec 24 14:50:59 2019 +++ src/sys/arch/sparc/include/ptrace.h Mon Sep 14 09:47:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.15 2019/12/24 14:50:59 kamil Exp $ */ +/* $NetBSD: ptrace.h,v 1.16 2020/09/14 09:47:43 kamil Exp $ */ /* * Copyright (c) 1992, 1993 @@ -55,14 +55,14 @@ "PT_SETFPREGS", #include -#define PTRACE_REG_PC(r) ((register_t)(r)->r_pc) +#define PTRACE_REG_PC(r) ((unsigned long int)(r)->r_pc) #define PTRACE_REG_FP(r) 0 /* not stored in struct reg */ #define PTRACE_REG_SET_PC(r, v) do { \ (r)->r_pc = (v); \ (r)->r_npc = (v) + 4; \ } while (/*CONSTCOND*/0) -#define PTRACE_REG_SP(r) ((register_t)(r)->r_out[6]) -#define PTRACE_REG_INTRV(r) ((register_t)(r)->r_out[0]) +#define PTRACE_REG_SP(r) ((unsigned long int)(r)->r_out[6]) +#define PTRACE_REG_INTRV(r) ((unsigned long int)(r)->r_out[0]) #define PTRACE_ILLEGAL_ASM __asm __volatile (".word 0" : : : "memory")
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: kamil Date: Sun Sep 13 03:43:16 UTC 2020 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi shl.mi src/distrib/sets/lists/debug: mi Log Message: Currently restrict GCC TSan files to gcc=9 To generate a diff of this commit: cvs rdiff -u -r1.902 -r1.903 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2352 -r1.2353 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.340 -r1.341 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.334 -r1.335 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.902 src/distrib/sets/lists/base/shl.mi:1.903 --- src/distrib/sets/lists/base/shl.mi:1.902 Sun Sep 13 02:37:31 2020 +++ src/distrib/sets/lists/base/shl.mi Sun Sep 13 03:43:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.902 2020/09/13 02:37:31 kamil Exp $ +# $NetBSD: shl.mi,v 1.903 2020/09/13 03:43:16 kamil Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -896,7 +896,7 @@ ./usr/lib/libtre.sobase-sys-shlib compatfile ./usr/lib/libtre.so.0base-sys-shlib compatfile ./usr/lib/libtre.so.0.8base-sys-shlib compatfile -./usr/lib/libtsan.sobase-sys-shlib arch64,cxx,gcc +./usr/lib/libtsan.sobase-sys-shlib arch64,cxx,gcc=9 ./usr/lib/libtsan.so.1base-sys-shlib arch64,cxx,gcc=9 ./usr/lib/libtsan.so.1.0 base-sys-shlib arch64,cxx,gcc=9 ./usr/lib/libtspi.sobase-sys-shlib compatfile,tpm Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2352 src/distrib/sets/lists/comp/mi:1.2353 --- src/distrib/sets/lists/comp/mi:1.2352 Sun Sep 13 02:37:31 2020 +++ src/distrib/sets/lists/comp/mi Sun Sep 13 03:43:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2352 2020/09/13 02:37:31 kamil Exp $ +# $NetBSD: mi,v 1.2353 2020/09/13 03:43:16 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3947,8 +3947,8 @@ ./usr/lib/libtpm_unseal_p.a comp-c-proflib compatfile,tpm,profile ./usr/lib/libtre.acomp-c-lib compatfile ./usr/lib/libtre_p.acomp-c-proflib compatfile,profile -./usr/lib/libtsan.acomp-c-lib arch64,cxx,gcc -./usr/lib/libtsan_p.acomp-c-proflib arch64,profile,cxx,gcc +./usr/lib/libtsan.acomp-c-lib arch64,cxx,gcc=9 +./usr/lib/libtsan_p.acomp-c-proflib arch64,profile,cxx,gcc=9 ./usr/lib/libtspi.acomp-c-lib compatfile,tpm ./usr/lib/libtspi_p.acomp-c-proflib compatfile,tpm,profile ./usr/lib/libubsan.acomp-c-lib compatfile,cxx,gcc Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.340 src/distrib/sets/lists/comp/shl.mi:1.341 --- src/distrib/sets/lists/comp/shl.mi:1.340 Sun Sep 13 02:37:31 2020 +++ src/distrib/sets/lists/comp/shl.mi Sun Sep 13 03:43:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.340 2020/09/13 02:37:31 kamil Exp $ +# $NetBSD: shl.mi,v 1.341 2020/09/13 03:43:16 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -274,7 +274,7 @@ ./usr/lib/libtermlib_pic.a comp-c-piclib compatfile,picinstall ./usr/lib/libtpm_unseal_pic.a comp-tpm-lib compatfile,picinstall,tpm ./usr/lib/libtre_pic.acomp-c-piclib compatfile,picinstall -./usr/lib/libtsan_pic.acomp-c-piclib arch64,picinstall,cxx,gcc +./usr/lib/libtsan_pic.acomp-c-piclib arch64,picinstall,cxx,gcc=9 ./usr/lib/libtspi_pic.acomp-c-piclib compatfile,picinstall,tpm ./usr/lib/libubsan_pic.a comp-c-piclib compatfile,picinstall,cxx,gcc ./usr/lib/libukfs_pic.acomp-c-piclib compatfile,picinstall,rump Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.334 src/distrib/sets/lists/debug/mi:1.335 --- src/distrib/sets/lists/debug/mi:1.334 Sun Sep 13 02:37:31 2020 +++ src/distrib/sets/lists/debug/mi Sun Sep 13 03:43:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.334 2020/09/13 02:37:31 kamil Exp $ +# $NetBSD: mi,v 1.335 2020/09/13 03:43:16 kamil Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -261,7 +261,7 @@ ./usr/lib/libterminfo_g.a comp-c-debuglib debuglib,compatfile ./usr/lib/libtpm_unseal_g.a comp-c-debuglib debuglib,compatfile,tpm ./usr/lib/libtre_g.acomp-c-debuglib debuglib,compatfile -./usr/lib/libtsan_g.acomp-c-debuglib debuglib,arch64,cxx,gcc +./usr/lib/libtsan_g.acomp-c-debuglib debuglib,arch64,cxx,gcc=9 ./usr/lib/libtspi_g.acomp-c-debuglib debuglib,compatfile,tpm ./usr/lib/libubsan_g.acomp-c-debuglib debuglib,compatfile,cxx,gcc ./usr/lib/libukfs_g.acomp-c-debuglib debuglib,compatfile,rump
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Sun Sep 13 03:03:57 UTC 2020 Modified Files: src/doc: CHANGES Log Message: gcc(1): Install TSan for 64bit CPUs. To generate a diff of this commit: cvs rdiff -u -r1.2737 -r1.2738 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2737 src/doc/CHANGES:1.2738 --- src/doc/CHANGES:1.2737 Sat Sep 12 08:39:31 2020 +++ src/doc/CHANGES Sun Sep 13 03:03:57 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2737 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2738 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -280,3 +280,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: dhcpcd: Update to version 9.2.0. [roy 20200906] iavf(4): Add driver for Intel Ethernet Adaptive Virtual Function [yamaguchi 20200908] + gcc(1): Install TSan for 64bit CPUs. [kamil 20200913]
CVS commit: src/external/gpl3/gcc/dist/libsanitizer
Module Name:src Committed By: kamil Date: Sun Sep 13 03:00:12 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer: netbsd_syscall_hooks.h src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_syscalls_netbsd.inc Log Message: Sync netbsd_syscall_hooks.h with LLVM r. 74760bb00fb9b78a Update the syscall definitionss from a snapshot 2.5 years old to the current one. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_syscalls_netbsd.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h diff -u src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h:1.1.1.1 src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h:1.1.1.1 Sat Sep 5 07:52:57 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h Sun Sep 13 03:00:12 2020 @@ -1,7 +1,8 @@ //===-- netbsd_syscall_hooks.h ===// // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===--===// // @@ -19,8 +20,8 @@ // DO NOT EDIT! THIS FILE HAS BEEN GENERATED! // // Generated with: generate_netbsd_syscalls.awk -// Generated date: 2018-03-03 -// Generated from: syscalls.master,v 1.291 2018/01/06 16:41:23 kamil Exp +// Generated date: 2020-09-10 +// Generated from: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp // //===--===// #ifndef SANITIZER_NETBSD_SYSCALL_HOOKS_H @@ -473,7 +474,12 @@ __sanitizer_syscall_pre_impl_dup2((long long)(from), (long long)(to)) #define __sanitizer_syscall_post_dup2(res, from, to) \ __sanitizer_syscall_post_impl_dup2(res, (long long)(from), (long long)(to)) -/* syscall 91 has been skipped */ +#define __sanitizer_syscall_pre_getrandom(buf, buflen, flags) \ + __sanitizer_syscall_pre_impl_getrandom( \ + (long long)(buf), (long long)(buflen), (long long)(flags)) +#define __sanitizer_syscall_post_getrandom(res, buf, buflen, flags)\ + __sanitizer_syscall_post_impl_getrandom( \ + res, (long long)(buf), (long long)(buflen), (long long)(flags)) #define __sanitizer_syscall_pre_fcntl(fd, cmd, arg)\ __sanitizer_syscall_pre_impl_fcntl((long long)(fd), (long long)(cmd),\ (long long)(arg)) @@ -848,9 +854,31 @@ #define __sanitizer_syscall_post_sysarch(res, op, parms) \ __sanitizer_syscall_post_impl_sysarch(res, (long long)(op), \ (long long)(parms)) -/* syscall 166 has been skipped */ -/* syscall 167 has been skipped */ -/* syscall 168 has been skipped */ +#define __sanitizer_syscall_pre___futex(uaddr, op, val, timeout, uaddr2, val2, \ +val3) \ + __sanitizer_syscall_pre_impl___futex((long long)(uaddr), (long long)(op),\ + (long long)(val), (long long)(timeout), \ + (long long)(uaddr2), (long long)(val2), \ + (long long)(val3)) +#define __sanitizer_syscall_post___futex(res, uaddr, op, val, timeout, uaddr2, \ + val2, val3) \ + __sanitizer_syscall_post_impl___futex( \ + res, (long long)(uaddr), (long long)(op), (long long)(val), \ + (long long)(timeout), (long long)(uaddr2), (long long)(val2),\ + (long long)(val3)) +#define __sanitizer_syscall_pre___futex_set_robust_list(head, len) \ + __sanitizer_syscall_pre_impl___futex_set_robust_list((long long)(head), \ + (long long)(len)) +#define __sanitizer_syscall_post___futex_set_robust_list(res, head, len) \ + __sanitizer_syscall_post_impl___futex_set_robust_list( \ + res,
CVS commit: src
Module Name:src Committed By: kamil Date: Sun Sep 13 02:37:32 UTC 2020 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi shl.mi src/distrib/sets/lists/debug: mi shl.mi src/external/gpl3/gcc/lib: Makefile src/external/gpl3/gcc/lib/libtsan: Makefile src/external/gpl3/gcc/usr.bin/include/sanitizer: Makefile src/share/mk: bsd.own.mk Log Message: Build and install GCC TSan for 64-bit CPUs To generate a diff of this commit: cvs rdiff -u -r1.901 -r1.902 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2351 -r1.2352 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.339 -r1.340 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.333 -r1.334 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.261 -r1.262 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/Makefile cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/lib/libtsan/Makefile cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile cvs rdiff -u -r1.1210 -r1.1211 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.901 src/distrib/sets/lists/base/shl.mi:1.902 --- src/distrib/sets/lists/base/shl.mi:1.901 Tue Sep 8 13:01:47 2020 +++ src/distrib/sets/lists/base/shl.mi Sun Sep 13 02:37:31 2020 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.901 2020/09/08 13:01:47 adam Exp $ +# $NetBSD: shl.mi,v 1.902 2020/09/13 02:37:31 kamil Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -896,6 +896,9 @@ ./usr/lib/libtre.sobase-sys-shlib compatfile ./usr/lib/libtre.so.0base-sys-shlib compatfile ./usr/lib/libtre.so.0.8base-sys-shlib compatfile +./usr/lib/libtsan.sobase-sys-shlib arch64,cxx,gcc +./usr/lib/libtsan.so.1base-sys-shlib arch64,cxx,gcc=9 +./usr/lib/libtsan.so.1.0 base-sys-shlib arch64,cxx,gcc=9 ./usr/lib/libtspi.sobase-sys-shlib compatfile,tpm ./usr/lib/libtspi.so.3base-sys-shlib compatfile,tpm ./usr/lib/libtspi.so.3.0 base-sys-shlib compatfile,tpm Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2351 src/distrib/sets/lists/comp/mi:1.2352 --- src/distrib/sets/lists/comp/mi:1.2351 Sat Sep 12 12:11:19 2020 +++ src/distrib/sets/lists/comp/mi Sun Sep 13 02:37:31 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2351 2020/09/12 12:11:19 roy Exp $ +# $NetBSD: mi,v 1.2352 2020/09/13 02:37:31 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -2174,6 +2174,8 @@ ./usr/include/gcc-9/sanitizer/asan_interface.h comp-gcc-include gcc=9 ./usr/include/gcc-9/sanitizer/common_interface_defs.h comp-gcc-include gcc=9 ./usr/include/gcc-9/sanitizer/lsan_interface.h comp-gcc-include gcc=9 +./usr/include/gcc-9/sanitizer/netbsd_syscall_hooks.h comp-gcc-include gcc=9 +./usr/include/gcc-9/sanitizer/tsan_interface.h comp-gcc-include gcc=9 ./usr/include/gcc-9/sanitizer/tsan_interface_atomic.h comp-gcc-include gcc=9 ./usr/include/gcc-9/stdatomic.hcomp-gcc-include gcc=9 ./usr/include/gelf.hcomp-c-include @@ -3945,6 +3947,8 @@ ./usr/lib/libtpm_unseal_p.a comp-c-proflib compatfile,tpm,profile ./usr/lib/libtre.acomp-c-lib compatfile ./usr/lib/libtre_p.acomp-c-proflib compatfile,profile +./usr/lib/libtsan.acomp-c-lib arch64,cxx,gcc +./usr/lib/libtsan_p.acomp-c-proflib arch64,profile,cxx,gcc ./usr/lib/libtspi.acomp-c-lib compatfile,tpm ./usr/lib/libtspi_p.acomp-c-proflib compatfile,tpm,profile ./usr/lib/libubsan.acomp-c-lib compatfile,cxx,gcc Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.339 src/distrib/sets/lists/comp/shl.mi:1.340 --- src/distrib/sets/lists/comp/shl.mi:1.339 Thu Aug 27 15:32:00 2020 +++ src/distrib/sets/lists/comp/shl.mi Sun Sep 13 02:37:31 2020 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.339 2020/08/27 15:32:00 riastradh Exp $ +# $NetBSD: shl.mi,v 1.340 2020/09/13 02:37:31 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -274,6 +274,7 @@ ./usr/lib/libtermlib_pic.a comp-c-piclib compatfile,picinstall ./usr/lib/libtpm_unseal_pic.a comp-tpm-lib compatfile,picinstall,tpm ./usr/lib/libtre_pic.acomp-c-piclib compatfile,picinstall +./usr/lib/libtsan_pic.acomp-c-piclib arch64,picinstall,cxx,gcc ./usr/lib/libtspi_pic.acomp-c-piclib compatfile,picinstall,tpm ./usr/lib/libubsan_pic.a comp-c-piclib compatfile,picinstall,cxx,gcc ./usr/lib/libukfs_pic.acomp-c-piclib compatfile,picinstall,rump Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.333 src/distrib/sets/lists/debug/mi:1.334 --- src/distrib/sets/lists/debug/mi:1.333
CVS commit: src/external/gpl3/gcc/lib/libtsan
Module Name:src Committed By: kamil Date: Sat Sep 12 23:04:44 UTC 2020 Modified Files: src/external/gpl3/gcc/lib/libtsan: Makefile Log Message: Always link TSan runtime with librt and libm With these changes, TSan/amd64 works. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/libtsan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libtsan/Makefile diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.11 src/external/gpl3/gcc/lib/libtsan/Makefile:1.12 --- src/external/gpl3/gcc/lib/libtsan/Makefile:1.11 Sat Sep 12 22:24:22 2020 +++ src/external/gpl3/gcc/lib/libtsan/Makefile Sat Sep 12 23:04:44 2020 @@ -1,4 +1,7 @@ -# $NetBSD: Makefile,v 1.11 2020/09/12 22:24:22 kamil Exp $ +# $NetBSD: Makefile,v 1.12 2020/09/12 23:04:44 kamil Exp $ + +UNSUPPORTED_COMPILER.clang= # defined +NOSANITIZER=# defined .include @@ -53,6 +56,8 @@ TSAN_SRCS+= tsan_rtl_unimpl.cc LIB= tsan SRCS+= ${TSAN_SRCS} +LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt +LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm CPPFLAGS+=-DCAN_SANITIZE_UB=0 COPTS.tsan_interceptors.cc += -Wno-unused-function
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Sat Sep 12 22:52:24 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_posix_libcdep.cc Log Message: Disable GetNamedMappingFd for NetBSD Analogous logic is in LLVM rev. 74760bb00fb9b78a2fe122. Removes undefined symbol linkage to shm_unlink and shm_open. To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:1.1.1.7 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:1.1.1.7 Sat Sep 5 07:52:57 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc Sat Sep 12 22:52:24 2020 @@ -304,7 +304,7 @@ void PlatformPrepareForSandboxing(__sani MemoryMappingLayout::CacheMemoryMappings(); } -#if SANITIZER_ANDROID || SANITIZER_GO +#if SANITIZER_ANDROID || SANITIZER_GO || SANITIZER_NETBSD int GetNamedMappingFd(const char *name, uptr size) { return -1; }
CVS commit: src/external/gpl3/gcc/lib/libtsan
Module Name:src Committed By: kamil Date: Sat Sep 12 22:24:22 UTC 2020 Modified Files: src/external/gpl3/gcc/lib/libtsan: Makefile Log Message: Ignore unused functions in tsan_interceptors.cc To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/lib/libtsan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libtsan/Makefile diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.10 src/external/gpl3/gcc/lib/libtsan/Makefile:1.11 --- src/external/gpl3/gcc/lib/libtsan/Makefile:1.10 Wed Oct 2 02:54:35 2019 +++ src/external/gpl3/gcc/lib/libtsan/Makefile Sat Sep 12 22:24:22 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/10/02 02:54:35 mrg Exp $ +# $NetBSD: Makefile,v 1.11 2020/09/12 22:24:22 kamil Exp $ .include @@ -54,5 +54,6 @@ TSAN_SRCS+= tsan_rtl_unimpl.cc LIB= tsan SRCS+= ${TSAN_SRCS} CPPFLAGS+=-DCAN_SANITIZE_UB=0 +COPTS.tsan_interceptors.cc += -Wno-unused-function .include
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/tsan
Module Name:src Committed By: kamil Date: Sat Sep 12 22:23:57 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc Log Message: Sync chunks of tsan_interceptors.cc with LLVM rev. 74760bb00fb9b78a2fe122 Sync tsan_interceptors.cc with upstream file tsan_interceptors_posix.cpp. Changes: - define fileno_unlocked() for NetBSD - use defined __sanitizer_FILE for NetBSD - handle symbol indirection for vfork and nanosleep - delete sem_* API, currently moved to common code with sanitizers - undef SANITIZER_INTERCEPT_PTHREAD_SIGMASK to fix build - remove locally introduced SANITIZER_NETBSD With these changes, TSan for GCC builds. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.10 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.11 --- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.10 Sat Sep 12 21:30:36 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc Sat Sep 12 22:23:57 2020 @@ -40,17 +40,16 @@ using namespace __tsan; // NOLINT #if SANITIZER_NETBSD #define dirfd(dirp) (*(int *)(dirp)) -#define fileno_unlocked fileno +#define fileno_unlocked(fp) \ + (((__sanitizer_FILE *)fp)->_file == -1 \ + ? -1 \ + : (int)(unsigned short)(((__sanitizer_FILE *)fp)->_file)) -#if _LP64 -#define __sF_size 152 -#else -#define __sF_size 88 -#endif - -#define stdout ((char*)&__sF + (__sF_size * 1)) -#define stderr ((char*)&__sF + (__sF_size * 2)) +#define stdout ((__sanitizer_FILE*)&__sF[1]) +#define stderr ((__sanitizer_FILE*)&__sF[2]) +#define nanosleep __nanosleep50 +#define vfork __vfork14 #endif #if SANITIZER_ANDROID @@ -92,8 +91,8 @@ DECLARE_REAL_AND_INTERCEPTOR(void *, mal DECLARE_REAL_AND_INTERCEPTOR(void, free, void *ptr) extern "C" void *pthread_self(); extern "C" void _exit(int status); -extern "C" int fileno_unlocked(void *stream); #if !SANITIZER_NETBSD +extern "C" int fileno_unlocked(void *stream); extern "C" int dirfd(void *dirp); #endif #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_NETBSD @@ -1417,61 +1416,6 @@ TSAN_INTERCEPTOR(int, pthread_once, void return 0; } -TSAN_INTERCEPTOR(int, sem_init, void *s, int pshared, unsigned value) { - SCOPED_TSAN_INTERCEPTOR(sem_init, s, pshared, value); - int res = REAL(sem_init)(s, pshared, value); - return res; -} - -TSAN_INTERCEPTOR(int, sem_destroy, void *s) { - SCOPED_TSAN_INTERCEPTOR(sem_destroy, s); - int res = REAL(sem_destroy)(s); - return res; -} - -TSAN_INTERCEPTOR(int, sem_wait, void *s) { - SCOPED_TSAN_INTERCEPTOR(sem_wait, s); - int res = BLOCK_REAL(sem_wait)(s); - if (res == 0) { -Acquire(thr, pc, (uptr)s); - } - return res; -} - -TSAN_INTERCEPTOR(int, sem_trywait, void *s) { - SCOPED_TSAN_INTERCEPTOR(sem_trywait, s); - int res = BLOCK_REAL(sem_trywait)(s); - if (res == 0) { -Acquire(thr, pc, (uptr)s); - } - return res; -} - -TSAN_INTERCEPTOR(int, sem_timedwait, void *s, void *abstime) { - SCOPED_TSAN_INTERCEPTOR(sem_timedwait, s, abstime); - int res = BLOCK_REAL(sem_timedwait)(s, abstime); - if (res == 0) { -Acquire(thr, pc, (uptr)s); - } - return res; -} - -TSAN_INTERCEPTOR(int, sem_post, void *s) { - SCOPED_TSAN_INTERCEPTOR(sem_post, s); - Release(thr, pc, (uptr)s); - int res = REAL(sem_post)(s); - return res; -} - -TSAN_INTERCEPTOR(int, sem_getvalue, void *s, int *sval) { - SCOPED_TSAN_INTERCEPTOR(sem_getvalue, s, sval); - int res = REAL(sem_getvalue)(s, sval); - if (res == 0) { -Acquire(thr, pc, (uptr)s); - } - return res; -} - #if SANITIZER_LINUX && !SANITIZER_ANDROID TSAN_INTERCEPTOR(int, __fxstat, int version, int fd, void *buf) { SCOPED_TSAN_INTERCEPTOR(__fxstat, version, fd, buf); @@ -2236,6 +2180,7 @@ static void HandleRecvmsg(ThreadState *t #define NEED_TLS_GET_ADDR #endif #undef SANITIZER_INTERCEPT_TLS_GET_ADDR +#undef SANITIZER_INTERCEPT_PTHREAD_SIGMASK #define COMMON_INTERCEPT_FUNCTION(name) INTERCEPT_FUNCTION(name) #define COMMON_INTERCEPT_FUNCTION_VER(name, ver) \ @@ -2476,7 +2421,6 @@ static void syscall_fd_close(uptr pc, in TSAN_SYSCALL(); FdClose(thr, pc, fd); } -#endif static USED void syscall_fd_acquire(uptr pc, int fd) { TSAN_SYSCALL(); @@ -2490,7 +2434,6 @@ static USED void syscall_fd_release(uptr FdRelease(thr, pc, fd); } -#if !SANITIZER_NETBSD static void syscall_pre_fork(uptr pc) { TSAN_SYSCALL(); ForkBefore(thr, pc);
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/tsan
Module Name:src Committed By: kamil Date: Sat Sep 12 21:30:36 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc Log Message: Remove dead code block (from a local patch) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.9 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.10 --- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.9 Sat Sep 5 09:12:32 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc Sat Sep 12 21:30:36 2020 @@ -57,21 +57,6 @@ using namespace __tsan; // NOLINT #define mallopt(a, b) #endif -#if 0 // XXXMRG -#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD -#define PTHREAD_CREATE_DETACHED 1 -#elif SANITIZER_MAC -#define PTHREAD_CREATE_DETACHED 2 -#endif -#if SANITIZER_NETBSD -#define __errno_location __errno -#define pthread_yield sched_yield -#define fileno_unlocked fileno -#define stdout __sF[1] -#define stderr __sF[2] -#endif -#endif - #ifdef __mips__ const int kSigCount = 129; #else
CVS commit: src/sys/dev/tc
Module Name:src Committed By: kamil Date: Sat Sep 12 16:44:41 UTC 2020 Modified Files: src/sys/dev/tc: sticio.h Log Message: Restrict stic_xmap to the kernel namespace Otherwise this header is not includable on ports without the definition of NBPG. This fixes build of sanitizers. In practice only pmax might be interested in using this device driver. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/tc/sticio.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/dev/tc/sticio.h diff -u src/sys/dev/tc/sticio.h:1.5 src/sys/dev/tc/sticio.h:1.6 --- src/sys/dev/tc/sticio.h:1.5 Sun Sep 6 06:01:01 2015 +++ src/sys/dev/tc/sticio.h Sat Sep 12 16:44:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sticio.h,v 1.5 2015/09/06 06:01:01 dholland Exp $ */ +/* $NetBSD: sticio.h,v 1.6 2020/09/12 16:44:41 kamil Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -72,6 +72,7 @@ struct stic_xcomm { u_int sxc_done[16]; /* packet completion semaphores */ }; +#ifdef _KERNEL /* * stic_xmap: a description of the area returned by mapping the board. * sxm_xcomm and sxm_buf are physically contigious and of variable size as a @@ -82,6 +83,7 @@ struct stic_xmap { u_int8_t sxm_poll[0xc]; /* poll registers */ u_int8_t sxm_xcomm[256 * 1024]; /* X comms area */ }; +#endif /* * ioctl interface.
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Sep 11 01:45:53 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux.h Log Message: Add prototypes of internal_sigdelset() and internal_clone() Cherry-pick the missing change from: commit 983d7ddd0b278b45d815cbac9197205b39c4860a Author: Kamil Rytarowski Date: Thu Jul 11 06:22:35 2019 + Add NetBSD LSan support Summary: Combine few relatively small changes into one: - implement internal_ptrace() and internal_clone() for NetBSD - add support for stoptheworld based on the ptrace(2) API - define COMPILER_RT_HAS_LSAN for NetBSD - enable tests for NetBSD/amd64 Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC. The implementation is in theory CPU independent through well defined macros across all NetBSD ports, however only the x86_64 version was tested. Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb Reviewed By: vitalybuka Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos Tags: #llvm Differential Revision: https://reviews.llvm.org/D64057 llvm-svn: 365735 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.10 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.11 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.10 Sat Sep 5 13:35:55 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h Fri Sep 11 01:45:53 2020 @@ -74,12 +74,8 @@ uptr internal_prctl(int option, uptr arg #endif // SANITIZER_LINUX #ifdef SANITIZER_NETBSD -int internal_sigaction_norestorer(int signum, const void *act, void *oldact); -#define internal_sigdelset(set, signum) \ -__sigdelset(set, signum) -#define internal_clone(fn, child_stack, flags, arg, \ -parent_tidptr, newtls, child_tidptr) \ -__clone(fn, child_stack, flags, arg) +void internal_sigdelset(__sanitizer_sigset_t *set, int signum); +uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg); #endif // This class reads thread IDs from /proc//task using only syscalls.
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Sep 11 01:08:36 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_getauxval.h Log Message: Add getauxval() compat for NetBSD Cherry-pick and adapt: commit 02519fc7a6f8c528f67975a9f78ce64dabf402b4 Author: Kamil Rytarowski Date: Thu Sep 12 18:57:58 2019 + Add getauxval() compat for NetBSD Summary: getauxval() is not available on NetBSD and there is no a direct equivalent. Add a function that implements the same semantics with NetBSD internals. Reorder the GetPageSize() functions to prefer the sysctl approach for NetBSD. It no longer makes a difference which approach is better. Avoid changing conditional code path. Reviewers: vitalybuka, dvyukov, mgorny, joerg Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67329 llvm-svn: 371758 To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h:1.1.1.1 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h:1.1.1.1 Sat Sep 5 07:52:57 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h Fri Sep 11 01:08:36 2020 @@ -8,6 +8,7 @@ // Common getauxval() guards and definitions. // getauxval() is not defined until glibc version 2.16, or until API level 21 // for Android. +// Implement the getauxval() compat function for NetBSD. // //===--===// @@ -41,6 +42,23 @@ extern "C" SANITIZER_WEAK_ATTRIBUTE unsigned long getauxval(unsigned long type); // NOLINT # endif -#endif // SANITIZER_LINUX || SANITIZER_FUCHSIA +#elif SANITIZER_NETBSD + +#define SANITIZER_USE_GETAUXVAL 1 + +#include +#include + +static inline decltype(AuxInfo::a_v) getauxval(decltype(AuxInfo::a_type) type) { + for (const AuxInfo *aux = (const AuxInfo *)_dlauxinfo(); + aux->a_type != AT_NULL; ++aux) { +if (type == aux->a_type) + return aux->a_v; + } + + return 0; +} + +#endif #endif // SANITIZER_GETAUXVAL_H
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Sep 11 01:07:53 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc Log Message: Use sysctl to implement GetPageSize() Cherry-pick code chunk from newer LLVM compiler-rt. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.36 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.37 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.36 Mon Sep 7 00:22:51 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Fri Sep 11 01:07:53 2020 @@ -1139,6 +1139,14 @@ uptr GetPageSize() { // Android post-M sysconf(_SC_PAGESIZE) crashes if called from .preinit_array. #if SANITIZER_ANDROID return 4096; +#elif SANITIZER_FREEBSD || SANITIZER_NETBSD +// Use sysctl as sysconf can trigger interceptors internally. + int pz = 0; + uptr pzl = sizeof(pz); + int mib[2] = {CTL_HW, HW_PAGESIZE}; + int rv = internal_sysctl(mib, 2, , , nullptr, 0); + CHECK_EQ(rv, 0); + return (uptr)pz; #elif SANITIZER_LINUX && (defined(__x86_64__) || defined(__i386__)) return EXEC_PAGESIZE; #elif SANITIZER_USE_GETAUXVAL
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Sep 11 01:07:27 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_internal_defs.h Log Message: Enable SANITIZER_CAN_USE_PREINIT_ARRAY on NetBSD Cherry-pick: commit 3a189bac9bb111c9a59339015ab0d4e2fed735f4 Author: Kamil Rytarowski Date: Thu Dec 19 03:21:46 2019 +0100 [compiler-rt] Enable SANITIZER_CAN_USE_PREINIT_ARRAY on NetBSD .preinit_array is supported since 9.0. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_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/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:1.12 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:1.13 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:1.12 Sat Sep 5 09:12:32 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h Fri Sep 11 01:07:27 2020 @@ -104,7 +104,7 @@ // FIXME: do we have anything like this on Mac? #ifndef SANITIZER_CAN_USE_PREINIT_ARRAY #if ((SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_OPENBSD || \ - SANITIZER_FUCHSIA) && !defined(PIC) + SANITIZER_FUCHSIA || SANITIZER_NETBSD) && !defined(PIC) #define SANITIZER_CAN_USE_PREINIT_ARRAY 1 // Before Solaris 11.4, .preinit_array is fully supported only with GNU ld. // FIXME: Check for those conditions.
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Sep 11 01:07:00 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_stoptheworld_netbsd_libcdep.cc Log Message: Adapt stop-the-world for ptrace changes in NetBSD-9.99.30 Cherry-pick and adapt: commit fc356dcc11c10003ff22acff667b0a9f5e6c1e0f Author: Kamil Rytarowski Date: Tue Dec 24 20:33:54 2019 +0100 [compiler-rt] Adapt stop-the-world for ptrace changes in NetBSD-9.99.30 Handle PT_LWPNEXT for newer kernels and keep PT_LWPINFO for older ones. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.1 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.1 Fri Sep 11 01:05:28 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc Fri Sep 11 01:07:00 2020 @@ -120,10 +120,18 @@ bool ThreadSuspender::SuspendAllThreads( VReport(2, "Attached to process %d.\n", pid_); +#ifdef PT_LWPNEXT + struct ptrace_lwpstatus pl; + int op = PT_LWPNEXT; +#else struct ptrace_lwpinfo pl; - int val; + int op = PT_LWPINFO; +#endif + pl.pl_lwpid = 0; - while ((val = ptrace(PT_LWPINFO, pid_, (void *), sizeof(pl))) != -1 && + + int val; + while ((val = ptrace(op, pid_, (void *), sizeof(pl))) != -1 && pl.pl_lwpid != 0) { suspended_threads_list_.Append(pl.pl_lwpid); VReport(2, "Appended thread %d in process %d.\n", pl.pl_lwpid, pid_);
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: kamil Date: Fri Sep 11 01:05:28 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_common.h lsan_linux.cc src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am Makefile.in sanitizer_netbsd.cc sanitizer_posix.h src/external/gpl3/gcc/lib: Makefile.sanitizer Added Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_stoptheworld_netbsd_libcdep.cc Log Message: Add NetBSD LSan support Cherry-pick and adapt: commit 983d7ddd0b278b45d815cbac9197205b39c4860a Author: Kamil Rytarowski Date: Thu Jul 11 06:22:35 2019 + Add NetBSD LSan support Summary: Combine few relatively small changes into one: - implement internal_ptrace() and internal_clone() for NetBSD - add support for stoptheworld based on the ptrace(2) API - define COMPILER_RT_HAS_LSAN for NetBSD - enable tests for NetBSD/amd64 Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC. The implementation is in theory CPU independent through well defined macros across all NetBSD ports, however only the x86_64 version was tested. Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb Reviewed By: vitalybuka Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos Tags: #llvm Differential Revision: https://reviews.llvm.org/D64057 llvm-svn: 365735 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_linux.cc cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_netbsd.cc cvs rdiff -u -r1.1.1.6 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix.h cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/lib/Makefile.sanitizer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.7 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.8 --- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.7 Sat Sep 5 09:12:31 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h Fri Sep 11 01:05:28 2020 @@ -20,8 +20,8 @@ #include "sanitizer_common/sanitizer_stoptheworld.h" #include "sanitizer_common/sanitizer_symbolizer.h" -// LeakSanitizer relies on some Glibc's internals (e.g. TLS machinery) thus -// supported for Linux only. Also, LSan doesn't like 32 bit architectures +// LeakSanitizer relies on some Glibc's internals (e.g. TLS machinery) on Linux. +// Also, LSan doesn't like 32 bit architectures // because of "small" (4 bytes) pointer size that leads to high false negative // ratio on large leaks. But we still want to have it for some 32 bit arches // (e.g. x86), see https://github.com/google/sanitizers/issues/403. @@ -39,6 +39,8 @@ #elif defined(__arm__) && \ ((SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_NETBSD) #define CAN_SANITIZE_LEAKS 1 +#elif SANITIZER_NETBSD +#define CAN_SANITIZE_LEAKS 1 #else #define CAN_SANITIZE_LEAKS 0 #endif Index: src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_linux.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_linux.cc:1.1.1.1 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_linux.cc:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_linux.cc:1.1.1.1 Tue Oct 1 09:36:38 2019 +++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_linux.cc Fri Sep 11 01:05:28 2020 @@ -5,13 +5,13 @@ // //===--===// // -// This file is a part of LeakSanitizer. Linux-specific code. +// This file is a part of LeakSanitizer. Linux/NetBSD-specific code. // //===--===// #include "sanitizer_common/sanitizer_platform.h" -#if SANITIZER_LINUX +#if SANITIZER_LINUX || SANITIZER_NETBSD #include "lsan_allocator.h" @@ -28,4 +28,4 @@ void ReplaceSystemMalloc() {} } // namespace __lsan -#endif // SANITIZER_LINUX +#endif // SANITIZER_LINUX || SANITIZER_NETBSD Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am:1.4 src/external/gpl3/gcc/dist/libsanitiz
CVS commit: src/external/gpl3/gcc/dist/libsanitizer
Module Name:src Committed By: kamil Date: Fri Sep 11 01:04:34 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/asan: asan_interceptors.h src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_interceptors.cc src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_platform_interceptors.h Log Message: Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD Cherry-pick and adapt: commit 8827047551570b7ed7088765c3de2a8cce6823b8 Author: Kamil Rytarowski Date: Sat Sep 21 07:30:42 2019 + Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD Summary: The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit, after executing all callback. This causes false positives as DoLeakCheck() is called from the atexit handler. In the LSan/ASan tests there are strict checks triggering false positives here. Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the real functions. Stop tracing allocations in pthread_atfork(3) funtions, as there are performed internal allocations that are not freed for the time of running StopTheWorld() code. This avoids false-positives. The same changes have to be replicated in the ASan and LSan runtime. Non-NetBSD OSs are not tested and this code is restricted to NetBSD only. Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: jfb, llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67331 llvm-svn: 372459 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h:1.6 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h:1.7 --- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h:1.6 Sat Sep 5 09:12:31 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h Fri Sep 11 01:04:33 2020 @@ -103,12 +103,24 @@ void InitializePlatformInterceptors(); # define ASAN_INTERCEPT___CXA_ATEXIT 0 #endif +#if SANITIZER_NETBSD +# define ASAN_INTERCEPT_ATEXIT 1 +#else +# define ASAN_INTERCEPT_ATEXIT 0 +#endif + #if SANITIZER_LINUX && !SANITIZER_ANDROID # define ASAN_INTERCEPT___STRDUP 1 #else # define ASAN_INTERCEPT___STRDUP 0 #endif +#if SANITIZER_NETBSD +# define ASAN_INTERCEPT_PTHREAD_ATFORK 1 +#else +# define ASAN_INTERCEPT_PTHREAD_ATFORK 0 +#endif + DECLARE_REAL(int, memcmp, const void *a1, const void *a2, uptr size) DECLARE_REAL(char*, strchr, const char *str, int c) DECLARE_REAL(SIZE_T, strlen, const char *s) Index: src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc:1.6 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc:1.7 --- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc:1.6 Fri Sep 11 01:03:31 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc Fri Sep 11 01:04:34 2020 @@ -348,6 +348,44 @@ INTERCEPTOR(char *, strerror, int errnum #define LSAN_MAYBE_INTERCEPT_STRERROR #endif +#if SANITIZER_INTERCEPT___CXA_ATEXIT +INTERCEPTOR(int, __cxa_atexit, void (*func)(void *), void *arg, +void *dso_handle) { + __lsan::ScopedInterceptorDisabler disabler; + return REAL(__cxa_atexit)(func, arg, dso_handle); +} +#define LSAN_MAYBE_INTERCEPT___CXA_ATEXIT INTERCEPT_FUNCTION(__cxa_atexit) +#else +#define LSAN_MAYBE_INTERCEPT___CXA_ATEXIT +#endif + +#if SANITIZER_INTERCEPT_ATEXIT +INTERCEPTOR(int, atexit, void (*f)()) { + __lsan::ScopedInterceptorDisabler disabler; + return REAL(__cxa_atexit)((void (*)(void *a))f, 0, 0); +} +#define LSAN_MAYBE_INTERCEPT_ATEXIT INTERCEPT_FUNCTION(atexit) +#else +#define LSAN_MAYBE_INTERCEPT_ATEXIT +#endif + +#if SANITIZER_INTERCEPT_PTHREAD_ATFORK +extern "C" { +extern int _pthread_atfork(void (*prepare)(), void (*parent)(), + void (*child)()); +}; + +INTERCEPTOR(int, pthread_atfork, void (*prepare)(), void (*parent)(), +void (*child)()) { + __lsan::ScopedInterceptorDisabler disabler; + // REAL(pthread_atfork) cannot be called due to symbol indirections at least on NetBSD + return _pthread_atfork(prepare, parent, child); +} +#define LSAN_MAYBE_INTERCEPT_PTHREAD_ATFORK INTERCEPT_FUNCTION(pthread_atfor
CVS commit: src/external/gpl3/gcc/dist/libsanitizer
Module Name:src Committed By: kamil Date: Fri Sep 11 01:03:31 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/asan: asan_interceptors.cc src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_interceptors.cc src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_common_interceptors.inc Log Message: Add __lsan::ScopedInterceptorDisabler for strerror(3) Cherry-pick and adapt: commit 1b58389428ed07a7322ba9c2bcaeec99807f9457 Author: Kamil Rytarowski Date: Sat Sep 21 07:45:02 2019 + Add __lsan::ScopedInterceptorDisabler for strerror(3) Summary: strerror(3) on NetBSD uses internally TSD with a destructor that is never fired for exit(3). It's correctly called for pthread_exit(3) scenarios. This is a case when a leak on exit(3) is expected, unavoidable and harmless. Reviewers: joerg, vitalybuka, dvyukov, mgorny Reviewed By: vitalybuka Subscribers: dmgreen, kristof.beyls, jfb, llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67337 llvm-svn: 372461 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.cc cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.cc:1.8 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.cc:1.9 --- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.cc:1.8 Sat Sep 5 09:12:31 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.cc Fri Sep 11 01:03:31 2020 @@ -163,6 +163,11 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, ASAN_MEMSET_IMPL(ctx, block, c, size); \ } while (false) +#if CAN_SANITIZE_LEAKS +#define COMMON_INTERCEPTOR_STRERROR() \ + __lsan::ScopedInterceptorDisabler disabler +#endif + #include "sanitizer_common/sanitizer_common_interceptors.inc" #include "sanitizer_common/sanitizer_signal_interceptors.inc" Index: src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc:1.5 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc:1.6 --- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc:1.5 Sat Sep 5 09:12:31 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_interceptors.cc Fri Sep 11 01:03:31 2020 @@ -338,6 +338,16 @@ INTERCEPTOR(void, thr_exit, tid_t *state #define LSAN_MAYBE_INTERCEPT_THR_EXIT #endif +#if SANITIZER_INTERCEPT_STRERROR +INTERCEPTOR(char *, strerror, int errnum) { + __lsan::ScopedInterceptorDisabler disabler; + return REAL(strerror)(errnum); +} +#define LSAN_MAYBE_INTERCEPT_STRERROR INTERCEPT_FUNCTION(strerror) +#else +#define LSAN_MAYBE_INTERCEPT_STRERROR +#endif + struct ThreadParam { void *(*callback)(void *arg); void *param; @@ -447,6 +457,8 @@ void InitializeInterceptors() { LSAN_MAYBE_INTERCEPT__LWP_EXIT; LSAN_MAYBE_INTERCEPT_THR_EXIT; + LSAN_MAYBE_INTERCEPT_STRERROR; + #if !SANITIZER_NETBSD && !SANITIZER_FREEBSD if (pthread_key_create(_thread_finalize_key, _finalize)) { Report("LeakSanitizer: failed to create thread key.\n"); Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1.9 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1.10 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1.9 Sat Sep 5 09:12:32 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc Fri Sep 11 01:03:31 2020 @@ -35,6 +35,7 @@ // COMMON_INTERCEPTOR_MMAP_IMPL // COMMON_INTERCEPTOR_COPY_STRING // COMMON_INTERCEPTOR_STRNDUP_IMPL +// COMMON_INTERCEPTOR_STRERROR //===--===// #include "interception/interception.h" @@ -290,6 +291,10 @@ bool PlatformHasDifferentMemcpyAndMemmov return new_mem; #endif +#ifndef COMMON_INTERCEPTOR_STRERROR +#define COMMON_INTERCEPTOR_STRERROR() {} +#endif + struct FileMetadata { // For open_memstream(). char **addr; @@ -3631,6 +3636,7 @@ INTERCEPTOR(int, sched_getparam, int pid INTERCEPTOR(char *, strerror, int errnum) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, strerror, errnum); + COMMON_INTERCEPTOR_
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Sep 11 01:01:14 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_stoptheworld_linux_libcdep.cc Log Message: Disable sanitizer_stoptheworld_linux_libcdep.cc for NetBSD To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:1.11 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:1.12 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:1.11 Sat Sep 5 09:12:32 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc Fri Sep 11 01:01:14 2020 @@ -12,7 +12,7 @@ #include "sanitizer_platform.h" -#if (SANITIZER_LINUX || SANITIZER_NETBSD) && \ +#if SANITIZER_LINUX && \ (defined(__x86_64__) || defined(__mips__) || \ defined(__aarch64__) || defined(__powerpc64__) || \ defined(__s390__) || defined(__i386__) || \
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: kamil Date: Thu Sep 10 12:53:06 UTC 2020 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux_libcdep.cc src/external/gpl3/gcc/lib: Makefile.sanitizer Log Message: Avoid using internal RTLD/libpthread/libc symbol in sanitizers Cherry-pick and adapt: commit 0da15ff318480f30bbc90b9e8ecb9bb9431c7fd3 Author: Kamil Rytarowski Date: Fri Jan 3 02:35:33 2020 +0100 [compiler-rt] [netbsd] Switch to syscall for ThreadSelfTlsTcb() This change avoids using internal, namespaced per-CPU calls that are not a stable interface to read the TSL base value. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/lib/Makefile.sanitizer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.15 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.16 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.15 Mon Sep 7 07:10:43 2020 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc Thu Sep 10 12:53:05 2020 @@ -47,6 +47,7 @@ #if SANITIZER_NETBSD #include #include +#include #endif #if SANITIZER_SOLARIS @@ -417,13 +418,7 @@ uptr ThreadSelf() { #if SANITIZER_NETBSD static struct tls_tcb * ThreadSelfTlsTcb() { - struct tls_tcb * tcb = NULL; -# ifdef __HAVE___LWP_GETTCB_FAST - tcb = (struct tls_tcb *)__lwp_gettcb_fast(); -# elif defined(__HAVE___LWP_GETPRIVATE_FAST) - tcb = (struct tls_tcb *)__lwp_getprivate_fast(); -# endif - return tcb; + return (struct tls_tcb *)_lwp_getprivate(); } uptr ThreadSelf() { Index: src/external/gpl3/gcc/lib/Makefile.sanitizer diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.12 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.13 --- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.12 Sat Sep 5 13:36:49 2020 +++ src/external/gpl3/gcc/lib/Makefile.sanitizer Thu Sep 10 12:53:05 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.sanitizer,v 1.12 2020/09/05 13:36:49 mrg Exp $ +# $NetBSD: Makefile.sanitizer,v 1.13 2020/09/10 12:53:05 kamil Exp $ SANITIZER=${GCCDIST}/libsanitizer .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common @@ -75,8 +75,6 @@ CSHLIBFLAGS+= -DPIC SRCS+= ${INTERCEPTION_SRCS} ${SANITIZER_SRCS} CPPFLAGS+=-I${SANITIZER}/include -I${SANITIZER} CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude -# XXX __lwp_getprivate_fast() is hidden normally. -CPPFLAGS.sanitizer_linux_libcdep.cc+= -D__LIBPTHREAD_SOURCE__ # XXX wants old lwp info and power ioctl, npf wants nv.h CPPFLAGS.sanitizer_platform_limits_netbsd.cc+= -D__LEGACY_PT_LWPINFO -D_KMEMUSER \ -I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: kamil Date: Wed Sep 9 14:38:41 UTC 2020 Modified Files: src/distrib/sets/lists/comp: mi Log Message: Register getrandom.0 Fixes MKCATPAGES=yes build. To generate a diff of this commit: cvs rdiff -u -r1.2348 -r1.2349 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2348 src/distrib/sets/lists/comp/mi:1.2349 --- src/distrib/sets/lists/comp/mi:1.2348 Wed Sep 9 07:23:45 2020 +++ src/distrib/sets/lists/comp/mi Wed Sep 9 14:38:41 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2348 2020/09/09 07:23:45 mrg Exp $ +# $NetBSD: mi,v 1.2349 2020/09/09 14:38:41 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -4475,6 +4475,7 @@ ./usr/share/man/cat2/getpid.0 comp-c-catman .cat ./usr/share/man/cat2/getppid.0 comp-c-catman .cat ./usr/share/man/cat2/getpriority.0 comp-c-catman .cat +./usr/share/man/cat2/getrandom.0 comp-c-catman .cat ./usr/share/man/cat2/getrlimit.0 comp-c-catman .cat ./usr/share/man/cat2/getrusage.0 comp-c-catman .cat ./usr/share/man/cat2/getsid.0 comp-c-catman .cat
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Fri Jul 17 15:52:16 UTC 2020 Modified Files: src/doc: CHANGES Log Message: libc: Added ppoll() wrapper around native pollts(2) To generate a diff of this commit: cvs rdiff -u -r1.2716 -r1.2717 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2716 src/doc/CHANGES:1.2717 --- src/doc/CHANGES:1.2716 Fri Jul 17 06:42:56 2020 +++ src/doc/CHANGES Fri Jul 17 15:52:16 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2716 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2717 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -256,3 +256,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: ERLITE -> OCTEON INSTALL_ERLITE -> INSTALL_OCTEON [simonb 20200715] + libc: Added ppoll() wrapper around native pollts(2) [kamil 20200717]
CVS commit: src/external/bsd/nsd/include
Module Name:src Committed By: kamil Date: Fri Jul 17 15:44:04 UTC 2020 Modified Files: src/external/bsd/nsd/include: config.h Log Message: Enable support for ppoll() To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/nsd/include/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/bsd/nsd/include/config.h diff -u src/external/bsd/nsd/include/config.h:1.8 src/external/bsd/nsd/include/config.h:1.9 --- src/external/bsd/nsd/include/config.h:1.8 Sun Dec 15 16:26:04 2019 +++ src/external/bsd/nsd/include/config.h Fri Jul 17 15:44:04 2020 @@ -249,7 +249,7 @@ #define HAVE_OPENSSL_SSL_H 1 /* Define to 1 if you have the `ppoll' function. */ -/* #undef HAVE_PPOLL */ +#define HAVE_PPOLL 1 /* Define to 1 if you have the `pselect' function. */ #define HAVE_PSELECT 1
CVS commit: src
Module Name:src Committed By: kamil Date: Fri Jul 17 15:34:17 UTC 2020 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/lib/libc/sys: Makefile.inc poll.2 src/sys/sys: poll.h src/tests/lib/libc/sys: Makefile t_poll.c Added Files: src/lib/libc/sys: ppoll.c src/tests/lib/libc/sys: t_pollts.c t_ppoll.c Log Message: Add ppoll() a compatibility wrapper around pollts(2) Submitted by Apurva Nandan. To generate a diff of this commit: cvs rdiff -u -r1.2339 -r1.2340 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.324 -r1.325 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.873 -r1.874 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.243 -r1.244 src/lib/libc/sys/Makefile.inc cvs rdiff -u -r1.30 -r1.31 src/lib/libc/sys/poll.2 cvs rdiff -u -r0 -r1.1 src/lib/libc/sys/ppoll.c cvs rdiff -u -r1.15 -r1.16 src/sys/sys/poll.h cvs rdiff -u -r1.65 -r1.66 src/tests/lib/libc/sys/Makefile cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_poll.c cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_pollts.c \ src/tests/lib/libc/sys/t_ppoll.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2339 src/distrib/sets/lists/comp/mi:1.2340 --- src/distrib/sets/lists/comp/mi:1.2339 Fri Jul 10 02:27:13 2020 +++ src/distrib/sets/lists/comp/mi Fri Jul 17 15:34:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2339 2020/07/10 02:27:13 thorpej Exp $ +# $NetBSD: mi,v 1.2340 2020/07/17 15:34:17 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -4529,6 +4529,7 @@ ./usr/share/man/cat2/posix_fadvise.0 comp-c-catman .cat ./usr/share/man/cat2/posix_fallocate.0 comp-c-catman .cat ./usr/share/man/cat2/posix_madvise.0 comp-c-catman .cat +./usr/share/man/cat2/ppoll.0 comp-c-catman .cat ./usr/share/man/cat2/pread.0 comp-c-catman .cat ./usr/share/man/cat2/preadv.0 comp-c-catman .cat ./usr/share/man/cat2/profil.0 comp-c-catman .cat @@ -12822,6 +12823,7 @@ ./usr/share/man/html2/posix_fadvise.html comp-c-htmlman html ./usr/share/man/html2/posix_fallocate.html comp-c-htmlman html ./usr/share/man/html2/posix_madvise.html comp-c-htmlman html +./usr/share/man/html2/ppoll.html comp-c-htmlman html ./usr/share/man/html2/pread.html comp-c-htmlman html ./usr/share/man/html2/preadv.html comp-c-htmlman html ./usr/share/man/html2/profil.html comp-c-htmlman html @@ -20943,6 +20945,7 @@ ./usr/share/man/man2/posix_fadvise.2 comp-c-man .man ./usr/share/man/man2/posix_fallocate.2 comp-c-man .man ./usr/share/man/man2/posix_madvise.2 comp-c-man .man +./usr/share/man/man2/ppoll.2 comp-c-man .man ./usr/share/man/man2/pread.2 comp-c-man .man ./usr/share/man/man2/preadv.2 comp-c-man .man ./usr/share/man/man2/profil.2 comp-c-man .man Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.324 src/distrib/sets/lists/debug/mi:1.325 --- src/distrib/sets/lists/debug/mi:1.324 Mon Jul 6 18:47:02 2020 +++ src/distrib/sets/lists/debug/mi Fri Jul 17 15:34:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.324 2020/07/06 18:47:02 christos Exp $ +# $NetBSD: mi,v 1.325 2020/07/17 15:34:17 kamil Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -2169,8 +2169,10 @@ ./usr/libdata/debug/usr/tests/lib/libc/sys/t_pipe.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_pipe2.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_poll.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libc/sys/t_pollts.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_posix_fadvise.debug tests-lib-debug debug,atf,rump ./usr/libdata/debug/usr/tests/lib/libc/sys/t_posix_fallocate.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libc/sys/t_ppoll.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_ptrace.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_ptrace_sigchld.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_ptrace_wait.debug tests-lib-debug debug,atf,compattestfile Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.873 src/distrib/sets/lists/tests/mi:1.874 --- src/distrib/sets/lists/tests/mi:1.873 Mon Jul 6 18:47:02 2020 +++ src/distrib/sets/lists/tests/mi Fri Jul 17 15:34:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.873 2020/07/06 18:47:02 christos Exp $ +# $NetBSD:
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: kamil Date: Fri Jul 17 15:24:03 UTC 2020 Modified Files: src/distrib/sets/lists/man: mi Log Message: man5/changelist.5 does not depend on MKPOSTFIX To generate a diff of this commit: cvs rdiff -u -r1.1695 -r1.1696 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1695 src/distrib/sets/lists/man/mi:1.1696 --- src/distrib/sets/lists/man/mi:1.1695 Mon Jul 13 09:10:34 2020 +++ src/distrib/sets/lists/man/mi Fri Jul 17 15:24:03 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1695 2020/07/13 09:10:34 jruoho Exp $ +# $NetBSD: mi,v 1.1696 2020/07/17 15:24:03 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -8315,7 +8315,7 @@ ./usr/share/man/man5/capfile.5 man-sys-man .man ./usr/share/man/man5/ccd.conf.5 man-sysutil-man .man ./usr/share/man/man5/cdb.5 man-sys-man .man -./usr/share/man/man5/changelist.5 man-sys-man postfix,.man +./usr/share/man/man5/changelist.5 man-sys-man .man ./usr/share/man/man5/cidr_table.5 man-postfix-man postfix,.man ./usr/share/man/man5/core.5 man-sys-man .man ./usr/share/man/man5/crontab.5 man-cron-man .man
CVS commit: src/usr.bin/tail
Module Name:src Committed By: kamil Date: Sat Jun 20 10:53:28 UTC 2020 Modified Files: src/usr.bin/tail: tac.1 Log Message: Remove double 'each of' Reported by Weitian LI liweitianux (DragonFly). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/tail/tac.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/tail/tac.1 diff -u src/usr.bin/tail/tac.1:1.2 src/usr.bin/tail/tac.1:1.3 --- src/usr.bin/tail/tac.1:1.2 Sun Oct 1 22:35:23 2017 +++ src/usr.bin/tail/tac.1 Sat Jun 20 10:53:28 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: tac.1,v 1.2 2017/10/01 22:35:23 kre Exp $ +.\" $NetBSD: tac.1,v 1.3 2020/06/20 10:53:28 kamil Exp $ .\" .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -30,7 +30,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 1, 2017 +.Dd June 20, 2020 .Dt TAC 1 .Os .Sh NAME @@ -42,7 +42,7 @@ .Sh DESCRIPTION .Nm .Pq cat backwards -outputs the contents of each of each of the specified files, +outputs the contents of each of the specified files, or the standard input if no files are specified, in reverse line order to the standard output. .Sh EXIT STATUS
CVS commit: src/share/man/man9
Module Name:src Committed By: kamil Date: Thu Jun 18 23:30:51 UTC 2020 Modified Files: src/share/man/man9: kmem.9 Log Message: Document kmem_strdup() and kmem_strndup() Added in 2018 by christos@ in sys/sys/kmem.h r. 1.11. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/share/man/man9/kmem.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/kmem.9 diff -u src/share/man/man9/kmem.9:1.24 src/share/man/man9/kmem.9:1.25 --- src/share/man/man9/kmem.9:1.24 Thu Aug 15 12:24:08 2019 +++ src/share/man/man9/kmem.9 Thu Jun 18 23:30:51 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: kmem.9,v 1.24 2019/08/15 12:24:08 maxv Exp $ +.\" $NetBSD: kmem.9,v 1.25 2020/06/18 23:30:51 kamil Exp $ .\" .\" Copyright (c)2006 YAMAMOTO Takashi, .\" All rights reserved. @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd August 15, 2019 +.Dd June 19, 2020 .Dt KMEM 9 .Os .\" @@ -63,6 +63,12 @@ .Ft char * .Fn kmem_strdupsize \ "const char *str" "size_t *size" "km_flag_t kmflags" +.Ft char * +.Fn kmem_strdup \ +"const char *str" "km_flag_t kmflags" +.Ft char * +.Fn kmem_strndup \ +"const char *str" "size_t manxlen" "km_flag_t kmflags" .Ft void .Fn kmem_strfree \ "char *str" @@ -184,6 +190,22 @@ argument if that is not .Dv NULL . .Pp The +.Fn kmem_strdup +function is a simplified version of +.Fn kmem_strdupsize +that does not return the size of the allocation. +.Pp +The +.Fn kmem_strndup +function is variation of +.Fn kmem_strdup +that copies at most +.Fa maxlen +characters from the string +.Fa str +always NUL terminating the copied string. +.Pp +The .Fn kmem_strfree function can be used to free a .Dv NUL
CVS commit: src
Module Name:src Committed By: kamil Date: Wed Jun 17 00:16:22 UTC 2020 Modified Files: src/lib/libc/rpc: svc_fdset.h src/sbin/fsck_lfs: kernelops.c src/tests/fs/common: fstest_ext2fs.c fstest_ffs.c fstest_lfs.c fstest_msdosfs.c fstest_nfs.c fstest_puffs.c fstest_rumpfs.c fstest_sysvbfs.c fstest_tmpfs.c fstest_udf.c fstest_v7fs.c fstest_zfs.c src/tests/fs/nfs/nfsservice: getmntinfo.c rumpnfsd.c src/usr.sbin/mountd: mountd.c src/usr.sbin/nfsd: nfsd.c src/usr.sbin/rpcbind: check_bound.c rpcb_svc_com.c rpcbind.c util.c Log Message: Include explicitly for previous indirect users via . To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/rpc/svc_fdset.h cvs rdiff -u -r1.3 -r1.4 src/sbin/fsck_lfs/kernelops.c cvs rdiff -u -r1.2 -r1.3 src/tests/fs/common/fstest_ext2fs.c \ src/tests/fs/common/fstest_rumpfs.c src/tests/fs/common/fstest_sysvbfs.c \ src/tests/fs/common/fstest_tmpfs.c src/tests/fs/common/fstest_zfs.c cvs rdiff -u -r1.6 -r1.7 src/tests/fs/common/fstest_ffs.c cvs rdiff -u -r1.7 -r1.8 src/tests/fs/common/fstest_lfs.c cvs rdiff -u -r1.3 -r1.4 src/tests/fs/common/fstest_msdosfs.c cvs rdiff -u -r1.11 -r1.12 src/tests/fs/common/fstest_nfs.c cvs rdiff -u -r1.12 -r1.13 src/tests/fs/common/fstest_puffs.c cvs rdiff -u -r1.4 -r1.5 src/tests/fs/common/fstest_udf.c cvs rdiff -u -r1.1 -r1.2 src/tests/fs/common/fstest_v7fs.c cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/nfsservice/getmntinfo.c cvs rdiff -u -r1.10 -r1.11 src/tests/fs/nfs/nfsservice/rumpnfsd.c cvs rdiff -u -r1.131 -r1.132 src/usr.sbin/mountd/mountd.c cvs rdiff -u -r1.68 -r1.69 src/usr.sbin/nfsd/nfsd.c cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/rpcbind/check_bound.c cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/rpcbind/rpcb_svc_com.c cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/rpcbind/rpcbind.c cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/rpcbind/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/rpc/svc_fdset.h diff -u src/lib/libc/rpc/svc_fdset.h:1.4 src/lib/libc/rpc/svc_fdset.h:1.5 --- src/lib/libc/rpc/svc_fdset.h:1.4 Sun Nov 8 02:46:53 2015 +++ src/lib/libc/rpc/svc_fdset.h Wed Jun 17 00:16:21 2020 @@ -1,7 +1,8 @@ -/* $NetBSD: svc_fdset.h,v 1.4 2015/11/08 02:46:53 christos Exp $ */ +/* $NetBSD: svc_fdset.h,v 1.5 2020/06/17 00:16:21 kamil Exp $ */ # ifdef RUMP_RPC # include +# include # include # undef close # define close(a) rump_sys_close(a) Index: src/sbin/fsck_lfs/kernelops.c diff -u src/sbin/fsck_lfs/kernelops.c:1.3 src/sbin/fsck_lfs/kernelops.c:1.4 --- src/sbin/fsck_lfs/kernelops.c:1.3 Tue Oct 13 22:04:31 2009 +++ src/sbin/fsck_lfs/kernelops.c Wed Jun 17 00:16:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kernelops.c,v 1.3 2009/10/13 22:04:31 pooka Exp $ */ +/* $NetBSD: kernelops.c,v 1.4 2020/06/17 00:16:21 kamil Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: kernelops.c,v 1.3 2009/10/13 22:04:31 pooka Exp $"); +__RCSID("$NetBSD: kernelops.c,v 1.4 2020/06/17 00:16:21 kamil Exp $"); #endif /* !lint */ /* @@ -52,6 +52,7 @@ __RCSID("$NetBSD: kernelops.c,v 1.3 2009 #ifdef USE_RUMP #include +#include #include const struct kernelops kops = { Index: src/tests/fs/common/fstest_ext2fs.c diff -u src/tests/fs/common/fstest_ext2fs.c:1.2 src/tests/fs/common/fstest_ext2fs.c:1.3 --- src/tests/fs/common/fstest_ext2fs.c:1.2 Fri Jul 30 16:15:05 2010 +++ src/tests/fs/common/fstest_ext2fs.c Wed Jun 17 00:16:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fstest_ext2fs.c,v 1.2 2010/07/30 16:15:05 pooka Exp $ */ +/* $NetBSD: fstest_ext2fs.c,v 1.3 2020/06/17 00:16:21 kamil Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -41,6 +41,7 @@ #include #include +#include #include #include "h_fsmacros.h" Index: src/tests/fs/common/fstest_rumpfs.c diff -u src/tests/fs/common/fstest_rumpfs.c:1.2 src/tests/fs/common/fstest_rumpfs.c:1.3 --- src/tests/fs/common/fstest_rumpfs.c:1.2 Sun Mar 16 10:28:03 2014 +++ src/tests/fs/common/fstest_rumpfs.c Wed Jun 17 00:16:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fstest_rumpfs.c,v 1.2 2014/03/16 10:28:03 njoly Exp $ */ +/* $NetBSD: fstest_rumpfs.c,v 1.3 2020/06/17 00:16:21 kamil Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -39,6 +39,7 @@ #include #include +#include #include #include "h_fsmacros.h" Index: src/tests/fs/common/fstest_sysvbfs.c diff -u src/tests/fs/common/fstest_sysvbfs.c:1.2 src/tests/fs/common/fstest_sysvbfs.c:1.3 --- src/tests/fs/common/fstest_sysvbfs.c:1.2 Fri Jul 30 16:15:05 2010 +++ src/tests/fs/common/fstest_sysvbfs.c Wed Jun 17 00:16:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fstest_sysvbfs.c,v 1.2 2010/07/30 16:15:05 pooka Exp $ */ +/* $NetBSD: fstest_sysvbfs.c,v 1.3 2020/06/17 00:16:21 kamil Exp $ */ /*- * Copyright (c) 2010 The NetBSD
CVS commit: src/sys/rump/include/rump
Module Name:src Committed By: kamil Date: Sun Jun 14 23:38:25 UTC 2020 Modified Files: src/sys/rump/include/rump: rump.h Log Message: Remove old compat include of rump_syscallshotgun.h It was separated in 2016 and is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/rump/include/rump/rump.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/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.71 src/sys/rump/include/rump/rump.h:1.72 --- src/sys/rump/include/rump/rump.h:1.71 Sun Jun 14 22:12:58 2020 +++ src/sys/rump/include/rump/rump.h Sun Jun 14 23:38:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.71 2020/06/14 22:12:58 kamil Exp $ */ +/* $NetBSD: rump.h,v 1.72 2020/06/14 23:38:25 kamil Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -133,11 +133,4 @@ int rump_daemonize_done(int); } #endif -/* - * Include macros prehistorically provided by this header. - * The inclusion might go away some year. Include the header directly - * if you want it to keep working for you. - */ -#include - #endif /* _RUMP_RUMP_H_ */
CVS commit: src/sys/rump/include/rump
Module Name:src Committed By: kamil Date: Sun Jun 14 22:12:58 UTC 2020 Modified Files: src/sys/rump/include/rump: rump.h Log Message: Fix header compatibility with C++ This file is OS-agnostic and cannot include OS specific headers. The fallback for NetBSD specific symbol __BEGIN_DECLS didn't work as it was misspelled as _BEGIN_DECLS. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/rump/include/rump/rump.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/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.70 src/sys/rump/include/rump/rump.h:1.71 --- src/sys/rump/include/rump/rump.h:1.70 Thu May 11 18:16:00 2017 +++ src/sys/rump/include/rump/rump.h Sun Jun 14 22:12:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.70 2017/05/11 18:16:00 christos Exp $ */ +/* $NetBSD: rump.h,v 1.71 2020/06/14 22:12:58 kamil Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -86,9 +86,8 @@ enum rump_etfs_type { RUMP_ETFS_DIR_SUBDIRS /* dir + subdirectories (recursive) */ }; -/* um, what's the point ?-) */ -#ifdef _BEGIN_DECLS -_BEGIN_DECLS +#if defined(__cplusplus) +extern "C" { #endif int rump_getversion(void); @@ -130,8 +129,8 @@ int rump_daemonize_done(int); #include #endif -#ifdef _END_DECLS -_END_DECLS +#if defined(__cplusplus) +} #endif /*
CVS commit: src/usr.bin/jot
Module Name:src Committed By: kamil Date: Sun Jun 14 01:26:46 UTC 2020 Modified Files: src/usr.bin/jot: jot.c Log Message: Generate format after setting the prec value Otherwise we end up with setting invalid printf format: "%.-1f" (from "if (snprintf(p, sz, "%%.%df", prec) >= (int)sz)") for prec equal to -1, which is not canonical (rejected by gcc and clang when used explicitly). Detected by ASan (MKSANITIZER) for "jot 8". To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/jot/jot.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/jot/jot.c diff -u src/usr.bin/jot/jot.c:1.27 src/usr.bin/jot/jot.c:1.28 --- src/usr.bin/jot/jot.c:1.27 Sun Feb 3 03:19:29 2019 +++ src/usr.bin/jot/jot.c Sun Jun 14 01:26:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: jot.c,v 1.27 2019/02/03 03:19:29 mrg Exp $ */ +/* $NetBSD: jot.c,v 1.28 2020/06/14 01:26:46 kamil Exp $ */ /*- * Copyright (c) 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\ #if 0 static char sccsid[] = "@(#)jot.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: jot.c,v 1.27 2019/02/03 03:19:29 mrg Exp $"); +__RCSID("$NetBSD: jot.c,v 1.28 2020/06/14 01:26:46 kamil Exp $"); #endif /* not lint */ /* @@ -226,11 +226,12 @@ getargs(int argc, char *argv[]) errx(EXIT_FAILURE, "Too many arguments. What do you mean by %s?", argv[4]); } - getformat(); if (prec == -1) prec = 0; + getformat(); + if (randomize) { /* 'step' is the seed here, use pseudo-random default */ if (!(have & STEP))
CVS commit: src/lib/librumpuser
Module Name:src Committed By: kamil Date: Sat Jun 13 16:51:59 UTC 2020 Modified Files: src/lib/librumpuser: sp_common.c Log Message: Fix incompatible function pointer casts To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/librumpuser/sp_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/sp_common.c diff -u src/lib/librumpuser/sp_common.c:1.41 src/lib/librumpuser/sp_common.c:1.42 --- src/lib/librumpuser/sp_common.c:1.41 Wed May 6 12:44:36 2020 +++ src/lib/librumpuser/sp_common.c Sat Jun 13 16:51:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sp_common.c,v 1.41 2020/05/06 12:44:36 christos Exp $ */ +/* $NetBSD: sp_common.c,v 1.42 2020/06/13 16:51:59 kamil Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -705,15 +705,21 @@ unix_cleanup(struct sockaddr *sa) /*ARGSUSED*/ static int -notsupp(void) +addrparse_notsupp(const char *addr __unused, struct sockaddr **sa __unused, + int allow_wildcard __unused) { fprintf(stderr, "rump_sp: support not yet implemented\n"); return EOPNOTSUPP; } +static void +cleanup_success(struct sockaddr *sa __unused) +{ +} + static int -success(void) +connecthook_success(int s __unused) { return 0; @@ -728,12 +734,12 @@ static struct { cleanup_fn cleanup; } parsetab[] = { { "tcp", PF_INET, sizeof(struct sockaddr_in), - tcp_parse, tcp_connecthook, (cleanup_fn)success }, + tcp_parse, tcp_connecthook, cleanup_success }, { "unix", PF_LOCAL, sizeof(struct sockaddr_un), - unix_parse, (connecthook_fn)success, unix_cleanup }, + unix_parse, connecthook_success, unix_cleanup }, { "tcp6", PF_INET6, sizeof(struct sockaddr_in6), - (addrparse_fn)notsupp, (connecthook_fn)success, - (cleanup_fn)success }, + addrparse_notsupp, connecthook_success, + cleanup_success }, }; #define NPARSE (sizeof(parsetab)/sizeof(parsetab[0]))
CVS commit: src/bin/expr
Module Name:src Committed By: kamil Date: Thu Jun 11 13:08:08 UTC 2020 Modified Files: src/bin/expr: expr.y Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/bin/expr/expr.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/expr/expr.y diff -u src/bin/expr/expr.y:1.45 src/bin/expr/expr.y:1.46 --- src/bin/expr/expr.y:1.45 Wed Jun 27 17:23:36 2018 +++ src/bin/expr/expr.y Thu Jun 11 13:08:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: expr.y,v 1.45 2018/06/27 17:23:36 kamil Exp $ */ +/* $NetBSD: expr.y,v 1.46 2020/06/11 13:08:07 kamil Exp $ */ /*_ * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ %{ #include #ifndef lint -__RCSID("$NetBSD: expr.y,v 1.45 2018/06/27 17:23:36 kamil Exp $"); +__RCSID("$NetBSD: expr.y,v 1.46 2020/06/11 13:08:07 kamil Exp $"); #endif /* not lint */ #include @@ -361,7 +361,7 @@ perform_arith_op(const char *left, const r = -r; } - /* - remove the case of legative l and positive r */ + /* - remove the case of negative l and positive r */ if (l < 0 && r >= 0) { /* Use res as a temporary variable */ res = l;
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: kamil Date: Thu Jun 11 00:33:30 UTC 2020 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: Follow the syscall() logic and mask unsupported syscall ranges in rump Avoids invalid pointer dereference from too large syscall numbers. To generate a diff of this commit: cvs rdiff -u -r1.348 -r1.349 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.348 src/sys/rump/librump/rumpkern/rump.c:1.349 --- src/sys/rump/librump/rumpkern/rump.c:1.348 Sat May 23 23:42:44 2020 +++ src/sys/rump/librump/rumpkern/rump.c Thu Jun 11 00:33:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.348 2020/05/23 23:42:44 ad Exp $ */ +/* $NetBSD: rump.c,v 1.349 2020/06/11 00:33:30 kamil Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.348 2020/05/23 23:42:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.349 2020/06/11 00:33:30 kamil Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -756,7 +756,9 @@ rump_syscall(int num, void *data, size_t p = curproc; e = p->p_emul; #ifndef __HAVE_MINIMAL_EMUL - KASSERT(num > 0 && num < e->e_nsysent); + num &= e->e_nsysent - 1; +#else + num &= SYS_NSYSENT - 1; #endif callp = e->e_sysent + num;