CVS commit: src/sys/ddb
Module Name:src Committed By: simonb Date: Sun Jun 28 04:06:14 UTC 2020 Modified Files: src/sys/ddb: db_output.h Log Message: Protect against multiple inclusion. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/ddb/db_output.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/ddb/db_output.h diff -u src/sys/ddb/db_output.h:1.21 src/sys/ddb/db_output.h:1.22 --- src/sys/ddb/db_output.h:1.21 Thu Mar 15 02:02:22 2012 +++ src/sys/ddb/db_output.h Sun Jun 28 04:06:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: db_output.h,v 1.21 2012/03/15 02:02:22 joerg Exp $ */ +/* $NetBSD: db_output.h,v 1.22 2020/06/28 04:06:14 simonb Exp $ */ /* * Mach Operating System @@ -29,6 +29,9 @@ * Date: 8/90 */ +#ifndef _DDB_DB_OUTPUT_H_ +#define _DDB_DB_OUTPUT_H_ + #include /* @@ -51,3 +54,5 @@ extern int db_tab_stop_width; #define DB_NEXT_TAB(i) \ i) + db_tab_stop_width) / db_tab_stop_width) * db_tab_stop_width) + +#endif /* _DDB_DB_OUTPUT_H_ */
CVS commit: src/etc/mtree
Module Name:src Committed By: kim Date: Sun Jun 28 03:05:59 UTC 2020 Modified Files: src/etc/mtree: special Log Message: Fix /private/tmp mode to match etc/rc.d/perusertmp To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/etc/mtree/special Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/special diff -u src/etc/mtree/special:1.169 src/etc/mtree/special:1.170 --- src/etc/mtree/special:1.169 Mon Jun 15 01:57:30 2020 +++ src/etc/mtree/special Sun Jun 28 03:05:59 2020 @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.169 2020/06/15 01:57:30 christos Exp $ +# $NetBSD: special,v 1.170 2020/06/28 03:05:59 kim Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -356,7 +356,7 @@ ./etc/zfs type=dir mode=0755 ./private type=dir mode=0755 optional -./private/tmp type=dir mode=0111 optional ignore +./private/tmp type=dir mode=0555 optional ignore ./roottype=dir mode=0755 ./root/.cshrc type=file mode=0644
CVS commit: src/include/arpa
Module Name:src Committed By: gutteridge Date: Sun Jun 28 02:16:19 UTC 2020 Modified Files: src/include/arpa: nameser_compat.h Log Message: nameser_compat.h: correct preprocessor error syntax To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/include/arpa/nameser_compat.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/arpa/nameser_compat.h diff -u src/include/arpa/nameser_compat.h:1.6 src/include/arpa/nameser_compat.h:1.7 --- src/include/arpa/nameser_compat.h:1.6 Tue Feb 24 17:57:08 2015 +++ src/include/arpa/nameser_compat.h Sun Jun 28 02:16:19 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nameser_compat.h,v 1.6 2015/02/24 17:57:08 christos Exp $ */ +/* $NetBSD: nameser_compat.h,v 1.7 2020/06/28 02:16:19 gutteridge Exp $ */ /* Copyright (c) 1983, 1989 *The Regents of the University of California. All rights reserved. @@ -82,7 +82,7 @@ * which will force your compiles to bomb until you fix * the above macros. */ - error "Undefined or invalid BYTE_ORDER"; +#error "Undefined or invalid BYTE_ORDER" #endif /*%
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: pgoyette Date: Sun Jun 28 01:38:40 UTC 2020 Modified Files: src/distrib/sets/lists/debug: mi Log Message: Add missing debug entry for new t_mbtowc XXX Please note that there are now TWO tests named t_mbtowc - this one in XXX tests/lib/libc/stdlib/ and an older one in tests/lib/libc/locale XXX I don't know if the functionality is duplicated or not. To generate a diff of this commit: cvs rdiff -u -r1.318 -r1.319 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.318 src/distrib/sets/lists/debug/mi:1.319 --- src/distrib/sets/lists/debug/mi:1.318 Sat Jun 27 18:03:52 2020 +++ src/distrib/sets/lists/debug/mi Sun Jun 28 01:38:39 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.318 2020/06/27 18:03:52 christos Exp $ +# $NetBSD: mi,v 1.319 2020/06/28 01:38:39 pgoyette Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -2089,6 +2089,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_getenv.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_getenv_thread.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_hsearch.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mbtowc.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mi_vector_hash.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mktemp.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_posix_memalign.debug tests-lib-debug debug,atf,compattestfile
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: jdolecek Date: Sat Jun 27 21:21:11 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: vdev_queue.c Log Message: fix bug introduced in conversion to kmem(9), passing address of the local variable instead of pointer to allocated memory should fix PR kern/55426 by Andreas Gustafsson To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_queue.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/dist/uts/common/fs/zfs/vdev_queue.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_queue.c:1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_queue.c:1.3 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_queue.c:1.2 Wed Jun 24 16:16:01 2020 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_queue.c Sat Jun 27 21:21:11 2020 @@ -820,7 +820,7 @@ again: search = kmem_zalloc(sizeof (*search), KM_NOSLEEP); if (search) { search->io_offset = vq->vq_last_offset + 1; - VERIFY3P(avl_find(tree, , ), ==, NULL); + VERIFY3P(avl_find(tree, search, ), ==, NULL); kmem_free(search, sizeof (*search)); zio = avl_nearest(tree, idx, AVL_AFTER); } else {
CVS commit: src/usr.bin/m4
Module Name:src Committed By: uwe Date: Sat Jun 27 19:18:58 UTC 2020 Modified Files: src/usr.bin/m4: eval.c Log Message: eval: Make radix optional even if minimum result width is specified. This is what GNU m4 does too. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/m4/eval.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/m4/eval.c diff -u src/usr.bin/m4/eval.c:1.27 src/usr.bin/m4/eval.c:1.28 --- src/usr.bin/m4/eval.c:1.27 Mon Jul 30 22:58:09 2018 +++ src/usr.bin/m4/eval.c Sat Jun 27 19:18:58 2020 @@ -1,5 +1,5 @@ /* $OpenBSD: eval.c,v 1.66 2008/08/21 21:01:47 espie Exp $ */ -/* $NetBSD: eval.c,v 1.27 2018/07/30 22:58:09 kre Exp $ */ +/* $NetBSD: eval.c,v 1.28 2020/06/27 19:18:58 uwe Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #include "nbtool_config.h" #endif #include -__RCSID("$NetBSD: eval.c,v 1.27 2018/07/30 22:58:09 kre Exp $"); +__RCSID("$NetBSD: eval.c,v 1.28 2020/06/27 19:18:58 uwe Exp $"); #include #include @@ -184,7 +184,7 @@ expand_builtin(const char *argv[], int a int maxdigits = 0; int e; - if (argc > 3) { + if (argc > 3 && *argv[3] != '\0') { base = strtoi(argv[3], NULL, 0, 2, 36, ); if (e) { m4errx(1, "expr: base %s invalid.", argv[3]);
CVS commit: src/usr.bin/m4
Module Name:src Committed By: uwe Date: Sat Jun 27 19:07:15 UTC 2020 Modified Files: src/usr.bin/m4: m4.1 Log Message: Improve markup for better PostScript output. Make sure quotes are right and copy-pastable even in UTF-8 output. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/m4/m4.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/m4/m4.1 diff -u src/usr.bin/m4/m4.1:1.30 src/usr.bin/m4/m4.1:1.31 --- src/usr.bin/m4/m4.1:1.30 Thu Jun 25 02:59:20 2020 +++ src/usr.bin/m4/m4.1 Sat Jun 27 19:07:15 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: m4.1,v 1.30 2020/06/25 02:59:20 uwe Exp $ +.\" $NetBSD: m4.1,v 1.31 2020/06/27 19:07:15 uwe Exp $ .\" @(#) $OpenBSD: m4.1,v 1.56 2009/10/14 17:19:47 sthen Exp $ .\" .\" Copyright (c) 1989, 1993 @@ -38,11 +38,11 @@ .Nm m4 .Nd macro language processor .Sh SYNOPSIS -.Nm m4 +.Nm .Op Fl EGgiPQsv .Oo .Sm off -.Fl D Ar name Op No = Ar value +.Fl D Ar name Op Cm = Ar value .Sm on .Oc .Op Fl d Ar flags @@ -56,42 +56,49 @@ .Op Ar .Sh DESCRIPTION The -.Nm m4 +.Nm utility is a macro processor that can be used as a front end to any language (e.g., C, ratfor, fortran, lex, and yacc). If no input files are given, -.Nm m4 +.Nm reads from the standard input, otherwise files specified on the command line are processed in the given order. -Input files can be regular files, files in the m4 include paths, or a +Input files can be regular files, files in the +.Nm +include paths, or a single dash -.Pq Sq - , +.Pq Sq Fl , denoting standard input. -.Nm m4 +.Nm writes the processed text to the standard output, unless told otherwise. .Pp -Macro calls have the form name(argument1[, argument2, ..., argumentN]). +Macro calls have the form +.Fo name +.Fa argument1\| +.Bo \" should be Oo/Oc but mandoc chokes on it +.Fa argument2 +.Fa \&... +.Fa argumentN\| +.Bc Ns Fc .Pp There cannot be any space following the macro name and the open parenthesis -.Sq \&( . +.Ql \&( . If the macro name is not followed by an open parenthesis it is processed with no arguments. .Pp Macro names consist of a leading alphabetic or underscore -possibly followed by alphanumeric or underscore characters, e.g., -valid macro names match the pattern -.Dq [a-zA-Z_][a-zA-Z0-9_]* . +possibly followed by alphanumeric or underscore characters, +i.e. valid macro names match the pattern +.Dq Li [a-zA-Z_][a-zA-Z0-9_]*\| . .Pp In arguments to macros, leading unquoted space, tab, and newline .Pq Sq \en characters are ignored. -To quote strings, use left and right single quotes -.Po e.g.,\ \& -.Sq "\ this is a string with a leading space" -.Pc . +To quote strings, use left and right single quotes, e.g.\& +.Li "\` this is a string with a leading space\(aq" . You can change the quote characters with the .Ic changequote built-in macro. @@ -100,39 +107,41 @@ Most built-ins don't make any sense with recognized as special when not followed by an open parenthesis. .Pp The options are as follows: -.Bl -tag -width Ds -.It Fl D , Fl Fl define Ar name Ns Op Pf = Ns Ar value +.Bl -tag -width Fl +.It Fl D , Fl Fl define Ar name Ns Op Ns Cm = Ns Ar value Define the symbol .Ar name -to have some value (or -.Dv NULL ) . +to have +.Ar value +or to be a null string. .It Fl d , Fl Fl debug Ar "flags" Set trace flags. .Ar flags may hold the following: -.Bl -tag -width Ds -.It Ar a +.Pp +.Bl -tag -width ".Li XX" -compact +.It Cm a print macro arguments. -.It Ar c +.It Cm c print macro expansion over several lines. -.It Ar e +.It Cm e print result of macro expansion. -.It Ar f +.It Cm f print filename location. -.It Ar l +.It Cm l print line number. -.It Ar q +.It Cm q quote arguments and expansion with the current quotes. -.It Ar t +.It Cm t start with all macros traced. -.It Ar x +.It Cm x number macro expansions. -.It Ar V -turn on all options. +.It Cm V +turn on all trace flags. .El .Pp By default, trace is set to -.Qq eq . +.Ql eq . .It Fl E , Fl Fl fatal-warnings Warnings make .Nm @@ -141,16 +150,24 @@ exit. Save the input state to .Ar filename . .It Fl G , Fl Fl traditional -Disable GNU-m4 extensions. +Disable GNU\~m4 extensions. .It Fl g , Fl Fl gnu -Activate GNU-m4 compatibility mode. -In this mode, translit handles simple character -ranges (e.g., a-z), regular expressions mimic emacs behavior, -multiple m4wrap calls are handled as a stack, +Activate GNU\~m4 compatibility mode. +In this mode +.Ic translit +handles simple character +ranges (e.g., +.Sq Li a-z ) , +regular expressions mimic emacs behavior, +multiple +.Ic m4wrap +calls are handled as a stack, the number of diversions is unlimited, empty names for macro definitions are allowed, -and eval understands -.Sq 0rbase:value +and +.Ic eval +understands +.Sq Ic 0r Ns Ar base Ns Cm \&: Ns Ar value numbers. .It Fl Fl help Print help message and exit. @@ -168,7 +185,7 @@ Send trace output to
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Sat Jun 27 18:52:24 UTC 2020 Modified Files: src/sys/stand/efiboot: boot.c Log Message: command_version: print config file path To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/stand/efiboot/boot.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/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.25 src/sys/stand/efiboot/boot.c:1.26 --- src/sys/stand/efiboot/boot.c:1.25 Sat Jun 27 17:23:08 2020 +++ src/sys/stand/efiboot/boot.c Sat Jun 27 18:52:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.25 2020/06/27 17:23:08 jmcneill Exp $ */ +/* $NetBSD: boot.c,v 1.26 2020/06/27 18:52:24 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -360,6 +360,7 @@ command_resetenv(char *arg) void command_version(char *arg) { + char pathbuf[80]; char *ufirmware; int rv; @@ -373,6 +374,10 @@ command_version(char *arg) ST->FirmwareRevision); FreePool(ufirmware); } + if (efi_bootdp != NULL && + efi_file_path(efi_bootdp, BOOTCFG_FILENAME, pathbuf, sizeof(pathbuf)) == 0) { + printf("Config path: %s\n", pathbuf); + } efi_fdt_show(); efi_acpi_show();
CVS commit: src/sys/arch/evbarm/fdt
Module Name:src Committed By: jmcneill Date: Sat Jun 27 18:44:02 UTC 2020 Modified Files: src/sys/arch/evbarm/fdt: fdt_machdep.c Log Message: Make sure we pass full pages to fdt_memory_remove_range To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.72 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.73 --- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.72 Fri May 15 06:01:26 2020 +++ src/sys/arch/evbarm/fdt/fdt_machdep.c Sat Jun 27 18:44:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_machdep.c,v 1.72 2020/05/15 06:01:26 skrll Exp $ */ +/* $NetBSD: fdt_machdep.c,v 1.73 2020/06/27 18:44:02 jmcneill Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.72 2020/05/15 06:01:26 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.73 2020/06/27 18:44:02 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_bootconfig.h" @@ -307,17 +307,21 @@ fdt_build_bootconfig(uint64_t mem_start, fdt_add_reserved_memory(mem_start, mem_end); - const uint64_t initrd_size = initrd_end - initrd_start; + const uint64_t initrd_size = + round_page(initrd_end) - trunc_page(initrd_start); if (initrd_size > 0) - fdt_memory_remove_range(initrd_start, initrd_size); + fdt_memory_remove_range(trunc_page(initrd_start), initrd_size); - const uint64_t rndseed_size = rndseed_end - rndseed_start; + const uint64_t rndseed_size = + round_page(rndseed_end) - trunc_page(rndseed_start); if (rndseed_size > 0) - fdt_memory_remove_range(rndseed_start, rndseed_size); + fdt_memory_remove_range(trunc_page(rndseed_start), + rndseed_size); - const uint64_t efirng_size = efirng_end - efirng_start; + const uint64_t efirng_size = + round_page(efirng_end) - trunc_page(efirng_start); if (efirng_size > 0) - fdt_memory_remove_range(efirng_start, efirng_size); + fdt_memory_remove_range(trunc_page(efirng_start), efirng_size); const int framebuffer = OF_finddevice("/chosen/framebuffer"); if (framebuffer >= 0) {
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: christos Date: Sat Jun 27 18:03:52 UTC 2020 Modified Files: src/distrib/sets/lists/debug: mi Log Message: fix the build To generate a diff of this commit: cvs rdiff -u -r1.317 -r1.318 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.317 src/distrib/sets/lists/debug/mi:1.318 --- src/distrib/sets/lists/debug/mi:1.317 Mon Jun 15 19:41:55 2020 +++ src/distrib/sets/lists/debug/mi Sat Jun 27 14:03:52 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.317 2020/06/15 23:41:55 christos Exp $ +# $NetBSD: mi,v 1.318 2020/06/27 18:03:52 christos Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -2072,7 +2072,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_fopen.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_format.debug tests-obsolete obsolete,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_fputc.debug tests-lib-debug debug,atf,compattestfile -./usr/libdata/debug/usr/tests/lib/libc/stdio/t_mktemp.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libc/stdio/t_mktemp.debug tests-obsolete obsolete,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_open_memstream.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_popen.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdio/t_printf.debug tests-lib-debug debug,atf,compattestfile @@ -2090,6 +2090,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_getenv_thread.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_hsearch.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mi_vector_hash.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mktemp.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_posix_memalign.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_random.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_strtod.debug tests-lib-debug debug,atf,compattestfile
CVS commit: src/sys
Module Name:src Committed By: christos Date: Sat Jun 27 17:29:19 UTC 2020 Modified Files: src/sys/fs/adosfs: advnops.c src/sys/fs/cd9660: cd9660_vnops.c src/sys/fs/efs: efs_vnops.c src/sys/fs/filecorefs: filecore_vnops.c src/sys/fs/msdosfs: msdosfs_vnops.c src/sys/fs/nilfs: nilfs_vnops.c src/sys/fs/ntfs: ntfs_vnops.c src/sys/fs/ptyfs: ptyfs_vnops.c src/sys/fs/sysvbfs: sysvbfs_vnops.c src/sys/fs/tmpfs: tmpfs_vnops.c src/sys/fs/udf: udf_vnops.c src/sys/fs/v7fs: v7fs_vnops.c src/sys/miscfs/fdesc: fdesc_vnops.c src/sys/miscfs/fifofs: fifo_vnops.c src/sys/miscfs/genfs: genfs.h genfs_vnops.c src/sys/miscfs/kernfs: kernfs_vnops.c src/sys/miscfs/procfs: procfs_vnops.c src/sys/miscfs/specfs: spec_vnops.c src/sys/nfs: nfs_vnops.c Log Message: Introduce genfs_pathconf() and use it for the default case in all filesystems. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/fs/adosfs/advnops.c cvs rdiff -u -r1.57 -r1.58 src/sys/fs/cd9660/cd9660_vnops.c cvs rdiff -u -r1.40 -r1.41 src/sys/fs/efs/efs_vnops.c cvs rdiff -u -r1.46 -r1.47 src/sys/fs/filecorefs/filecore_vnops.c cvs rdiff -u -r1.103 -r1.104 src/sys/fs/msdosfs/msdosfs_vnops.c cvs rdiff -u -r1.41 -r1.42 src/sys/fs/nilfs/nilfs_vnops.c cvs rdiff -u -r1.64 -r1.65 src/sys/fs/ntfs/ntfs_vnops.c cvs rdiff -u -r1.59 -r1.60 src/sys/fs/ptyfs/ptyfs_vnops.c cvs rdiff -u -r1.66 -r1.67 src/sys/fs/sysvbfs/sysvbfs_vnops.c cvs rdiff -u -r1.142 -r1.143 src/sys/fs/tmpfs/tmpfs_vnops.c cvs rdiff -u -r1.113 -r1.114 src/sys/fs/udf/udf_vnops.c cvs rdiff -u -r1.30 -r1.31 src/sys/fs/v7fs/v7fs_vnops.c cvs rdiff -u -r1.133 -r1.134 src/sys/miscfs/fdesc/fdesc_vnops.c cvs rdiff -u -r1.80 -r1.81 src/sys/miscfs/fifofs/fifo_vnops.c cvs rdiff -u -r1.34 -r1.35 src/sys/miscfs/genfs/genfs.h cvs rdiff -u -r1.207 -r1.208 src/sys/miscfs/genfs/genfs_vnops.c cvs rdiff -u -r1.165 -r1.166 src/sys/miscfs/kernfs/kernfs_vnops.c cvs rdiff -u -r1.214 -r1.215 src/sys/miscfs/procfs/procfs_vnops.c cvs rdiff -u -r1.179 -r1.180 src/sys/miscfs/specfs/spec_vnops.c cvs rdiff -u -r1.315 -r1.316 src/sys/nfs/nfs_vnops.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/fs/adosfs/advnops.c diff -u src/sys/fs/adosfs/advnops.c:1.54 src/sys/fs/adosfs/advnops.c:1.55 --- src/sys/fs/adosfs/advnops.c:1.54 Sat May 16 14:31:48 2020 +++ src/sys/fs/adosfs/advnops.c Sat Jun 27 13:29:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: advnops.c,v 1.54 2020/05/16 18:31:48 christos Exp $ */ +/* $NetBSD: advnops.c,v 1.55 2020/06/27 17:29:17 christos Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.54 2020/05/16 18:31:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.55 2020/06/27 17:29:17 christos Exp $"); #include #include @@ -931,7 +931,7 @@ adosfs_pathconf(void *v) *ap->a_retval = 32; return (0); default: - return (EINVAL); + return genfs_pathconf(ap); } /* NOTREACHED */ } Index: src/sys/fs/cd9660/cd9660_vnops.c diff -u src/sys/fs/cd9660/cd9660_vnops.c:1.57 src/sys/fs/cd9660/cd9660_vnops.c:1.58 --- src/sys/fs/cd9660/cd9660_vnops.c:1.57 Sat May 16 14:31:48 2020 +++ src/sys/fs/cd9660/cd9660_vnops.c Sat Jun 27 13:29:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vnops.c,v 1.57 2020/05/16 18:31:48 christos Exp $ */ +/* $NetBSD: cd9660_vnops.c,v 1.58 2020/06/27 17:29:17 christos Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.57 2020/05/16 18:31:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.58 2020/06/27 17:29:17 christos Exp $"); #include #include @@ -779,7 +779,7 @@ cd9660_pathconf(void *v) *ap->a_retval = 32; return (0); default: - return (EINVAL); + return genfs_pathconf(ap); } /* NOTREACHED */ } Index: src/sys/fs/efs/efs_vnops.c diff -u src/sys/fs/efs/efs_vnops.c:1.40 src/sys/fs/efs/efs_vnops.c:1.41 --- src/sys/fs/efs/efs_vnops.c:1.40 Sat May 16 14:31:48 2020 +++ src/sys/fs/efs/efs_vnops.c Sat Jun 27 13:29:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: efs_vnops.c,v 1.40 2020/05/16 18:31:48 christos Exp $ */ +/* $NetBSD: efs_vnops.c,v 1.41 2020/06/27 17:29:17 christos Exp $ */ /* * Copyright (c) 2006 Stephen M. Rumble @@ -17,7 +17,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: efs_vnops.c,v 1.40 2020/05/16 18:31:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: efs_vnops.c,v 1.41 2020/06/27 17:29:17 christos Exp $"); #include #include @@ -757,7 +757,7 @@ efs_pathconf(void *v) *ap->a_retval = 32; break; default: - return (EINVAL); + return genfs_pathconf(ap); } return (0); Index: src/sys/fs/filecorefs/filecore_vnops.c diff -u src/sys/fs/filecorefs/filecore_vnops.c:1.46 src/sys/fs/filecorefs/filecore_vnops.c:1.47
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sat Jun 27 17:27:59 UTC 2020 Modified Files: src/sys/kern: subr_kobj.c Log Message: print the index of the problematic symbol To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/kern/subr_kobj.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/subr_kobj.c diff -u src/sys/kern/subr_kobj.c:1.66 src/sys/kern/subr_kobj.c:1.67 --- src/sys/kern/subr_kobj.c:1.66 Sat Jun 23 10:22:30 2018 +++ src/sys/kern/subr_kobj.c Sat Jun 27 13:27:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_kobj.c,v 1.66 2018/06/23 14:22:30 jakllsch Exp $ */ +/* $NetBSD: subr_kobj.c,v 1.67 2020/06/27 17:27:59 christos Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.66 2018/06/23 14:22:30 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.67 2020/06/27 17:27:59 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_modular.h" @@ -889,7 +889,8 @@ kobj_sym_lookup(kobj_t ko, uintptr_t sym * Don't even try to lookup the symbol if the index is * bogus. */ - kobj_error(ko, "symbol index out of range"); + kobj_error(ko, "symbol index %ju out of range", + (uintmax_t)symidx); return EINVAL; } @@ -903,7 +904,8 @@ kobj_sym_lookup(kobj_t ko, uintptr_t sym switch (ELF_ST_BIND(sym->st_info)) { case STB_LOCAL: /* Local, but undefined? huh? */ - kobj_error(ko, "local symbol undefined"); + kobj_error(ko, "local symbol @%ju undefined", + (uintmax_t)symidx); return EINVAL; case STB_GLOBAL: @@ -912,11 +914,13 @@ kobj_sym_lookup(kobj_t ko, uintptr_t sym /* Force a lookup failure if the symbol name is bogus. */ if (*symbol == 0) { - kobj_error(ko, "bad symbol name"); + kobj_error(ko, "bad symbol @%ju name", + (uintmax_t)symidx); return EINVAL; } if (sym->st_value == 0) { - kobj_error(ko, "bad value"); + kobj_error(ko, "%s @%ju: bad value", symbol, + (uintmax_t)symidx); return EINVAL; } @@ -924,10 +928,13 @@ kobj_sym_lookup(kobj_t ko, uintptr_t sym return 0; case STB_WEAK: - kobj_error(ko, "weak symbols not supported"); + kobj_error(ko, "weak symbol @%ju not supported", + (uintmax_t)symidx); return EINVAL; default: + kobj_error(ko, "bad binding %#x for symbol @%ju", + ELF_ST_BIND(sym->st_info), (uintmax_t)symidx); return EINVAL; } }
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Sat Jun 27 17:23:08 UTC 2020 Modified Files: src/sys/stand/efiboot: boot.c efifile.c efifile.h Log Message: Load boot.cfg from the EFI system partition instead of the first FFS partition on that device. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/stand/efiboot/boot.c cvs rdiff -u -r1.3 -r1.4 src/sys/stand/efiboot/efifile.c cvs rdiff -u -r1.1 -r1.2 src/sys/stand/efiboot/efifile.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/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.24 src/sys/stand/efiboot/boot.c:1.25 --- src/sys/stand/efiboot/boot.c:1.24 Fri Jun 26 03:23:04 2020 +++ src/sys/stand/efiboot/boot.c Sat Jun 27 17:23:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.24 2020/06/26 03:23:04 thorpej Exp $ */ +/* $NetBSD: boot.c,v 1.25 2020/06/27 17:23:08 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -29,6 +29,7 @@ #include "efiboot.h" #include "efiblock.h" +#include "efifile.h" #include "efifdt.h" #include "efiacpi.h" #include "efienv.h" @@ -539,11 +540,15 @@ read_env(void) void boot(void) { + char pathbuf[80]; int currname, c; read_env(); - parsebootconf(BOOTCFG_FILENAME); + if (efi_bootdp != NULL && efi_file_path(efi_bootdp, BOOTCFG_FILENAME, pathbuf, sizeof(pathbuf)) == 0) { + twiddle_toggle = 1; + parsebootconf(pathbuf); + } if (bootcfg_info.clear) uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); @@ -551,7 +556,6 @@ boot(void) print_banner(); /* Display menu if configured */ - twiddle_toggle = 1; if (bootcfg_info.nummenu > 0) { doboottypemenu(); /* No return */ } Index: src/sys/stand/efiboot/efifile.c diff -u src/sys/stand/efiboot/efifile.c:1.3 src/sys/stand/efiboot/efifile.c:1.4 --- src/sys/stand/efiboot/efifile.c:1.3 Sun Aug 26 21:28:18 2018 +++ src/sys/stand/efiboot/efifile.c Sat Jun 27 17:23:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: efifile.c,v 1.3 2018/08/26 21:28:18 jmcneill Exp $ */ +/* $NetBSD: efifile.c,v 1.4 2020/06/27 17:23:08 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -146,3 +146,22 @@ efi_file_strategy(void *devdata, int rw, return 0; } + +int +efi_file_path(EFI_DEVICE_PATH *dp, const char *fname, char *buf, size_t buflen) +{ + UINTN vol; + int depth; + + depth = efi_device_path_depth(dp, END_DEVICE_PATH_TYPE); + + for (vol = 0; vol < efi_nvol; vol++) { + if (efi_device_path_ncmp(dp, DevicePathFromHandle(efi_vol[vol]), depth) == 0) + break; + } + if (vol == efi_nvol) + return ENOENT; + + snprintf(buf, buflen, "fs%u:%s", (u_int)vol, fname); + return 0; +} Index: src/sys/stand/efiboot/efifile.h diff -u src/sys/stand/efiboot/efifile.h:1.1 src/sys/stand/efiboot/efifile.h:1.2 --- src/sys/stand/efiboot/efifile.h:1.1 Fri Aug 24 02:01:06 2018 +++ src/sys/stand/efiboot/efifile.h Sat Jun 27 17:23:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: efifile.h,v 1.1 2018/08/24 02:01:06 jmcneill Exp $ */ +/* $NetBSD: efifile.h,v 1.2 2020/06/27 17:23:08 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -31,3 +31,5 @@ void efi_file_system_probe(void); int efi_file_open(struct open_file *, ...); int efi_file_close(struct open_file *); int efi_file_strategy(void *, int, daddr_t, size_t, void *, size_t *); +int efi_file_path(EFI_DEVICE_PATH *, const char *, char *, size_t); +
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: jmcneill Date: Sat Jun 27 17:22:12 UTC 2020 Modified Files: src/sys/lib/libsa: bootcfg.c Log Message: Support loading boot.cfg from non file-system based devices. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libsa/bootcfg.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/lib/libsa/bootcfg.c diff -u src/sys/lib/libsa/bootcfg.c:1.4 src/sys/lib/libsa/bootcfg.c:1.5 --- src/sys/lib/libsa/bootcfg.c:1.4 Sun Mar 31 20:08:45 2019 +++ src/sys/lib/libsa/bootcfg.c Sat Jun 27 17:22:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bootcfg.c,v 1.4 2019/03/31 20:08:45 christos Exp $ */ +/* $NetBSD: bootcfg.c,v 1.5 2020/06/27 17:22:12 jmcneill Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -99,7 +99,7 @@ perform_bootcfg(const char *conf, bootcf { char *bc, *c; int cmenu, cbanner; - ssize_t len, off; + ssize_t len, off, resid; int fd, err; struct stat st; char *next, *key, *value, *v2; @@ -119,8 +119,8 @@ perform_bootcfg(const char *conf, bootcf err = fstat(fd, ); if (err == -1) { - close(fd); - return EIO; + /* file descriptor may not be backed by a libsa file-system */ + st.st_size = maxsz; } /* if a maximum size is being requested for the boot.cfg enforce it. */ @@ -146,12 +146,14 @@ perform_bootcfg(const char *conf, bootcf * the storage anyway. */ off = 0; + resid = st.st_size; do { - len = read(fd, bc + off, 1024); + len = read(fd, bc + off, uimin(1024, resid)); if (len <= 0) break; off += len; - } while (len > 0); + resid -= len; + } while (len > 0 && resid > 0); bc[off] = '\0'; close(fd);
CVS commit: xsrc/external/mit/xf86-video-intel/dist/src
Module Name:xsrc Committed By: tsutsui Date: Sat Jun 27 17:09:59 UTC 2020 Modified Files: xsrc/external/mit/xf86-video-intel/dist/src: intel_module.c Log Message: Use UXA (not SNA) by default on Intel Gen3/4/5 chipsets (except 915). This works around PR/54995 (screen corruption on N455) and PR/55198 (X freezes/hangs on 965GM). Ok'ed by mrg@. Should be pulled up to netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ xsrc/external/mit/xf86-video-intel/dist/src/intel_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-intel/dist/src/intel_module.c diff -u xsrc/external/mit/xf86-video-intel/dist/src/intel_module.c:1.1.1.4 xsrc/external/mit/xf86-video-intel/dist/src/intel_module.c:1.2 --- xsrc/external/mit/xf86-video-intel/dist/src/intel_module.c:1.1.1.4 Wed Mar 20 06:34:02 2019 +++ xsrc/external/mit/xf86-video-intel/dist/src/intel_module.c Sat Jun 27 17:09:59 2020 @@ -567,9 +567,8 @@ _xf86findDriver(const char *ident, XF86C return NULL; } -static enum accel_method { NOACCEL, SNA, UXA } get_accel_method(void) +static enum accel_method { NOACCEL, SNA, UXA } get_accel_method(enum accel_method accel_method) { - enum accel_method accel_method = DEFAULT_ACCEL_METHOD; XF86ConfDevicePtr dev; if (hosted()) @@ -641,7 +640,17 @@ intel_scrn_create(DriverPtr driver, #endif #if KMS - switch (get_accel_method()) { + enum accel_method default_accel_method = DEFAULT_ACCEL_METHOD; + /* + * XXX + * Use UXA by default for Gen3/4/5 chipsets (except 915) to avoid + * screen corruption etc. (PR/54995, PR/55198) + */ + if ((unsigned)((struct intel_device_info *)match_data)->gen > 030 && + (unsigned)((struct intel_device_info *)match_data)->gen < 060) + default_accel_method = UXA; + + switch (get_accel_method(default_accel_method)) { #if USE_SNA case NOACCEL: case SNA:
CVS commit: src/sys/dev
Module Name:src Committed By: jdolecek Date: Sat Jun 27 17:07:49 UTC 2020 Modified Files: src/sys/dev/ic: aic79xx.c aic7xxx.c src/sys/dev/microcode/aic7xxx: aic79xx_seq.h aic7xxx_seq.h aicasm.c Log Message: constify, NFCI To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/aic79xx.c cvs rdiff -u -r1.141 -r1.142 src/sys/dev/ic/aic7xxx.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/microcode/aic7xxx/aic79xx_seq.h cvs rdiff -u -r1.13 -r1.14 src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h cvs rdiff -u -r1.9 -r1.10 src/sys/dev/microcode/aic7xxx/aicasm.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/ic/aic79xx.c diff -u src/sys/dev/ic/aic79xx.c:1.55 src/sys/dev/ic/aic79xx.c:1.56 --- src/sys/dev/ic/aic79xx.c:1.55 Sat Jun 27 09:28:15 2020 +++ src/sys/dev/ic/aic79xx.c Sat Jun 27 17:07:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aic79xx.c,v 1.55 2020/06/27 09:28:15 jdolecek Exp $ */ +/* $NetBSD: aic79xx.c,v 1.56 2020/06/27 17:07:49 jdolecek Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.55 2020/06/27 09:28:15 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.56 2020/06/27 17:07:49 jdolecek Exp $"); #include #include @@ -222,7 +222,7 @@ static void ahd_dumpseq(struct ahd_soft #endif static void ahd_loadseq(struct ahd_softc *ahd); static int ahd_check_patch(struct ahd_softc *ahd, - struct patch **start_patch, + const struct patch **start_patch, u_int start_instr, u_int *skip_addr); static u_int ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address); @@ -8258,7 +8258,7 @@ ahd_loadseq(struct ahd_softc *ahd) struct cs cs_table[num_critical_sections]; u_int begin_set[num_critical_sections]; u_int end_set[num_critical_sections]; - struct patch *cur_patch; + const struct patch *cur_patch; u_int cs_count; u_int cur_cs; u_int i; @@ -8409,12 +8409,12 @@ ahd_loadseq(struct ahd_softc *ahd) } static int -ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch, +ahd_check_patch(struct ahd_softc *ahd, const struct patch **start_patch, u_int start_instr, u_int *skip_addr) { - struct patch *cur_patch; - struct patch *last_patch; - u_int num_patches; + const struct patch *cur_patch; + const struct patch *last_patch; + u_int num_patches; num_patches = sizeof(patches)/sizeof(struct patch); last_patch = [num_patches]; @@ -8447,7 +8447,7 @@ ahd_check_patch(struct ahd_softc *ahd, s static u_int ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address) { - struct patch *cur_patch; + const struct patch *cur_patch; int address_offset; u_int skip_addr; u_int i; @@ -8484,7 +8484,7 @@ ahd_download_instr(struct ahd_softc *ahd /* * The firmware is always compiled into a little endian format. */ - instr.integer = ahd_le32toh(*(uint32_t*)[instrptr * 4]); + instr.integer = ahd_le32toh(*(const uint32_t*)[instrptr * 4]); fmt1_ins = fmt3_ins = NULL; Index: src/sys/dev/ic/aic7xxx.c diff -u src/sys/dev/ic/aic7xxx.c:1.141 src/sys/dev/ic/aic7xxx.c:1.142 --- src/sys/dev/ic/aic7xxx.c:1.141 Sat Jun 27 09:28:15 2020 +++ src/sys/dev/ic/aic7xxx.c Sat Jun 27 17:07:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx.c,v 1.141 2020/06/27 09:28:15 jdolecek Exp $ */ +/* $NetBSD: aic7xxx.c,v 1.142 2020/06/27 17:07:49 jdolecek Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -39,7 +39,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: aic7xxx.c,v 1.141 2020/06/27 09:28:15 jdolecek Exp $ + * $Id: aic7xxx.c,v 1.142 2020/06/27 17:07:49 jdolecek Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $ * @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.141 2020/06/27 09:28:15 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.142 2020/06/27 17:07:49 jdolecek Exp $"); #include #include @@ -232,7 +232,7 @@ static void ahc_dumpseq(struct ahc_soft #endif static void ahc_loadseq(struct ahc_softc *ahc); static int ahc_check_patch(struct ahc_softc *ahc, - struct patch **start_patch, + const struct patch **start_patch, u_int start_instr, u_int *skip_addr); static void ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts); @@ -6281,7 +6281,7 @@ ahc_loadseq(struct ahc_softc *ahc) struct cs cs_table[num_critical_sections]; u_int begin_set[num_critical_sections]; u_int end_set[num_critical_sections]; - struct patch *cur_patch; + const struct patch *cur_patch; u_int cs_count; u_int cur_cs; u_int i; @@ -6371,11 +6371,11 @@ ahc_loadseq(struct ahc_softc *ahc) } static int -ahc_check_patch(struct ahc_softc *ahc, struct patch **start_patch, +ahc_check_patch(struct ahc_softc *ahc, const struct patch **start_patch, u_int
CVS commit: src/sys/dev/microcode/aic7xxx
Module Name:src Committed By: jdolecek Date: Sat Jun 27 16:48:01 UTC 2020 Modified Files: src/sys/dev/microcode/aic7xxx: aic7xxx_reg.h aic7xxx_seq.h aicasm_gram.y Log Message: make sure to strip leading '$' from NetBSD rcs id so that it won't be replaces by cvs, and regen the headers again To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h cvs rdiff -u -r1.12 -r1.13 src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h cvs rdiff -u -r1.6 -r1.7 src/sys/dev/microcode/aic7xxx/aicasm_gram.y 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/microcode/aic7xxx/aic7xxx_reg.h diff -u src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h:1.4 src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h:1.5 --- src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h:1.4 Sat Jun 27 16:32:46 2020 +++ src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h Sat Jun 27 16:48:01 2020 @@ -2,8 +2,8 @@ * DO NOT EDIT - This file is automatically generated * from the following source files: * - * $NetBSD: aic7xxx_reg.h,v 1.4 2020/06/27 16:32:46 jdolecek Exp $ - * $NetBSD: aic7xxx_reg.h,v 1.4 2020/06/27 16:32:46 jdolecek Exp $ + * NetBSD: aic7xxx.seq,v 1.20 2019/06/04 10:15:22 msaitoh Exp $ + * NetBSD: aic7xxx.reg,v 1.4 2005/12/11 12:22:18 christos Exp $ */ typedef int (ahc_reg_print_t)(u_int, u_int *, u_int); typedef struct ahc_reg_parse_entry { Index: src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h diff -u src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h:1.12 src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h:1.13 --- src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h:1.12 Sat Jun 27 16:29:11 2020 +++ src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h Sat Jun 27 16:48:01 2020 @@ -2,8 +2,8 @@ * DO NOT EDIT - This file is automatically generated * from the following source files: * - * $NetBSD: aic7xxx_seq.h,v 1.12 2020/06/27 16:29:11 jdolecek Exp $ - * $NetBSD: aic7xxx_seq.h,v 1.12 2020/06/27 16:29:11 jdolecek Exp $ + * NetBSD: aic7xxx.seq,v 1.20 2019/06/04 10:15:22 msaitoh Exp $ + * NetBSD: aic7xxx.reg,v 1.4 2005/12/11 12:22:18 christos Exp $ */ static uint8_t seqprog[] = { 0xb2, 0x00, 0x00, 0x08, Index: src/sys/dev/microcode/aic7xxx/aicasm_gram.y diff -u src/sys/dev/microcode/aic7xxx/aicasm_gram.y:1.6 src/sys/dev/microcode/aic7xxx/aicasm_gram.y:1.7 --- src/sys/dev/microcode/aic7xxx/aicasm_gram.y:1.6 Sat Nov 25 16:48:32 2006 +++ src/sys/dev/microcode/aic7xxx/aicasm_gram.y Sat Jun 27 16:48:01 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: aicasm_gram.y,v 1.6 2006/11/25 16:48:32 christos Exp $ */ +/* $NetBSD: aicasm_gram.y,v 1.7 2020/06/27 16:48:01 jdolecek Exp $ */ /* * Parser for the Aic7xxx SCSI Host adapter sequencer assembler. @@ -1915,6 +1915,9 @@ add_version(const char *verstring) int newlen; int oldlen; + if (verstring[0] == '$') + verstring++; + newlen = strlen(verstring) + strlen(prefix); oldlen = 0; if (versions != NULL)
CVS commit: src/sys/dev/microcode/aic7xxx
Module Name:src Committed By: jdolecek Date: Sat Jun 27 16:32:46 UTC 2020 Modified Files: src/sys/dev/microcode/aic7xxx: aic7xxx_reg.h Log Message: regen again To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h diff -u src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h:1.3 src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h:1.4 --- src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h:1.3 Sat Jun 27 16:29:11 2020 +++ src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h Sat Jun 27 16:32:46 2020 @@ -2,8 +2,8 @@ * DO NOT EDIT - This file is automatically generated * from the following source files: * - * $NetBSD: aic7xxx_reg.h,v 1.3 2020/06/27 16:29:11 jdolecek Exp $ - * $NetBSD: aic7xxx_reg.h,v 1.3 2020/06/27 16:29:11 jdolecek Exp $ + * $NetBSD: aic7xxx_reg.h,v 1.4 2020/06/27 16:32:46 jdolecek Exp $ + * $NetBSD: aic7xxx_reg.h,v 1.4 2020/06/27 16:32:46 jdolecek Exp $ */ typedef int (ahc_reg_print_t)(u_int, u_int *, u_int); typedef struct ahc_reg_parse_entry {
CVS commit: src/sys/dev/microcode/aic7xxx
Module Name:src Committed By: jdolecek Date: Sat Jun 27 16:29:11 UTC 2020 Modified Files: src/sys/dev/microcode/aic7xxx: aic79xx_reg.h aic7xxx_reg.h aic7xxx_seq.h Log Message: regen - NFCI, confirmed by comparing compiled binary object before and after To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/microcode/aic7xxx/aic79xx_reg.h \ src/sys/dev/microcode/aic7xxx/aic7xxx_seq.h cvs rdiff -u -r1.2 -r1.3 src/sys/dev/microcode/aic7xxx/aic7xxx_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/microcode/aic7xxx/aic79xx_reg.h diff -u src/sys/dev/microcode/aic7xxx/aic79xx_reg.h:1.11 src/sys/dev/microcode/aic7xxx/aic79xx_reg.h:1.12 --- src/sys/dev/microcode/aic7xxx/aic79xx_reg.h:1.11 Fri Aug 29 03:54:07 2003 +++ src/sys/dev/microcode/aic7xxx/aic79xx_reg.h Sat Jun 27 16:29:11 2020 @@ -160,13 +160,6 @@ ahd_reg_print_t ahd_dfstatus_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_arbctl_print; -#else -#define ahd_arbctl_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "ARBCTL", 0x1b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_sg_cache_shadow_print; #else #define ahd_sg_cache_shadow_print(regvalue, cur_col, wrap) \ @@ -181,10 +174,10 @@ ahd_reg_print_t ahd_sg_cache_pre_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_typeptr_print; +ahd_reg_print_t ahd_arbctl_print; #else -#define ahd_typeptr_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "TYPEPTR", 0x20, regvalue, cur_col, wrap) +#define ahd_arbctl_print(regvalue, cur_col, wrap) \ +ahd_print_register(NULL, 0, "ARBCTL", 0x1b, regvalue, cur_col, wrap) #endif #if AIC_DEBUG_REGISTERS @@ -195,6 +188,13 @@ ahd_reg_print_t ahd_lqin_print; #endif #if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_typeptr_print; +#else +#define ahd_typeptr_print(regvalue, cur_col, wrap) \ +ahd_print_register(NULL, 0, "TYPEPTR", 0x20, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_tagptr_print; #else #define ahd_tagptr_print(regvalue, cur_col, wrap) \ @@ -405,13 +405,6 @@ ahd_reg_print_t ahd_scsiseq1_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_dlcount_print; -#else -#define ahd_dlcount_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "DLCOUNT", 0x3c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_businitid_print; #else #define ahd_businitid_print(regvalue, cur_col, wrap) \ @@ -426,17 +419,17 @@ ahd_reg_print_t ahd_sxfrctl0_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sxfrctl1_print; +ahd_reg_print_t ahd_dlcount_print; #else -#define ahd_sxfrctl1_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "SXFRCTL1", 0x3d, regvalue, cur_col, wrap) +#define ahd_dlcount_print(regvalue, cur_col, wrap) \ +ahd_print_register(NULL, 0, "DLCOUNT", 0x3c, regvalue, cur_col, wrap) #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sxfrctl2_print; +ahd_reg_print_t ahd_sxfrctl1_print; #else -#define ahd_sxfrctl2_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "SXFRCTL2", 0x3e, regvalue, cur_col, wrap) +#define ahd_sxfrctl1_print(regvalue, cur_col, wrap) \ +ahd_print_register(NULL, 0, "SXFRCTL1", 0x3d, regvalue, cur_col, wrap) #endif #if AIC_DEBUG_REGISTERS @@ -447,17 +440,17 @@ ahd_reg_print_t ahd_bustargid_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_dffstat_print; +ahd_reg_print_t ahd_sxfrctl2_print; #else -#define ahd_dffstat_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "DFFSTAT", 0x3f, regvalue, cur_col, wrap) +#define ahd_sxfrctl2_print(regvalue, cur_col, wrap) \ +ahd_print_register(NULL, 0, "SXFRCTL2", 0x3e, regvalue, cur_col, wrap) #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_multargid_print; +ahd_reg_print_t ahd_dffstat_print; #else -#define ahd_multargid_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "MULTARGID", 0x40, regvalue, cur_col, wrap) +#define ahd_dffstat_print(regvalue, cur_col, wrap) \ +ahd_print_register(NULL, 0, "DFFSTAT", 0x3f, regvalue, cur_col, wrap) #endif #if AIC_DEBUG_REGISTERS @@ -468,6 +461,13 @@ ahd_reg_print_t ahd_scsisigo_print; #endif #if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_multargid_print; +#else +#define ahd_multargid_print(regvalue, cur_col, wrap) \ +ahd_print_register(NULL, 0, "MULTARGID", 0x40, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_scsisigi_print; #else #define ahd_scsisigi_print(regvalue, cur_col, wrap) \ @@ -517,17 +517,17 @@ ahd_reg_print_t ahd_selid_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sblkctl_print; +ahd_reg_print_t ahd_optionmode_print; #else -#define ahd_sblkctl_print(regvalue, cur_col, wrap) \ -ahd_print_register(NULL, 0, "SBLKCTL", 0x4a,
CVS commit: src/sys/dev/microcode/aic7xxx
Module Name:src Committed By: jdolecek Date: Sat Jun 27 16:19:39 UTC 2020 Modified Files: src/sys/dev/microcode/aic7xxx: aicasm_macro_gram.y aicasm_scan.l aicasm_symbol.c Log Message: make this compile with normal WARNS To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/microcode/aic7xxx/aicasm_macro_gram.y cvs rdiff -u -r1.5 -r1.6 src/sys/dev/microcode/aic7xxx/aicasm_scan.l cvs rdiff -u -r1.6 -r1.7 src/sys/dev/microcode/aic7xxx/aicasm_symbol.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/microcode/aic7xxx/aicasm_macro_gram.y diff -u src/sys/dev/microcode/aic7xxx/aicasm_macro_gram.y:1.2 src/sys/dev/microcode/aic7xxx/aicasm_macro_gram.y:1.3 --- src/sys/dev/microcode/aic7xxx/aicasm_macro_gram.y:1.2 Sat Nov 25 16:48:32 2006 +++ src/sys/dev/microcode/aic7xxx/aicasm_macro_gram.y Sat Jun 27 16:19:38 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: aicasm_macro_gram.y,v 1.2 2006/11/25 16:48:32 christos Exp $ */ +/* $NetBSD: aicasm_macro_gram.y,v 1.3 2020/06/27 16:19:38 jdolecek Exp $ */ /* * Sub-parser for macro invocation in the Aic7xxx SCSI @@ -66,6 +66,8 @@ static symbol_t *macro_symbol; static void add_macro_arg(const char *argtext, int position); +int yylex(void); + %} %union { Index: src/sys/dev/microcode/aic7xxx/aicasm_scan.l diff -u src/sys/dev/microcode/aic7xxx/aicasm_scan.l:1.5 src/sys/dev/microcode/aic7xxx/aicasm_scan.l:1.6 --- src/sys/dev/microcode/aic7xxx/aicasm_scan.l:1.5 Sun Dec 11 12:22:18 2005 +++ src/sys/dev/microcode/aic7xxx/aicasm_scan.l Sat Jun 27 16:19:38 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: aicasm_scan.l,v 1.5 2005/12/11 12:22:18 christos Exp $ */ +/* $NetBSD: aicasm_scan.l,v 1.6 2020/06/27 16:19:38 jdolecek Exp $ */ /* * Lexical Analyzer for the Aic7xxx SCSI Host adapter sequencer assembler. * @@ -60,6 +60,13 @@ #include "aicasm_symbol.h" #include "aicasm_gram.h" +int yyparse(void); +void yy_delete_buffer(YY_BUFFER_STATE); +int mmlex(void); +int mmparse(void); +void mm_delete_buffer(YY_BUFFER_STATE); +void mm_switch_to_buffer(YY_BUFFER_STATE); + /* This is used for macro body capture too, so err on the large size. */ #define MAX_STR_CONST 4096 static char string_buf[MAX_STR_CONST]; Index: src/sys/dev/microcode/aic7xxx/aicasm_symbol.c diff -u src/sys/dev/microcode/aic7xxx/aicasm_symbol.c:1.6 src/sys/dev/microcode/aic7xxx/aicasm_symbol.c:1.7 --- src/sys/dev/microcode/aic7xxx/aicasm_symbol.c:1.6 Wed Mar 18 10:22:40 2009 +++ src/sys/dev/microcode/aic7xxx/aicasm_symbol.c Sat Jun 27 16:19:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aicasm_symbol.c,v 1.6 2009/03/18 10:22:40 cegger Exp $ */ +/* $NetBSD: aicasm_symbol.c,v 1.7 2020/06/27 16:19:38 jdolecek Exp $ */ /* * Aic7xxx SCSI host adapter firmware asssembler symbol table implementation @@ -43,7 +43,7 @@ */ #include -__RCSID("$NetBSD: aicasm_symbol.c,v 1.6 2009/03/18 10:22:40 cegger Exp $"); +__RCSID("$NetBSD: aicasm_symbol.c,v 1.7 2020/06/27 16:19:38 jdolecek Exp $"); #include @@ -59,6 +59,7 @@ __RCSID("$NetBSD: aicasm_symbol.c,v 1.6 #include #include #include +#include #include "aicasm_symbol.h" #include "aicasm.h"
CVS commit: src/sys/dev/microcode/aic7xxx
Module Name:src Committed By: jdolecek Date: Sat Jun 27 16:00:35 UTC 2020 Modified Files: src/sys/dev/microcode/aic7xxx: Makefile Log Message: make this work with objdir, drop unused -ll To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/microcode/aic7xxx/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/dev/microcode/aic7xxx/Makefile diff -u src/sys/dev/microcode/aic7xxx/Makefile:1.7 src/sys/dev/microcode/aic7xxx/Makefile:1.8 --- src/sys/dev/microcode/aic7xxx/Makefile:1.7 Sat Apr 19 19:26:10 2003 +++ src/sys/dev/microcode/aic7xxx/Makefile Sat Jun 27 16:00:34 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2003/04/19 19:26:10 fvdl Exp $ +# $NetBSD: Makefile,v 1.8 2020/06/27 16:00:34 jdolecek Exp $ 7XXX_SEQ= aic7xxx.seq 7XXX_SEQHDR= aic7xxx_seq.h @@ -8,7 +8,7 @@ 79XX_SEQHDR= aic79xx_seq.h 79XX_REGHDR= aic79xx_reg.h -AICASMINCS=-I/usr/include -I${.CURDIR}/../../.. -I. +AICASMINCS=-I/usr/include -I${.CURDIR}/../../.. -I. -I${.CURDIR} PROG= aicasm @@ -18,7 +18,7 @@ SRCS= aicasm.c aicasm_symbol.c aicasm_sc YHEADER=1 DPADD+= ${LIBL} ${LIBY} -LDADD+= -ll -ly +LDADD+= -ly NOSHARE=# defined @@ -29,11 +29,12 @@ NOSHARE=# defined # LFLAGS+= ${.TARGET:M*macro*:S/$(.TARGET)/-Pmm/} YFLAGS+= ${.TARGET:M*macro*:S/$(.TARGET)/-p mm/} +CPPFLAGS+= -I${.CURDIR} regen: 7xxx_headers 79xx_headers 7xxx_headers: ${PROG} ${7XXX_SEQ} - ./${PROG} ${AICASMINCS} -o ${7XXX_SEQHDR} -r ${7XXX_REGHDR} ${7XXX_SEQ} + ./${PROG} ${AICASMINCS} -o ${.CURDIR}/${7XXX_SEQHDR} -r ${.CURDIR}/${7XXX_REGHDR} ${.CURDIR}/${7XXX_SEQ} 79xx_headers: ${PROG} ${79XX_SEQ} - ./${PROG} ${AICASMINCS} -o ${79XX_SEQHDR} -r ${79XX_REGHDR} ${79XX_SEQ} + ./${PROG} ${AICASMINCS} -o ${.CURDIR}/${79XX_SEQHDR} -r ${.CURDIR}/${79XX_REGHDR} ${.CURDIR}/${79XX_SEQ}
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Sat Jun 27 15:49:30 UTC 2020 Modified Files: src/sys/compat/sys: mount.h Log Message: Ignore the supplied size, and always use the argument size that we know. Found by maxv@ To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/compat/sys/mount.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/compat/sys/mount.h diff -u src/sys/compat/sys/mount.h:1.12 src/sys/compat/sys/mount.h:1.13 --- src/sys/compat/sys/mount.h:1.12 Sat Jun 27 03:00:43 2020 +++ src/sys/compat/sys/mount.h Sat Jun 27 11:49:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.12 2020/06/27 07:00:43 maxv Exp $ */ +/* $NetBSD: mount.h,v 1.13 2020/06/27 15:49:30 christos Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -141,7 +141,7 @@ statvfs_to_statfs12_copy(const void *vs, int error; statvfs_to_statfs12(vs, s12); - error = copyout(s12, vs12, l); + error = copyout(s12, vs12, sizeof(*s12)); STATVFSBUF_PUT(s12); return error;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jdolecek Date: Sat Jun 27 14:34:45 UTC 2020 Modified Files: src/sys/dev/usb: if_urtwn.c Log Message: mark several init-only functions as noinline to avoid bumping into the stack limit To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/dev/usb/if_urtwn.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/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.87 src/sys/dev/usb/if_urtwn.c:1.88 --- src/sys/dev/usb/if_urtwn.c:1.87 Sat May 2 00:50:07 2020 +++ src/sys/dev/usb/if_urtwn.c Sat Jun 27 14:34:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.87 2020/05/02 00:50:07 mrg Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.88 2020/06/27 14:34:45 jdolecek Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.87 2020/05/02 00:50:07 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.88 2020/06/27 14:34:45 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -733,7 +733,7 @@ urtwn_close_pipes(struct urtwn_softc *sc } } -static int +static int __noinline urtwn_alloc_rx_list(struct urtwn_softc *sc) { struct urtwn_rx_data *data; @@ -785,7 +785,7 @@ urtwn_free_rx_list(struct urtwn_softc *s } } -static int +static int __noinline urtwn_alloc_tx_list(struct urtwn_softc *sc) { struct urtwn_tx_data *data; @@ -1566,7 +1566,7 @@ urtwn_media_change(struct ifnet *ifp) /* * Initialize rate adaptation in firmware. */ -static int +static int __noinline urtwn_ra_init(struct urtwn_softc *sc) { static const uint8_t map[] = { @@ -3271,7 +3271,7 @@ urtwn_r88e_power_on(struct urtwn_softc * return 0; } -static int +static int __noinline urtwn_llt_init(struct urtwn_softc *sc) { size_t i, page_count, pktbuf_count; @@ -3413,7 +3413,7 @@ urtwn_fw_loadpage(struct urtwn_softc *sc return error; } -static int +static int __noinline urtwn_load_firmware(struct urtwn_softc *sc) { firmware_handle_t fwh; @@ -3707,7 +3707,7 @@ urtwn_r88e_dma_init(struct urtwn_softc * return 0; } -static void +static void __noinline urtwn_mac_init(struct urtwn_softc *sc) { size_t i; @@ -3732,7 +3732,7 @@ urtwn_mac_init(struct urtwn_softc *sc) } } -static void +static void __noinline urtwn_bb_init(struct urtwn_softc *sc) { const struct rtwn_bb_prog *prog; @@ -3896,7 +3896,7 @@ urtwn_bb_init(struct urtwn_softc *sc) } } -static void +static void __noinline urtwn_rf_init(struct urtwn_softc *sc) { const struct rtwn_rf_prog *prog; @@ -3982,7 +3982,7 @@ urtwn_rf_init(struct urtwn_softc *sc) } } -static void +static void __noinline urtwn_cam_init(struct urtwn_softc *sc) { uint32_t content, command; @@ -4032,7 +4032,7 @@ urtwn_cam_init(struct urtwn_softc *sc) urtwn_write_4(sc, R92C_CAMCMD, R92C_CAMCMD_POLLING | R92C_CAMCMD_CLR); } -static void +static void __noinline urtwn_pa_bias_init(struct urtwn_softc *sc) { uint8_t reg; @@ -4058,7 +4058,7 @@ urtwn_pa_bias_init(struct urtwn_softc *s } } -static void +static void __noinline urtwn_rxfilter_init(struct urtwn_softc *sc) { @@ -4083,7 +4083,7 @@ urtwn_rxfilter_init(struct urtwn_softc * urtwn_write_2(sc, R92C_RXFLTMAP2, 0x); } -static void +static void __noinline urtwn_edca_init(struct urtwn_softc *sc) { @@ -4370,7 +4370,7 @@ urtwn_set_txpower(struct urtwn_softc *sc } } -static void +static void __noinline urtwn_set_chan(struct urtwn_softc *sc, struct ieee80211_channel *c, u_int ht40m) { struct ieee80211com *ic = >sc_ic; @@ -4460,7 +4460,7 @@ urtwn_set_chan(struct urtwn_softc *sc, s } } -static void +static void __noinline urtwn_iq_calib(struct urtwn_softc *sc, bool inited) { @@ -4971,7 +4971,7 @@ urtwn_init(struct ifnet *ifp) return error; } -static void +static void __noinline urtwn_stop(struct ifnet *ifp, int disable) { struct urtwn_softc *sc = ifp->if_softc;
CVS commit: src/tests/sbin/ifconfig
Module Name:src Committed By: jruoho Date: Sat Jun 27 14:04:17 UTC 2020 Modified Files: src/tests/sbin/ifconfig: t_random_garbage.sh Log Message: Ups. Fix shell parameter. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_random_garbage.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sbin/ifconfig/t_random_garbage.sh diff -u src/tests/sbin/ifconfig/t_random_garbage.sh:1.1 src/tests/sbin/ifconfig/t_random_garbage.sh:1.2 --- src/tests/sbin/ifconfig/t_random_garbage.sh:1.1 Sat Jun 27 13:53:43 2020 +++ src/tests/sbin/ifconfig/t_random_garbage.sh Sat Jun 27 14:04:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_random_garbage.sh,v 1.1 2020/06/27 13:53:43 jruoho Exp $ +# $NetBSD: t_random_garbage.sh,v 1.2 2020/06/27 14:04:17 jruoho Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,10 +38,10 @@ getrstr() { write_garbage() { val=$(getrint) echo "Test $3: write to $1 opt $2 -> $val" - ifconfig $1 $opt $val >/dev/null 2>&1 + ifconfig $1 $2 $val >/dev/null 2>&1 val=$(getrstr) echo "Test $3: write to $1 opt $2 -> $val" - ifconfig $1 $opt $val >/dev/null 2>&1 + ifconfig $1 $2 $val >/dev/null 2>&1 } atf_test_case random_garbage
CVS commit: src/doc
Module Name:src Committed By: jdolecek Date: Sat Jun 27 14:03:39 UTC 2020 Modified Files: src/doc: CHANGES.prev Log Message: belately note the stackgap removals in 2007 To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 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.155 src/doc/CHANGES.prev:1.156 --- src/doc/CHANGES.prev:1.155 Wed Apr 8 04:32:14 2020 +++ src/doc/CHANGES.prev Sat Jun 27 14:03:39 2020 @@ -1,4 +1,4 @@ -LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.155 $> +LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.156 $> Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8: @@ -1077,7 +1077,7 @@ Changes from NetBSD 0.9 to NetBSD 1.0: execve(), or the registers might get dumped on someone else's stack... (deraadt) execve(2): keep execve arg buffer around for later use (deraadt & cgd) - STACKGAP: a small optional buffer located near the top of the stack + stackgap: a small optional buffer located near the top of the stack where binary compatibility functions can copyout/copyin argument buffers that are copyin/copyout'd at low levels by various system calls (deraadt) @@ -8798,6 +8798,7 @@ Changes from NetBSD 4.0 to NetBSD 5.0: to locate files within an emulation's root directory. Instead get namei() to check the emulation root first. [dsl 20070422] + stackgap: Now only used by systrace(4) [dsl 20070422] pax(1): Add a '-V' flag to pax for verbose summary without listing. [christos 20070423] prep: Add support for the MTX604 RAVEN based machine. Other RAVEN @@ -9205,6 +9206,8 @@ Changes from NetBSD 4.0 to NetBSD 5.0: hp700: Kernels are now compiled with -O2. [skrll 20071230] compat_hpux: Removed. [ad 20071231] systrace(1): Removed. [ad 20071231] + stackgap: Removed stackgap support functions due to systrace(4) + removal [ad 20071231] arm: Add support for kernel crashdump to arm32. [chris 20080101] tprof: Add tprof, a simple performance monitor based profiler, inspired from linux oprofile. it's still very experimental.
CVS commit: src
Module Name:src Committed By: jruoho Date: Sat Jun 27 13:53:43 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/tests/sbin/ifconfig: Makefile Added Files: src/tests/sbin/ifconfig: t_random_garbage.sh Log Message: Add also a test that writes random garbage to every ifconfig(8) option that takes parameters. Based on quick testing, iwn(4) and wm(4) pass, but urtwn(4) panics. Use at your own risk; in some cases, it may be possible that horrors are written directly to the hardware. To generate a diff of this commit: cvs rdiff -u -r1.860 -r1.861 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.7 -r1.8 src/tests/sbin/ifconfig/Makefile cvs rdiff -u -r0 -r1.1 src/tests/sbin/ifconfig/t_random_garbage.sh 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.860 src/distrib/sets/lists/tests/mi:1.861 --- src/distrib/sets/lists/tests/mi:1.860 Sat Jun 27 10:15:50 2020 +++ src/distrib/sets/lists/tests/mi Sat Jun 27 13:53:43 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.860 2020/06/27 10:15:50 jruoho Exp $ +# $NetBSD: mi,v 1.861 2020/06/27 13:53:43 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3999,6 +3999,7 @@ ./usr/tests/sbin/ifconfig/t_bridge tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_capabilities tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_nonexistent tests-sbin-tests compattestfile,atf +./usr/tests/sbin/ifconfig/t_random_garbage tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_repeated_scan tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_repeated_updown tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_tap tests-sbin-tests compattestfile,atf Index: src/tests/sbin/ifconfig/Makefile diff -u src/tests/sbin/ifconfig/Makefile:1.7 src/tests/sbin/ifconfig/Makefile:1.8 --- src/tests/sbin/ifconfig/Makefile:1.7 Sat Jun 27 06:57:44 2020 +++ src/tests/sbin/ifconfig/Makefile Sat Jun 27 13:53:43 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2020/06/27 06:57:44 jruoho Exp $ +# $NetBSD: Makefile,v 1.8 2020/06/27 13:53:43 jruoho Exp $ .include @@ -7,6 +7,7 @@ TESTSDIR= ${TESTSBASE}/sbin/ifconfig TESTS_SH= t_bridge \ t_capabilities \ t_nonexistent \ + t_random_garbage \ t_repeated_scan \ t_repeated_updown \ t_tap \ Added files: Index: src/tests/sbin/ifconfig/t_random_garbage.sh diff -u /dev/null src/tests/sbin/ifconfig/t_random_garbage.sh:1.1 --- /dev/null Sat Jun 27 13:53:43 2020 +++ src/tests/sbin/ifconfig/t_random_garbage.sh Sat Jun 27 13:53:43 2020 @@ -0,0 +1,94 @@ +# $NetBSD: t_random_garbage.sh,v 1.1 2020/06/27 13:53:43 jruoho Exp $ +# +# Copyright (c) 2020 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jukka Ruohonen. +# +# 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. +# +getrint() { + echo $(od -An -N2 -i /dev/urandom | sed 's/ //') +} + +getrstr() { + echo $(cat /dev/urandom | head -n 1 | base64) +} + +write_garbage() { + val=$(getrint) + echo "Test $3: write to $1 opt $2 -> $val" + ifconfig $1 $opt $val >/dev/null 2>&1 + val=$(getrstr) + echo "Test $3: write to $1 opt $2 -> $val" + ifconfig $1 $opt $val >/dev/null 2>&1 +} + +atf_test_case random_garbage +random_garbage_head() { + atf_set "require.user" "root" + atf_set "descr" "Test writing random garbage to ifconfig(8) options" +} + +random_garbage_body() { + + # Please note: + # + # 1. As some drivers seem to have input validation issues, it may + #be possible that horrors
CVS commit: src/sys/kern
Module Name:src Committed By: jmcneill Date: Sat Jun 27 13:53:10 UTC 2020 Modified Files: src/sys/kern: subr_autoconf.c Log Message: prop_dictionary_[sg]et_cstring{,_nocopy} -> prop_dictionary_[sg]et_string{,_nocopy} To generate a diff of this commit: cvs rdiff -u -r1.271 -r1.272 src/sys/kern/subr_autoconf.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/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.271 src/sys/kern/subr_autoconf.c:1.272 --- src/sys/kern/subr_autoconf.c:1.271 Mon May 25 21:05:01 2020 +++ src/sys/kern/subr_autoconf.c Sat Jun 27 13:53:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.271 2020/05/25 21:05:01 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.272 2020/06/27 13:53:10 jmcneill Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.271 2020/05/25 21:05:01 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.272 2020/06/27 13:53:10 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -568,13 +568,13 @@ devmon_report_device(device_t dev, bool what = (isattach ? "device-attach" : "device-detach"); parent = (pdev == NULL ? "root" : device_xname(pdev)); - if (prop_dictionary_get_cstring_nocopy(dict, "location", )) { - prop_dictionary_set_cstring(ev, "location", where); + if (prop_dictionary_get_string(dict, "location", )) { + prop_dictionary_set_string(ev, "location", where); aprint_debug("ev: %s %s at %s in [%s]\n", what, device_xname(dev), parent, where); } - if (!prop_dictionary_set_cstring(ev, "device", device_xname(dev)) || - !prop_dictionary_set_cstring(ev, "parent", parent)) { + if (!prop_dictionary_set_string(ev, "device", device_xname(dev)) || + !prop_dictionary_set_string(ev, "parent", parent)) { prop_object_release(ev); return; } @@ -1454,12 +1454,12 @@ config_devalloc(const device_t parent, c dev->dv_properties = prop_dictionary_create(); KASSERT(dev->dv_properties != NULL); - prop_dictionary_set_cstring_nocopy(dev->dv_properties, + prop_dictionary_set_string_nocopy(dev->dv_properties, "device-driver", dev->dv_cfdriver->cd_name); prop_dictionary_set_uint16(dev->dv_properties, "device-unit", dev->dv_unit); if (parent != NULL) { - prop_dictionary_set_cstring(dev->dv_properties, + prop_dictionary_set_string(dev->dv_properties, "device-parent", device_xname(parent)); } @@ -1513,7 +1513,7 @@ config_add_attrib_dict(device_t dev) break; if ((attr_dict = prop_dictionary_create()) == NULL) break; - prop_dictionary_set_cstring_nocopy(attr_dict, "attribute-name", + prop_dictionary_set_string_nocopy(attr_dict, "attribute-name", ci->ci_name); /* Create an array of the locator names and defaults */ @@ -1524,10 +1524,10 @@ config_add_attrib_dict(device_t dev) loc_dict = prop_dictionary_create(); if (loc_dict == NULL) continue; -prop_dictionary_set_cstring_nocopy(loc_dict, +prop_dictionary_set_string_nocopy(loc_dict, "loc-name", ci->ci_locdesc[j].cld_name); if (ci->ci_locdesc[j].cld_defaultstr != NULL) - prop_dictionary_set_cstring_nocopy( + prop_dictionary_set_string_nocopy( loc_dict, "default", ci->ci_locdesc[j].cld_defaultstr); prop_array_set(loc_array, j, loc_dict);
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: jmcneill Date: Sat Jun 27 13:41:44 UTC 2020 Modified Files: src/sys/external/bsd/drm2/drm: drmfb.c Log Message: prop_data_create_data+prop_dictionary_set+prop_object_release -> prop_dictionary_set_data To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/drm/drmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/drm/drmfb.c diff -u src/sys/external/bsd/drm2/drm/drmfb.c:1.7 src/sys/external/bsd/drm2/drm/drmfb.c:1.8 --- src/sys/external/bsd/drm2/drm/drmfb.c:1.7 Fri May 31 20:25:58 2019 +++ src/sys/external/bsd/drm2/drm/drmfb.c Sat Jun 27 13:41:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: drmfb.c,v 1.7 2019/05/31 20:25:58 jmcneill Exp $ */ +/* $NetBSD: drmfb.c,v 1.8 2020/06/27 13:41:44 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.7 2019/05/31 20:25:58 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.8 2020/06/27 13:41:44 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -141,10 +141,8 @@ drmfb_attach(struct drmfb_softc *sc, con da->da_fb_helper->connector_info[n]->connector; struct drm_property_blob *edid = connector->edid_blob_ptr; if (edid && edid->length) { - prop_data_t edid_data = - prop_data_create_data(edid->data, edid->length); - prop_dictionary_set(dict, "EDID", edid_data); - prop_object_release(edid_data); + prop_dictionary_set_data(dict, "EDID", edid->data, + edid->length); break; } }
CVS commit: src/sys/external/bsd/drm2/dist/drm
Module Name:src Committed By: jmcneill Date: Sat Jun 27 13:39:06 UTC 2020 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_crtc.c Log Message: prop_dictionary_get_cstring -> prop_dictionary_get_string To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/dist/drm/drm_crtc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/drm_crtc.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_crtc.c:1.16 src/sys/external/bsd/drm2/dist/drm/drm_crtc.c:1.17 --- src/sys/external/bsd/drm2/dist/drm/drm_crtc.c:1.16 Fri Feb 14 14:34:57 2020 +++ src/sys/external/bsd/drm2/dist/drm/drm_crtc.c Sat Jun 27 13:39:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_crtc.c,v 1.16 2020/02/14 14:34:57 maya Exp $ */ +/* $NetBSD: drm_crtc.c,v 1.17 2020/06/27 13:39:05 jmcneill Exp $ */ /* * Copyright (c) 2006-2008 Intel Corporation @@ -32,7 +32,7 @@ * Jesse Barnes */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_crtc.c,v 1.16 2020/02/14 14:34:57 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_crtc.c,v 1.17 2020/06/27 13:39:05 jmcneill Exp $"); #include #include @@ -825,13 +825,14 @@ EXPORT_SYMBOL(drm_display_info_set_bus_f static void drm_connector_get_cmdline_mode(struct drm_connector *connector) { struct drm_cmdline_mode *mode = >cmdline_mode; - char *option = NULL; #ifdef __NetBSD__ + const char *option; prop_dictionary_t prop = device_properties(connector->dev->dev); - if (!prop_dictionary_get_cstring(prop, connector->name, )) + if (!prop_dictionary_get_string(prop, connector->name, )) return; #else + char *option = NULL; if (fb_get_options(connector->name, )) return; #endif
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sat Jun 27 13:34:20 UTC 2020 Modified Files: src/sys/dev/ic: bcmgenet.c dm9000.c dwc_gmac.c Log Message: prop_data_data_nocopy -> prop_data_value To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/bcmgenet.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/dm9000.c cvs rdiff -u -r1.70 -r1.71 src/sys/dev/ic/dwc_gmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/bcmgenet.c diff -u src/sys/dev/ic/bcmgenet.c:1.6 src/sys/dev/ic/bcmgenet.c:1.7 --- src/sys/dev/ic/bcmgenet.c:1.6 Mon May 25 19:49:28 2020 +++ src/sys/dev/ic/bcmgenet.c Sat Jun 27 13:34:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bcmgenet.c,v 1.6 2020/05/25 19:49:28 jmcneill Exp $ */ +/* $NetBSD: bcmgenet.c,v 1.7 2020/06/27 13:34:20 jmcneill Exp $ */ /*- * Copyright (c) 2020 Jared McNeill @@ -34,7 +34,7 @@ #include "opt_ddb.h" #include -__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.6 2020/05/25 19:49:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.7 2020/06/27 13:34:20 jmcneill Exp $"); #include #include @@ -836,7 +836,7 @@ genet_get_eaddr(struct genet_softc *sc, if (eaprop != NULL) { KASSERT(prop_object_type(eaprop) == PROP_TYPE_DATA); KASSERT(prop_data_size(eaprop) == ETHER_ADDR_LEN); - memcpy(eaddr, prop_data_data_nocopy(eaprop), + memcpy(eaddr, prop_data_value(eaprop), ETHER_ADDR_LEN); return; } Index: src/sys/dev/ic/dm9000.c diff -u src/sys/dev/ic/dm9000.c:1.28 src/sys/dev/ic/dm9000.c:1.29 --- src/sys/dev/ic/dm9000.c:1.28 Thu Apr 2 13:38:50 2020 +++ src/sys/dev/ic/dm9000.c Sat Jun 27 13:34:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dm9000.c,v 1.28 2020/04/02 13:38:50 nisimura Exp $ */ +/* $NetBSD: dm9000.c,v 1.29 2020/06/27 13:34:20 jmcneill Exp $ */ /* * Copyright (c) 2009 Paul Fleischer @@ -224,7 +224,7 @@ dme_attach(struct dme_softc *sc, const u */ KASSERT(prop_object_type(ea) == PROP_TYPE_DATA); KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN); - memcpy(enaddr, prop_data_data_nocopy(ea), ETHER_ADDR_LEN); + memcpy(enaddr, prop_data_value(ea), ETHER_ADDR_LEN); aprint_debug_dev(sc->sc_dev, "got MAC address!\n"); } else { /* Index: src/sys/dev/ic/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.70 src/sys/dev/ic/dwc_gmac.c:1.71 --- src/sys/dev/ic/dwc_gmac.c:1.70 Sun May 17 21:50:47 2020 +++ src/sys/dev/ic/dwc_gmac.c Sat Jun 27 13:34:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.70 2020/05/17 21:50:47 chs Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.71 2020/06/27 13:34:20 jmcneill Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.70 2020/05/17 21:50:47 chs Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.71 2020/06/27 13:34:20 jmcneill Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -202,7 +202,7 @@ dwc_gmac_attach(struct dwc_gmac_softc *s */ KASSERT(prop_object_type(ea) == PROP_TYPE_DATA); KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN); - memcpy(enaddr, prop_data_data_nocopy(ea), ETHER_ADDR_LEN); + memcpy(enaddr, prop_data_value(ea), ETHER_ADDR_LEN); } else { /* * If we did not get an externaly configure address,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jmcneill Date: Sat Jun 27 13:33:26 UTC 2020 Modified Files: src/sys/dev/usb: if_mue.c if_smsc.c Log Message: prop_data_data_nocopy -> prop_data_value To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/if_mue.c cvs rdiff -u -r1.68 -r1.69 src/sys/dev/usb/if_smsc.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/usb/if_mue.c diff -u src/sys/dev/usb/if_mue.c:1.59 src/sys/dev/usb/if_mue.c:1.60 --- src/sys/dev/usb/if_mue.c:1.59 Sun Mar 15 23:04:50 2020 +++ src/sys/dev/usb/if_mue.c Sat Jun 27 13:33:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mue.c,v 1.59 2020/03/15 23:04:50 thorpej Exp $ */ +/* $NetBSD: if_mue.c,v 1.60 2020/06/27 13:33:26 jmcneill Exp $ */ /* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */ /* @@ -20,7 +20,7 @@ /* Driver for Microchip LAN7500/LAN7800 chipsets. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.59 2020/03/15 23:04:50 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.60 2020/06/27 13:33:26 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -732,7 +732,7 @@ mue_get_macaddr(struct usbnet *un, prop_ if (eaprop != NULL) { KASSERT(prop_object_type(eaprop) == PROP_TYPE_DATA); KASSERT(prop_data_size(eaprop) == ETHER_ADDR_LEN); - memcpy(un->un_eaddr, prop_data_data_nocopy(eaprop), + memcpy(un->un_eaddr, prop_data_value(eaprop), ETHER_ADDR_LEN); if (ETHER_IS_VALID(un->un_eaddr)) return 0; Index: src/sys/dev/usb/if_smsc.c diff -u src/sys/dev/usb/if_smsc.c:1.68 src/sys/dev/usb/if_smsc.c:1.69 --- src/sys/dev/usb/if_smsc.c:1.68 Sun Mar 15 23:04:51 2020 +++ src/sys/dev/usb/if_smsc.c Sat Jun 27 13:33:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_smsc.c,v 1.68 2020/03/15 23:04:51 thorpej Exp $ */ +/* $NetBSD: if_smsc.c,v 1.69 2020/06/27 13:33:26 jmcneill Exp $ */ /* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */ /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.68 2020/03/15 23:04:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.69 2020/06/27 13:33:26 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -896,7 +896,7 @@ smsc_attach(device_t parent, device_t se if (eaprop != NULL) { KASSERT(prop_object_type(eaprop) == PROP_TYPE_DATA); KASSERT(prop_data_size(eaprop) == ETHER_ADDR_LEN); - memcpy(un->un_eaddr, prop_data_data_nocopy(eaprop), + memcpy(un->un_eaddr, prop_data_value(eaprop), ETHER_ADDR_LEN); } else { /* Check if there is already a MAC address in the register */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Sat Jun 27 13:32:01 UTC 2020 Modified Files: src/sys/dev/pci: if_wm.c Log Message: prop_data_data_nocopy -> prop_data_value To generate a diff of this commit: cvs rdiff -u -r1.678 -r1.679 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.678 src/sys/dev/pci/if_wm.c:1.679 --- src/sys/dev/pci/if_wm.c:1.678 Thu Jun 11 09:23:13 2020 +++ src/sys/dev/pci/if_wm.c Sat Jun 27 13:32:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.678 2020/06/11 09:23:13 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.679 2020/06/27 13:32:00 jmcneill Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.678 2020/06/11 09:23:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.679 2020/06/27 13:32:00 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -2543,7 +2543,7 @@ alloc_retry: if (ea != NULL) { KASSERT(prop_object_type(ea) == PROP_TYPE_DATA); KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN); - memcpy(enaddr, prop_data_data_nocopy(ea), ETHER_ADDR_LEN); + memcpy(enaddr, prop_data_value(ea), ETHER_ADDR_LEN); } else { if (wm_read_mac_addr(sc, enaddr) != 0) { aprint_error_dev(sc->sc_dev,
CVS commit: src/regress/lib/libc
Module Name:src Committed By: mlelstv Date: Sat Jun 27 11:06:43 UTC 2020 Modified Files: src/regress/lib/libc: Makefile Log Message: citrus SUBDIR is gone To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/regress/lib/libc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/lib/libc/Makefile diff -u src/regress/lib/libc/Makefile:1.82 src/regress/lib/libc/Makefile:1.83 --- src/regress/lib/libc/Makefile:1.82 Fri Jan 10 16:35:11 2014 +++ src/regress/lib/libc/Makefile Sat Jun 27 11:06:43 2020 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.82 2014/01/10 16:35:11 christos Exp $ +# $NetBSD: Makefile,v 1.83 2020/06/27 11:06:43 mlelstv Exp $ -SUBDIR+= citrus divrem +SUBDIR+= divrem .include
CVS commit: src/tests/lib/libc/stdlib
Module Name:src Committed By: jruoho Date: Sat Jun 27 10:19:43 UTC 2020 Modified Files: src/tests/lib/libc/stdlib: t_mbtowc.c Log Message: Add the default TNF copyright (2005), cf. PR misc/55419. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_mbtowc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdlib/t_mbtowc.c diff -u src/tests/lib/libc/stdlib/t_mbtowc.c:1.1 src/tests/lib/libc/stdlib/t_mbtowc.c:1.2 --- src/tests/lib/libc/stdlib/t_mbtowc.c:1.1 Sat Jun 27 10:14:10 2020 +++ src/tests/lib/libc/stdlib/t_mbtowc.c Sat Jun 27 10:19:43 2020 @@ -1,3 +1,30 @@ +/* $NetBSD: t_mbtowc.c,v 1.2 2020/06/27 10:19:43 jruoho Exp $ */ + +/*- + * Copyright (c) 2005 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. + */ /* From: Miloslav Trmac */
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: jruoho Date: Sat Jun 27 10:15:50 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Add t_t_mbtowc. To generate a diff of this commit: cvs rdiff -u -r1.859 -r1.860 src/distrib/sets/lists/tests/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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.859 src/distrib/sets/lists/tests/mi:1.860 --- src/distrib/sets/lists/tests/mi:1.859 Sat Jun 27 09:45:57 2020 +++ src/distrib/sets/lists/tests/mi Sat Jun 27 10:15:50 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.859 2020/06/27 09:45:57 jruoho Exp $ +# $NetBSD: mi,v 1.860 2020/06/27 10:15:50 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3074,6 +3074,7 @@ ./usr/tests/lib/libc/stdlib/t_getenv_thread tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_getopt tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_hsearch tests-lib-tests compattestfile,atf +./usr/tests/lib/libc/stdlib/t_mbtowc tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_mi_vector_hash tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_mktemp tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_posix_memalign tests-lib-tests compattestfile,atf
CVS commit: src
Module Name:src Committed By: jruoho Date: Sat Jun 27 10:14:10 UTC 2020 Modified Files: src/tests/lib/libc/stdlib: Makefile Added Files: src/tests/lib/libc/stdlib: t_mbtowc.c Removed Files: src/regress/lib/libc/citrus: Makefile src/regress/lib/libc/citrus/mbtowc: Makefile mbtowc_test.c Log Message: Start moving the remaining tests from src/regress to src/tests. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/regress/lib/libc/citrus/Makefile cvs rdiff -u -r1.1 -r0 src/regress/lib/libc/citrus/mbtowc/Makefile \ src/regress/lib/libc/citrus/mbtowc/mbtowc_test.c cvs rdiff -u -r1.29 -r1.30 src/tests/lib/libc/stdlib/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdlib/t_mbtowc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdlib/Makefile diff -u src/tests/lib/libc/stdlib/Makefile:1.29 src/tests/lib/libc/stdlib/Makefile:1.30 --- src/tests/lib/libc/stdlib/Makefile:1.29 Sat Jun 27 09:45:57 2020 +++ src/tests/lib/libc/stdlib/Makefile Sat Jun 27 10:14:10 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2020/06/27 09:45:57 jruoho Exp $ +# $NetBSD: Makefile,v 1.30 2020/06/27 10:14:10 jruoho Exp $ .include @@ -11,6 +11,7 @@ TESTS_C+= t_getenv TESTS_C+= t_getenv_thread TESTS_C+= t_exit TESTS_C+= t_hsearch +TESTS_C+= t_mbtowc TESTS_C+= t_mktemp TESTS_C+= t_mi_vector_hash TESTS_C+= t_posix_memalign Added files: Index: src/tests/lib/libc/stdlib/t_mbtowc.c diff -u /dev/null src/tests/lib/libc/stdlib/t_mbtowc.c:1.1 --- /dev/null Sat Jun 27 10:14:10 2020 +++ src/tests/lib/libc/stdlib/t_mbtowc.c Sat Jun 27 10:14:10 2020 @@ -0,0 +1,47 @@ + +/* From: Miloslav Trmac */ + +#include +#include +#include +#include +#include +#include + +ATF_TC(mbtowc_sign); +ATF_TC_HEAD(mbtowc_sign, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test mbtowc(3) sign conversion"); +} + +ATF_TC_BODY(mbtowc_sign, tc) +{ + char back[MB_LEN_MAX]; + wchar_t wc; + size_t i; + int ret; + + (void)setlocale(LC_ALL, ""); + (void)printf("Charset: %s\n", nl_langinfo(CODESET)); + ret = mbtowc(, "\xe4", 1); + (void)printf("mbtowc(): %d\n", ret); + + if (ret > 0) { + (void)printf("Result: 0x%08lX\n",(unsigned long)wc); + ret = wctomb(back, wc); + (void)printf("wctomb(): %d\n", ret); + for(i = 0; ret > 0 && i < (size_t)ret; i++) + printf("%02X ",(unsigned char)back[i]); + putchar('\n'); + } + + ATF_REQUIRE(ret > 0); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, mbtowc_sign); + + return atf_no_error(); +}
CVS commit: src/sys/arch/arm/dts
Module Name:src Committed By: jmcneill Date: Sat Jun 27 10:00:29 UTC 2020 Modified Files: src/sys/arch/arm/dts: sun8i-h3-nanopi-m1.dts Log Message: Enable audio codec To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/dts/sun8i-h3-nanopi-m1.dts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/dts/sun8i-h3-nanopi-m1.dts diff -u src/sys/arch/arm/dts/sun8i-h3-nanopi-m1.dts:1.2 src/sys/arch/arm/dts/sun8i-h3-nanopi-m1.dts:1.3 --- src/sys/arch/arm/dts/sun8i-h3-nanopi-m1.dts:1.2 Fri Dec 22 13:27:29 2017 +++ src/sys/arch/arm/dts/sun8i-h3-nanopi-m1.dts Sat Jun 27 10:00:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i-h3-nanopi-m1.dts,v 1.2 2017/12/22 13:27:29 jmcneill Exp $ */ +/* $NetBSD: sun8i-h3-nanopi-m1.dts,v 1.3 2020/06/27 10:00:29 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -35,3 +35,7 @@ allwinner,leds-active-low; status = "okay"; }; + + { + status = "okay"; +};
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: jdolecek Date: Sat Jun 27 09:54:08 UTC 2020 Modified Files: src/sys/arch/xen/x86: cpu.c Log Message: avoid excessive stack usage in mp_cpu_start(), this is called after VM init so kmem(9) can be used To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/sys/arch/xen/x86/cpu.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/xen/x86/cpu.c diff -u src/sys/arch/xen/x86/cpu.c:1.136 src/sys/arch/xen/x86/cpu.c:1.137 --- src/sys/arch/xen/x86/cpu.c:1.136 Thu May 21 21:12:31 2020 +++ src/sys/arch/xen/x86/cpu.c Sat Jun 27 09:54:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.136 2020/05/21 21:12:31 ad Exp $ */ +/* $NetBSD: cpu.c,v 1.137 2020/06/27 09:54:08 jdolecek Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.136 2020/05/21 21:12:31 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.137 2020/06/27 09:54:08 jdolecek Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -999,22 +999,24 @@ int mp_cpu_start(struct cpu_info *ci, vaddr_t target) { int hyperror; - struct vcpu_guest_context vcpuctx; + struct vcpu_guest_context *vcpuctx; KASSERT(ci != NULL); KASSERT(ci != _info_primary); KASSERT(ci->ci_flags & CPUF_AP); + vcpuctx = kmem_alloc(sizeof(*vcpuctx), KM_SLEEP); + #ifdef __x86_64__ - xen_init_amd64_vcpuctxt(ci, , (void (*)(struct cpu_info *))target); + xen_init_amd64_vcpuctxt(ci, vcpuctx, (void (*)(struct cpu_info *))target); #else - xen_init_i386_vcpuctxt(ci, , (void (*)(struct cpu_info *))target); + xen_init_i386_vcpuctxt(ci, vcpuctx, (void (*)(struct cpu_info *))target); #endif /* Initialise the given vcpu to execute cpu_hatch(ci); */ - if ((hyperror = HYPERVISOR_vcpu_op(VCPUOP_initialise, ci->ci_vcpuid, ))) { + if ((hyperror = HYPERVISOR_vcpu_op(VCPUOP_initialise, ci->ci_vcpuid, vcpuctx))) { aprint_error(": context initialisation failed. errno = %d\n", hyperror); - return hyperror; + goto out; } /* Start it up */ @@ -1022,20 +1024,23 @@ mp_cpu_start(struct cpu_info *ci, vaddr_ /* First bring it down */ if ((hyperror = HYPERVISOR_vcpu_op(VCPUOP_down, ci->ci_vcpuid, NULL))) { aprint_error(": VCPUOP_down hypervisor command failed. errno = %d\n", hyperror); - return hyperror; + goto out; } if ((hyperror = HYPERVISOR_vcpu_op(VCPUOP_up, ci->ci_vcpuid, NULL))) { aprint_error(": VCPUOP_up hypervisor command failed. errno = %d\n", hyperror); - return hyperror; + goto out; } if (!vcpu_is_up(ci)) { aprint_error(": did not come up\n"); - return -1; + hyperror = -1; + goto out; } - return 0; +out: + kmem_free(vcpuctx, sizeof(*vcpuctx)); + return hyperror; } void
CVS commit: src
Module Name:src Committed By: jruoho Date: Sat Jun 27 09:45:57 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/tests/lib/libc/stdio: Makefile src/tests/lib/libc/stdlib: Makefile Added Files: src/tests/lib/libc/stdlib: t_mktemp.c Removed Files: src/tests/lib/libc/stdio: t_mktemp.c Log Message: Move the test for mktemp(3) to the right place. To generate a diff of this commit: cvs rdiff -u -r1.858 -r1.859 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libc/stdio/Makefile cvs rdiff -u -r1.1 -r0 src/tests/lib/libc/stdio/t_mktemp.c cvs rdiff -u -r1.28 -r1.29 src/tests/lib/libc/stdlib/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdlib/t_mktemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.858 src/distrib/sets/lists/tests/mi:1.859 --- src/distrib/sets/lists/tests/mi:1.858 Sat Jun 27 08:50:46 2020 +++ src/distrib/sets/lists/tests/mi Sat Jun 27 09:45:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.858 2020/06/27 08:50:46 jruoho Exp $ +# $NetBSD: mi,v 1.859 2020/06/27 09:45:57 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3052,7 +3052,7 @@ ./usr/tests/lib/libc/stdio/t_fopen tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdio/t_format tests-obsolete obsolete ./usr/tests/lib/libc/stdio/t_fputc tests-lib-tests compattestfile,atf -./usr/tests/lib/libc/stdio/t_mktemp tests-lib-tests compattestfile,atf +./usr/tests/lib/libc/stdio/t_mktemp tests-obsolete obsolete ./usr/tests/lib/libc/stdio/t_open_memstream tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdio/t_popen tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdio/t_printf tests-lib-tests compattestfile,atf @@ -3075,6 +3075,7 @@ ./usr/tests/lib/libc/stdlib/t_getopt tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_hsearch tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_mi_vector_hash tests-lib-tests compattestfile,atf +./usr/tests/lib/libc/stdlib/t_mktemp tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_posix_memalign tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_random tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/stdlib/t_strtod tests-lib-tests compattestfile,atf Index: src/tests/lib/libc/stdio/Makefile diff -u src/tests/lib/libc/stdio/Makefile:1.12 src/tests/lib/libc/stdio/Makefile:1.13 --- src/tests/lib/libc/stdio/Makefile:1.12 Wed Oct 15 21:55:34 2014 +++ src/tests/lib/libc/stdio/Makefile Sat Jun 27 09:45:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2014/10/15 21:55:34 justin Exp $ +# $NetBSD: Makefile,v 1.13 2020/06/27 09:45:57 jruoho Exp $ .include @@ -10,7 +10,6 @@ TESTS_C+= t_fmemopen TESTS_C+= t_fopen TESTS_C+= t_open_memstream TESTS_C+= t_fputc -TESTS_C+= t_mktemp TESTS_C+= t_popen TESTS_C+= t_printf TESTS_C+= t_scanf Index: src/tests/lib/libc/stdlib/Makefile diff -u src/tests/lib/libc/stdlib/Makefile:1.28 src/tests/lib/libc/stdlib/Makefile:1.29 --- src/tests/lib/libc/stdlib/Makefile:1.28 Tue Dec 22 14:27:14 2015 +++ src/tests/lib/libc/stdlib/Makefile Sat Jun 27 09:45:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2015/12/22 14:27:14 christos Exp $ +# $NetBSD: Makefile,v 1.29 2020/06/27 09:45:57 jruoho Exp $ .include @@ -11,6 +11,7 @@ TESTS_C+= t_getenv TESTS_C+= t_getenv_thread TESTS_C+= t_exit TESTS_C+= t_hsearch +TESTS_C+= t_mktemp TESTS_C+= t_mi_vector_hash TESTS_C+= t_posix_memalign TESTS_C+= t_random Added files: Index: src/tests/lib/libc/stdlib/t_mktemp.c diff -u /dev/null src/tests/lib/libc/stdlib/t_mktemp.c:1.1 --- /dev/null Sat Jun 27 09:45:57 2020 +++ src/tests/lib/libc/stdlib/t_mktemp.c Sat Jun 27 09:45:57 2020 @@ -0,0 +1,54 @@ +/* $NetBSD: t_mktemp.c,v 1.1 2020/06/27 09:45:57 jruoho Exp $ */ + +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Sat Jun 27 09:28:15 UTC 2020 Modified Files: src/sys/dev/ic: aic79xx.c aic7xxx.c Log Message: small constify To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/ic/aic79xx.c cvs rdiff -u -r1.140 -r1.141 src/sys/dev/ic/aic7xxx.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/ic/aic79xx.c diff -u src/sys/dev/ic/aic79xx.c:1.54 src/sys/dev/ic/aic79xx.c:1.55 --- src/sys/dev/ic/aic79xx.c:1.54 Sat Jun 27 09:03:15 2020 +++ src/sys/dev/ic/aic79xx.c Sat Jun 27 09:28:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aic79xx.c,v 1.54 2020/06/27 09:03:15 jdolecek Exp $ */ +/* $NetBSD: aic79xx.c,v 1.55 2020/06/27 09:28:15 jdolecek Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.54 2020/06/27 09:03:15 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.55 2020/06/27 09:28:15 jdolecek Exp $"); #include #include @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v struct ahd_softc_tailq ahd_tailq = TAILQ_HEAD_INITIALIZER(ahd_tailq); /* Lookup Tables **/ -const char *ahd_chip_names[] = +const char * const ahd_chip_names[] = { "NONE", "aic7901", @@ -5983,14 +5983,14 @@ ahd_controller_info(struct ahd_softc *ah ahd->scb_data.maxhscbs); } -static const char *channel_strings[] = { +static const char * const channel_strings[] = { "Primary Low", "Primary High", "Secondary Low", "Secondary High" }; -static const char *termstat_strings[] = { +static const char * const termstat_strings[] = { "Terminated Correctly", "Over Terminated", "Under Terminated", Index: src/sys/dev/ic/aic7xxx.c diff -u src/sys/dev/ic/aic7xxx.c:1.140 src/sys/dev/ic/aic7xxx.c:1.141 --- src/sys/dev/ic/aic7xxx.c:1.140 Sat Jun 27 09:03:15 2020 +++ src/sys/dev/ic/aic7xxx.c Sat Jun 27 09:28:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $ */ +/* $NetBSD: aic7xxx.c,v 1.141 2020/06/27 09:28:15 jdolecek Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -39,7 +39,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $ + * $Id: aic7xxx.c,v 1.141 2020/06/27 09:28:15 jdolecek Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $ * @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.141 2020/06/27 09:28:15 jdolecek Exp $"); #include #include @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v struct ahc_softc_tailq ahc_tailq = TAILQ_HEAD_INITIALIZER(ahc_tailq); /* Lookup Tables **/ -const char *ahc_chip_names[] = +const char * const ahc_chip_names[] = { "NONE", "aic7770",
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Sat Jun 27 09:03:15 UTC 2020 Modified Files: src/sys/dev/ic: aic79xx.c aic7xxx.c Log Message: mark ahc_loadseq()/ahd_loadseq() as __noinline to avoid 'stack usage might get unbounded' - seems the variable-length array using const variable is misinterpreted as unbounded when inlined To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ic/aic79xx.c cvs rdiff -u -r1.139 -r1.140 src/sys/dev/ic/aic7xxx.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/ic/aic79xx.c diff -u src/sys/dev/ic/aic79xx.c:1.53 src/sys/dev/ic/aic79xx.c:1.54 --- src/sys/dev/ic/aic79xx.c:1.53 Fri Dec 27 09:45:26 2019 +++ src/sys/dev/ic/aic79xx.c Sat Jun 27 09:03:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aic79xx.c,v 1.53 2019/12/27 09:45:26 msaitoh Exp $ */ +/* $NetBSD: aic79xx.c,v 1.54 2020/06/27 09:03:15 jdolecek Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.53 2019/12/27 09:45:26 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.54 2020/06/27 09:03:15 jdolecek Exp $"); #include #include @@ -8252,7 +8252,7 @@ ahd_dumpseq(struct ahd_softc* ahd) } #endif -static void +static void __noinline ahd_loadseq(struct ahd_softc *ahd) { struct cs cs_table[num_critical_sections]; Index: src/sys/dev/ic/aic7xxx.c diff -u src/sys/dev/ic/aic7xxx.c:1.139 src/sys/dev/ic/aic7xxx.c:1.140 --- src/sys/dev/ic/aic7xxx.c:1.139 Fri Dec 27 09:45:26 2019 +++ src/sys/dev/ic/aic7xxx.c Sat Jun 27 09:03:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx.c,v 1.139 2019/12/27 09:45:26 msaitoh Exp $ */ +/* $NetBSD: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -39,7 +39,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: aic7xxx.c,v 1.139 2019/12/27 09:45:26 msaitoh Exp $ + * $Id: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $ * @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.139 2019/12/27 09:45:26 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $"); #include #include @@ -6275,7 +6275,7 @@ ahc_dumpseq(struct ahc_softc* ahc) } #endif -static void +static void __noinline ahc_loadseq(struct ahc_softc *ahc) { struct cs cs_table[num_critical_sections];
CVS commit: src
Module Name:src Committed By: jruoho Date: Sat Jun 27 08:50:46 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/tests/sbin/sysctl: Makefile Added Files: src/tests/sbin/sysctl: t_random_garbage.sh Log Message: Add a simple test case that writes random garbage to (almost) every sysctl node. This test reproduced already at least five unique panics in a few quick runs. The test is skipped by default as it is not likely safe even without the panics. To generate a diff of this commit: cvs rdiff -u -r1.857 -r1.858 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/sysctl/Makefile cvs rdiff -u -r0 -r1.1 src/tests/sbin/sysctl/t_random_garbage.sh 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.857 src/distrib/sets/lists/tests/mi:1.858 --- src/distrib/sets/lists/tests/mi:1.857 Sat Jun 27 06:57:44 2020 +++ src/distrib/sets/lists/tests/mi Sat Jun 27 08:50:46 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.857 2020/06/27 06:57:44 jruoho Exp $ +# $NetBSD: mi,v 1.858 2020/06/27 08:50:46 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4032,6 +4032,7 @@ ./usr/tests/sbin/sysctl/Atffile tests-sbin-tests compattestfile,atf ./usr/tests/sbin/sysctl/Kyuafile tests-sbin-tests compattestfile,atf,kyua ./usr/tests/sbin/sysctl/t_perm tests-sbin-tests compattestfile,atf +./usr/tests/sbin/sysctl/t_random_garbage tests-sbin-tests compattestfile,atf ./usr/tests/sbin/sysctl/t_sysctl tests-sbin-tests compattestfile,atf ./usr/tests/sharetests-sys-tests compattestfile,atf ./usr/tests/share/Atffile tests-sys-tests compattestfile,atf Index: src/tests/sbin/sysctl/Makefile diff -u src/tests/sbin/sysctl/Makefile:1.2 src/tests/sbin/sysctl/Makefile:1.3 --- src/tests/sbin/sysctl/Makefile:1.2 Tue Apr 10 02:39:33 2012 +++ src/tests/sbin/sysctl/Makefile Sat Jun 27 08:50:46 2020 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2012/04/10 02:39:33 jruoho Exp $ +# $NetBSD: Makefile,v 1.3 2020/06/27 08:50:46 jruoho Exp $ .include TESTSDIR= ${TESTSBASE}/sbin/sysctl -TESTS_SH= t_perm t_sysctl +TESTS_SH= t_perm t_random_garbage t_sysctl .include Added files: Index: src/tests/sbin/sysctl/t_random_garbage.sh diff -u /dev/null src/tests/sbin/sysctl/t_random_garbage.sh:1.1 --- /dev/null Sat Jun 27 08:50:46 2020 +++ src/tests/sbin/sysctl/t_random_garbage.sh Sat Jun 27 08:50:46 2020 @@ -0,0 +1,93 @@ +# $NetBSD: t_random_garbage.sh,v 1.1 2020/06/27 08:50:46 jruoho Exp $ +# +# Copyright (c) 2020 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jukka Ruohonen. +# +# 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. +# +tmp="/tmp/sysctl.out" + +getrint() { + echo $(od -An -N2 -i /dev/urandom | sed 's/ //') +} + +getrstr() { + echo $(cat /dev/urandom | head -n 1 | base64) +} + +atf_test_case random_garbage cleanup +random_garbage_head() { + sysctl -a > $tmp + atf_set "require.user" "root" + atf_set "descr" "Test writing random garbage to sysctl nodes" +} + +random_garbage_body() { + + atf_skip "The test is not safe" + + while read line; do + + var=$(echo $line | awk '{print $1}') + + case $var in + kern.securelevel*) + echo "Skipping $var" + continue + ;; + + security*) + echo "Skipping $var" + continue + ;; + esac + + val=$(getrint) + echo "Write $var -> $val" + sysctl -w $var=$val + val=$(getrstr) + echo "Write $var -> $val" + sysctl -w $var=$val + + done < $tmp +} + +random_garbage_cleanup() { + + atf_skip "The test is not
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: macallan Date: Sat Jun 27 07:33:51 UTC 2020 Modified Files: src/sys/arch/powerpc/include: cpu.h Log Message: apply __HIDE_DELAY so zfs and friends at least compile To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/powerpc/include/cpu.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/powerpc/include/cpu.h diff -u src/sys/arch/powerpc/include/cpu.h:1.110 src/sys/arch/powerpc/include/cpu.h:1.111 --- src/sys/arch/powerpc/include/cpu.h:1.110 Sun Dec 1 15:34:45 2019 +++ src/sys/arch/powerpc/include/cpu.h Sat Jun 27 07:33:51 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.110 2019/12/01 15:34:45 ad Exp $ */ +/* $NetBSD: cpu.h,v 1.111 2020/06/27 07:33:51 macallan Exp $ */ /* * Copyright (C) 1999 Wolfgang Solfrank. @@ -416,8 +416,10 @@ void cpu_debug_dump(void); #define cpu_proc_fork(p1, p2) +#ifndef __HIDE_DELAY #define DELAY(n) delay(n) void delay(unsigned int); +#endif /* __HIDE_DELAY */ #define CLKF_USERMODE(cf) cpu_clkf_usermode(cf) #define CLKF_PC(cf) cpu_clkf_pc(cf)
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maxv Date: Sat Jun 27 07:29:11 UTC 2020 Modified Files: src/sys/dev/usb: ulpt.c Log Message: Fix NULL deref on attach failure. Found via vHCI fuzzing. Reported-by: syzbot+9fdcdc21799e5d6d7...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/dev/usb/ulpt.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/usb/ulpt.c diff -u src/sys/dev/usb/ulpt.c:1.106 src/sys/dev/usb/ulpt.c:1.107 --- src/sys/dev/usb/ulpt.c:1.106 Sat Mar 14 02:35:33 2020 +++ src/sys/dev/usb/ulpt.c Sat Jun 27 07:29:11 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ulpt.c,v 1.106 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: ulpt.c,v 1.107 2020/06/27 07:29:11 maxv Exp $ */ /* * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.106 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.107 2020/06/27 07:29:11 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -374,7 +374,9 @@ ulpt_detach(device_t self, int flags) vdevgone(maj, mn, mn, VCHR); vdevgone(maj, mn | ULPT_NOPRIME , mn | ULPT_NOPRIME, VCHR); - usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, sc->sc_dev); + if (sc->sc_udev != NULL) + usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, + sc->sc_dev); return 0; }
CVS commit: src/sys/compat/sys
Module Name:src Committed By: maxv Date: Sat Jun 27 07:00:43 UTC 2020 Modified Files: src/sys/compat/sys: mount.h Log Message: Yet another idiotic compat syscall that was developed with literally zero test made. Simply invoking this syscall with _valid parameters_ triggers a fatal fault, because the kernel tries to write to userland addresses. With specially-crafted parameters it is easy to completely escalate privileges into the kernel. Also the size of the allocation is just obviously wrong, but it looks like the callers are even more wrong, so not gonna fix it for now. Reported-by: syzbot+b05096f3114b2820d...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/compat/sys/mount.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/compat/sys/mount.h diff -u src/sys/compat/sys/mount.h:1.11 src/sys/compat/sys/mount.h:1.12 --- src/sys/compat/sys/mount.h:1.11 Fri Oct 4 01:28:02 2019 +++ src/sys/compat/sys/mount.h Sat Jun 27 07:00:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.11 2019/10/04 01:28:02 christos Exp $ */ +/* $NetBSD: mount.h,v 1.12 2020/06/27 07:00:43 maxv Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -140,7 +140,7 @@ statvfs_to_statfs12_copy(const void *vs, struct statfs12 *s12 = STATVFSBUF_GET(); int error; - statvfs_to_statfs12(vs, vs12); + statvfs_to_statfs12(vs, s12); error = copyout(s12, vs12, l); STATVFSBUF_PUT(s12);
CVS commit: src
Module Name:src Committed By: jruoho Date: Sat Jun 27 06:57:44 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/tests/sbin/ifconfig: Makefile Added Files: src/tests/sbin/ifconfig: t_capabilities.sh Log Message: Add a basic test for enabling/disabling network interface capabilities. To generate a diff of this commit: cvs rdiff -u -r1.856 -r1.857 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.6 -r1.7 src/tests/sbin/ifconfig/Makefile cvs rdiff -u -r0 -r1.1 src/tests/sbin/ifconfig/t_capabilities.sh 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.856 src/distrib/sets/lists/tests/mi:1.857 --- src/distrib/sets/lists/tests/mi:1.856 Sat Jun 27 05:20:34 2020 +++ src/distrib/sets/lists/tests/mi Sat Jun 27 06:57:44 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.856 2020/06/27 05:20:34 jruoho Exp $ +# $NetBSD: mi,v 1.857 2020/06/27 06:57:44 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3995,6 +3995,7 @@ ./usr/tests/sbin/ifconfig/Atffile tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/Kyuafile tests-sbin-tests compattestfile,atf,kyua ./usr/tests/sbin/ifconfig/t_bridge tests-sbin-tests compattestfile,atf +./usr/tests/sbin/ifconfig/t_capabilities tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_nonexistent tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_repeated_scan tests-sbin-tests compattestfile,atf ./usr/tests/sbin/ifconfig/t_repeated_updown tests-sbin-tests compattestfile,atf Index: src/tests/sbin/ifconfig/Makefile diff -u src/tests/sbin/ifconfig/Makefile:1.6 src/tests/sbin/ifconfig/Makefile:1.7 --- src/tests/sbin/ifconfig/Makefile:1.6 Sat Jun 27 05:07:07 2020 +++ src/tests/sbin/ifconfig/Makefile Sat Jun 27 06:57:44 2020 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.6 2020/06/27 05:07:07 jruoho Exp $ +# $NetBSD: Makefile,v 1.7 2020/06/27 06:57:44 jruoho Exp $ .include TESTSDIR= ${TESTSBASE}/sbin/ifconfig TESTS_SH= t_bridge \ + t_capabilities \ t_nonexistent \ t_repeated_scan \ t_repeated_updown \ Added files: Index: src/tests/sbin/ifconfig/t_capabilities.sh diff -u /dev/null src/tests/sbin/ifconfig/t_capabilities.sh:1.1 --- /dev/null Sat Jun 27 06:57:44 2020 +++ src/tests/sbin/ifconfig/t_capabilities.sh Sat Jun 27 06:57:44 2020 @@ -0,0 +1,159 @@ +# $NetBSD: t_capabilities.sh,v 1.1 2020/06/27 06:57:44 jruoho Exp $ +# +# Copyright (c) 2020 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jukka Ruohonen. +# +# 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. +# +setcap() { + + echo "Request: $1 $2 ($3)" + ifconfig $1 $2 + + if [ $4 -eq 1 ]; then + + if [ ! $? -eq 0 ]; then + atf_fail "Failed to enable $3 for $1" + fi + + if [ -z "$(ifconfig $1 | grep "enabled" | grep $3)" ]; then + atf_fail "Failed to enable $3 for $1" + fi + + echo "Request: $1 -$2 (-$3)" + ifconfig $1 -$2 + + if [ ! $? -eq 0 ]; then + atf_fail "Failed to disable $3 for $1" + fi + + if [ ! -z "$(ifconfig $1 | grep "enabled" | grep $3)" ]; then + atf_fail "Failed to disable $3 for $1" + fi + fi +} + +parsecap() { + + i=$1 + checkrv=$3 + x=$(echo $2 | sed "s/.*//") + + export IFS="," + + for y in $x; do + + z="" + + if [ $y = "TSO4" ]; then + z="tso4" + elif [ $y = "IP4CSUM_Rx" ]; then + z="ip4csum-rx" + elif [ $y = "IP4CSUM_Tx" ]; then + z="ip4csum-tx" + elif [ $y = "TCP4CSUM_Rx" ]; then + z="tcp4csum-rx" + elif [ $y = "TCP4CSUM_Tx" ]; then + z="tcp4csum-tx" + elif [
CVS commit: src/sys/modules/arch
Module Name:src Committed By: rin Date: Sat Jun 27 06:50:00 UTC 2020 Modified Files: src/sys/modules/arch: archdirs.mk Added Files: src/sys/modules/arch/powerpc/powerpc-ibm4xx: Makefile bsd.powerpc-ibm4xx.mk Removed Files: src/sys/modules/arch/powerpc/powerpc-4xx: Makefile bsd.powerpc-4xx.mk Log Message: Rename module directory for ibm4xx from /stand/powerpc-4xx to /stand/powerpc-ibm4xx to match with what we set in evbppc_machdep.c: https://nxr.netbsd.org/xref/src/sys/arch/evbppc/evbppc/evbppc_machdep.c#86 (And we use ibm4xx not 4xx for directory in sys/arch/powerpc.) Note that we had never enabled MODULAR for ibm4xx yet; kernel with MODULAR option was unable to build. This should be why this discrepancy had never been found until today... To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/modules/arch/archdirs.mk cvs rdiff -u -r1.1 -r0 src/sys/modules/arch/powerpc/powerpc-4xx/Makefile cvs rdiff -u -r1.3 -r0 \ src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/powerpc/powerpc-ibm4xx/Makefile \ src/sys/modules/arch/powerpc/powerpc-ibm4xx/bsd.powerpc-ibm4xx.mk 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/arch/archdirs.mk diff -u src/sys/modules/arch/archdirs.mk:1.4 src/sys/modules/arch/archdirs.mk:1.5 --- src/sys/modules/arch/archdirs.mk:1.4 Wed Sep 19 16:11:53 2018 +++ src/sys/modules/arch/archdirs.mk Sat Jun 27 06:50:00 2020 @@ -1,4 +1,4 @@ -# $NetBSD: archdirs.mk,v 1.4 2018/09/19 16:11:53 maxv Exp $ +# $NetBSD: archdirs.mk,v 1.5 2020/06/27 06:50:00 rin Exp $ # list of subdirs used per-platform @@ -11,7 +11,7 @@ ARCHDIR_SUBDIR= x86/i386pae-xen .endif .if ${MACHINE_ARCH} == "powerpc" -ARCHDIR_SUBDIR= powerpc/powerpc-4xx powerpc/powerpc-booke +ARCHDIR_SUBDIR= powerpc/powerpc-ibm4xx powerpc/powerpc-booke .endif .if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" Added files: Index: src/sys/modules/arch/powerpc/powerpc-ibm4xx/Makefile diff -u /dev/null src/sys/modules/arch/powerpc/powerpc-ibm4xx/Makefile:1.1 --- /dev/null Sat Jun 27 06:50:00 2020 +++ src/sys/modules/arch/powerpc/powerpc-ibm4xx/Makefile Sat Jun 27 06:50:00 2020 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2020/06/27 06:50:00 rin Exp $ + +BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.powerpc-ibm4xx.mk + +.include "../../compatsubdir.mk" Index: src/sys/modules/arch/powerpc/powerpc-ibm4xx/bsd.powerpc-ibm4xx.mk diff -u /dev/null src/sys/modules/arch/powerpc/powerpc-ibm4xx/bsd.powerpc-ibm4xx.mk:1.1 --- /dev/null Sat Jun 27 06:50:00 2020 +++ src/sys/modules/arch/powerpc/powerpc-ibm4xx/bsd.powerpc-ibm4xx.mk Sat Jun 27 06:50:00 2020 @@ -0,0 +1,17 @@ +# $NetBSD: bsd.powerpc-ibm4xx.mk,v 1.1 2020/06/27 06:50:00 rin Exp $ + +.ifndef _BSD_POWERPC_IBM4XX_MK_ +_BSD_POWERPC_IBM4XX_MK_=1 + +KMODULEARCHDIR:= powerpc-ibm4xx + +CPPFLAGS+= -mcpu=403 +PPC_IBM4XX= 1 + +# hack into bsd.kmodule.mk +PPC_INTR_IMPL=\"powerpc/intr.h\" +PPC_PCI_MACHDEP_IMPL=\"powerpc/pci_machdep.h\" + +AFLAGS+= -mcpu=403 + +.endif # _BSD_POWERPC_IBM4XX_MK_