CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Wed Apr 7 03:45:18 UTC 2021 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: bump libevent To generate a diff of this commit: cvs rdiff -u -r1.915 -r1.916 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.272 -r1.273 src/distrib/sets/lists/debug/shl.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.915 src/distrib/sets/lists/base/shl.mi:1.916 --- src/distrib/sets/lists/base/shl.mi:1.915 Fri Apr 2 06:06:26 2021 +++ src/distrib/sets/lists/base/shl.mi Tue Apr 6 23:45:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.915 2021/04/02 10:06:26 martin Exp $ +# $NetBSD: shl.mi,v 1.916 2021/04/07 03:45:18 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -44,7 +44,7 @@ ./lib/libedit.so.3.1base-sys-shlib dynamicroot ./lib/libevent.sobase-sys-shlib dynamicroot ./lib/libevent.so.4base-sys-shlib dynamicroot -./lib/libevent.so.4.1base-sys-shlib dynamicroot +./lib/libevent.so.4.2base-sys-shlib dynamicroot ./lib/libgcc_s.sobase-sys-shlib dynamicroot,gcc ./lib/libgcc_s.so.1base-sys-shlib dynamicroot,gcc ./lib/libgcc_s.so.1.0base-sys-shlib dynamicroot,gcc @@ -317,13 +317,13 @@ ./usr/lib/libelf.so.2.0base-sys-shlib compatfile ./usr/lib/libevent.sobase-sys-shlib compatfile ./usr/lib/libevent.so.4base-sys-shlib compatfile -./usr/lib/libevent.so.4.1 base-sys-shlib compatfile +./usr/lib/libevent.so.4.2 base-sys-shlib compatfile ./usr/lib/libevent_openssl.so base-sys-shlib compatfile ./usr/lib/libevent_openssl.so.4 base-sys-shlib compatfile -./usr/lib/libevent_openssl.so.4.1 base-sys-shlib compatfile +./usr/lib/libevent_openssl.so.4.2 base-sys-shlib compatfile ./usr/lib/libevent_pthreads.so base-sys-shlib compatfile ./usr/lib/libevent_pthreads.so.4 base-sys-shlib compatfile -./usr/lib/libevent_pthreads.so.4.1 base-sys-shlib compatfile +./usr/lib/libevent_pthreads.so.4.2 base-sys-shlib compatfile ./usr/lib/libexecinfo.so base-sys-shlib compatfile ./usr/lib/libexecinfo.so.0 base-sys-shlib compatfile ./usr/lib/libexecinfo.so.0.0 base-sys-shlib compatfile Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.272 src/distrib/sets/lists/debug/shl.mi:1.273 --- src/distrib/sets/lists/debug/shl.mi:1.272 Mon Mar 15 16:17:04 2021 +++ src/distrib/sets/lists/debug/shl.mi Tue Apr 6 23:45:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.272 2021/03/15 20:17:04 christos Exp $ +# $NetBSD: shl.mi,v 1.273 2021/04/07 03:45:18 christos Exp $ ./usr/lib/libbfd_g.a comp-c-debuglib debuglib,compatfile,binutils ./usr/libdata/debug/lib base-sys-usr debug,dynamicroot,compatdir ./usr/libdata/debug/lib/libavl.so.0.0.debug comp-zfs-debug debug,dynamicroot,zfs @@ -11,7 +11,7 @@ ./usr/libdata/debug/lib/libdevmapper.so.1.0.debug comp-sys-debug debug,dynamicroot,lvm ./usr/libdata/debug/lib/libdm.so.0.0.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libedit.so.3.1.debug comp-sys-debug debug,dynamicroot -./usr/libdata/debug/lib/libevent.so.4.1.debug comp-sys-debug debug,dynamicroot +./usr/libdata/debug/lib/libevent.so.4.2.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libgcc_s.so.1.0.debug comp-sys-debug debug,dynamicroot,gcc ./usr/libdata/debug/lib/libipsec.so.3.0.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libkvm.so.6.0.debug comp-sys-debug debug,dynamicroot @@ -110,9 +110,9 @@ ./usr/libdata/debug/usr/lib/libdwarf.so.2.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libedit.so.3.1.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libelf.so.2.0.debug comp-sys-debug debug,compatfile -./usr/libdata/debug/usr/lib/libevent.so.4.1.debug comp-sys-debug debug,compatfile -./usr/libdata/debug/usr/lib/libevent_openssl.so.4.1.debug comp-sys-debug debug,compatfile -./usr/libdata/debug/usr/lib/libevent_pthreads.so.4.1.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libevent.so.4.2.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libevent_openssl.so.4.2.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libevent_pthreads.so.4.2.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libexecinfo.so.0.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libexpat.so.2.3.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libfetch.so.3.0.debug comp-sys-debug debug,compatfile
CVS commit: src/doc
Module Name:src Committed By: christos Date: Wed Apr 7 03:38:51 UTC 2021 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new libevent To generate a diff of this commit: cvs rdiff -u -r1.1788 -r1.1789 src/doc/3RDPARTY cvs rdiff -u -r1.2791 -r1.2792 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1788 src/doc/3RDPARTY:1.1789 --- src/doc/3RDPARTY:1.1788 Sat Apr 3 13:46:07 2021 +++ src/doc/3RDPARTY Tue Apr 6 23:38:50 2021 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1788 2021/04/03 17:46:07 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1789 2021/04/07 03:38:50 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -738,12 +738,12 @@ The lvm2tools and the libdevmapper are n repository. See the lvm2tools Notes for more information. Package: libevent -Version: 2.1.8-stable +Version: 2.1.12-stable Current Vers: 2.1.12-stable Maintainer: Niels Provos Archive Site: http://www.monkey.org/~provos/libevent/ Home Page: http://www.monkey.org/~provos/libevent/ -Date: 2021-03-01 +Date: 2021-04-06 Responsible: License: BSD (3/4-clause) Location: external/bsd/libevent/dist Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2791 src/doc/CHANGES:1.2792 --- src/doc/CHANGES:1.2791 Sat Apr 3 13:46:07 2021 +++ src/doc/CHANGES Tue Apr 6 23:38:50 2021 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2791 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2792 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -346,3 +346,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: evbppc: Add support for DHT Walnut 405GP evaluation board. [rin 20210402] acpi(4): Updated ACPICA to 20210331. [christos 20210403] + libevent: Import libevent 2.1.12 [christos 20210406]
CVS commit: src/doc
Module Name:src Committed By: christos Date: Wed Apr 7 03:38:40 UTC 2021 Modified Files: src/doc: CHANGES.prev Log Message: fix incorrect version To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/doc/CHANGES.prev 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.prev diff -u src/doc/CHANGES.prev:1.157 src/doc/CHANGES.prev:1.158 --- src/doc/CHANGES.prev:1.157 Mon Sep 28 22:49:55 2020 +++ src/doc/CHANGES.prev Tue Apr 6 23:38:39 2021 @@ -1,4 +1,4 @@ -LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.157 $> +LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.158 $> Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8: @@ -12160,7 +12160,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0: acpi(4): Updated ACPICA to 20170119. [christos 20170125] bta2dpd(8): Add new bluetooth A2DP daemon. [nat 20170129] kerberos(8): Update to latest Heimdal-HEAD [christos 20170128] - libevent: Import libevent 2.1.18 [christos 20170131] + libevent: Import libevent 2.1.8 [christos 20170131] nc(1): Add a netcat utility from OpenBSD [christos 20170206] pthread_dbg(3): Removed from the base distribution. [kamil 20170208] ixg(4): Support TX/RX multiqueue [msaitoh 20170208]
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Wed Apr 7 02:59:01 UTC 2021 Modified Files: src/sys/arch/mips/mips: trap.c Log Message: Basic dtrace trap support. Mostly from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.260 -r1.261 src/sys/arch/mips/mips/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/trap.c diff -u src/sys/arch/mips/mips/trap.c:1.260 src/sys/arch/mips/mips/trap.c:1.261 --- src/sys/arch/mips/mips/trap.c:1.260 Mon Mar 29 03:22:17 2021 +++ src/sys/arch/mips/mips/trap.c Wed Apr 7 02:59:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $ */ +/* $NetBSD: trap.c,v 1.261 2021/04/07 02:59:01 simonb Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.261 2021/04/07 02:59:01 simonb Exp $"); #include "opt_cputype.h" /* which mips CPU levels do we support? */ #include "opt_ddb.h" @@ -83,6 +83,16 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.2 #include #endif +#ifdef KDTRACE_HOOKS +#include + +/* Not used for now, but needed for dtrace/fbt modules */ +dtrace_doubletrap_func_t dtrace_doubletrap_func = NULL; +dtrace_trap_func_t dtrace_trap_func = NULL; + +int(* dtrace_invop_jump_addr)(struct trapframe *); +#endif /* KDTRACE_HOOKS */ + const char * const trap_names[] = { "external interrupt", "TLB modification", @@ -187,6 +197,30 @@ trap(uint32_t status, uint32_t cause, va LWP_CACHE_CREDS(l, p); } +#ifdef KDTRACE_HOOKS + /* + * A trap can occur while DTrace executes a probe. Before + * executing the probe, DTrace blocks re-scheduling and sets + * a flag in its per-cpu flags to indicate that it doesn't + * want to fault. On returning from the probe, the no-fault + * flag is cleared and finally re-scheduling is enabled. + * + * If the DTrace kernel module has registered a trap handler, + * call it and if it returns non-zero, assume that it has + * handled the trap and modified the trap frame so that this + * function can return normally. + */ + /* + * XXXDTRACE: add pid probe handler here (if ever) + */ + if (!USERMODE(status)) { + if ((dtrace_trap_func != NULL) && + ((*dtrace_trap_func)(tf, type) != 0)) { + return; + } + } +#endif /* KDTRACE_HOOKS */ + switch (type) { default: dopanic: @@ -518,8 +552,15 @@ trap(uint32_t status, uint32_t cause, va } break; /* SIGNAL */ - case T_WATCH: case T_BREAK: +#ifdef KDTRACE_HOOKS + if ((dtrace_invop_jump_addr != NULL) && + (dtrace_invop_jump_addr(tf) == 0)) { + return; + } +#endif /* KDTRACE_HOOKS */ + /* FALLTHROUGH */ + case T_WATCH: #if defined(DDB) kdb_trap(type, &tf->tf_registers); return; /* KERN */ @@ -805,16 +846,6 @@ mips_singlestep(struct lwp *l) return 0; } -#ifdef KDTRACE_HOOKS -#include - -/* Not used for now, but needed for dtrace/fbt modules */ -dtrace_doubletrap_func_t dtrace_doubletrap_func = NULL; -dtrace_trap_func_t dtrace_trap_func = NULL; - -int(* dtrace_invop_jump_addr)(struct trapframe *); -#endif /* KDTRACE_HOOKS */ - #ifdef TRAP_SIGDEBUG static void frame_dump(const struct trapframe *tf, struct pcb *pcb)
CVS import: src/external/bsd/libevent/dist
Module Name:src Committed By: christos Date: Wed Apr 7 02:43:17 UTC 2021 Update of /cvsroot/src/external/bsd/libevent/dist In directory ivanova.netbsd.org:/tmp/cvs-serv18565 Log Message: Changes in version 2.1.12-stable (05 Jul 2020) This release contains mostly bug fixes (I decided not to port some features that can be ported even without ABI breakage, if you cannot find feature that you are interested in, please give us a note!) Since 2.1.12 libevent will use github actions as main CI, since it recommends itself better then travis/appveyor (and had been removed from upstream). Look carefully at "slightly touches the behaviour" section. Below you will find some of changes (this list has been cleaned up from the patches that touches only tests and similar): CI: o Backport github actions to 2.1 (be3acd7c Azat Khuzhin) o Merge branch 'event_rpcgen.py-cleanup' (f0ded5f3, 48e04887 Enji Cooper) o Add API/ABI checker (using LVC) (709210d4, 2af1f6cc yuangongji) test: o tinytest: support timeout on Windows (794e8f75 yuangongji) o Merge branch 'osx-clock' (e85afbe3 Azat Khuzhin) o test-ratelim: calculate timers bias (for slow CPUs) to avoid false-positive (8ad26d0b Azat Khuzhin) fixes: o buffer: do not pass NULL to memcpy() from evbuffer_pullup() (5b063049 Azat Khuzhin) o http: fix undefined-shift in EVUTIL_IS*_ helpers (6b8d02a7 Azat Khuzhin) o Check error code of evhttp_add_header_internal() in evhttp_parse_query_impl() (97e28f09 Azat Khuzhin) o http: fix EVHTTP_CON_AUTOFREE in case of timeout (and some else) (1be25938 Azat Khuzhin) o evdns: Add additional validation for values of dns options (c2972453 ayuseleznev) o There is typo in GetAdaptersAddresses windows library. It should be iphlpapi.dll (891adda9 Aleksandr-Melnikov) o Merge branch 'EV_CLOSED-and-EV_ET-fixes' (db2efdf5 Azat Khuzhin) o Fix memory corruption in EV_CLOSURE_EVENT_FINALIZE with debug enabled (8ccd8f56 Jan Kasiak) o increase segment refcnt only if evbuffer_add_file_segment() succeeds (30662a3c yuangongji) o evdns: fix a crash when evdns_base with waiting requests is freed (6f8e0e97 ayuseleznev) o event_base_once: fix potential null pointer threat (2e9ceb16 chenguolong) o http: do not assume body for CONNECT (1b42270b Azat Khuzhin) o evbuffer_add_file: fix freeing of segment in the error path (5f017bde Azat Khuzhin) o Fix checking return value of the evdns_base_resolv_conf_parse() (fc51bf2c Azat Khuzhin) o Merge branch 'fix-signal-leak' (poll/select now needs reinit) (1c9cc07b Azat Khuzhin) improvements: o evutil_time: improve evutil_gettimeofday on Windows (a8219143 Nick Grifka) o Support EV_CLOSED on linux for poll(2) (2530e7c6 Azat Khuzhin) o Parse IPv6 scope IDs. (f602211f Philip Homburg) o evutil_time: Implements usleep() using wait funtion on Windows (d42240d1 yuangongji) o evutil_time: detect and use _gmtime64_s()/_gmtime64() (f4a6152c yuangongji) slightly touches the behaviour: o bufferevent: allow setting priority on socket and openssl type (4dd3acdd Nicolas J. Bouliane) o Fix EV_CLOSED detection/reporting (epoll only) (1df324d4 Azat Khuzhin) (XXX) o Revert "Warn if forked from the event loop during event_reinit()" (71f5c0d3 Azat Khuzhin) samples: o https-client: load certificates from the system cert store on Windows (e9478640 yuangongji) build fixes: o Do not use sysctl.h on linux (it had been deprecated) (d2871a37 Azat Khuzhin) o cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT (a62ec765 Paul Osborne) o Update list of cmake files for autotools dist archive (2016f017 Azat Khuzhin) o LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default (640f9cf6 Mario Emmenlauer) o cmake: fix getaddrinfo checking error (dea51c2e yuangongji) o autoconf: fix getaddrinfo checking errors on mingw (b9bf7fa7 yuangongji) o Do not use shared global structures on CYGWIN (8a9b5655 Azat Khuzhin) o Added uninstall target check to cmakelists (3f1fb1f9 Dimo Markov) o Fix compilation without OPENSSL_API_COMPAT (921bdcdd Azat Khuzhin) o cmake: improve package config file (1c047618, baec84f2 yuangongji) o Link with iphlpapi only on windows (976f7d34 Azat Khuzhin) o autotools: fails build when need but can not find openssl (93174bb5 yuangongji) o Merge branch 'http-connect' (e2424229 Azat Khuzhin) o Fix compat with NetBSD >= 10 (5febb4e1 Kamil Rytarowski) o cmake: fix getrandom() detection (e0e5f3bd Azat Khuzhin) o arc4random: replace sysctl() with getrandom (on linux) (66ec78fd Azat Khuzhin) o Upgrade autoconf (after upgrading minimum required to 2.67) (45da7d9d yuangongji) o eliminate some C4267 warnings in Windows (9e468c77 yuangongji) o autotools: attach doxygen target into all target (5d1e8570 yuangongji) o cmake: attach doxygen target into all target (7a85300a yuangongji) o Change the minimum version of automake to 1.13 and autoconf to 2.67 (fdb8fb
CVS commit: src/external/cddl/osnet/dev/dtrace/mips
Module Name:src Committed By: simonb Date: Wed Apr 7 01:54:32 UTC 2021 Modified Files: src/external/cddl/osnet/dev/dtrace/mips: dtrace_isa.c Log Message: Use NAL (nop-and-link) to get the current PC. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c diff -u src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c:1.1 src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c:1.2 --- src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c:1.1 Mon Mar 29 05:17:09 2021 +++ src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c Wed Apr 7 01:54:31 2021 @@ -107,9 +107,8 @@ dtrace_getpcstack(pc_t *pcstack, int pcs ra = (register_t)(intptr_t)__builtin_return_address(0); __asm __volatile( - "jal 99f\n" - "nop\n" - "99:\n" + "nal\n" + " nop\n" "move %0, $31\n" /* get ra */ "move $31, %1\n" /* restore ra */ : "=r" (pc)
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Apr 6 22:21:53 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: sync comment with reality after renaming several functions No functional change. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/xlint/lint1/lex.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/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.23 src/usr.bin/xlint/lint1/lex.c:1.24 --- src/usr.bin/xlint/lint1/lex.c:1.23 Fri Apr 2 22:05:43 2021 +++ src/usr.bin/xlint/lint1/lex.c Tue Apr 6 22:21:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.23 2021/04/02 22:05:43 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.24 2021/04/06 22:21:53 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: lex.c,v 1.23 2021/04/02 22:05:43 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.24 2021/04/06 22:21:53 rillig Exp $"); #endif #include @@ -487,7 +487,7 @@ keyw(sym_t *sym) /* * Convert a string representing an integer into internal representation. - * The value is returned in yylval. icon() (and yylex()) returns T_CON. + * Return T_CON, storing the numeric value in yylval, for yylex. */ int lex_integer_constant(const char *yytext, size_t yyleng, int base)
CVS commit: src/share/man/man4
Module Name:src Committed By: riastradh Date: Tue Apr 6 22:12:16 UTC 2021 Modified Files: src/share/man/man4: rnd.4 Log Message: Remove sentence that has not been true since netbsd-6. ioctl(RNDADDDATA) is not the only way to raise the entropy estimate; privileged writes to /dev/random have the same effect. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/share/man/man4/rnd.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/rnd.4 diff -u src/share/man/man4/rnd.4:1.38 src/share/man/man4/rnd.4:1.39 --- src/share/man/man4/rnd.4:1.38 Fri Feb 12 01:52:09 2021 +++ src/share/man/man4/rnd.4 Tue Apr 6 22:12:16 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: rnd.4,v 1.38 2021/02/12 01:52:09 riastradh Exp $ +.\" $NetBSD: rnd.4,v 1.39 2021/04/06 22:12:16 riastradh Exp $ .\" .\" Copyright (c) 2014-2020 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -389,9 +389,6 @@ This ioctl can be used only once per boo It is intended for a system that saves entropy to disk on shutdown and restores it on boot, so that the system can immediately be unpredictable without having to wait to gather entropy. -.Pp -This ioctl is the only way for userland to directly change the system's -entropy estimate. .It Dv RNDGETPOOLSTAT Pq Vt rndpoolstat_t .Bd -literal typedef struct {
CVS commit: src/sbin/rndctl
Module Name:src Committed By: riastradh Date: Tue Apr 6 22:02:40 UTC 2021 Modified Files: src/sbin/rndctl: rndctl.8 Log Message: Clarify wording further based on private feedback. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sbin/rndctl/rndctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/rndctl/rndctl.8 diff -u src/sbin/rndctl/rndctl.8:1.28 src/sbin/rndctl/rndctl.8:1.29 --- src/sbin/rndctl/rndctl.8:1.28 Tue Apr 6 12:32:39 2021 +++ src/sbin/rndctl/rndctl.8 Tue Apr 6 22:02:40 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: rndctl.8,v 1.28 2021/04/06 12:32:39 riastradh Exp $ +.\" $NetBSD: rndctl.8,v 1.29 2021/04/06 22:02:40 riastradh Exp $ .\" .\" Copyright (c) 1997 Michael Graff .\" All rights reserved. @@ -66,15 +66,23 @@ is altered or displayed. This is mutually exclusive with .Fl t . .It Fl E -Disable entropy estimation for the given device name or device type. +Ignore estimates of entropy from the drivers for the given device name +or type. +.Pp If collection is still enabled, data is still collected and mixed into -the internal entropy pool, but no entropy is assumed to be present. +the internal entropy pool, but no entropy is assumed to be present and +data from the selected devices will not unblock +.Pa /dev/random . .It Fl e -Re-enable entropy estimation for the given device name or device type. -If the kernel's estimate for the given device is zero, as it is for -devices of types other than +Accept estimates of entropy from the drivers for the given device name +or type. +.Pp +.Cm "rndctl -e" +does not change the estimate provided by the driver; if the driver's +estimate is zero, as it generally is for devices of types other than .Ic rng , -this does not increase the estimate. +it remains zero after +.Cm "rndctl -e" . .It Fl i With the .Fl L @@ -86,9 +94,11 @@ even if the file claims to have adequate This is useful if the file is on a medium, such as an NFS share, that the operator does not know to be secret. .It Fl L -Load saved entropy from file +Load a seed from .Ar save-file -and overwrite it with a seed derived by hashing it together with output +generated by +.Cm "rndctl -S" . +Overwrite it with a seed derived by hashing it together with output from .Pa /dev/urandom so that the new seed has at least as much entropy as either the old @@ -105,7 +115,7 @@ or .Ar devname specified. .It Fl S -Save entropy to file +Generate a seed from the system entropy pool and save it to .Ar save-file for later use with .Cm "rndctl -L" .
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Apr 6 21:59:58 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_118.c src/usr.bin/xlint/lint1: tree.c Log Message: lint: for shift in C99 mode, do not warn about difference to pre-C90 C99 is too far away from traditional C to make this warning useful. There are 3 different situations in which this warning is generated: For '1 << (unsigned char)1', the result type is 'unsigned int' in traditional C. The result type is unsigned because at least 1 of the operators is unsigned, and it is 'unsigned int' because the usual arithmetic promotions are applied. For '1 >> (long)1', as well as for '1 << (long)1', the result type is 'long' in traditional C since the usual arithmetic promotions are applied. Omitting this warning in C99 mode reduces the amount of lint warnings in a typical NetBSD release build by approximately 6800 of 107000 total. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_118.c cvs rdiff -u -r1.270 -r1.271 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_118.c diff -u src/tests/usr.bin/xlint/lint1/msg_118.c:1.3 src/tests/usr.bin/xlint/lint1/msg_118.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_118.c:1.3 Sun Feb 28 01:22:02 2021 +++ src/tests/usr.bin/xlint/lint1/msg_118.c Tue Apr 6 21:59:58 2021 @@ -1,9 +1,9 @@ -/* $NetBSD: msg_118.c,v 1.3 2021/02/28 01:22:02 rillig Exp $ */ +/* $NetBSD: msg_118.c,v 1.4 2021/04/06 21:59:58 rillig Exp $ */ # 3 "msg_118.c" -// Test for message: semantics of '%s' change in ANSI C; use explicit cast [118] +/* Test for message: semantics of '%s' change in ANSI C; use explicit cast [118] */ -/* lint1-extra-flags: -h */ +/* lint1-flags: -hsw */ int int_shl_uint(int i, unsigned int u) Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.270 src/usr.bin/xlint/lint1/tree.c:1.271 --- src/usr.bin/xlint/lint1/tree.c:1.270 Tue Apr 6 21:35:25 2021 +++ src/usr.bin/xlint/lint1/tree.c Tue Apr 6 21:59:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.270 2021/04/06 21:35:25 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.271 2021/04/06 21:59:58 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.270 2021/04/06 21:35:25 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.271 2021/04/06 21:59:58 rillig Exp $"); #endif #include @@ -855,7 +855,7 @@ typeok_shr(const mod_t *mp, * The left operand would become unsigned in * traditional C. */ - if (hflag && + if (hflag && !Sflag && (ln->tn_op != CON || ln->tn_val->v_quad < 0)) { /* semantics of '%s' change in ANSI C; use ... */ warning(118, mp->m_name); @@ -866,7 +866,7 @@ typeok_shr(const mod_t *mp, * In traditional C the left operand would be extended, * possibly with 1, and then shifted. */ - if (hflag && + if (hflag && !Sflag && (ln->tn_op != CON || ln->tn_val->v_quad < 0)) { /* semantics of '%s' change in ANSI C; use ... */ warning(118, mp->m_name); @@ -891,7 +891,7 @@ typeok_shl(const mod_t *mp, tspec_t lt, * that there is really a difference between * ANSI C and traditional C. */ - if (hflag) + if (hflag && !Sflag) /* semantics of '%s' change in ANSI C; use ... */ warning(118, mp->m_name); }
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Apr 6 21:44:12 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_121.c msg_121.exp Log Message: lint: test what happens for 'int << double' I just wanted to see whether typeok_shift would be reached in this case, to ensure that is_uinteger applies as expected. It does. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_121.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_121.exp 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/xlint/lint1/msg_121.c diff -u src/tests/usr.bin/xlint/lint1/msg_121.c:1.3 src/tests/usr.bin/xlint/lint1/msg_121.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_121.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_121.c Tue Apr 6 21:44:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_121.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_121.c,v 1.4 2021/04/06 21:44:12 rillig Exp $ */ # 3 "msg_121.c" // Test for message: negative shift [121] @@ -8,3 +8,13 @@ example(int x) { return x << (3 - 5); /* expect: 121 */ } + +void /*ARGSUSED*/ +shift_by_double(int x, double amount) +{ + /* + * This is already caught by typeok_scalar, so it doesn't reach + * typeok_shift via typeok_op. + */ + return x << amount; /* expect: incompatible types */ +} Index: src/tests/usr.bin/xlint/lint1/msg_121.exp diff -u src/tests/usr.bin/xlint/lint1/msg_121.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_121.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_121.exp:1.2 Fri Jan 8 21:25:03 2021 +++ src/tests/usr.bin/xlint/lint1/msg_121.exp Tue Apr 6 21:44:12 2021 @@ -1 +1,2 @@ msg_121.c(9): warning: negative shift [121] +msg_121.c(19): error: operands of '<<' have incompatible types (int != double) [107]
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Apr 6 21:35:25 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: reduce indentation of typeok_shift No functional change. To generate a diff of this commit: cvs rdiff -u -r1.269 -r1.270 src/usr.bin/xlint/lint1/tree.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/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.269 src/usr.bin/xlint/lint1/tree.c:1.270 --- src/usr.bin/xlint/lint1/tree.c:1.269 Tue Apr 6 21:32:57 2021 +++ src/usr.bin/xlint/lint1/tree.c Tue Apr 6 21:35:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.269 2021/04/06 21:32:57 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.270 2021/04/06 21:35:25 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.269 2021/04/06 21:32:57 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.270 2021/04/06 21:35:25 rillig Exp $"); #endif #include @@ -900,21 +900,21 @@ typeok_shl(const mod_t *mp, tspec_t lt, static void typeok_shift(tspec_t lt, const tnode_t *rn, tspec_t rt) { - if (rn->tn_op == CON) { - if (!is_uinteger(rt) && rn->tn_val->v_quad < 0) { - /* negative shift */ - warning(121); - } else if ((uint64_t)rn->tn_val->v_quad == - (uint64_t)size_in_bits(lt)) { - /* shift equal to size of object */ - warning(267); - } else if ((uint64_t)rn->tn_val->v_quad > - (uint64_t)size_in_bits(lt)) { - /* shift amount %llu is greater than bit-size %llu of '%s' */ - warning(122, (unsigned long long)rn->tn_val->v_quad, - (unsigned long long)size_in_bits(lt), - tspec_name(lt)); - } + if (rn->tn_op != CON) + return; + + if (!is_uinteger(rt) && rn->tn_val->v_quad < 0) { + /* negative shift */ + warning(121); + } else if ((uint64_t)rn->tn_val->v_quad == + (uint64_t)size_in_bits(lt)) { + /* shift equal to size of object */ + warning(267); + } else if ((uint64_t)rn->tn_val->v_quad > (uint64_t)size_in_bits(lt)) { + /* shift amount %llu is greater than bit-size %llu of '%s' */ + warning(122, (unsigned long long)rn->tn_val->v_quad, + (unsigned long long)size_in_bits(lt), + tspec_name(lt)); } }
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Apr 6 21:32:57 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_117.exp msg_120.exp msg_122.c msg_122.exp src/usr.bin/xlint/lint1: err.c tree.c Log Message: lint: add details to warning about too large shift amount The previous message 'shift greater than size of object' was too short to give reasonable hints, especially when the expressions involve typedefs or macros. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_117.exp \ src/tests/usr.bin/xlint/lint1/msg_120.exp \ src/tests/usr.bin/xlint/lint1/msg_122.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_122.exp cvs rdiff -u -r1.102 -r1.103 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.268 -r1.269 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_117.exp diff -u src/tests/usr.bin/xlint/lint1/msg_117.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_117.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_117.exp:1.3 Sun Jan 31 11:44:48 2021 +++ src/tests/usr.bin/xlint/lint1/msg_117.exp Tue Apr 6 21:32:57 2021 @@ -1,6 +1,6 @@ msg_117.c(11): warning: bitwise '>>' on signed value possibly nonportable [117] msg_117.c(23): warning: bitwise '>>' on signed value nonportable [120] msg_117.c(29): warning: bitwise '>>' on signed value possibly nonportable [117] -msg_117.c(29): warning: shift greater than size of object [122] +msg_117.c(29): warning: shift amount 4660 is greater than bit-size 32 of 'int' [122] msg_117.c(35): warning: bitwise '>>' on signed value possibly nonportable [117] msg_117.c(35): warning: negative shift [121] Index: src/tests/usr.bin/xlint/lint1/msg_120.exp diff -u src/tests/usr.bin/xlint/lint1/msg_120.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_120.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_120.exp:1.3 Sun Jan 31 11:44:48 2021 +++ src/tests/usr.bin/xlint/lint1/msg_120.exp Tue Apr 6 21:32:57 2021 @@ -1,6 +1,6 @@ msg_120.c(11): warning: bitwise '>>' on signed value possibly nonportable [117] msg_120.c(23): warning: bitwise '>>' on signed value nonportable [120] msg_120.c(29): warning: bitwise '>>' on signed value possibly nonportable [117] -msg_120.c(29): warning: shift greater than size of object [122] +msg_120.c(29): warning: shift amount 4660 is greater than bit-size 32 of 'int' [122] msg_120.c(35): warning: bitwise '>>' on signed value possibly nonportable [117] msg_120.c(35): warning: negative shift [121] Index: src/tests/usr.bin/xlint/lint1/msg_122.c diff -u src/tests/usr.bin/xlint/lint1/msg_122.c:1.3 src/tests/usr.bin/xlint/lint1/msg_122.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_122.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_122.c Tue Apr 6 21:32:57 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_122.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_122.c,v 1.4 2021/04/06 21:32:57 rillig Exp $ */ # 3 "msg_122.c" -// Test for message: shift greater than size of object [122] +// Test for message: shift amount %llu is greater than bit-size %llu of '%s' [122] int example(int x) Index: src/tests/usr.bin/xlint/lint1/msg_122.exp diff -u src/tests/usr.bin/xlint/lint1/msg_122.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_122.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_122.exp:1.2 Fri Jan 8 21:25:03 2021 +++ src/tests/usr.bin/xlint/lint1/msg_122.exp Tue Apr 6 21:32:57 2021 @@ -1 +1 @@ -msg_122.c(9): warning: shift greater than size of object [122] +msg_122.c(9): warning: shift amount 129 is greater than bit-size 32 of 'int' [122] Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.102 src/usr.bin/xlint/lint1/err.c:1.103 --- src/usr.bin/xlint/lint1/err.c:1.102 Mon Apr 5 02:05:47 2021 +++ src/usr.bin/xlint/lint1/err.c Tue Apr 6 21:32:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.102 2021/04/05 02:05:47 rillig Exp $ */ +/* $NetBSD: err.c,v 1.103 2021/04/06 21:32:57 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.102 2021/04/05 02:05:47 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.103 2021/04/06 21:32:57 rillig Exp $"); #endif #include @@ -176,7 +176,7 @@ const char *msgs[] = { "conversion of '%s' to '%s' is out of range", /* 119 */ "bitwise '%s' on signed value nonportable", /* 120 */ "negative shift", /* 121 */ - "shift greater than size of object", /* 122 */ + "shift amount %llu is greater than bit-size %llu of '%s'",/* 122 */ "illegal combination of %s (%s) and %s (%s), op %s", /* 123 */ "illegal pointer combination (%s) and (%s), op %s", /* 124 */ "ANSI C forbids ordered comparisons of pointers to functions",/* 125 */ Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lin
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Apr 6 21:17:28 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_132.c msg_132.exp src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix wrong warning about losing accuracy when converting to _Bool To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_132.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_132.exp cvs rdiff -u -r1.267 -r1.268 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_132.c diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.4 src/tests/usr.bin/xlint/lint1/msg_132.c:1.5 --- src/tests/usr.bin/xlint/lint1/msg_132.c:1.4 Tue Apr 6 21:10:37 2021 +++ src/tests/usr.bin/xlint/lint1/msg_132.c Tue Apr 6 21:17:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_132.c,v 1.4 2021/04/06 21:10:37 rillig Exp $ */ +/* $NetBSD: msg_132.c,v 1.5 2021/04/06 21:17:28 rillig Exp $ */ # 3 "msg_132.c" // Test for message: conversion from '%s' to '%s' may lose accuracy [132] @@ -63,9 +63,14 @@ convert_signed(i8 v8, i16 v16, i32 v32, v64 = v32; } +/* + * Before tree.c 1.268 from 2021-04-06, lint wrongly warned that conversion to + * _Bool might lose accuracy. C99 6.3.1.2 defines a special conversion rule + * from scalar to _Bool though. + */ _Bool to_bool(long a, long b) { /* seen in fp_lib.h, function wideRightShiftWithSticky */ - return a | b; /* expect: 132 *//*FIXME*/ + return a | b; } Index: src/tests/usr.bin/xlint/lint1/msg_132.exp diff -u src/tests/usr.bin/xlint/lint1/msg_132.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_132.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_132.exp:1.3 Tue Apr 6 21:10:37 2021 +++ src/tests/usr.bin/xlint/lint1/msg_132.exp Tue Apr 6 21:17:28 2021 @@ -10,4 +10,3 @@ msg_132.c(51): warning: conversion from msg_132.c(54): warning: conversion from 'int' to 'short' may lose accuracy [132] msg_132.c(55): warning: conversion from 'long long' to 'short' may lose accuracy [132] msg_132.c(59): warning: conversion from 'long long' to 'int' may lose accuracy [132] -msg_132.c(70): warning: conversion from 'long' to '_Bool' may lose accuracy [132] Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.267 src/usr.bin/xlint/lint1/tree.c:1.268 --- src/usr.bin/xlint/lint1/tree.c:1.267 Tue Apr 6 13:17:04 2021 +++ src/usr.bin/xlint/lint1/tree.c Tue Apr 6 21:17:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.267 2021/04/06 13:17:04 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.268 2021/04/06 21:17:27 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.267 2021/04/06 13:17:04 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.268 2021/04/06 21:17:27 rillig Exp $"); #endif #include @@ -1948,6 +1948,9 @@ check_integer_conversion(op_t op, int ar if (op == CVT) return; + if (Sflag && nt == BOOL) + return; /* See C99 6.3.1.2 */ + if (Pflag && portable_size_in_bits(nt) > portable_size_in_bits(ot) && is_uinteger(nt) != is_uinteger(ot)) { if (aflag > 0 && pflag) {
CVS commit: src/lib
Module Name:src Committed By: jkoshy Date: Tue Apr 6 21:13:04 UTC 2021 Modified Files: src/lib: Makefile Log Message: Attempt to unbreak the build by reverting r1.288. To generate a diff of this commit: cvs rdiff -u -r1.288 -r1.289 src/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/Makefile diff -u src/lib/Makefile:1.288 src/lib/Makefile:1.289 --- src/lib/Makefile:1.288 Tue Apr 6 20:13:43 2021 +++ src/lib/Makefile Tue Apr 6 21:13:04 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.288 2021/04/06 20:13:43 jkoshy Exp $ +# $NetBSD: Makefile,v 1.289 2021/04/06 21:13:04 jkoshy Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -62,7 +62,7 @@ SUBDIR+= ../external/bsd/am-utils/lib SUBDIR+= ../external/bsd/flex/lib SUBDIR+= ../external/bsd/tre/lib -SUBDIR+= ../external/bsd/elftoolchain # libelf and libdwarf +SUBDIR+= ../external/bsd/elftoolchain/lib/libelf SUBDIR+= ../external/bsd/liblzf/lib SUBDIR+= ../external/bsd/libpcap/lib @@ -118,6 +118,7 @@ SUBDIR+= ../external/public-domain/xz/li SUBDIR+= ../crypto/external/bsd/netpgp/libmj SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz SUBDIR+= ../external/bsd/blocklist/lib # depends on libpthread +SUBDIR+= ../external/bsd/elftoolchain/lib/libdwarf # depends on libelf SUBDIR+= ../external/mit/lua/lib # depends on libm SUBDIR+= ../external/public-domain/sqlite/lib # depends on libm SUBDIR+= libcurses # depends on libterminfo
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Apr 6 21:10:37 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_132.c msg_132.exp Log Message: tests/lint: demonstrate wrong warning about losing accuracy To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_132.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_132.exp 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/xlint/lint1/msg_132.c diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.3 src/tests/usr.bin/xlint/lint1/msg_132.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_132.c:1.3 Sun Feb 28 21:39:17 2021 +++ src/tests/usr.bin/xlint/lint1/msg_132.c Tue Apr 6 21:10:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_132.c,v 1.3 2021/02/28 21:39:17 rillig Exp $ */ +/* $NetBSD: msg_132.c,v 1.4 2021/04/06 21:10:37 rillig Exp $ */ # 3 "msg_132.c" // Test for message: conversion from '%s' to '%s' may lose accuracy [132] @@ -62,3 +62,10 @@ convert_signed(i8 v8, i16 v16, i32 v32, v64 = v16; v64 = v32; } + +_Bool +to_bool(long a, long b) +{ + /* seen in fp_lib.h, function wideRightShiftWithSticky */ + return a | b; /* expect: 132 *//*FIXME*/ +} Index: src/tests/usr.bin/xlint/lint1/msg_132.exp diff -u src/tests/usr.bin/xlint/lint1/msg_132.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_132.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_132.exp:1.2 Sun Feb 28 21:39:17 2021 +++ src/tests/usr.bin/xlint/lint1/msg_132.exp Tue Apr 6 21:10:37 2021 @@ -10,3 +10,4 @@ msg_132.c(51): warning: conversion from msg_132.c(54): warning: conversion from 'int' to 'short' may lose accuracy [132] msg_132.c(55): warning: conversion from 'long long' to 'short' may lose accuracy [132] msg_132.c(59): warning: conversion from 'long long' to 'int' may lose accuracy [132] +msg_132.c(70): warning: conversion from 'long' to '_Bool' may lose accuracy [132]
CVS commit: src/lib
Module Name:src Committed By: jkoshy Date: Tue Apr 6 20:13:43 UTC 2021 Modified Files: src/lib: Makefile Log Message: Traverse the complete imported Elftoolchain tree during a build. To generate a diff of this commit: cvs rdiff -u -r1.287 -r1.288 src/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/Makefile diff -u src/lib/Makefile:1.287 src/lib/Makefile:1.288 --- src/lib/Makefile:1.287 Sun Mar 7 15:09:12 2021 +++ src/lib/Makefile Tue Apr 6 20:13:43 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.287 2021/03/07 15:09:12 christos Exp $ +# $NetBSD: Makefile,v 1.288 2021/04/06 20:13:43 jkoshy Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -62,7 +62,7 @@ SUBDIR+= ../external/bsd/am-utils/lib SUBDIR+= ../external/bsd/flex/lib SUBDIR+= ../external/bsd/tre/lib -SUBDIR+= ../external/bsd/elftoolchain/lib/libelf +SUBDIR+= ../external/bsd/elftoolchain # libelf and libdwarf SUBDIR+= ../external/bsd/liblzf/lib SUBDIR+= ../external/bsd/libpcap/lib @@ -118,7 +118,6 @@ SUBDIR+= ../external/public-domain/xz/li SUBDIR+= ../crypto/external/bsd/netpgp/libmj SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz SUBDIR+= ../external/bsd/blocklist/lib # depends on libpthread -SUBDIR+= ../external/bsd/elftoolchain/lib/libdwarf # depends on libelf SUBDIR+= ../external/mit/lua/lib # depends on libm SUBDIR+= ../external/public-domain/sqlite/lib # depends on libm SUBDIR+= libcurses # depends on libterminfo
CVS commit: src/external/bsd/elftoolchain
Module Name:src Committed By: jkoshy Date: Tue Apr 6 19:44:24 UTC 2021 Modified Files: src/external/bsd/elftoolchain: Makefile Log Message: Mirror upstream build steps: traverse 'common' before traversing 'lib'. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftoolchain/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/Makefile diff -u src/external/bsd/elftoolchain/Makefile:1.1 src/external/bsd/elftoolchain/Makefile:1.2 --- src/external/bsd/elftoolchain/Makefile:1.1 Sun Mar 9 16:58:03 2014 +++ src/external/bsd/elftoolchain/Makefile Tue Apr 6 19:44:24 2021 @@ -1,3 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2014/03/09 16:58:03 christos Exp $ -SUBDIR=lib +# $NetBSD: Makefile,v 1.2 2021/04/06 19:44:24 jkoshy Exp $ +SUBDIR= common +SUBDIR+= lib + .include
CVS commit: src/external/bsd/elftoolchain/common
Module Name:src Committed By: jkoshy Date: Tue Apr 6 19:40:20 UTC 2021 Added Files: src/external/bsd/elftoolchain/common: Makefile src/external/bsd/elftoolchain/common/sys: Makefile Log Message: Prepare for and to be installed into ${DESTDIR}/usr/include. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/common/Makefile cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/common/sys/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/elftoolchain/common/Makefile diff -u /dev/null src/external/bsd/elftoolchain/common/Makefile:1.1 --- /dev/null Tue Apr 6 19:40:20 2021 +++ src/external/bsd/elftoolchain/common/Makefile Tue Apr 6 19:40:19 2021 @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1 2021/04/06 19:40:19 jkoshy Exp $ + +.include + +TOP= ${.CURDIR}/../dist +SRCDIR= ${TOP}/common + +.PATH: ${SRCDIR} + +SUBDIR= sys + +INCS= elfdefinitions.h +INCSDIR= /usr/include + +.PHONY: all clean clobber depend obj + +all depend: + +clean clobber: + rm -f ${CLEANFILES} + +cleandepend: + rm -f ${.OBJDIR}/.depend + +.include +.include Index: src/external/bsd/elftoolchain/common/sys/Makefile diff -u /dev/null src/external/bsd/elftoolchain/common/sys/Makefile:1.1 --- /dev/null Tue Apr 6 19:40:20 2021 +++ src/external/bsd/elftoolchain/common/sys/Makefile Tue Apr 6 19:40:19 2021 @@ -0,0 +1,28 @@ +# $NetBSD: Makefile,v 1.1 2021/04/06 19:40:19 jkoshy Exp $ + +.include + +TOP= ${.CURDIR}/../../dist +SRCDIR= ${TOP}/common/sys + +.PATH: ${SRCDIR} + +INCS= elfdefinitions.h +INCSDIR= /usr/include/sys + +elfdefinitions.h: elfdefinitions.m4 elfconstants.m4 + ${TOOL_M4} -I${SRCDIR} -D SRCDIR=${SRCDIR} ${M4FLAGS} \ + elfdefinitions.m4 > ${.TARGET} + +.PHONY: all clean clobber depend + +all depend: elfdefinitions.h + +clean clobber: + rm -f ${INCS} + +cleandepend: + rm -f ${.OBJDIR}/.depend + +.include +.include
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Tue Apr 6 19:28:26 UTC 2021 Modified Files: src/external/bsd/elftoolchain/dist/common: Makefile Log Message: Sync with upstream r3943. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/Makefile diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.3 --- src/external/bsd/elftoolchain/dist/common/Makefile:1.2 Thu Nov 26 21:52:00 2020 +++ src/external/bsd/elftoolchain/dist/common/Makefile Tue Apr 6 19:28:25 2021 @@ -1,7 +1,9 @@ -# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy +# Id: Makefile 3938 2021-04-04 18:16:18Z jkoshy TOP= .. +SUBDIR= sys + INCS= elfdefinitions.h INCSDIR= /usr/include @@ -16,3 +18,4 @@ cleandepend: rm -f ${.OBJDIR}/.depend .include "${TOP}/mk/elftoolchain.inc.mk" +.include "${TOP}/mk/elftoolchain.subdir.mk"
CVS commit: src/external/bsd/elftoolchain/dist/common/sys
Module Name:src Committed By: jkoshy Date: Tue Apr 6 18:38:04 UTC 2021 Added Files: src/external/bsd/elftoolchain/dist/common/sys: Makefile elfconstants.m4 elfdefinitions.m4 Log Message: Add files present in upstream revision r3943. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/dist/common/sys/Makefile \ src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 \ src/external/bsd/elftoolchain/dist/common/sys/elfdefinitions.m4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/elftoolchain/dist/common/sys/Makefile diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/Makefile:1.1 --- /dev/null Tue Apr 6 18:38:04 2021 +++ src/external/bsd/elftoolchain/dist/common/sys/Makefile Tue Apr 6 18:38:04 2021 @@ -0,0 +1,25 @@ +# Id: Makefile 3943 2021-04-05 17:03:34Z jkoshy + +TOP= ../.. + +SRCS= elfdefinitions.m4 elfconstants.m4 +INCS= elfdefinitions.h +INCSDIR= /usr/include/sys + +CLEANFILES= ${INCS} + +.PHONY: all clean clobber depend obj + +all: ${INCS} + +elfdefinitions.h: elfdefinitions.m4 elfconstants.m4 + m4 -I${.CURDIR} -D SRCDIR=${.CURDIR} ${M4FLAGS} \ + elfdefinitions.m4 > ${.TARGET} + +depend cleandepend: + +clean clobber: + rm -f ${CLEANFILES} + +.include "${TOP}/mk/elftoolchain.inc.mk" +.include "${TOP}/mk/elftoolchain.m4.mk" Index: src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4:1.1 --- /dev/null Tue Apr 6 18:38:04 2021 +++ src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 Tue Apr 6 18:38:04 2021 @@ -0,0 +1,2592 @@ +# Copyright (c) 2010,2021 Joseph Koshy +# 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 AUTHOR 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 AUTHOR 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. + +# These definitions are based on: +# - The public specification of the ELF format as defined in the +# October 2009 draft of System V ABI. +# See: http://www.sco.com/developers/gabi/latest/ch4.intro.html +# - The May 1998 (version 1.5) draft of "The ELF-64 object format". +# - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips, +# ia64, powerpc, and RISC-V processors. +# - The "Linkers and Libraries Guide", from Sun Microsystems. + +define(`VCSID_ELFCONSTANTS_M4', + `Id: elfconstants.m4 3939 2021-04-04 20:15:13Z jkoshy') + +# +# Types of capabilities. +# +define(`DEFINE_CAPABILITIES',` +DEFINE_CAPABILITY(`CA_SUNW_NULL', 0, `ignored') +DEFINE_CAPABILITY(`CA_SUNW_HW_1', 1, `hardware capability') +DEFINE_CAPABILITY(`CA_SUNW_SW_1', 2, `software capability')') + +# +# Flags used with dynamic linking entries. +# +define(`DEFINE_DYN_FLAGS',` +DEFINE_DYN_FLAG(`DF_ORIGIN', 0x1, + `object being loaded may refer to `$ORIGIN'') +DEFINE_DYN_FLAG(`DF_SYMBOLIC', 0x2, + `search library for references before executable') +DEFINE_DYN_FLAG(`DF_TEXTREL', 0x4, + `relocation entries may modify text segment') +DEFINE_DYN_FLAG(`DF_BIND_NOW', 0x8, + `process relocation entries at load time') +DEFINE_DYN_FLAG(`DF_STATIC_TLS', 0x10, + `uses static thread-local storage') +DEFINE_DYN_FLAG(`DF_1_BIND_NOW', 0x1, + `process relocation entries at load time') +DEFINE_DYN_FLAG(`DF_1_GLOBAL', 0x2, + `unused') +DEFINE_DYN_FLAG(`DF_1_GROUP', 0x4, + `object is a member of a group') +DEFINE_DYN_FLAG(`DF_1_NODELETE', 0x8, + `object cannot be deleted from a process') +DEFINE_DYN_FLAG(`DF_1_LOADFLTR', 0x10, + `immediate load filtees') +DEFINE_DYN_FLAG(`DF_1_INITFIRST', 0x20, + `initialize object first') +DEFINE_DYN_FLAG(`DF_1_NOOPEN', 0x40, + `disallow dlopen()') +DEFINE_DYN_FLAG(`DF_1_
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue Apr 6 18:10:43 UTC 2021 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1669 To generate a diff of this commit: cvs rdiff -u -r1.1.2.81 -r1.1.2.82 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.81 src/doc/CHANGES-8.3:1.1.2.82 --- src/doc/CHANGES-8.3:1.1.2.81 Sat Mar 27 13:41:50 2021 +++ src/doc/CHANGES-8.3 Tue Apr 6 18:10:43 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.81 2021/03/27 13:41:50 martin Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.82 2021/04/06 18:10:43 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -1834,4 +1834,9 @@ testsuite/t18.out 1.1 (patch) Update bozohttpd to 20210227. [mrg, ticket #1668] +bin/ps/print.c 1.133 + + Fix the column width calculation for the lstart column if an empty + column header is specified. + [simonb, ticket #1669]
CVS commit: [netbsd-8] src/bin/ps
Module Name:src Committed By: martin Date: Tue Apr 6 18:09:52 UTC 2021 Modified Files: src/bin/ps [netbsd-8]: print.c Log Message: Pull up following revision(s) (requested by simonb in ticket #1669): bin/ps/print.c: revision 1.133 Fix the column width calculation for the lstart column if an empty column header is specified. Fixes bug pointed out by Ted Spradley in https://mail-index.netbsd.org/netbsd-users/2021/04/05/msg026808.html . To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.127.6.1 src/bin/ps/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ps/print.c diff -u src/bin/ps/print.c:1.127 src/bin/ps/print.c:1.127.6.1 --- src/bin/ps/print.c:1.127 Mon Dec 12 20:35:36 2016 +++ src/bin/ps/print.c Tue Apr 6 18:09:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.127 2016/12/12 20:35:36 christos Exp $ */ +/* $NetBSD: print.c,v 1.127.6.1 2021/04/06 18:09:52 martin Exp $ */ /* * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -__RCSID("$NetBSD: print.c,v 1.127 2016/12/12 20:35:36 christos Exp $"); +__RCSID("$NetBSD: print.c,v 1.127.6.1 2021/04/06 18:09:52 martin Exp $"); #endif #endif /* not lint */ @@ -810,22 +810,33 @@ lstarted(struct pinfo *pi, VARENT *ve, e char buf[100]; v = ve->var; - if (!k->p_uvalid) { + startt = k->p_ustart_sec; + + if (mode == WIDTHMODE) { /* - * Minimum width is less than header - we don't - * need to check it every time. + * We only need to set the width once, as we assume + * that all times are the same length. We do need to + * check against the header length as well, as "no + * header" mode for this variable will set the field + * width to the length of the header anyway (ref: the + * P1003.1-2004 comment in findvar()). + * + * XXX: The hardcoded "STARTED" string. Better or + * worse than a "<= 7" or some other arbitary number? */ - if (mode == PRINTMODE) + if (v->width <= (int)strlen("STARTED")) { + (void)strftime(buf, sizeof(buf) -1, "%c", + localtime(&startt)); + strprintorsetwidth(v, buf, mode); + } + } else { + if (!k->p_uvalid) { (void)printf("%*s", v->width, "-"); - return; - } - startt = k->p_ustart_sec; - - /* assume all times are the same length */ - if (mode != WIDTHMODE || v->width == 0) { - (void)strftime(buf, sizeof(buf) -1, "%c", - localtime(&startt)); - strprintorsetwidth(v, buf, mode); + } else { + (void)strftime(buf, sizeof(buf) -1, "%c", + localtime(&startt)); + strprintorsetwidth(v, buf, mode); + } } }
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Tue Apr 6 18:08:53 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 Log Message: Tickets #1241 - #1244 To generate a diff of this commit: cvs rdiff -u -r1.1.2.63 -r1.1.2.64 src/doc/CHANGES-9.2 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-9.2 diff -u src/doc/CHANGES-9.2:1.1.2.63 src/doc/CHANGES-9.2:1.1.2.64 --- src/doc/CHANGES-9.2:1.1.2.63 Wed Mar 31 13:52:02 2021 +++ src/doc/CHANGES-9.2 Tue Apr 6 18:08:53 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.2,v 1.1.2.63 2021/03/31 13:52:02 martin Exp $ +# $NetBSD: CHANGES-9.2,v 1.1.2.64 2021/04/06 18:08:53 martin Exp $ A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2 release: @@ -2885,3 +2885,45 @@ sys/arch/sparc/sparc/trap.c 1.199 instructions. [christos, ticket #1240] +sys/dev/audio/audiobell.c 1.4 + + PR 56059: avoid kernel hang when using /dev/speaker. + [isaki, ticket #1241] + +bin/sh/exec.c 1.55 +bin/sh/input.c 1.72 + + sh(1): PR 55979: fix unitialized memory reference + and handling of nul characters in shell scripts. + [kre, ticket #1242] + +external/public-domain/tz/dist/Makefile up to 1.1.1.30 +external/public-domain/tz/dist/NEWS up to 1.1.1.34 +external/public-domain/tz/dist/TZDATA_VERSION up to 1.24 +external/public-domain/tz/dist/africa up to 1.1.1.25 +external/public-domain/tz/dist/asia up to 1.1.1.28 +external/public-domain/tz/dist/australasia up to 1.1.1.21 +external/public-domain/tz/dist/backward up to 1.1.1.12 +external/public-domain/tz/dist/backzone up to 1.1.1.20 +external/public-domain/tz/dist/etcetera up to 1.1.1.5 +external/public-domain/tz/dist/europe up to 1.1.1.30 +external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.15 +external/public-domain/tz/dist/leapseconds up to 1.1.1.18 +external/public-domain/tz/dist/leapseconds.awk up to 1.1.1.12 +external/public-domain/tz/dist/northamerica up to 1.1.1.27 +external/public-domain/tz/dist/theory.html up to 1.1.1.12 +external/public-domain/tz/dist/version up to 1.1.1.21 +external/public-domain/tz/dist/ziguard.awk up to 1.1.1.6 +external/public-domain/tz/dist/zone.tab up to 1.1.1.19 +external/public-domain/tz/dist/zone1970.tab up to 1.1.1.21 +doc/3RDPARTY apply patch + + Updated tzdata to 2021a. + [kre, ticket #1243] + +bin/ps/print.c 1.133 + + Fix the column width calculation for the lstart column if an empty + column header is specified. + [simonb, ticket #1244] +
CVS commit: [netbsd-9] src/bin/ps
Module Name:src Committed By: martin Date: Tue Apr 6 18:07:28 UTC 2021 Modified Files: src/bin/ps [netbsd-9]: print.c Log Message: Pull up following revision(s) (requested by simonb in ticket #1244): bin/ps/print.c: revision 1.133 Fix the column width calculation for the lstart column if an empty column header is specified. Fixes bug pointed out by Ted Spradley in https://mail-index.netbsd.org/netbsd-users/2021/04/05/msg026808.html . To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.132.2.1 src/bin/ps/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ps/print.c diff -u src/bin/ps/print.c:1.132 src/bin/ps/print.c:1.132.2.1 --- src/bin/ps/print.c:1.132 Wed Jun 19 21:25:50 2019 +++ src/bin/ps/print.c Tue Apr 6 18:07:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.132 2019/06/19 21:25:50 kamil Exp $ */ +/* $NetBSD: print.c,v 1.132.2.1 2021/04/06 18:07:28 martin Exp $ */ /* * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -__RCSID("$NetBSD: print.c,v 1.132 2019/06/19 21:25:50 kamil Exp $"); +__RCSID("$NetBSD: print.c,v 1.132.2.1 2021/04/06 18:07:28 martin Exp $"); #endif #endif /* not lint */ @@ -815,22 +815,33 @@ lstarted(struct pinfo *pi, VARENT *ve, e char buf[100]; v = ve->var; - if (!k->p_uvalid) { + startt = k->p_ustart_sec; + + if (mode == WIDTHMODE) { /* - * Minimum width is less than header - we don't - * need to check it every time. + * We only need to set the width once, as we assume + * that all times are the same length. We do need to + * check against the header length as well, as "no + * header" mode for this variable will set the field + * width to the length of the header anyway (ref: the + * P1003.1-2004 comment in findvar()). + * + * XXX: The hardcoded "STARTED" string. Better or + * worse than a "<= 7" or some other arbitary number? */ - if (mode == PRINTMODE) + if (v->width <= (int)strlen("STARTED")) { + (void)strftime(buf, sizeof(buf) -1, "%c", + localtime(&startt)); + strprintorsetwidth(v, buf, mode); + } + } else { + if (!k->p_uvalid) { (void)printf("%*s", v->width, "-"); - return; - } - startt = k->p_ustart_sec; - - /* assume all times are the same length */ - if (mode != WIDTHMODE || v->width == 0) { - (void)strftime(buf, sizeof(buf) -1, "%c", - localtime(&startt)); - strprintorsetwidth(v, buf, mode); + } else { + (void)strftime(buf, sizeof(buf) -1, "%c", + localtime(&startt)); + strprintorsetwidth(v, buf, mode); + } } }
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Tue Apr 6 18:01:21 UTC 2021 Modified Files: src/doc [netbsd-9]: 3RDPARTY src/external/public-domain/tz/dist [netbsd-9]: Makefile NEWS TZDATA_VERSION africa asia australasia backward backzone etcetera europe leap-seconds.list leapseconds leapseconds.awk northamerica theory.html version ziguard.awk zone.tab zone1970.tab Log Message: Pull up the following, requested by kre in ticket #1243: external/public-domain/tz/dist/Makefile up to 1.1.1.30 external/public-domain/tz/dist/NEWS up to 1.1.1.34 external/public-domain/tz/dist/TZDATA_VERSION up to 1.24 external/public-domain/tz/dist/africa up to 1.1.1.25 external/public-domain/tz/dist/asia up to 1.1.1.28 external/public-domain/tz/dist/australasia up to 1.1.1.21 external/public-domain/tz/dist/backward up to 1.1.1.12 external/public-domain/tz/dist/backzone up to 1.1.1.20 external/public-domain/tz/dist/etcetera up to 1.1.1.5 external/public-domain/tz/dist/europe up to 1.1.1.30 external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.15 external/public-domain/tz/dist/leapseconds up to 1.1.1.18 external/public-domain/tz/dist/leapseconds.awk up to 1.1.1.12 external/public-domain/tz/dist/northamerica up to 1.1.1.27 external/public-domain/tz/dist/theory.html up to 1.1.1.12 external/public-domain/tz/dist/version up to 1.1.1.21 external/public-domain/tz/dist/ziguard.awk up to 1.1.1.6 external/public-domain/tz/dist/zone.tab up to 1.1.1.19 external/public-domain/tz/dist/zone1970.tab up to 1.1.1.21 doc/3RDPARTYapply patch Import tzdata2020f from ftp://ftp.iana.org/tz/releases/tzdata2020f.tar.gz Release 2020f - 2020-12-29 00:17:46 -0800 No changes to tzdata, just to a part of the build procedure not used on NetBSD Release 2020e - 2020-12-22 15:14:34 -0800 Volgograd switched to Moscow time on 2020-12-27 at 02:00. Correct many pre-1986 transitions, fixing entries originally derived from Shanks. The fixes include changes to: Australia, Bahamas, Bermuda, Belize, Ghana, Israel and Palestine, Kenya and adjacent, Nigeria and adjacent, Seychelles, Vanuatu Australia/Currie has been moved to the 'backward' file and its corrected data moved to the 'backzone' file. To better match legislation in Turks and Caicos, the 2015 shift to year-round observance of -04 is now modeled as AST throughout before returning to Eastern Time with US DST in 2018, rather than as maintaining EDT until 2015-11-01. To generate a diff of this commit: cvs rdiff -u -r1.1640.2.23 -r1.1640.2.24 src/doc/3RDPARTY cvs rdiff -u -r1.1.1.24.2.5 -r1.1.1.24.2.6 \ src/external/public-domain/tz/dist/Makefile \ src/external/public-domain/tz/dist/europe cvs rdiff -u -r1.1.1.27.2.5 -r1.1.1.27.2.6 \ src/external/public-domain/tz/dist/NEWS cvs rdiff -u -r1.17.2.5 -r1.17.2.6 \ src/external/public-domain/tz/dist/TZDATA_VERSION cvs rdiff -u -r1.1.1.20.2.3 -r1.1.1.20.2.4 \ src/external/public-domain/tz/dist/africa cvs rdiff -u -r1.1.1.23.2.4 -r1.1.1.23.2.5 \ src/external/public-domain/tz/dist/asia cvs rdiff -u -r1.1.1.17.2.3 -r1.1.1.17.2.4 \ src/external/public-domain/tz/dist/australasia cvs rdiff -u -r1.1.1.10.2.1 -r1.1.1.10.2.2 \ src/external/public-domain/tz/dist/backward cvs rdiff -u -r1.1.1.16.2.3 -r1.1.1.16.2.4 \ src/external/public-domain/tz/dist/backzone cvs rdiff -u -r1.1.1.4 -r1.1.1.4.2.1 \ src/external/public-domain/tz/dist/etcetera cvs rdiff -u -r1.1.1.11.2.3 -r1.1.1.11.2.4 \ src/external/public-domain/tz/dist/leap-seconds.list cvs rdiff -u -r1.1.1.13.2.3 -r1.1.1.13.2.4 \ src/external/public-domain/tz/dist/leapseconds cvs rdiff -u -r1.1.1.8.2.3 -r1.1.1.8.2.4 \ src/external/public-domain/tz/dist/leapseconds.awk \ src/external/public-domain/tz/dist/theory.html cvs rdiff -u -r1.1.1.23.2.3 -r1.1.1.23.2.4 \ src/external/public-domain/tz/dist/northamerica cvs rdiff -u -r1.1.1.14.2.5 -r1.1.1.14.2.6 \ src/external/public-domain/tz/dist/version cvs rdiff -u -r1.1.1.4.2.1 -r1.1.1.4.2.2 \ src/external/public-domain/tz/dist/ziguard.awk cvs rdiff -u -r1.1.1.16.2.2 -r1.1.1.16.2.3 \ src/external/public-domain/tz/dist/zone.tab cvs rdiff -u -r1.1.1.18.2.2 -r1.1.1.18.2.3 \ src/external/public-domain/tz/dist/zone1970.tab Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1640.2.23 src/doc/3RDPARTY:1.1640.2.24 --- src/doc/3RDPARTY:1.1640.2.23 Sat Mar 27 14:35:04 2021 +++ src/doc/3RDPARTY Tue Apr 6 18:01:21 2021 @@ -1,4 +1,4 @@ -# $NetBSD: 3RD
CVS commit: [netbsd-9] src/bin/sh
Module Name:src Committed By: martin Date: Tue Apr 6 17:52:03 UTC 2021 Modified Files: src/bin/sh [netbsd-9]: exec.c input.c Log Message: Pull up following revision(s) (requested by kre in ticket #1242): bin/sh/input.c: revision 1.72 bin/sh/exec.c: revision 1.55 PR bin/55979 This fixes the MSAN detected reference to an unitialised variable (an unitialised field in a struct) which happens when a command is not found after a PATH search. Aside from skipping some known to be going to fail exec*() calls in some cases, the setting of the relevant field is irrelevant, so this problem makes no practical difference to the shell, or any shell script. XXX (maybe) pullup -9 PR bin/55979 Correctly handle (ie: ignore completely) \0 chars (nuls) in the shell command input stream (script, dot file, or stdin). Previously nul chars were ignored correctly in the line in which they occurred, but would cause trailing chars of that line to reappear as the start of the following line. If there was just one \0 skipped, this would generally result in an extra \n in the sh input, which in most cases has no effect. With multiple \0's in a single line, more of the end of that line was duplicated into the following one. This usually manifested as a weird "command not found" error. Note that any \0 chars in the sh input make the script non-conforming, so fixing this is not crucial (no \0's should really ever be seen) but it was an obvious bug in the code, which was attempting to ignore nul chars (as do many other shells), so let it be fixed. XXX pullup -9 To generate a diff of this commit: cvs rdiff -u -r1.53.2.1 -r1.53.2.2 src/bin/sh/exec.c cvs rdiff -u -r1.71 -r1.71.2.1 src/bin/sh/input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/exec.c diff -u src/bin/sh/exec.c:1.53.2.1 src/bin/sh/exec.c:1.53.2.2 --- src/bin/sh/exec.c:1.53.2.1 Thu Aug 27 09:15:38 2020 +++ src/bin/sh/exec.c Tue Apr 6 17:52:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.53.2.1 2020/08/27 09:15:38 martin Exp $ */ +/* $NetBSD: exec.c,v 1.53.2.2 2021/04/06 17:52:03 martin Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)exec.c 8.4 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: exec.c,v 1.53.2.1 2020/08/27 09:15:38 martin Exp $"); +__RCSID("$NetBSD: exec.c,v 1.53.2.2 2021/04/06 17:52:03 martin Exp $"); #endif #endif /* not lint */ @@ -683,6 +683,7 @@ loop: if (act & DO_ERR) outfmt(out2, "%s: %s\n", name, errmsg(e, E_EXEC)); entry->cmdtype = CMDUNKNOWN; + entry->u.index = idx + 1; return; builtin_success: @@ -704,8 +705,10 @@ success: entry->lineno = cmdp->lineno; entry->lno_frel = cmdp->fn_ln1; entry->u = cmdp->param; - } else + } else { entry->cmdtype = CMDUNKNOWN; + entry->u.index = -1; + } } Index: src/bin/sh/input.c diff -u src/bin/sh/input.c:1.71 src/bin/sh/input.c:1.71.2.1 --- src/bin/sh/input.c:1.71 Sat Feb 9 09:20:47 2019 +++ src/bin/sh/input.c Tue Apr 6 17:52:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.71 2019/02/09 09:20:47 kre Exp $ */ +/* $NetBSD: input.c,v 1.71.2.1 2021/04/06 17:52:03 martin Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)input.c 8.3 (Berkeley) 6/9/95"; #else -__RCSID("$NetBSD: input.c,v 1.71 2019/02/09 09:20:47 kre Exp $"); +__RCSID("$NetBSD: input.c,v 1.71.2.1 2021/04/06 17:52:03 martin Exp $"); #endif #endif /* not lint */ @@ -90,6 +90,7 @@ struct parsefile { int fd; /* file descriptor (or -1 if string) */ int nleft; /* number of chars left in this line */ int lleft; /* number of chars left in this buffer */ + int nskip; /* number of \0's dropped in previous line */ const char *nextc; /* next char in buffer */ char *buf; /* input buffer */ struct strpush *strpush; /* for pushing strings at this level */ @@ -274,8 +275,13 @@ preadbuffer(void) parselleft = parsenleft = EOF_NLEFT; return PEOF; } + parsefile->nskip = 0; } + /* jump over slots for any \0 chars that were dropped */ + parsenextc += parsefile->nskip; + parsefile->nskip = 0; + /* p = (not const char *)parsenextc; */ p = parsefile->buf + (parsenextc - parsefile->buf); q = p; @@ -288,6 +294,7 @@ preadbuffer(void) switch (*p) { case '\0': p++; /* Skip nul */ + parsefile->nskip++; goto check; case '\t': @@ -306,7 +313,11 @@ preadbuffer(void) break; } - *q++ = *p++; + if (parsefile->nskip) + *q++ = *p++; + else + q = ++p; + check: if (--parselleft <= 0) { parsenleft = q - parsenextc - 1;
CVS commit: [netbsd-9] src/sys/dev/audio
Module Name:src Committed By: martin Date: Tue Apr 6 17:44:29 UTC 2021 Modified Files: src/sys/dev/audio [netbsd-9]: audiobell.c Log Message: Pull up following revision(s) (requested by isaki in ticket #1241): sys/dev/audio/audiobell.c: revision 1.4 Fix and improve the buffer length calculation to avoid zero length even if blk_ms is small. This fixes PR kern/56059. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/dev/audio/audiobell.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/audio/audiobell.c diff -u src/sys/dev/audio/audiobell.c:1.3 src/sys/dev/audio/audiobell.c:1.3.2.1 --- src/sys/dev/audio/audiobell.c:1.3 Wed Jun 26 06:57:45 2019 +++ src/sys/dev/audio/audiobell.c Tue Apr 6 17:44:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: audiobell.c,v 1.3 2019/06/26 06:57:45 isaki Exp $ */ +/* $NetBSD: audiobell.c,v 1.3.2.1 2021/04/06 17:44:29 martin Exp $ */ /* * Copyright (c) 1999 Richard Earnshaw @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.3 2019/06/26 06:57:45 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.3.2.1 2021/04/06 17:44:29 martin Exp $"); #include #include @@ -81,6 +81,13 @@ static const int32_t sinewave[] = { #undef A /* + * The minimum and the maximum buffer sizes must be a multiple of 32 + * (32 = countof(sinewave) * sizeof(uint16_t)). + */ +#define MINBUFSIZE (1024) +#define MAXBUFSIZE (4096) + +/* * dev is a device_t for the audio device to use. * pitch is the pitch of the bell in Hz, * period is the length in ms, @@ -102,7 +109,7 @@ audiobell(void *dev, u_int pitch, u_int u_int remainbytes; u_int wave1count; u_int wave1bytes; - u_int blkbytes; + u_int bufbytes; u_int len; u_int step; u_int offset; @@ -111,6 +118,10 @@ audiobell(void *dev, u_int pitch, u_int KASSERT(volume <= 100); + /* Playing for 0msec does nothing. */ + if (period == 0) + return; + /* The audio system isn't built for polling. */ if (poll) return; @@ -158,16 +169,23 @@ audiobell(void *dev, u_int pitch, u_int remainbytes = remaincount * sizeof(int16_t); wave1bytes = wave1count * sizeof(int16_t); - blkbytes = ptrack->usrbuf_blksize; - blkbytes = rounddown(blkbytes, wave1bytes); - blkbytes = uimin(blkbytes, remainbytes); - buf = malloc(blkbytes, M_TEMP, M_WAITOK); + /* Based on 3*usrbuf_blksize, but not too small or too large */ + bufbytes = ptrack->usrbuf_blksize * NBLKHW; + if (bufbytes < MINBUFSIZE) + bufbytes = MINBUFSIZE; + else if (bufbytes > MAXBUFSIZE) + bufbytes = MAXBUFSIZE; + else + bufbytes = roundup(bufbytes, wave1bytes); + bufbytes = uimin(bufbytes, remainbytes); + KASSERT(bufbytes != 0); + buf = malloc(bufbytes, M_TEMP, M_WAITOK); if (buf == NULL) goto out; /* Generate sinewave with specified volume */ j = offset; - for (i = 0; i < blkbytes / sizeof(int16_t); i++) { + for (i = 0; i < bufbytes / sizeof(int16_t); i++) { /* XXX audio already has track volume feature though #if 0 */ buf[i] = AUDIO_SCALEDOWN(sinewave[j] * (int)volume, 16); j += step; @@ -177,7 +195,7 @@ audiobell(void *dev, u_int pitch, u_int /* Write while paused to avoid inserting silence. */ ptrack->is_pause = true; for (; remainbytes > 0; remainbytes -= len) { - len = uimin(remainbytes, blkbytes); + len = uimin(remainbytes, bufbytes); aiov.iov_base = (void *)buf; aiov.iov_len = len; auio.uio_iov = &aiov;
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: simonb Date: Tue Apr 6 16:10:08 UTC 2021 Modified Files: src/sys/arch/sparc/sparc: db_disasm.c Log Message: The location arg of db_disasm() is a db_addr_t, not a vaddr_t. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sparc/sparc/db_disasm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/sparc/db_disasm.c diff -u src/sys/arch/sparc/sparc/db_disasm.c:1.22 src/sys/arch/sparc/sparc/db_disasm.c:1.23 --- src/sys/arch/sparc/sparc/db_disasm.c:1.22 Wed Jan 11 12:14:32 2017 +++ src/sys/arch/sparc/sparc/db_disasm.c Tue Apr 6 16:10:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.22 2017/01/11 12:14:32 joerg Exp $ */ +/* $NetBSD: db_disasm.c,v 1.23 2021/04/06 16:10:08 simonb Exp $ */ /* * Copyright (c) 1994 David S. Miller, da...@nadzieja.rutgers.edu @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.22 2017/01/11 12:14:32 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.23 2021/04/06 16:10:08 simonb Exp $"); #include #include @@ -876,7 +876,7 @@ struct sparc_insn sparc_i[] = { }; db_addr_t -db_disasm(vaddr_t loc, bool altfmt) +db_disasm(db_addr_t loc, bool altfmt) { struct sparc_insn* i_ptr = (struct sparc_insn *)&sparc_i;
CVS commit: src/sys/arch/m68k/m68k
Module Name:src Committed By: simonb Date: Tue Apr 6 16:05:17 UTC 2021 Modified Files: src/sys/arch/m68k/m68k: db_disasm.h Log Message: Remove duplicate db_disasm() prototype. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/m68k/db_disasm.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/m68k/m68k/db_disasm.h diff -u src/sys/arch/m68k/m68k/db_disasm.h:1.9 src/sys/arch/m68k/m68k/db_disasm.h:1.10 --- src/sys/arch/m68k/m68k/db_disasm.h:1.9 Sat Mar 14 14:46:01 2009 +++ src/sys/arch/m68k/m68k/db_disasm.h Tue Apr 6 16:05:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.h,v 1.9 2009/03/14 14:46:01 dsl Exp $ */ +/* $NetBSD: db_disasm.h,v 1.10 2021/04/06 16:05:17 simonb Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -424,5 +424,3 @@ typedef struct dis_buffer dis_buffer_t; #define PRINT_FPREG(dbuf, reg) addstr(dbuf, fpregs[reg]) #define PRINT_DREG(dbuf, reg) addstr(dbuf, dregs[reg]) #define PRINT_AREG(dbuf, reg) addstr(dbuf, aregs[reg]) - -db_addr_t db_disasm(db_addr_t loc, bool moto_syntax);
CVS commit: src/sys/arch/m68k/m68k
Module Name:src Committed By: simonb Date: Tue Apr 6 16:04:44 UTC 2021 Modified Files: src/sys/arch/m68k/m68k: db_disasm.c Log Message: Include to get ddb's db_disasm() prototype. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/m68k/m68k/db_disasm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/m68k/m68k/db_disasm.c diff -u src/sys/arch/m68k/m68k/db_disasm.c:1.44 src/sys/arch/m68k/m68k/db_disasm.c:1.45 --- src/sys/arch/m68k/m68k/db_disasm.c:1.44 Sat Oct 26 17:50:18 2019 +++ src/sys/arch/m68k/m68k/db_disasm.c Tue Apr 6 16:04:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.44 2019/10/26 17:50:18 christos Exp $ */ +/* $NetBSD: db_disasm.c,v 1.45 2021/04/06 16:04:44 simonb Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.44 2019/10/26 17:50:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.45 2021/04/06 16:04:44 simonb Exp $"); #include #ifdef _KERNEL @@ -72,8 +72,9 @@ __KERNEL_RCSID(0, "$NetBSD: db_disasm.c, #include -#include +#include #include +#include #include static void get_modregstr(dis_buffer_t *, int, int, int, int);
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: simonb Date: Tue Apr 6 15:55:26 UTC 2021 Modified Files: src/sys/arch/sparc64/sparc64: db_disasm.c Log Message: Fix a typo, remove a useless blank line. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc64/sparc64/db_disasm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/db_disasm.c diff -u src/sys/arch/sparc64/sparc64/db_disasm.c:1.18 src/sys/arch/sparc64/sparc64/db_disasm.c:1.19 --- src/sys/arch/sparc64/sparc64/db_disasm.c:1.18 Sun Oct 4 08:16:14 2015 +++ src/sys/arch/sparc64/sparc64/db_disasm.c Tue Apr 6 15:55:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.18 2015/10/04 08:16:14 joerg Exp $ */ +/* $NetBSD: db_disasm.c,v 1.19 2021/04/06 15:55:26 simonb Exp $ */ /* * Copyright (c) 1994 David S. Miller, da...@nadzieja.rutgers.edu @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.18 2015/10/04 08:16:14 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.19 2021/04/06 15:55:26 simonb Exp $"); #include #include @@ -223,7 +223,7 @@ struct sparc_insn sparc_i[] = { /* Note: if imm22 is zero then this is actually a "nop" grrr... */ {(FORMAT2(0, 0x4)), "sethi", "Cd"}, - /* Branch on Integer Co`ndition Codes "Bicc" */ + /* Branch on Integer Condition Codes "Bicc" */ {(FORMAT2(0, 2) | COND(8)), "ba", "a,m"}, {(FORMAT2(0, 2) | COND(0)), "bn", "a,m"}, {(FORMAT2(0, 2) | COND(9)), "bne", "a,m"}, @@ -1121,4 +1121,3 @@ db_disasm(db_addr_t loc, bool altfmt) return (loc + 4); } -
CVS commit: src/sys/conf
Module Name:src Committed By: simonb Date: Tue Apr 6 15:05:12 UTC 2021 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Revert rev 1.278 which tried to call ctfmerge only once - this has caused kernels with embedded symbol tables to explode in size. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.279 src/sys/conf/Makefile.kern.inc:1.280 --- src/sys/conf/Makefile.kern.inc:1.279 Mon Apr 5 22:52:03 2021 +++ src/sys/conf/Makefile.kern.inc Tue Apr 6 15:05:12 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.279 2021/04/05 22:52:03 christos Exp $ +# $NetBSD: Makefile.kern.inc,v 1.280 2021/04/06 15:05:12 simonb Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -210,6 +210,11 @@ _MD_OBJS= ${MD_OBJS} SYSTEM_LIB= ${MD_LIBS} ${LIBKERN} SYSTEM_OBJ?= ${_MD_OBJS} ${OBJS} ${SYSTEM_LIB} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ:O} +.if defined(CTFMERGE) +SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o +.else +SYSTEM_CTFMERGE= ${_MKSHECHO} +.endif REMOVE_SWAP= [@] .for k in ${KERNELS} @@ -237,7 +242,7 @@ LINKFLAGS?= ${LINKFORMAT} ${LINKSCRIPT} LINKFLAGS_DEBUG?= -X SYSTEM_LD_TAIL?=@${TOOL_SED} '/const char sccs/!d;s/.*@(.)//;s/" "//;s/\\.*//' vers.c && \ - ${SIZE} $@ && chmod 755 $@ + ${SIZE} $@ && ${SYSTEM_CTFMERGE} && chmod 755 $@ SYSTEM_LD_TAIL_DEBUG?=&& \ echo mv -f $@ $@.gdb && mv -f $@ $@.gdb && \ echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb && \ @@ -260,11 +265,6 @@ LINKFLAGS+= ${LINKFLAGS_NORMAL} SYSTEM_LD_HEAD+= ${SYSTEM_LD_HEAD_EXTRA} SYSTEM_LD_TAIL_STAGE1= ${SYSTEM_LD_TAIL} SYSTEM_LD_TAIL_STAGE2= ${SYSTEM_LD_TAIL} -.if defined(CTFMERGE) -SYSTEM_LD_TAIL_STAGE2+= && echo ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ... \ - && ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} \ - ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o -.endif .if defined(COPY_SYMTAB) SYSTEM_LD_TAIL_STAGE2+= && echo ${DBSYM} $@ && ${DBSYM} $@ .if !empty(DEBUG:M-g)
CVS commit: src/bin/ps
Module Name:src Committed By: christos Date: Tue Apr 6 13:35:52 UTC 2021 Modified Files: src/bin/ps: print.c Log Message: - dedup code - add a safe_strftime() to handle error cases To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/bin/ps/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ps/print.c diff -u src/bin/ps/print.c:1.133 src/bin/ps/print.c:1.134 --- src/bin/ps/print.c:1.133 Tue Apr 6 01:13:24 2021 +++ src/bin/ps/print.c Tue Apr 6 09:35:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.133 2021/04/06 05:13:24 simonb Exp $ */ +/* $NetBSD: print.c,v 1.134 2021/04/06 13:35:52 christos Exp $ */ /* * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -__RCSID("$NetBSD: print.c,v 1.133 2021/04/06 05:13:24 simonb Exp $"); +__RCSID("$NetBSD: print.c,v 1.134 2021/04/06 13:35:52 christos Exp $"); #endif #endif /* not lint */ @@ -109,6 +109,14 @@ static time_t now; #define LSDEAD 6 #endif +static void __attribute__((__format__(__strftime__, 3, 0))) +safe_strftime(char *buf, size_t bufsiz, const char *fmt, +const struct tm *tp) +{ + if (tp == NULL || strftime(buf, bufsiz, fmt, tp) == 0) + strlcpy(buf, "-", sizeof(buf)); +} + static int iwidth(u_int64_t v) { @@ -793,12 +801,12 @@ started(struct pinfo *pi, VARENT *ve, en (void)time(&now); if (now - k->p_ustart_sec < SECSPERDAY) /* I *hate* SCCS... */ - (void)strftime(buf, sizeof(buf) - 1, "%l:%" "M%p", tp); + safe_strftime(buf, sizeof(buf) - 1, "%l:%" "M%p", tp); else if (now - k->p_ustart_sec < DAYSPERWEEK * SECSPERDAY) /* I *hate* SCCS... */ - (void)strftime(buf, sizeof(buf) - 1, "%a%" "I%p", tp); + safe_strftime(buf, sizeof(buf) - 1, "%a%" "I%p", tp); else - (void)strftime(buf, sizeof(buf) - 1, "%e%b%y", tp); + safe_strftime(buf, sizeof(buf) - 1, "%e%b%y", tp); /* %e and %l can start with a space. */ cp = buf; if (*cp == ' ') @@ -829,20 +837,17 @@ lstarted(struct pinfo *pi, VARENT *ve, e * XXX: The hardcoded "STARTED" string. Better or * worse than a "<= 7" or some other arbitary number? */ - if (v->width <= (int)strlen("STARTED")) { - (void)strftime(buf, sizeof(buf) -1, "%c", - localtime(&startt)); - strprintorsetwidth(v, buf, mode); + if (v->width > (int)sizeof("STARTED") - 1) { + return; } } else { if (!k->p_uvalid) { (void)printf("%*s", v->width, "-"); - } else { - (void)strftime(buf, sizeof(buf) -1, "%c", - localtime(&startt)); - strprintorsetwidth(v, buf, mode); + return; } } + safe_strftime(buf, sizeof(buf) - 1, "%c", localtime(&startt)); + strprintorsetwidth(v, buf, mode); } void
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Apr 6 13:17:04 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile externs1.h tree.c Added Files: src/usr.bin/xlint/lint1: ckbool.c Log Message: lint: move check for strict bool mode into separate file No functional change. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/xlint/lint1/ckbool.c cvs rdiff -u -r1.100 -r1.101 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.266 -r1.267 src/usr.bin/xlint/lint1/tree.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/xlint/lint1/Makefile diff -u src/usr.bin/xlint/lint1/Makefile:1.65 src/usr.bin/xlint/lint1/Makefile:1.66 --- src/usr.bin/xlint/lint1/Makefile:1.65 Mon Apr 5 02:05:47 2021 +++ src/usr.bin/xlint/lint1/Makefile Tue Apr 6 13:17:04 2021 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.65 2021/04/05 02:05:47 rillig Exp $ +# $NetBSD: Makefile,v 1.66 2021/04/06 13:17:04 rillig Exp $ .include PROG= lint1 -SRCS= cgram.y ckctype.c ckgetopt.c decl.c emit.c emit1.c err.c \ - func.c init.c inittyp.c lex.c \ +SRCS= cgram.y \ + ckbool.c ckctype.c ckgetopt.c \ + decl.c emit.c emit1.c err.c func.c init.c inittyp.c lex.c \ main1.c mem.c mem1.c oper.c print.c scan.l tree.c tyname.c MAN= lint.7 Index: src/usr.bin/xlint/lint1/externs1.h diff -u src/usr.bin/xlint/lint1/externs1.h:1.100 src/usr.bin/xlint/lint1/externs1.h:1.101 --- src/usr.bin/xlint/lint1/externs1.h:1.100 Mon Apr 5 02:05:47 2021 +++ src/usr.bin/xlint/lint1/externs1.h Tue Apr 6 13:17:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: externs1.h,v 1.100 2021/04/05 02:05:47 rillig Exp $ */ +/* $NetBSD: externs1.h,v 1.101 2021/04/06 13:17:04 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -336,6 +336,13 @@ extern int lex_input(void); extern char *print_tnode(char *, size_t, const tnode_t *); /* + * ckbool.c + */ +extern bool typeok_scalar_strict_bool(op_t, const mod_t *, int, + const tnode_t *, const tnode_t *); +extern bool fallback_symbol_strict_bool(sym_t *); + +/* * ckctype.c */ extern void check_ctype_function_call(const tnode_t *, const tnode_t *); Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.266 src/usr.bin/xlint/lint1/tree.c:1.267 --- src/usr.bin/xlint/lint1/tree.c:1.266 Mon Apr 5 02:05:47 2021 +++ src/usr.bin/xlint/lint1/tree.c Tue Apr 6 13:17:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.266 2021/04/05 02:05:47 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.267 2021/04/06 13:17:04 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.266 2021/04/05 02:05:47 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.267 2021/04/06 13:17:04 rillig Exp $"); #endif #include @@ -207,23 +207,8 @@ static void fallback_symbol(sym_t *sym) { - if (Tflag && strcmp(sym->s_name, "__lint_false") == 0) { - sym->s_scl = CTCONST; /* close enough */ - sym->s_type = gettyp(BOOL); - sym->s_value.v_tspec = BOOL; - sym->s_value.v_ansiu = false; - sym->s_value.v_quad = 0; + if (fallback_symbol_strict_bool(sym)) return; - } - - if (Tflag && strcmp(sym->s_name, "__lint_true") == 0) { - sym->s_scl = CTCONST; /* close enough */ - sym->s_type = gettyp(BOOL); - sym->s_value.v_tspec = BOOL; - sym->s_value.v_ansiu = false; - sym->s_value.v_quad = 1; - return; - } if (block_level > 0 && (strcmp(sym->s_name, "__FUNCTION__") == 0 || strcmp(sym->s_name, "__PRETTY_FUNCTION__") == 0)) { @@ -736,42 +721,6 @@ is_null_pointer(const tnode_t *tn) && (tn->tn_op == CON && tn->tn_val->v_quad == 0); } -/* - * See if the node is valid as operand of an operator that compares its - * argument with 0. - */ -bool -is_typeok_bool_operand(const tnode_t *tn) -{ - tspec_t t; - - lint_assert(Tflag); - - tn = before_conversion(tn); - t = tn->tn_type->t_tspec; - - if (t == BOOL) - return true; - - if (tn->tn_from_system_header && is_scalar(t)) - return true; - - /* For enums that are used as bit sets, allow "flags & FLAG". */ - if (tn->tn_op == BITAND && - tn->tn_left->tn_op == CVT && - tn->tn_left->tn_type->t_tspec == INT && !tn->tn_left->tn_cast && - tn->tn_left->tn_left->tn_type->t_tspec == ENUM && - /* - * XXX: Somehow the type information got lost here. The type - * of the enum constant on the right-hand side should still be - * ENUM, but is INT. - */ - tn->tn_right->tn_type->t_tspec == INT) - return true; - - return false; -} - static bool typeok_incdec(op_t op, const tnode_t *tn, const type_t *tp) { @@ -1109,159 +1058,7 @@ typeok_assign(const mod_t *mp, const tno return true; } -/* - * See if in strict bool mode, the operator takes either two bool operands - * or two arbitrary other operands. - */ -static bool -is_assignmen
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Tue Apr 6 13:11:22 UTC 2021 Modified Files: src/sys/arch/mips/mips: mips_stacktrace.c Log Message: If we're going to print a number in hex, at least put a 0x in front of it so we can cut'n'paste it into gdb directly. This has only annoyed me for 25 or so years... Wrap a long long while here. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/mips_stacktrace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/mips_stacktrace.c diff -u src/sys/arch/mips/mips/mips_stacktrace.c:1.8 src/sys/arch/mips/mips/mips_stacktrace.c:1.9 --- src/sys/arch/mips/mips/mips_stacktrace.c:1.8 Mon Mar 29 03:09:42 2021 +++ src/sys/arch/mips/mips/mips_stacktrace.c Tue Apr 6 13:11:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $ */ +/* $NetBSD: mips_stacktrace.c,v 1.9 2021/04/06 13:11:22 simonb Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.9 2021/04/06 13:11:22 simonb Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -504,10 +504,12 @@ mips3_eret: done: if (mask & (1 << _R_RA)) ra = regs[_R_RA]; - (*printfn)("%#"PRIxVADDR": %s+%"PRIxVADDR" (%"PRIxREGISTER",%"PRIxREGISTER",%"PRIxREGISTER",%"PRIxREGISTER") ra %"PRIxVADDR" sz %d\n", - sp, fn_name(subr), pc - subr, - regs[_R_A0], regs[_R_A1], regs[_R_A2], regs[_R_A3], - ra, stksize); + (*printfn)("%#"PRIxVADDR": %s+%#"PRIxVADDR" (%#"PRIxREGISTER"," + "%#"PRIxREGISTER",%#"PRIxREGISTER",%#"PRIxREGISTER") " + "ra %#"PRIxVADDR" sz %d\n", + sp, fn_name(subr), pc - subr, + regs[_R_A0], regs[_R_A1], regs[_R_A2], regs[_R_A3], + ra, stksize); if (ra) { if (pc == ra && stksize == 0)
CVS commit: src/external/cddl/osnet/dev/dtrace
Module Name:src Committed By: simonb Date: Tue Apr 6 12:48:59 UTC 2021 Modified Files: src/external/cddl/osnet/dev/dtrace/amd64: dtrace_subr.c src/external/cddl/osnet/dev/dtrace/arm: dtrace_subr.c src/external/cddl/osnet/dev/dtrace/i386: dtrace_subr.c Log Message: sizeof(*var) instead of sizeof(type) To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 \ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c cvs rdiff -u -r1.12 -r1.13 \ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c:1.14 src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c:1.15 --- src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c:1.14 Fri Nov 8 11:06:21 2019 +++ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c Tue Apr 6 12:48:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_subr.c,v 1.14 2019/11/08 11:06:21 hannken Exp $ */ +/* $NetBSD: dtrace_subr.c,v 1.15 2021/04/06 12:48:59 simonb Exp $ */ /* * CDDL HEADER START @@ -78,7 +78,7 @@ dtrace_invop_add(int (*func)(uintptr_t, { dtrace_invop_hdlr_t *hdlr; - hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP); + hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP); hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; @@ -108,7 +108,7 @@ dtrace_invop_remove(int (*func)(uintptr_ prev->dtih_next = hdlr->dtih_next; } - kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t)); + kmem_free(hdlr, sizeof(*hdlr)); } /*ARGSUSED*/ Index: src/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c:1.4 src/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c:1.5 --- src/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c:1.4 Mon May 28 21:05:03 2018 +++ src/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c Tue Apr 6 12:48:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_subr.c,v 1.4 2018/05/28 21:05:03 chs Exp $ */ +/* $NetBSD: dtrace_subr.c,v 1.5 2021/04/06 12:48:59 simonb Exp $ */ /* * CDDL HEADER START @@ -94,7 +94,7 @@ dtrace_invop_add(int (*func)(uintptr_t, { dtrace_invop_hdlr_t *hdlr; - hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP); + hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP); hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; @@ -124,7 +124,7 @@ dtrace_invop_remove(int (*func)(uintptr_ prev->dtih_next = hdlr->dtih_next; } - kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t)); + kmem_free(hdlr, sizeof(*hdlr)); } /*ARGSUSED*/ Index: src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.12 src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.13 --- src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.12 Wed Feb 13 08:46:40 2019 +++ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Tue Apr 6 12:48:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_subr.c,v 1.12 2019/02/13 08:46:40 rin Exp $ */ +/* $NetBSD: dtrace_subr.c,v 1.13 2021/04/06 12:48:59 simonb Exp $ */ /* * CDDL HEADER START @@ -86,7 +86,7 @@ dtrace_invop_add(int (*func)(uintptr_t, { dtrace_invop_hdlr_t *hdlr; - hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP); + hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP); hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; @@ -116,7 +116,7 @@ dtrace_invop_remove(int (*func)(uintptr_ prev->dtih_next = hdlr->dtih_next; } - kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t)); + kmem_free(hdlr, sizeof(*hdlr)); } void
CVS commit: src/external/cddl/osnet/dev/dtrace/aarch64
Module Name:src Committed By: simonb Date: Tue Apr 6 12:48:36 UTC 2021 Modified Files: src/external/cddl/osnet/dev/dtrace/aarch64: dtrace_subr.c Log Message: sizeof(*var) instead of sizeof(type) Call kmem_free() with size of data being freed. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.4 src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.5 --- src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.4 Thu Nov 12 02:15:56 2020 +++ src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c Tue Apr 6 12:48:36 2021 @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtrace_subr.c,v 1.4 2020/11/12 02:15:56 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtrace_subr.c,v 1.5 2021/04/06 12:48:36 simonb Exp $"); #include #include @@ -87,7 +87,7 @@ dtrace_invop_add(int (*func)(uintptr_t, { dtrace_invop_hdlr_t *hdlr; - hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP); + hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP); hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; @@ -120,7 +120,7 @@ dtrace_invop_remove(int (*func)(uintptr_ prev->dtih_next = hdlr->dtih_next; } - kmem_free(hdlr, 0); + kmem_free(hdlr, sizeof(*hdlr)); } /*ARGSUSED*/
CVS commit: src/sbin/rndctl
Module Name:src Committed By: riastradh Date: Tue Apr 6 12:32:39 UTC 2021 Modified Files: src/sbin/rndctl: rndctl.8 Log Message: Clarify security model of rndctl -S files. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sbin/rndctl/rndctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/rndctl/rndctl.8 diff -u src/sbin/rndctl/rndctl.8:1.27 src/sbin/rndctl/rndctl.8:1.28 --- src/sbin/rndctl/rndctl.8:1.27 Fri Apr 2 07:04:05 2021 +++ src/sbin/rndctl/rndctl.8 Tue Apr 6 12:32:39 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: rndctl.8,v 1.27 2021/04/02 07:04:05 nia Exp $ +.\" $NetBSD: rndctl.8,v 1.28 2021/04/06 12:32:39 riastradh Exp $ .\" .\" Copyright (c) 1997 Michael Graff .\" All rights reserved. @@ -105,11 +105,22 @@ or .Ar devname specified. .It Fl S -Save entropy pool to file -.Ar save-file . +Save entropy to file +.Ar save-file +for later use with +.Cm "rndctl -L" . +.Pp The file format is specific to .Nm and includes an estimate of the amount of saved entropy and a checksum. +The prior internal state of the system entropy pool cannot be recovered +from +.Ar save-file , +so disclosure of +.Ar save-file +does not compromise past secrets drawn from +.Pa /dev/urandom +or equivalent. .It Fl s Display statistics on the current state of the entropy pool. .It Fl t
CVS commit: src/external/cddl/osnet/dev/dtrace/mips
Module Name:src Committed By: christos Date: Tue Apr 6 12:10:21 UTC 2021 Modified Files: src/external/cddl/osnet/dev/dtrace/mips: dtrace_subr.c Log Message: sizeof(*var) instead of sizeof(type) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c:1.2 src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c:1.3 --- src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c:1.2 Tue Apr 6 04:19:15 2021 +++ src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c Tue Apr 6 08:10:21 2021 @@ -88,7 +88,7 @@ dtrace_invop_add(int (*func)(uintptr_t, { dtrace_invop_hdlr_t *hdlr; - hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP); + hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP); hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; @@ -121,7 +121,7 @@ dtrace_invop_remove(int (*func)(uintptr_ prev->dtih_next = hdlr->dtih_next; } - kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t)); + kmem_free(hdlr, sizeof(*hdlr)); } /*ARGSUSED*/
CVS commit: src/lib/libnvmm
Module Name:src Committed By: reinoud Date: Tue Apr 6 08:40:17 UTC 2021 Modified Files: src/lib/libnvmm: libnvmm.c nvmm.h Log Message: Implement nvmm_vcpu::stop, a race-free exit from nvmm_vcpu_run() without signals. This introduces a new kernel and userland NVMM version indicating this support. Patch by Kamil Rytarowski and committed on his request. This is the missing libnvmm part I forgot to include in the origional commit. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libnvmm/libnvmm.c cvs rdiff -u -r1.18 -r1.19 src/lib/libnvmm/nvmm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libnvmm/libnvmm.c diff -u src/lib/libnvmm/libnvmm.c:1.19 src/lib/libnvmm/libnvmm.c:1.20 --- src/lib/libnvmm/libnvmm.c:1.19 Sat Sep 5 07:22:25 2020 +++ src/lib/libnvmm/libnvmm.c Tue Apr 6 08:40:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: libnvmm.c,v 1.19 2020/09/05 07:22:25 maxv Exp $ */ +/* $NetBSD: libnvmm.c,v 1.20 2021/04/06 08:40:17 reinoud Exp $ */ /* * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net @@ -310,6 +310,7 @@ nvmm_vcpu_create(struct nvmm_machine *ma vcpu->cpuid = cpuid; vcpu->state = &comm->state; vcpu->event = &comm->event; + vcpu->stop = &comm->stop; vcpu->exit = malloc(sizeof(*vcpu->exit)); return 0; @@ -561,3 +562,12 @@ nvmm_ctl(int op, void *data, size_t size return 0; } + +int +nvmm_vcpu_stop(struct nvmm_vcpu *vcpu) +{ + + *vcpu->stop = 1; + + return 0; +} Index: src/lib/libnvmm/nvmm.h diff -u src/lib/libnvmm/nvmm.h:1.18 src/lib/libnvmm/nvmm.h:1.19 --- src/lib/libnvmm/nvmm.h:1.18 Sat Sep 5 07:22:25 2020 +++ src/lib/libnvmm/nvmm.h Tue Apr 6 08:40:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm.h,v 1.18 2020/09/05 07:22:25 maxv Exp $ */ +/* $NetBSD: nvmm.h,v 1.19 2021/04/06 08:40:17 reinoud Exp $ */ /* * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net @@ -37,7 +37,12 @@ #include #include -#define NVMM_USER_VERSION 1 +#define NVMM_USER_VERSION 2 + +/* + * Version 1 - Initial release in NetBSD 9.0. + * Version 2 - Added nvmm_vcpu::stop. + */ struct nvmm_io; struct nvmm_mem; @@ -59,6 +64,7 @@ struct nvmm_vcpu { struct nvmm_vcpu_state *state; struct nvmm_vcpu_event *event; struct nvmm_vcpu_exit *exit; + volatile int *stop; }; struct nvmm_io { @@ -123,4 +129,6 @@ int nvmm_ctl(int, void *, size_t); int nvmm_vcpu_dump(struct nvmm_machine *, struct nvmm_vcpu *); +int nvmm_vcpu_stop(struct nvmm_vcpu *); + #endif /* _LIBNVMM_H_ */
CVS commit: src/external/cddl/osnet/dev/dtrace/mips
Module Name:src Committed By: simonb Date: Tue Apr 6 08:19:15 UTC 2021 Modified Files: src/external/cddl/osnet/dev/dtrace/mips: dtrace_subr.c Log Message: Call kmem_free() with the size of the thing we are freeing. Fixes panic when unloading the ktrace module on MIPS. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c:1.1 src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c:1.2 --- src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c:1.1 Mon Mar 29 05:17:09 2021 +++ src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c Tue Apr 6 08:19:15 2021 @@ -121,7 +121,7 @@ dtrace_invop_remove(int (*func)(uintptr_ prev->dtih_next = hdlr->dtih_next; } - kmem_free(hdlr, 0); + kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t)); } /*ARGSUSED*/
CVS commit: src/sys/kern
Module Name:src Committed By: simonb Date: Tue Apr 6 07:57:03 UTC 2021 Modified Files: src/sys/kern: kern_ctf.c Log Message: Check the CTF magic number in an endian friendly way (and don't use magic numbers to check the magic number!). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/kern/kern_ctf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_ctf.c diff -u src/sys/kern/kern_ctf.c:1.7 src/sys/kern/kern_ctf.c:1.8 --- src/sys/kern/kern_ctf.c:1.7 Mon May 28 21:05:00 2018 +++ src/sys/kern/kern_ctf.c Tue Apr 6 07:57:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ctf.c,v 1.7 2018/05/28 21:05:00 chs Exp $ */ +/* $NetBSD: kern_ctf.c,v 1.8 2021/04/06 07:57:03 simonb Exp $ */ /*- * Copyright (c) 2008 John Birrell * All rights reserved. @@ -81,6 +81,7 @@ mod_ctf_get(struct module *mod, mod_ctf_ void *ctfbuf = NULL; uint8_t *ctfaddr; + uint16_t ctfmagic; size_t ctfsize; /* @@ -137,8 +138,9 @@ mod_ctf_get(struct module *mod, mod_ctf_ goto out; } - /* Check the CTF magic number. (XXX check for big endian!) */ - if (ctfaddr[0] != 0xf1 || ctfaddr[1] != 0xcf) { + /* Check the CTF magic number. */ + memcpy(&ctfmagic, ctfaddr, sizeof ctfmagic); + if (ctfmagic != CTF_MAGIC) { error = EINVAL; goto out; }
CVS commit: src/sys/sys
Module Name:src Committed By: simonb Date: Tue Apr 6 07:56:10 UTC 2021 Modified Files: src/sys/sys: kern_ctf.h Log Message: Define the CTF ELF section header magic number. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/sys/kern_ctf.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/sys/kern_ctf.h diff -u src/sys/sys/kern_ctf.h:1.2 src/sys/sys/kern_ctf.h:1.3 --- src/sys/sys/kern_ctf.h:1.2 Mon May 28 21:05:02 2018 +++ src/sys/sys/kern_ctf.h Tue Apr 6 07:56:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ctf.h,v 1.2 2018/05/28 21:05:02 chs Exp $ */ +/* $NetBSD: kern_ctf.h,v 1.3 2021/04/06 07:56:10 simonb Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -29,6 +29,8 @@ #ifndef _SYS_CTF_H_ #define _SYS_CTF_H_ +#define CTF_MAGIC 0xcff1 /* magic number identifying header */ + /* * Modules CTF section */