CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Aug 17 22:29:11 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: main1.c Log Message: lint: extract suppress_messages from main No functional change. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/usr.bin/xlint/lint1/main1.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/main1.c diff -u src/usr.bin/xlint/lint1/main1.c:1.55 src/usr.bin/xlint/lint1/main1.c:1.56 --- src/usr.bin/xlint/lint1/main1.c:1.55 Tue Aug 17 21:19:02 2021 +++ src/usr.bin/xlint/lint1/main1.c Tue Aug 17 22:29:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main1.c,v 1.55 2021/08/17 21:19:02 rillig Exp $ */ +/* $NetBSD: main1.c,v 1.56 2021/08/17 22:29:11 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: main1.c,v 1.55 2021/08/17 21:19:02 rillig Exp $"); +__RCSID("$NetBSD: main1.c,v 1.56 2021/08/17 22:29:11 rillig Exp $"); #endif #include @@ -168,11 +168,28 @@ sigfpe(int s) fpe = 1; } +static void +suppress_messages(char *ids) +{ + char *ptr, *end; + long id; + + for (ptr = strtok(ids, ","); ptr != NULL; ptr = strtok(NULL, ",")) { + errno = 0; + id = strtol(ptr, , 0); + if ((id == TARG_LONG_MIN || id == TARG_LONG_MAX) && + errno == ERANGE) + err(1, "invalid error message id '%s'", ptr); + if (*end != '\0' || ptr == end || id < 0 || id >= ERR_SETSIZE) + errx(1, "invalid error message id '%s'", ptr); + ERR_SET(id, ); + } +} + int main(int argc, char *argv[]) { - int c; - char *ptr; + int c; setprogname(argv[0]); @@ -217,23 +234,7 @@ main(int argc, char *argv[]) break; case 'X': - for (ptr = strtok(optarg, ","); ptr != NULL; - ptr = strtok(NULL, ",")) { -char *eptr; -long msg; - -errno = 0; -msg = strtol(ptr, , 0); -if ((msg == TARG_LONG_MIN || msg == TARG_LONG_MAX) && -errno == ERANGE) -err(1, "invalid error message id '%s'", - ptr); -if (*eptr != '\0' || ptr == eptr || msg < 0 || -msg >= ERR_SETSIZE) - errx(1, "invalid error message id '%s'", - ptr); -ERR_SET(msg, ); - } + suppress_messages(optarg); break; default: usage();
CVS commit: src
Module Name:src Committed By: andvar Date: Tue Aug 17 22:00:33 UTC 2021 Modified Files: src/share/man/man4: route.4 src/sys/altq: altq_cbq.c src/sys/arch/acorn32/acorn32: rpc_machdep.c src/sys/arch/acorn32/doc: history src/sys/arch/acorn32/eb7500atx: eb7500atx_machdep.c src/sys/arch/alpha/jensenio: jensenio_dma.c src/sys/arch/amiga/amiga: amiga_init.c src/sys/arch/amiga/dev: fd.c grfabs_cc.c src/sys/arch/arm/footbridge: footbridge_machdep.c src/sys/arch/arm/imx: imxspi.c src/sys/arch/atari/atari: atari_init.c src/sys/arch/atari/dev: grfabs_fal.c grfabs_tt.c if_ne_mb.c src/sys/arch/evbarm/adi_brh: brh_machdep.c src/sys/arch/evbarm/armadillo: armadillo9_machdep.c src/sys/arch/evbarm/g42xxeb: g42xxeb_machdep.c src/sys/arch/evbarm/hdl_g: hdlg_machdep.c src/sys/arch/evbarm/imx31: imx31lk_machdep.c src/sys/arch/evbarm/iq80310: iq80310_machdep.c src/sys/arch/evbarm/iq80321: iq80321_machdep.c src/sys/arch/evbarm/ixdp425: ixdp425_machdep.c src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c src/sys/arch/evbarm/lubbock: lubbock_machdep.c src/sys/arch/evbarm/mini2440: mini2440_machdep.c src/sys/arch/evbarm/npwr_fc: npwr_fc_machdep.c src/sys/arch/evbarm/nslu2: nslu2_machdep.c src/sys/arch/evbarm/smdk2xx0: smdk2410_machdep.c smdk2800_machdep.c src/sys/arch/evbarm/tsarm: tsarm_machdep.c src/sys/arch/evbarm/viper: viper_machdep.c src/sys/arch/hpcarm/hpcarm: kloader_machdep.c pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c src/sys/arch/i386/conf: MODULAR src/sys/arch/macppc/stand/ofwboot: ofdev.c src/sys/arch/mips/alchemy/include: aureg.h src/sys/arch/mips/ralink: ralink_eth.c src/sys/arch/mipsco/obio: rambo.h src/sys/arch/netwinder/netwinder: netwinder_machdep.c src/sys/arch/pmax/ibus: siireg.h src/sys/arch/powerpc/oea: ofw_rascons.c src/sys/arch/sh3/include: scifreg.h src/sys/arch/shark/shark: shark_machdep.c src/sys/arch/sparc/sparc: machdep.c src/sys/arch/sun2/sun2: machdep.c src/sys/arch/sun68k/stand: README src/sys/arch/vax/include: qdreg.h src/sys/arch/zaurus/zaurus: kloader_machdep.c machdep.c src/sys/dev/ic: gemreg.h hd64570.c rndisreg.h tulipreg.h src/sys/dev/marvell: if_mvxpereg.h src/sys/dev/pci: if_casreg.h if_iwmreg.h pci_subr.c pcireg.h src/sys/dev/pci/ixgbe: if_bypass.c src/sys/dev/qbus: qdreg.h src/sys/dev/tc: stic.c src/sys/dev/usb: usb_quirks.c xhci.c src/sys/kern: subr_vmem.c src/sys/lib/libkern/arch/hppa: milli.S src/sys/netinet6: ip6_output.c ip6_var.h src/sys/sys: shm.h src/sys/ufs/ext2fs: ext2fs_inode.c src/tests/net/if: t_ifconfig.sh src/usr.sbin/acpitools/amldb: amldb.8 debug.c src/usr.sbin/ypserv/ypinit: ypinit.sh Log Message: fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/route.4 cvs rdiff -u -r1.36 -r1.37 src/sys/altq/altq_cbq.c cvs rdiff -u -r1.98 -r1.99 src/sys/arch/acorn32/acorn32/rpc_machdep.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/acorn32/doc/history cvs rdiff -u -r1.34 -r1.35 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/jensenio/jensenio_dma.c cvs rdiff -u -r1.130 -r1.131 src/sys/arch/amiga/amiga/amiga_init.c cvs rdiff -u -r1.99 -r1.100 src/sys/arch/amiga/dev/fd.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amiga/dev/grfabs_cc.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/footbridge/footbridge_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/imx/imxspi.c cvs rdiff -u -r1.101 -r1.102 src/sys/arch/atari/atari/atari_init.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/dev/grfabs_fal.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/dev/grfabs_tt.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/dev/if_ne_mb.c cvs rdiff -u -r1.50 -r1.51 src/sys/arch/evbarm/adi_brh/brh_machdep.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/evbarm/armadillo/armadillo9_machdep.c cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/hdl_g/hdlg_machdep.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/imx31/imx31lk_machdep.c cvs rdiff -u -r1.93 -r1.94 src/sys/arch/evbarm/iq80310/iq80310_machdep.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/evbarm/iq80321/iq80321_machdep.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/evbarm/ixdp425/ixdp425_machdep.c cvs rdiff -u -r1.65 -r1.66 src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/lubbock/lubbock_machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/mini2440/mini2440_machdep.c
CVS commit: src/sys/modules
Module Name:src Committed By: kre Date: Tue Aug 17 21:39:32 UTC 2021 Modified Files: src/sys/modules: Makefile Log Message: s/blake2s/blakes2s/ to match the directory that exists To generate a diff of this commit: cvs rdiff -u -r1.252 -r1.253 src/sys/modules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.252 src/sys/modules/Makefile:1.253 --- src/sys/modules/Makefile:1.252 Tue Aug 17 17:29:19 2021 +++ src/sys/modules/Makefile Tue Aug 17 21:39:32 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.252 2021/08/17 17:29:19 christos Exp $ +# $NetBSD: Makefile,v 1.253 2021/08/17 21:39:32 kre Exp $ .include @@ -27,7 +27,7 @@ SUBDIR+= adosfs SUBDIR+= aio SUBDIR+= audio SUBDIR+= autofs -SUBDIR+= blake2s +SUBDIR+= blakes2s SUBDIR+= blowfish SUBDIR+= bpf SUBDIR+= bpf_filter
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Aug 17 21:19:02 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: main1.c Log Message: lint: sync usage message with reality To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/usr.bin/xlint/lint1/main1.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/main1.c diff -u src/usr.bin/xlint/lint1/main1.c:1.54 src/usr.bin/xlint/lint1/main1.c:1.55 --- src/usr.bin/xlint/lint1/main1.c:1.54 Tue Aug 17 21:05:34 2021 +++ src/usr.bin/xlint/lint1/main1.c Tue Aug 17 21:19:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main1.c,v 1.54 2021/08/17 21:05:34 rillig Exp $ */ +/* $NetBSD: main1.c,v 1.55 2021/08/17 21:19:02 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: main1.c,v 1.54 2021/08/17 21:05:34 rillig Exp $"); +__RCSID("$NetBSD: main1.c,v 1.55 2021/08/17 21:19:02 rillig Exp $"); #endif #include @@ -290,9 +290,9 @@ static void __attribute__((noreturn)) usage(void) { (void)fprintf(stderr, - "usage: %s [-abcdeghmprstuvwyzFST] [-Ac11] [-X [,]... " - "src dest\n", - getprogname()); + "usage: %s [-abceghmprstuvwyzFPST] [-Ac11] [-R old=new]\n" + " %*s [-X [,]...] src dest\n", + getprogname(), (int)strlen(getprogname()), ""); exit(1); }
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Aug 17 21:05:34 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: main1.c Log Message: lint: move GCC builtins into gcc_builtins No functional change. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/usr.bin/xlint/lint1/main1.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/main1.c diff -u src/usr.bin/xlint/lint1/main1.c:1.53 src/usr.bin/xlint/lint1/main1.c:1.54 --- src/usr.bin/xlint/lint1/main1.c:1.53 Sun Aug 1 19:11:54 2021 +++ src/usr.bin/xlint/lint1/main1.c Tue Aug 17 21:05:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main1.c,v 1.53 2021/08/01 19:11:54 rillig Exp $ */ +/* $NetBSD: main1.c,v 1.54 2021/08/17 21:05:34 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: main1.c,v 1.53 2021/08/01 19:11:54 rillig Exp $"); +__RCSID("$NetBSD: main1.c,v 1.54 2021/08/17 21:05:34 rillig Exp $"); #endif #include @@ -130,16 +130,15 @@ sig_atomic_t fpe; static void usage(void); -static const char builtins[] = -"int __builtin_isinf(long double);\n" -"int __builtin_isnan(long double);\n" -"int __builtin_copysign(long double, long double);\n" -; -static const size_t builtinlen = sizeof(builtins) - 1; - static FILE * gcc_builtins(void) { + static const char builtins[] = + "int __builtin_isinf(long double);\n" + "int __builtin_isnan(long double);\n" + "int __builtin_copysign(long double, long double);\n"; + size_t builtins_len = sizeof(builtins) - 1; + #if HAVE_NBTOOL_CONFIG_H char template[] = "/tmp/lint.XX"; int fd; @@ -151,14 +150,14 @@ gcc_builtins(void) close(fd); return NULL; } - if (fwrite(builtins, 1, builtinlen, fp) != builtinlen) { + if (fwrite(builtins, 1, builtins_len, fp) != builtins_len) { fclose(fp); return NULL; } rewind(fp); return fp; #else - return fmemopen(__UNCONST(builtins), builtinlen, "r"); + return fmemopen(__UNCONST(builtins), builtins_len, "r"); #endif }
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Tue Aug 17 17:31:59 UTC 2021 Modified Files: src/distrib/sets/lists/debug: module.mi src/distrib/sets/lists/modules: mi Log Message: modules for if_wg, blake2s, libsodium To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/debug/module.mi cvs rdiff -u -r1.144 -r1.145 src/distrib/sets/lists/modules/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/debug/module.mi diff -u src/distrib/sets/lists/debug/module.mi:1.9 src/distrib/sets/lists/debug/module.mi:1.10 --- src/distrib/sets/lists/debug/module.mi:1.9 Mon May 17 00:07:42 2021 +++ src/distrib/sets/lists/debug/module.mi Tue Aug 17 13:31:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: module.mi,v 1.9 2021/05/17 04:07:42 yamaguchi Exp $ +# $NetBSD: module.mi,v 1.10 2021/08/17 17:31:58 christos Exp $ ./usr/libdata/debug/@MODULEDIR@ modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/accf_dataready modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/accf_dataready/accf_dataready.kmod.debug modules-base-kernel kmod,debug @@ -14,6 +14,8 @@ ./usr/libdata/debug/@MODULEDIR@/audio/audio.kmod.debug modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/autofsmodules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/autofs/autofs.kmod.debug modules-base-kernel kmod,debug +./usr/libdata/debug/@MODULEDIR@/blake2smodules-base-kernel kmod,debug +./usr/libdata/debug/@MODULEDIR@/blake2s/blake2s.kmod.debug modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/blowfishmodules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/blowfish/blowfish.kmod.debug modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/bpfmodules-base-kernel kmod,debug @@ -224,6 +226,8 @@ ./usr/libdata/debug/@MODULEDIR@/if_urndis/if_urndis.kmod.debug modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/if_vlanmodules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/if_vlan/if_vlan.kmod.debug modules-base-kernel kmod,debug +./usr/libdata/debug/@MODULEDIR@/if_wgmodules-base-kernel kmod,debug +./usr/libdata/debug/@MODULEDIR@/if_wg/if_wg.kmod.debug modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/iicmodules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/iic/iic.kmod.debug modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/ip_ecnmodules-base-kernel kmod,debug @@ -332,6 +336,8 @@ ./usr/libdata/debug/@MODULEDIR@/skipjack/skipjack.kmod.debug modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/slcompress modules-base-kernel kmod,debug ./usr/libdata/debug/@MODULEDIR@/slcompress/slcompress.kmod.debug modules-base-kernel kmod,debug +./usr/libdata/debug/@MODULEDIR@/sodiummodules-base-kernel kmod,solaris,debug +./usr/libdata/debug/@MODULEDIR@/sodium/sodium.kmod.debug modules-base-kernel kmod,solaris,debug ./usr/libdata/debug/@MODULEDIR@/solarismodules-base-kernel kmod,solaris,debug ./usr/libdata/debug/@MODULEDIR@/solaris/solaris.kmod.debug modules-base-kernel kmod,solaris,debug ./usr/libdata/debug/@MODULEDIR@/spdmemmodules-base-kernel kmod,debug Index: src/distrib/sets/lists/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.144 src/distrib/sets/lists/modules/mi:1.145 --- src/distrib/sets/lists/modules/mi:1.144 Mon May 17 00:07:42 2021 +++ src/distrib/sets/lists/modules/mi Tue Aug 17 13:31:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.144 2021/05/17 04:07:42 yamaguchi Exp $ +# $NetBSD: mi,v 1.145 2021/08/17 17:31:59 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -23,6 +23,8 @@ ./@MODULEDIR@/audio/audio.kmod modules-base-kernel kmod ./@MODULEDIR@/autofsmodules-base-kernel kmod ./@MODULEDIR@/autofs/autofs.kmod modules-base-kernel kmod +./@MODULEDIR@/blake2smodules-base-kernel kmod +./@MODULEDIR@/blake2s/blake2s.kmod modules-base-kernel kmod ./@MODULEDIR@/blowfishmodules-base-kernel kmod ./@MODULEDIR@/blowfish/blowfish.kmod modules-base-kernel kmod ./@MODULEDIR@/bpfmodules-base-kernel kmod @@ -251,6 +253,8 @@ ./@MODULEDIR@/if_vioif/if_vioif.kmod base-obsolete obsolete ./@MODULEDIR@/if_vlanmodules-base-kernel kmod ./@MODULEDIR@/if_vlan/if_vlan.kmod modules-base-kernel kmod +./@MODULEDIR@/if_wgmodules-base-kernel kmod +./@MODULEDIR@/if_wg/if_wg.kmod modules-base-kernel kmod ./@MODULEDIR@/iicmodules-base-kernel kmod ./@MODULEDIR@/iic/iic.kmod modules-base-kernel kmod ./@MODULEDIR@/ip_ecnmodules-base-kernel kmod @@ -399,6 +403,8 @@ ./@MODULEDIR@/slcompress/slcompress.kmod modules-base-kernel kmod ./@MODULEDIR@/smbfsbase-obsolete obsolete ./@MODULEDIR@/smbfs/smbfs.kmod base-obsolete obsolete +./@MODULEDIR@/sodiummodules-base-kernel kmod
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Tue Aug 17 17:31:13 UTC 2021 Modified Files: src/sys/net: if_wg.c Log Message: Some signnes, casts, and constant sizes. Add module dependencies. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/net/if_wg.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/net/if_wg.c diff -u src/sys/net/if_wg.c:1.64 src/sys/net/if_wg.c:1.65 --- src/sys/net/if_wg.c:1.64 Tue Jun 15 20:21:19 2021 +++ src/sys/net/if_wg.c Tue Aug 17 13:31:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wg.c,v 1.64 2021/06/16 00:21:19 riastradh Exp $ */ +/* $NetBSD: if_wg.c,v 1.65 2021/08/17 17:31:13 christos Exp $ */ /* * Copyright (C) Ryota Ozaki @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.64 2021/06/16 00:21:19 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.65 2021/08/17 17:31:13 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_altq_enabled.h" @@ -442,7 +442,7 @@ sliwin_update(struct sliwin *W, uint64_t bit = S % SLIWIN_BPW; if (W->B[word] & (1UL << bit)) return EAUTH; - W->B[word] |= 1UL << bit; + W->B[word] |= 1U << bit; /* Accept! */ return 0; @@ -1009,7 +1009,7 @@ wg_algo_hmac(uint8_t out[], const size_t uint8_t hmackey[HMAC_BLOCK_LEN] = {0}; uint8_t ipad[HMAC_BLOCK_LEN]; uint8_t opad[HMAC_BLOCK_LEN]; - int i; + size_t i; struct blake2s state; KASSERT(outlen == WG_HASH_LEN); @@ -1167,11 +1167,11 @@ wg_algo_tai64n(wg_timestamp_t timestamp) /* FIXME strict TAI64N (https://cr.yp.to/libtai/tai64.html) */ getnanotime(); /* TAI64 label in external TAI64 format */ - be32enc(timestamp, 0x4000UL + (ts.tv_sec >> 32)); + be32enc(timestamp, 0x4000U + (uint32_t)(ts.tv_sec >> 32)); /* second beginning from 1970 TAI */ - be32enc(timestamp + 4, ts.tv_sec & 0xU); + be32enc(timestamp + 4, (uint32_t)(ts.tv_sec & 0xU)); /* nanosecond in big-endian format */ - be32enc(timestamp + 8, ts.tv_nsec); + be32enc(timestamp + 8, (uint32_t)ts.tv_nsec); } /* @@ -1715,7 +1715,7 @@ wg_send_handshake_msg_init(struct wg_sof if (wgp->wgp_handshake_start_time == 0) wgp->wgp_handshake_start_time = time_uptime; callout_schedule(>wgp_handshake_timeout_timer, - MIN(wg_rekey_timeout, INT_MAX/hz) * hz); + MIN(wg_rekey_timeout, (unsigned)(INT_MAX / hz)) * hz); } else { wg_put_session_index(wg, wgs); /* Initiation failed; toss packet waiting for it if any. */ @@ -2271,7 +2271,7 @@ wg_lookup_session_by_index(struct wg_sof static void wg_schedule_rekey_timer(struct wg_peer *wgp) { - int timeout = MIN(wg_rekey_after_time, INT_MAX/hz); + int timeout = MIN(wg_rekey_after_time, (unsigned)(INT_MAX / hz)); callout_schedule(>wgp_rekey_timer, timeout * hz); } @@ -2308,7 +2308,7 @@ wg_need_to_send_init_message(struct wg_s } static void -wg_schedule_peer_task(struct wg_peer *wgp, int task) +wg_schedule_peer_task(struct wg_peer *wgp, unsigned int task) { mutex_enter(wgp->wgp_intr_lock); @@ -3082,7 +3082,7 @@ wg_peer_work(struct work *wk, void *cook { struct wg_peer *wgp = container_of(wk, struct wg_peer, wgp_work); struct wg_softc *wg = wgp->wgp_sc; - int tasks; + unsigned int tasks; mutex_enter(wgp->wgp_intr_lock); while ((tasks = wgp->wgp_tasks) != 0) { @@ -4515,10 +4515,10 @@ wg_ioctl_get(struct wg_softc *wg, struct const struct timespec *t = >wgp_last_handshake_time; if (!prop_dictionary_set_uint64(prop_peer, - "last_handshake_time_sec", t->tv_sec)) + "last_handshake_time_sec", (uint64_t)t->tv_sec)) goto next; if (!prop_dictionary_set_uint32(prop_peer, - "last_handshake_time_nsec", t->tv_nsec)) + "last_handshake_time_nsec", (uint32_t)t->tv_nsec)) goto next; if (wgp->wgp_n_allowedips == 0) @@ -5002,4 +5002,4 @@ rumpkern_wg_recv_peer(struct wg_softc *w */ #include "if_module.h" -IF_MODULE(MODULE_CLASS_DRIVER, wg, "") +IF_MODULE(MODULE_CLASS_DRIVER, wg, "sodium,blake2s")
CVS commit: src/sys/external/isc/libsodium/src
Module Name:src Committed By: christos Date: Tue Aug 17 17:30:01 UTC 2021 Modified Files: src/sys/external/isc/libsodium/src: glue.c Log Message: Add module glue To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/isc/libsodium/src/glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/isc/libsodium/src/glue.c diff -u src/sys/external/isc/libsodium/src/glue.c:1.1 src/sys/external/isc/libsodium/src/glue.c:1.2 --- src/sys/external/isc/libsodium/src/glue.c:1.1 Thu Aug 20 17:20:16 2020 +++ src/sys/external/isc/libsodium/src/glue.c Tue Aug 17 13:30:01 2021 @@ -1 +1,56 @@ +/* $NetBSD: glue.c,v 1.2 2021/08/17 17:30:01 christos Exp $ */ + +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: glue.c,v 1.2 2021/08/17 17:30:01 christos Exp $"); + +#include +#include +#include + int libsodium_errno; + +MODULE(MODULE_CLASS_MISC, sodium, NULL); + +static int +sodium_modcmd(modcmd_t cmd, void *arg) +{ + + switch (cmd) { + case MODULE_CMD_INIT: + break; + + case MODULE_CMD_FINI: + break; + + default: + return ENOTTY; + } + + return 0; +}
CVS commit: src/sys/modules
Module Name:src Committed By: christos Date: Tue Aug 17 17:29:20 UTC 2021 Modified Files: src/sys/modules: Makefile Added Files: src/sys/modules/blakes2s: Makefile src/sys/modules/if_wg: Makefile wg.ioconf src/sys/modules/sodium: Makefile Makefile.sodmod Log Message: modules for blake2s libsodium and if_wg To generate a diff of this commit: cvs rdiff -u -r1.251 -r1.252 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/blakes2s/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/if_wg/Makefile \ src/sys/modules/if_wg/wg.ioconf cvs rdiff -u -r0 -r1.1 src/sys/modules/sodium/Makefile \ src/sys/modules/sodium/Makefile.sodmod Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.251 src/sys/modules/Makefile:1.252 --- src/sys/modules/Makefile:1.251 Mon Aug 9 16:49:10 2021 +++ src/sys/modules/Makefile Tue Aug 17 13:29:19 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.251 2021/08/09 20:49:10 andvar Exp $ +# $NetBSD: Makefile,v 1.252 2021/08/17 17:29:19 christos Exp $ .include @@ -27,6 +27,7 @@ SUBDIR+= adosfs SUBDIR+= aio SUBDIR+= audio SUBDIR+= autofs +SUBDIR+= blake2s SUBDIR+= blowfish SUBDIR+= bpf SUBDIR+= bpf_filter @@ -100,6 +101,7 @@ SUBDIR+= if_ure SUBDIR+= if_url SUBDIR+= if_urndis SUBDIR+= if_vlan +SUBDIR+= if_wg SUBDIR+= iic SUBDIR+= ip_ecn SUBDIR+= ipl @@ -389,6 +391,8 @@ SUBDIR+= cyclic SUBDIR+= dtrace .endif +SUBDIR+=sodium + # we need solaris for the dtrace and zfs modules .if (${MKDTRACE} != "no" || ${MKZFS} != "no") SUBDIR+=solaris Added files: Index: src/sys/modules/blakes2s/Makefile diff -u /dev/null src/sys/modules/blakes2s/Makefile:1.1 --- /dev/null Tue Aug 17 13:29:20 2021 +++ src/sys/modules/blakes2s/Makefile Tue Aug 17 13:29:20 2021 @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2021/08/17 17:29:20 christos Exp $ + +.include "../Makefile.inc" + +KMOD= blake2s + +BLAKE2SDIR= $S/crypto/blake2 +CPPFLAGS+= -I${BLAKE2SDIR} + +.PATH: ${BLAKE2SDIR} +SRCS+= blake2s.c + +.include Index: src/sys/modules/if_wg/Makefile diff -u /dev/null src/sys/modules/if_wg/Makefile:1.1 --- /dev/null Tue Aug 17 13:29:20 2021 +++ src/sys/modules/if_wg/Makefile Tue Aug 17 13:29:20 2021 @@ -0,0 +1,17 @@ +# $NetBSD: Makefile,v 1.1 2021/08/17 17:29:20 christos Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/net + +KMOD= if_wg +IOCONF= wg.ioconf +SRCS= if_wg.c + +CPPFLAGS+= -DINET +CPPFLAGS+= -DINET6 +CPPFLAGS+= -DALTQ + +WARNS= 3 + +.include Index: src/sys/modules/if_wg/wg.ioconf diff -u /dev/null src/sys/modules/if_wg/wg.ioconf:1.1 --- /dev/null Tue Aug 17 13:29:20 2021 +++ src/sys/modules/if_wg/wg.ioconf Tue Aug 17 13:29:20 2021 @@ -0,0 +1,7 @@ +# $NetBSD: wg.ioconf,v 1.1 2021/08/17 17:29:20 christos Exp $ + +ioconf wg + +include "conf/files" + +pseudo-device wg Index: src/sys/modules/sodium/Makefile diff -u /dev/null src/sys/modules/sodium/Makefile:1.1 --- /dev/null Tue Aug 17 13:29:20 2021 +++ src/sys/modules/sodium/Makefile Tue Aug 17 13:29:20 2021 @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.1 2021/08/17 17:29:20 christos Exp $ + +.include "../Makefile.inc" + +KMOD= sodium + +.include "Makefile.sodmod" +.include Index: src/sys/modules/sodium/Makefile.sodmod diff -u /dev/null src/sys/modules/sodium/Makefile.sodmod:1.1 --- /dev/null Tue Aug 17 13:29:20 2021 +++ src/sys/modules/sodium/Makefile.sodmod Tue Aug 17 13:29:20 2021 @@ -0,0 +1,53 @@ +# $NetBSD: Makefile.sodmod,v 1.1 2021/08/17 17:29:20 christos Exp $ + +SODIUMDIR= ${S}/external/isc/libsodium +SODIUMSRCDIR= ${SODIUMDIR}/dist/src/libsodium + +.PATH: ${SODIUMDIR}/src +SRCS+= glue.c + +.PATH: ${SODIUMSRCDIR}/crypto_scalarmult/curve25519/ref10 +SRCS+= x25519_ref10.c + +.PATH: ${SODIUMSRCDIR}/crypto_scalarmult/curve25519 +SRCS+= scalarmult_curve25519.c + +.PATH: ${SODIUMSRCDIR}/crypto_scalarmult +SRCS+= crypto_scalarmult.c + +.PATH: ${SODIUMSRCDIR}/crypto_onetimeauth/poly1305/donna +SRCS+= poly1305_donna.c + +.PATH: ${SODIUMSRCDIR}/crypto_onetimeauth/poly1305 +SRCS+= onetimeauth_poly1305.c + +.PATH: ${SODIUMSRCDIR}/crypto_onetimeauth +SRCS+= crypto_onetimeauth.c + +.PATH: ${SODIUMSRCDIR}/crypto_stream/chacha20/ref +SRCS+= chacha20_ref.c + +.PATH: ${SODIUMSRCDIR}/crypto_stream/chacha20 +SRCS+= stream_chacha20.c + +.PATH: ${SODIUMSRCDIR}/crypto_aead/xchacha20poly1305/sodium +SRCS+= aead_xchacha20poly1305.c + +.PATH: ${SODIUMSRCDIR}/crypto_aead/chacha20poly1305/sodium +SRCS+= aead_chacha20poly1305.c + +.PATH: ${SODIUMSRCDIR}/crypto_core/hchacha20 +SRCS+= core_hchacha20.c + +.PATH: ${SODIUMSRCDIR}/crypto_core/ed25519/ref10 +SRCS+= ed25519_ref10.c + +WARNS= 3 + +CWARNFLAGS+= -Wall +CWARNFLAGS+= -Wno-shadow +CWARNFLAGS+= -Wno-unused-function +CWARNFLAGS+= -Wno-unused-variable + +CPPFLAGS+= -DHAVE_TI_MODE -I${SODIUMDIR}/include +CPPFLAGS+= -I${SODIUMDIR}/dist/src/libsodium/include/sodium
CVS commit: src/sys/dev/pci
Module Name:src Committed By: andvar Date: Tue Aug 17 17:16:40 UTC 2021 Modified Files: src/sys/dev/pci: pci_subr.c Log Message: s/Windw/Window/ in log message. To generate a diff of this commit: cvs rdiff -u -r1.227 -r1.228 src/sys/dev/pci/pci_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/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.227 src/sys/dev/pci/pci_subr.c:1.228 --- src/sys/dev/pci/pci_subr.c:1.227 Mon Jul 12 04:41:14 2021 +++ src/sys/dev/pci/pci_subr.c Tue Aug 17 17:16:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.227 2021/07/12 04:41:14 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.228 2021/08/17 17:16:40 andvar Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.227 2021/07/12 04:41:14 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.228 2021/08/17 17:16:40 andvar Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -3539,7 +3539,7 @@ pci_conf_print_multicast_cap(const pcire /* Endpoint Only */ n = PCIREG_SHIFTOUT(reg, PCI_MCAST_CAP_WINSIZEREQ); if (n > 0) - printf(" Windw Size Requested: %d\n", 1 << (n - 1)); + printf(" Window Size Requested: %d\n", 1 << (n - 1)); onoff("ECRC Regeneration Supported", reg, PCI_MCAST_CAP_ECRCREGEN);
CVS commit: src/share/man/man4
Module Name:src Committed By: andvar Date: Tue Aug 17 14:11:22 UTC 2021 Modified Files: src/share/man/man4: tty.4 Log Message: tty.4: s/asynchronus/asynchronous/ To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/tty.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/tty.4 diff -u src/share/man/man4/tty.4:1.30 src/share/man/man4/tty.4:1.31 --- src/share/man/man4/tty.4:1.30 Sat Sep 7 19:32:52 2019 +++ src/share/man/man4/tty.4 Tue Aug 17 14:11:22 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: tty.4,v 1.30 2019/09/07 19:32:52 wiz Exp $ +.\" $NetBSD: tty.4,v 1.31 2021/08/17 14:11:22 andvar Exp $ .\" .\" Copyright (c) 1991, 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -478,7 +478,7 @@ Return the current line discipline in th .Sh HISTORY A console typewriter device .Pa /dev/tty -and asynchronus communication interfaces +and asynchronous communication interfaces .Pa /dev/tty[0-5] first appeared in .At v1 .
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Tue Aug 17 09:43:21 UTC 2021 Modified Files: src/sys/netinet6: nd6.c Log Message: nd6: prevent ln from being freed while releasing held packets To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/netinet6/nd6.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/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.276 src/sys/netinet6/nd6.c:1.277 --- src/sys/netinet6/nd6.c:1.276 Mon Dec 28 20:19:50 2020 +++ src/sys/netinet6/nd6.c Tue Aug 17 09:43:21 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.276 2020/12/28 20:19:50 nia Exp $ */ +/* $NetBSD: nd6.c,v 1.277 2021/08/17 09:43:21 ozaki-r Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.276 2020/12/28 20:19:50 nia Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.277 2021/08/17 09:43:21 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1305,6 +1305,7 @@ nd6_llinfo_release_pkts(struct llentry * m_hold = ln->la_hold, ln->la_hold = NULL, ln->la_numheld = 0; + LLE_ADDREF(ln); LLE_WUNLOCK(ln); for (; m_hold != NULL; m_hold = m_hold_next) { m_hold_next = m_hold->m_nextpkt; @@ -1318,6 +1319,7 @@ nd6_llinfo_release_pkts(struct llentry * ip6_if_output(ifp, ifp, m_hold, , NULL); } LLE_WLOCK(ln); + LLE_REMREF(ln); } /*
CVS commit: src/usr.bin/progress
Module Name:src Committed By: gson Date: Tue Aug 17 07:18:43 UTC 2021 Modified Files: src/usr.bin/progress: progress.c Log Message: Add missing check for error returns from read(). Found by inspection while reviewing the changes suggested by RVP in PR install/56303, but not believed to be the cause of the failure reported in that PR. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/progress/progress.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/progress/progress.c diff -u src/usr.bin/progress/progress.c:1.24 src/usr.bin/progress/progress.c:1.25 --- src/usr.bin/progress/progress.c:1.24 Mon Aug 9 10:46:39 2021 +++ src/usr.bin/progress/progress.c Tue Aug 17 07:18:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $ */ +/* $NetBSD: progress.c,v 1.25 2021/08/17 07:18:43 gson Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $"); +__RCSID("$NetBSD: progress.c,v 1.25 2021/08/17 07:18:43 gson Exp $"); #endif/* not lint */ #include @@ -231,7 +231,11 @@ main(int argc, char *argv[]) do { nr = read(fd, fb_buf, buffersize); } while (nr < 0 && errno == EINTR); - if (nr <= 0) + if (nr < 0) { + progressmeter(1); + err(1, "reading input"); + } + if (nr == 0) break; for (off = 0; nr; nr -= nw, off += nw, bytes += nw) if ((nw = write(outpipe[1], fb_buf + off,