CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:54:48 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Ticket #28 and #29. To generate a diff of this commit: cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.9 src/doc/CHANGES-9.0:1.1.2.10 --- src/doc/CHANGES-9.0:1.1.2.9 Wed Aug 7 10:20:44 2019 +++ src/doc/CHANGES-9.0 Thu Aug 8 05:54:48 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.9 2019/08/07 10:20:44 martin Exp $ +# $NetBSD: CHANGES-9.0,v 1.1.2.10 2019/08/08 05:54:48 msaitoh Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -320,3 +320,24 @@ sys/arch/aarch64/aarch64/trap.c 1.18 trap_el0_32sync: add missing break to ESR_EC_FP_TRAP_A32 case. [jmcneill, ticket #27] +usr.sbin/sysinst/arch/ews4800mips/md.h 1.4 +usr.sbin/sysinst/defs.h1.43 +usr.sbin/sysinst/disklabel.c 1.11 +usr.sbin/sysinst/disks.c 1.47 +usr.sbin/sysinst/gpt.c1.9 +usr.sbin/sysinst/partitions.h 1.5 +usr.sbin/sysinst/target.c 1.10 +usr.sbin/sysinst/txtwalk.c 1.2 +usr.sbin/sysinst/txtwalk.h 1.2 + + - Support upgrade of systems using NAME= syntax in /etc/fstab. + - Make supported file system types dynamic - instead of hardcoding the + available types at compile time, check for available newfs_* helper + binaries in the actual install environment at runtime. + [martin, ticket #28] + +usr.sbin/sysinst/disks.c 1.48 + + When creating the /etc/fstab for new installs, the sense of the + "noauto" flag was inverted. + [martin, ticket #29]
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:54:48 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Ticket #28 and #29. To generate a diff of this commit: cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:53:03 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #29): usr.sbin/sysinst/disks.c: revision 1.48 When creating the /etc/fstab for new installs, the sense of the "noauto" flag was inverted (editor mishap?) To generate a diff of this commit: cvs rdiff -u -r1.44.2.3 -r1.44.2.4 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.3 src/usr.sbin/sysinst/disks.c:1.44.2.4 --- src/usr.sbin/sysinst/disks.c:1.44.2.3 Thu Aug 8 05:51:43 2019 +++ src/usr.sbin/sysinst/disks.c Thu Aug 8 05:53:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.3 2019/08/08 05:51:43 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.4 2019/08/08 05:53:03 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1352,7 +1352,7 @@ make_fstab(struct install_partition_desc "%s%s\t\t%s\t%s\trw%s%s%s%s%s%s%s%s\t\t %d %d\n", s, dev, mp, fstype, ptn->mountflags & PUIMNT_LOG ? ",log" : "", - ptn->mountflags & PUIMNT_NOAUTO ? "" : ",noauto", + ptn->mountflags & PUIMNT_NOAUTO ? ",noauto" : "", ptn->mountflags & PUIMNT_ASYNC ? ",async" : "", ptn->mountflags & PUIMNT_NOATIME ? ",noatime" : "", ptn->mountflags & PUIMNT_NODEV ? ",nodev" : "",
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:53:03 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #29): usr.sbin/sysinst/disks.c: revision 1.48 When creating the /etc/fstab for new installs, the sense of the "noauto" flag was inverted (editor mishap?) To generate a diff of this commit: cvs rdiff -u -r1.44.2.3 -r1.44.2.4 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:51:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: defs.h disklabel.c disks.c gpt.c partitions.h target.c txtwalk.c txtwalk.h src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.h Log Message: Pull up following revision(s) (requested by martin in ticket #28): usr.sbin/sysinst/disklabel.c: revision 1.11 usr.sbin/sysinst/target.c: revision 1.10 usr.sbin/sysinst/disks.c: revision 1.47 usr.sbin/sysinst/txtwalk.c: revision 1.2 usr.sbin/sysinst/partitions.h: revision 1.5 usr.sbin/sysinst/txtwalk.h: revision 1.2 usr.sbin/sysinst/arch/ews4800mips/md.h: revision 1.4 usr.sbin/sysinst/gpt.c: revision 1.9 usr.sbin/sysinst/defs.h: revision 1.43 Support upgrade of systems using NAME= syntax in /etc/fstab. Make supported file system types dynamic - instead of hardcoding the available types at compile time, check for available newfs_* helper binaries in the actual install environment at runtime. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.2.1 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.sbin/sysinst/partitions.h cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/target.c cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/txtwalk.c \ src/usr.sbin/sysinst/txtwalk.h cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/sysinst/arch/ews4800mips/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.42 src/usr.sbin/sysinst/defs.h:1.42.2.1 --- src/usr.sbin/sysinst/defs.h:1.42 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/defs.h Thu Aug 8 05:51:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.42 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: defs.h,v 1.42.2.1 2019/08/08 05:51:43 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -806,6 +806,7 @@ int target_file_exists_p(const char *); int target_symlink_exists_p(const char *); void unwind_mounts(void); int target_mounted(void); +void umount_root(void); /* from partman.c */ #ifndef NO_PARTMAN Index: src/usr.sbin/sysinst/disklabel.c diff -u src/usr.sbin/sysinst/disklabel.c:1.10 src/usr.sbin/sysinst/disklabel.c:1.10.2.1 --- src/usr.sbin/sysinst/disklabel.c:1.10 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/disklabel.c Thu Aug 8 05:51:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.c,v 1.10 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: disklabel.c,v 1.10.2.1 2019/08/08 05:51:43 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -1016,6 +1016,32 @@ disklabel_get_alignment(const struct dis return parts->ptn_alignment; } +static part_id +disklabel_find_by_name(struct disk_partitions *arg, const char *name) +{ + const struct disklabel_disk_partitions *parts = + (const struct disklabel_disk_partitions*)arg; + char *sl, part; + ptrdiff_t n; + part_id pno; + + sl = strrchr(name, '/'); + if (sl == NULL) + return NO_PART; + n = sl - name; + if (strncmp(name, parts->l.d_packname, n) != 0) + return NO_PART; + part = name[n+1]; + if (part < 'a') + return NO_PART; + pno = part - 'a'; + if (pno >= parts->l.d_npartitions) + return NO_PART; + if (parts->l.d_partitions[pno].p_fstype == FS_UNUSED) + return NO_PART; + return pno; +} + static void disklabel_free(struct disk_partitions *arg) { @@ -1034,6 +1060,7 @@ disklabel_parts = { .read_from_disk = disklabel_parts_read, .create_new_for_disk = disklabel_parts_new, .change_disk_geom = disklabel_change_geom, + .find_by_name = disklabel_find_by_name, .get_disk_pack_name = disklabel_get_disk_pack_name, .set_disk_pack_name = disklabel_set_disk_pack_name, .delete_all_partitions = disklabel_delete_all, Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.2 src/usr.sbin/sysinst/disks.c:1.44.2.3 --- src/usr.sbin/sysinst/disks.c:1.44.2.2 Mon Aug 5 04:36:42 2019 +++ src/usr.sbin/sysinst/disks.c Thu Aug 8 05:51:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.2 2019/08/05 04:36:42 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.3 2019/08/08 05:51:43 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -80,13 +81,22 @@ struct disk_desc { daddr_t dd_totsec; }; -static const char name_prefix[] = "NAME="; +#define NAME_PREFIX "NAME=" +static const char name_prefix[] = NAME_PREFIX; + +/* things we could have as /sbin/newfs_* and /sbin/fsck_* */ +static const char *extern_fs_with_chk[] = { + "ext2fs", "lfs", "msdos", "v7fs" +}; + +/* things we could have as
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:51:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: defs.h disklabel.c disks.c gpt.c partitions.h target.c txtwalk.c txtwalk.h src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.h Log Message: Pull up following revision(s) (requested by martin in ticket #28): usr.sbin/sysinst/disklabel.c: revision 1.11 usr.sbin/sysinst/target.c: revision 1.10 usr.sbin/sysinst/disks.c: revision 1.47 usr.sbin/sysinst/txtwalk.c: revision 1.2 usr.sbin/sysinst/partitions.h: revision 1.5 usr.sbin/sysinst/txtwalk.h: revision 1.2 usr.sbin/sysinst/arch/ews4800mips/md.h: revision 1.4 usr.sbin/sysinst/gpt.c: revision 1.9 usr.sbin/sysinst/defs.h: revision 1.43 Support upgrade of systems using NAME= syntax in /etc/fstab. Make supported file system types dynamic - instead of hardcoding the available types at compile time, check for available newfs_* helper binaries in the actual install environment at runtime. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.2.1 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.sbin/sysinst/partitions.h cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/target.c cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/txtwalk.c \ src/usr.sbin/sysinst/txtwalk.h cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/sysinst/arch/ews4800mips/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: maya Date: Thu Aug 8 05:50:20 UTC 2019 Modified Files: src/share/man/man4: urndis.4 Log Message: urndis: list macallan's newer samsung instead of some other samsung. (this strongly suggests anything in-between will work too) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/urndis.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/urndis.4 diff -u src/share/man/man4/urndis.4:1.5 src/share/man/man4/urndis.4:1.6 --- src/share/man/man4/urndis.4:1.5 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/urndis.4 Thu Aug 8 05:50:20 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: urndis.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: urndis.4,v 1.6 2019/08/08 05:50:20 maya Exp $ .\" .\" Copyright (c) 2010 Michael Knudsen .\" All rights reserved. @@ -29,7 +29,7 @@ .\" .\" $OpenBSD: urndis.4,v 1.11 2011/07/20 13:12:16 jasper Exp $ .\" -.Dd July 20, 2011 +.Dd August 8, 2019 .Dt URNDIS 4 .Os .Sh NAME @@ -66,7 +66,7 @@ HTC Wildfire .It Samsung Galaxy S / S2 .It -Samsung Nexus S +Samsung Galaxy S8 Active .El .Pp The
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: msaitoh Date: Thu Aug 8 04:25:21 UTC 2019 Modified Files: src/sys/arch/i386/conf: GENERIC Log Message: Use + To generate a diff of this commit: cvs rdiff -u -r1.1208 -r1.1209 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1208 src/sys/arch/i386/conf/GENERIC:1.1209 --- src/sys/arch/i386/conf/GENERIC:1.1208 Mon Jun 17 19:01:17 2019 +++ src/sys/arch/i386/conf/GENERIC Thu Aug 8 04:25:21 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1208 2019/06/17 19:01:17 kamil Exp $ +# $NetBSD: GENERIC,v 1.1209 2019/08/08 04:25:21 msaitoh Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1208 $" +#ident "GENERIC-$Revision: 1.1209 $" maxusers 64 # estimated number of users @@ -120,8 +120,8 @@ options DDB_HISTORY_SIZE=512 # enable h #options KGDB # remote debugger #options KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600 #makeoptions DEBUG="-g" # compile full symbol table -#options KUBSAN # Kernel Undefined Behavior Sanitizer (kUBSan) -#options UBSAN_ALWAYS_FATAL # (optional) Panic on all kUBSan reports +#options KUBSAN # Kernel Undefined Behavior Sanitizer (kUBSan) +#options UBSAN_ALWAYS_FATAL # (optional) Panic on all kUBSan reports #options SYSCALL_STATS # per syscall counts #options SYSCALL_TIMES # per syscall times #options SYSCALL_TIMES_HASCOUNTER # use 'broken' rdtsc (soekris) @@ -129,7 +129,7 @@ options KDTRACE_HOOKS # kernel DTrace h # Kernel Code Coverage Driver. #makeoptions KCOV=1 -#options KCOV +#options KCOV # Compatibility options include "conf/compat_netbsd09.config"
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: msaitoh Date: Thu Aug 8 04:25:21 UTC 2019 Modified Files: src/sys/arch/i386/conf: GENERIC Log Message: Use + To generate a diff of this commit: cvs rdiff -u -r1.1208 -r1.1209 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: uwe Date: Thu Aug 8 00:20:54 UTC 2019 Modified Files: src/share/man/man9: rasops.9 Log Message: Try to improve formatting and naration. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/rasops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/rasops.9 diff -u src/share/man/man9/rasops.9:1.18 src/share/man/man9/rasops.9:1.19 --- src/share/man/man9/rasops.9:1.18 Wed Aug 7 13:46:02 2019 +++ src/share/man/man9/rasops.9 Thu Aug 8 00:20:54 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: rasops.9,v 1.18 2019/08/07 13:46:02 rin Exp $ +.\" $NetBSD: rasops.9,v 1.19 2019/08/08 00:20:54 uwe Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -42,6 +42,9 @@ .Fn rasops_init "struct rasops_info *ri" "int wantrows" "int wantcols" .Ft int .Fn rasops_reconfig "struct rasops_info *ri" "int wantrows" "int wantcols" +.Pp +.Cd options RASOPS_DEFAULT_WIDTH=80 +.Cd options RASOPS_DEFAULT_HEIGHT=25 .Sh DESCRIPTION The .Nm @@ -49,15 +52,15 @@ subsystem is a set of raster operations .Xr wscons 9 . .Pp The primary data type for using the raster operations is the -.Em rasops_info +.Vt rasops_info structure in -.Pa dev/rasops/rasops.h . +.In dev/rasops/rasops.h . .Pp Valid values for the -.Em ri_flg +.Fa ri_flg member are: .Pp -.Bl -tag -offset indent -width RI_ENABLE_ALPHA_XX -compact +.Bl -tag -width ".Dv RI_ENABLE_ALPHA" -offset indent -compact .It Dv RI_FULLCLEAR .Fn eraserows hack to clear full screen @@ -81,56 +84,47 @@ do not generate box drawing characters f Use this when it is not safe to allocate memory, for example when setting up an early console. .It Dv RI_ENABLE_ALPHA -set this if the caller supports anti-aliased fonts in the given colour depth. +the caller supports anti-aliased fonts in the given colour depth. Without this flag .Fn rasops_init will only pick bitmap fonts. .It Dv RI_8BIT_IS_RGB -set this if the caller uses an R3G3B2 colour map in 8 bit. +the caller uses an R3G3B2 colour map in 8 bit. .Fn rasops_init -will generate an appropriate ri_devcmap[] but the caller still needs to set up -the actual colour map. +will generate an appropriate +.Fa ri_devcmap Ns Li [] +but the caller still needs to set up the actual colour map. .El .Sh FUNCTIONS -.Bl -tag -width compact -.It Fn rasops_init "ri" "wantrows" "wantcols" -Initialise a -.Em rasops_info +.Fn rasops_init +initialises a +.Vt rasops_info descriptor. +.Fn rasops_reconfig +is used to reconfigure it if parameters have changed in some way. +.Pp The arguments .Fa wantrows and .Fa wantcols are the number of rows and columns we'd like. -In terms of optimization, bitmap fonts of width -.Bl -item -offset indent -compact -.It -8 or 16 (all depths) -.It -12 (depths other than 1) -.El -work the best. -.It Fn rasops_reconfig "ri" "wantrows" "wantcols" -Reconfigure a -.Em rasops_info -descriptor because parameters have changed in some way. -The arguments -.Fa wantrows +Passing zero for either one of them uses the default \(em normally +80 by 25 but it can be changed with config options +.Dv RASOPS_DEFAULT_WIDTH and -.Fa wantcols -are the number of rows and columns we'd like. -Passing zero for either one of -them uses the default - normally 80x25 but it can be changed with -.Bd -literal -offset indent -compact -options RASOPS_DEFAULT_WIDTH=80 -options RASOPS_DEFAULT_HEIGHT=25 -.Ed +.Dv RASOPS_DEFAULT_HEIGHT . +.Pp +In terms of optimization, bitmap fonts of width 8 or 16 work the best +for all depths. +For depths other than 1 the fonts of width 12 are also optimized. +.Pp If calling .Fn rasops_reconfig -to change the font and ri_wsfcookie \*[Ge] 0, you must call +to change the font and +.Fa ri_wsfcookie +is non-negative, you must call .Fn wsfont_unlock -on it, and reset it to -1 (or a new, valid cookie). -.El +on it, and reset it to \-1 or a new, valid cookie. .Sh CODE REFERENCES The rasops subsystem is implemented within the directory .Pa sys/dev/rasops .
CVS commit: src/share/man/man9
Module Name:src Committed By: uwe Date: Thu Aug 8 00:20:54 UTC 2019 Modified Files: src/share/man/man9: rasops.9 Log Message: Try to improve formatting and naration. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/rasops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: macallan Date: Wed Aug 7 22:26:29 UTC 2019 Modified Files: src/sys/dev/usb: if_urndis.c Log Message: match USB_PRODUCT_SAMSUNG_ANDROID too now this works with my Galaxy S8 active To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/if_urndis.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_urndis.c diff -u src/sys/dev/usb/if_urndis.c:1.22 src/sys/dev/usb/if_urndis.c:1.23 --- src/sys/dev/usb/if_urndis.c:1.22 Thu Aug 1 00:10:22 2019 +++ src/sys/dev/usb/if_urndis.c Wed Aug 7 22:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urndis.c,v 1.22 2019/08/01 00:10:22 mrg Exp $ */ +/* $NetBSD: if_urndis.c,v 1.23 2019/08/07 22:26:28 macallan Exp $ */ /* $OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */ /* @@ -21,7 +21,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.22 2019/08/01 00:10:22 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.23 2019/08/07 22:26:28 macallan Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -177,6 +177,7 @@ CFATTACH_DECL_NEW(urndis, sizeof(struct static const struct usb_devno urndis_devs[] = { { USB_VENDOR_HTC, USB_PRODUCT_HTC_ANDROID }, { USB_VENDOR_SAMSUNG, USB_PRODUCT_SAMSUNG_ANDROID2 }, + { USB_VENDOR_SAMSUNG, USB_PRODUCT_SAMSUNG_ANDROID }, }; static usbd_status
CVS commit: src/sys/dev/usb
Module Name:src Committed By: macallan Date: Wed Aug 7 22:26:29 UTC 2019 Modified Files: src/sys/dev/usb: if_urndis.c Log Message: match USB_PRODUCT_SAMSUNG_ANDROID too now this works with my Galaxy S8 active To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/if_urndis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: maya Date: Wed Aug 7 20:45:53 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vfsops.c Log Message: validate the length of args (like other filesystems) ok riastradh To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.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/zfs_vfsops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.24 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.25 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.24 Mon Jun 17 08:09:57 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 7 20:45:53 2019 @@ -1993,6 +1993,9 @@ zfs_mount(vfs_t *vfsp, const char *path, if (uap == NULL) return (SET_ERROR(EINVAL)); + if (*data_len < sizeof *uap) + return (SET_ERROR(EINVAL)); + if (mvp->v_type != VDIR) return (SET_ERROR(ENOTDIR));
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: maya Date: Wed Aug 7 20:45:53 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vfsops.c Log Message: validate the length of args (like other filesystems) ok riastradh To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed Aug 7 20:34:12 UTC 2019 Modified Files: src/sys/dev/usb: if_udav.c Log Message: Compare against 0 for missing endpoint. From mrg@ To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/dev/usb/if_udav.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed Aug 7 20:34:12 UTC 2019 Modified Files: src/sys/dev/usb: if_udav.c Log Message: Compare against 0 for missing endpoint. From mrg@ To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/dev/usb/if_udav.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_udav.c diff -u src/sys/dev/usb/if_udav.c:1.61 src/sys/dev/usb/if_udav.c:1.62 --- src/sys/dev/usb/if_udav.c:1.61 Wed Aug 7 19:21:48 2019 +++ src/sys/dev/usb/if_udav.c Wed Aug 7 20:34:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_udav.c,v 1.61 2019/08/07 19:21:48 skrll Exp $ */ +/* $NetBSD: if_udav.c,v 1.62 2019/08/07 20:34:12 skrll Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.61 2019/08/07 19:21:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.62 2019/08/07 20:34:12 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -232,9 +232,9 @@ udav_attach(device_t parent, device_t se un->un_ed[USBNET_ENDPT_INTR] = ed->bEndpointAddress; } - if (un->un_ed[USBNET_ENDPT_RX] == -1 || - un->un_ed[USBNET_ENDPT_TX] == -1 || - un->un_ed[USBNET_ENDPT_INTR] == -1) { + if (un->un_ed[USBNET_ENDPT_RX] == 0 || + un->un_ed[USBNET_ENDPT_TX] == 0 || + un->un_ed[USBNET_ENDPT_INTR] == 0) { aprint_error_dev(self, "missing endpoint\n"); return; }
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Wed Aug 7 19:58:50 UTC 2019 Modified Files: src/share/man/man9: sysctl.9 Log Message: Fix previous: Link to module(9). Suggested by pgoyette. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Wed Aug 7 19:58:50 UTC 2019 Modified Files: src/share/man/man9: sysctl.9 Log Message: Fix previous: Link to module(9). Suggested by pgoyette. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/sysctl.9 diff -u src/share/man/man9/sysctl.9:1.22 src/share/man/man9/sysctl.9:1.23 --- src/share/man/man9/sysctl.9:1.22 Wed Aug 7 19:16:36 2019 +++ src/share/man/man9/sysctl.9 Wed Aug 7 19:58:50 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.9,v 1.22 2019/08/07 19:16:36 wiz Exp $ +.\" $NetBSD: sysctl.9,v 1.23 2019/08/07 19:58:50 wiz Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -564,7 +564,7 @@ The address of the function is added to .Fn sysctl_init traverses during initialization. For loadable kernel modules (see -.Xr module 7 ) , +.Xr module 9 ) , the list of functions is called from the module loader after the module's initialization routine. Any sysctl nodes created for the loadable module are removed using
CVS commit: src/etc/rc.d
Module Name:src Committed By: nakayama Date: Wed Aug 7 19:30:00 UTC 2019 Modified Files: src/etc/rc.d: automount automountd autounmountd ip6addrctl Log Message: Add $_rc_subr_loaded before ". /etc/rc.subr" for speedup and consistency. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/automount src/etc/rc.d/automountd \ src/etc/rc.d/autounmountd cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/ip6addrctl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/rc.d
Module Name:src Committed By: nakayama Date: Wed Aug 7 19:30:00 UTC 2019 Modified Files: src/etc/rc.d: automount automountd autounmountd ip6addrctl Log Message: Add $_rc_subr_loaded before ". /etc/rc.subr" for speedup and consistency. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/automount src/etc/rc.d/automountd \ src/etc/rc.d/autounmountd cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/ip6addrctl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/automount diff -u src/etc/rc.d/automount:1.1 src/etc/rc.d/automount:1.2 --- src/etc/rc.d/automount:1.1 Tue Jan 9 03:31:14 2018 +++ src/etc/rc.d/automount Wed Aug 7 19:30:00 2019 @@ -1,13 +1,13 @@ #!/bin/sh # -# $NetBSD: automount,v 1.1 2018/01/09 03:31:14 christos Exp $ +# $NetBSD: automount,v 1.2 2019/08/07 19:30:00 nakayama Exp $ # # PROVIDE: automount # REQUIRE: automountd # KEYWORD: nojail shutdown -. /etc/rc.subr +$_rc_subr_loaded . /etc/rc.subr name="automount" rcvar="autofs" Index: src/etc/rc.d/automountd diff -u src/etc/rc.d/automountd:1.1 src/etc/rc.d/automountd:1.2 --- src/etc/rc.d/automountd:1.1 Tue Jan 9 03:31:14 2018 +++ src/etc/rc.d/automountd Wed Aug 7 19:30:00 2019 @@ -1,13 +1,13 @@ #!/bin/sh # -# $NetBSD: automountd,v 1.1 2018/01/09 03:31:14 christos Exp $ +# $NetBSD: automountd,v 1.2 2019/08/07 19:30:00 nakayama Exp $ # # PROVIDE: automountd # REQUIRE: DAEMON # KEYWORD: nojail -. /etc/rc.subr +$_rc_subr_loaded . /etc/rc.subr name="automountd" rcvar="autofs" Index: src/etc/rc.d/autounmountd diff -u src/etc/rc.d/autounmountd:1.1 src/etc/rc.d/autounmountd:1.2 --- src/etc/rc.d/autounmountd:1.1 Tue Jan 9 03:31:14 2018 +++ src/etc/rc.d/autounmountd Wed Aug 7 19:30:00 2019 @@ -7,7 +7,7 @@ # REQUIRE: DAEMON # KEYWORD: nojail -. /etc/rc.subr +$_rc_subr_loaded . /etc/rc.subr name="autounmountd" rcvar="autofs" Index: src/etc/rc.d/ip6addrctl diff -u src/etc/rc.d/ip6addrctl:1.2 src/etc/rc.d/ip6addrctl:1.3 --- src/etc/rc.d/ip6addrctl:1.2 Wed Dec 23 04:38:00 2015 +++ src/etc/rc.d/ip6addrctl Wed Aug 7 19:30:00 2019 @@ -6,7 +6,7 @@ # PROVIDE: ip6addrctl # REQUIRE: root bootconf mountcritlocal tty -. /etc/rc.subr +$_rc_subr_loaded . /etc/rc.subr name="ip6addrctl" rcvar="ip6addrctl"
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed Aug 7 19:21:48 UTC 2019 Modified Files: src/sys/dev/usb: files.usb if_udav.c if_udavreg.h Log Message: Convert udav(4) to usbnet. Based on a diff from mrg@ To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/dev/usb/files.usb cvs rdiff -u -r1.60 -r1.61 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_udavreg.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/usb/files.usb diff -u src/sys/dev/usb/files.usb:1.160 src/sys/dev/usb/files.usb:1.161 --- src/sys/dev/usb/files.usb:1.160 Wed Aug 7 07:25:09 2019 +++ src/sys/dev/usb/files.usb Wed Aug 7 19:21:48 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.160 2019/08/07 07:25:09 skrll Exp $ +# $NetBSD: files.usb,v 1.161 2019/08/07 19:21:48 skrll Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -378,7 +378,7 @@ attach mue at usbdevif file dev/usb/if_mue.c mue # DAVICOM DM9601 -device udav: arp, ether, ifnet, mii, mii_phy +device udav: arp, ether, ifnet, mii, mii_phy, usbnet attach udav at usbdevif file dev/usb/if_udav.c udav Index: src/sys/dev/usb/if_udav.c diff -u src/sys/dev/usb/if_udav.c:1.60 src/sys/dev/usb/if_udav.c:1.61 --- src/sys/dev/usb/if_udav.c:1.60 Thu Aug 1 00:10:22 2019 +++ src/sys/dev/usb/if_udav.c Wed Aug 7 19:21:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_udav.c,v 1.60 2019/08/01 00:10:22 mrg Exp $ */ +/* $NetBSD: if_udav.c,v 1.61 2019/08/07 19:21:48 skrll Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -45,95 +45,64 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.60 2019/08/01 00:10:22 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.61 2019/08/07 19:21:48 skrll Exp $"); #ifdef _KERNEL_OPT -#include "opt_inet.h" #include "opt_usb.h" #endif #include #include -#include -#include +#include #include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#ifdef INET -#include -#include -#endif - -#include -#include - -#include -#include -#include -#include +#include #include +struct udav_softc { + struct usbnet sc_un; + uint16_t sc_flags; +}; /* Function declarations */ int udav_match(device_t, cfdata_t, void *); void udav_attach(device_t, device_t, void *); -int udav_detach(device_t, int); -int udav_activate(device_t, enum devact); CFATTACH_DECL_NEW(udav, sizeof(struct udav_softc), udav_match, udav_attach, -udav_detach, udav_activate); +usbnet_detach, usbnet_activate); + +static void udav_chip_init(struct usbnet *); -Static int udav_openpipes(struct udav_softc *); -Static int udav_rx_list_init(struct udav_softc *); -Static int udav_tx_list_init(struct udav_softc *); -Static int udav_newbuf(struct udav_softc *, struct udav_chain *, struct mbuf *); -Static void udav_start(struct ifnet *); -Static int udav_send(struct udav_softc *, struct mbuf *, int); -Static void udav_txeof(struct usbd_xfer *, void *, usbd_status); -Static void udav_rxeof(struct usbd_xfer *, void *, usbd_status); -Static void udav_tick(void *); -Static void udav_tick_task(void *); -Static int udav_ioctl(struct ifnet *, u_long, void *); -Static void udav_stop_task(struct udav_softc *); -Static void udav_stop(struct ifnet *, int); -Static void udav_watchdog(struct ifnet *); -Static int udav_ifmedia_change(struct ifnet *); -Static void udav_lock_mii(struct udav_softc *); -Static void udav_unlock_mii(struct udav_softc *); -Static int udav_miibus_readreg(device_t, int, int, uint16_t *); -Static int udav_miibus_writereg(device_t, int, int, uint16_t); -Static void udav_miibus_statchg(struct ifnet *); -Static int udav_init(struct ifnet *); -Static void udav_setmulti(struct udav_softc *); -Static void udav_reset(struct udav_softc *); - -Static int udav_csr_read(struct udav_softc *, int, void *, int); -Static int udav_csr_write(struct udav_softc *, int, void *, int); -Static int udav_csr_read1(struct udav_softc *, int); -Static int udav_csr_write1(struct udav_softc *, int, unsigned char); +static unsigned udav_tx_prepare(struct usbnet *, struct mbuf *, + struct usbnet_chain *); +static void udav_rxeof_loop(struct usbnet *, struct usbd_xfer *, + struct usbnet_chain *, uint32_t); +static void udav_stop_cb(struct ifnet *, int); +static int udav_ioctl_cb(struct ifnet *, u_long, void *); +static usbd_status udav_mii_read_reg(struct usbnet *, int, int, uint16_t *); +static usbd_status udav_mii_write_reg(struct usbnet *, int, int, uint16_t); +static void udav_mii_statchg(struct ifnet *); +static int udav_init(struct ifnet *); +static void udav_setiff(struct usbnet *); +static void udav_setiff_locked(struct usbnet *); +static void udav_reset(struct usbnet *); + +static int udav_csr_read(struct udav_softc *,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed Aug 7 19:21:48 UTC 2019 Modified Files: src/sys/dev/usb: files.usb if_udav.c if_udavreg.h Log Message: Convert udav(4) to usbnet. Based on a diff from mrg@ To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/dev/usb/files.usb cvs rdiff -u -r1.60 -r1.61 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_udavreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Wed Aug 7 19:16:36 UTC 2019 Modified Files: src/share/man/man9: sysctl.9 Log Message: Remove Pp in wrong places. Fix Xref. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/sysctl.9 diff -u src/share/man/man9/sysctl.9:1.21 src/share/man/man9/sysctl.9:1.22 --- src/share/man/man9/sysctl.9:1.21 Wed Aug 7 13:22:00 2019 +++ src/share/man/man9/sysctl.9 Wed Aug 7 19:16:36 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.9,v 1.21 2019/08/07 13:22:00 pgoyette Exp $ +.\" $NetBSD: sysctl.9,v 1.22 2019/08/07 19:16:36 wiz Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -164,7 +164,6 @@ which function to call to handle the spe The following algorithm is used by .Fn sysctl_dispatch to determine the function to call: -.Pp .Bl -bullet -offset indent .It Scan the tree using @@ -189,7 +188,6 @@ call the appropriate function. If none of these options applies and no other error was yet recorded, return .Er EOPNOTSUPP . -.Pp .El The .Fa oldp @@ -566,7 +564,7 @@ The address of the function is added to .Fn sysctl_init traverses during initialization. For loadable kernel modules (see -.Xr modules 9 ) , +.Xr module 7 ) , the list of functions is called from the module loader after the module's initialization routine. Any sysctl nodes created for the loadable module are removed using
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Wed Aug 7 19:16:36 UTC 2019 Modified Files: src/share/man/man9: sysctl.9 Log Message: Remove Pp in wrong places. Fix Xref. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Wed Aug 7 19:13:49 UTC 2019 Modified Files: src/lib/libc/sys: read.2 Log Message: Remove leading zero in date. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libc/sys/read.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Wed Aug 7 19:13:49 UTC 2019 Modified Files: src/lib/libc/sys: read.2 Log Message: Remove leading zero in date. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libc/sys/read.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/read.2 diff -u src/lib/libc/sys/read.2:1.37 src/lib/libc/sys/read.2:1.38 --- src/lib/libc/sys/read.2:1.37 Wed Aug 7 01:09:49 2019 +++ src/lib/libc/sys/read.2 Wed Aug 7 19:13:49 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: read.2,v 1.37 2019/08/07 01:09:49 roy Exp $ +.\" $NetBSD: read.2,v 1.38 2019/08/07 19:13:49 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" -.Dd August 07, 2019 +.Dd August 7, 2019 .Dt READ 2 .Os .Sh NAME
CVS commit: src/sbin/drvctl
Module Name:src Committed By: wiz Date: Wed Aug 7 19:08:10 UTC 2019 Modified Files: src/sbin/drvctl: drvctl.8 Log Message: Remove superfluous Pp. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sbin/drvctl/drvctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/drvctl
Module Name:src Committed By: wiz Date: Wed Aug 7 19:08:10 UTC 2019 Modified Files: src/sbin/drvctl: drvctl.8 Log Message: Remove superfluous Pp. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sbin/drvctl/drvctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/drvctl/drvctl.8 diff -u src/sbin/drvctl/drvctl.8:1.19 src/sbin/drvctl/drvctl.8:1.20 --- src/sbin/drvctl/drvctl.8:1.19 Tue Aug 6 10:45:14 2019 +++ src/sbin/drvctl/drvctl.8 Wed Aug 7 19:08:10 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: drvctl.8,v 1.19 2019/08/06 10:45:14 mrg Exp $ +.\" $NetBSD: drvctl.8,v 1.20 2019/08/07 19:08:10 wiz Exp $ .\" .\" Copyright (c) 2004 .\" Matthias Drochner. All rights reserved. @@ -174,7 +174,6 @@ attributes, try one or both of these: # drvctl -r -a usbifif uhub3 # drvctl -r -a usbdevif uhub3 .Ed -.Pp .Sh SEE ALSO .Xr proplib 3 , .Xr drvctl 4 ,
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Aug 7 19:07:09 UTC 2019 Modified Files: src/share/man/man4: sb.4 Log Message: New sentence, new line. Sort SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/share/man/man4/sb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/sb.4 diff -u src/share/man/man4/sb.4:1.26 src/share/man/man4/sb.4:1.27 --- src/share/man/man4/sb.4:1.26 Mon Aug 5 15:06:47 2019 +++ src/share/man/man4/sb.4 Wed Aug 7 19:07:09 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: sb.4,v 1.26 2019/08/05 15:06:47 ryoon Exp $ +.\" $NetBSD: sb.4,v 1.27 2019/08/07 19:07:09 wiz Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -56,20 +56,24 @@ the particular model). The base I/O port address is usually jumper-selected to either 0x220 or 0x240 (newer cards may provide software configuration, but this driver does not directly support them--you must configure the card for its I/O -addresses with other software). The SoundBlaster takes 16 I/O ports. +addresses with other software). +The SoundBlaster takes 16 I/O ports. For the SoundBlaster and SoundBlaster Pro, the IRQ and DRQ channels are -jumper-selected. For the SoundBlaster 16, the IRQ and DRQ channels are -set by this driver to the values specified in the config file. The IRQ -must be selected from the set {5,7,9,10}. +jumper-selected. +For the SoundBlaster 16, the IRQ and DRQ channels are +set by this driver to the values specified in the config file. +The IRQ must be selected from the set {5,7,9,10}. .Pp The configuration file must use 1 .Cm flags -specification to enable the Jazz16 support. This is to avoid potential -conflicts with other devices when probing the Jazz 16 because it requires -use of extra I/O ports not in the base port range. +specification to enable the Jazz16 support. +This is to avoid potential conflicts with other devices when probing +the Jazz 16 because it requires use of extra I/O ports not in the +base port range. .Pp With a SoundBlaster 16 card the device is full duplex, but it can -only sensibly handle a precision of 8 bits. It does so by extending +only sensibly handle a precision of 8 bits. +It does so by extending the output 8 bit samples to 16 bits and using the 8 bit DMA channel for input and the 16 bit channel for output. .Pp @@ -86,13 +90,13 @@ has a midi device attached directly to t .Sh SEE ALSO .Xr aic 4 , .Xr audio 4 , +.Xr i386/pnpbios 4 , .Xr isa 4 , .Xr isapnp 4 , .Xr joy 4 , .Xr midi 4 , .Xr mpu 4 , -.Xr opl 4 , -.Xr i386/pnpbios 4 +.Xr opl 4 .Sh HISTORY The .Nm @@ -102,5 +106,5 @@ device driver appeared in Non-SCSI CD-ROM interfaces are not supported. .Pp The MIDI interface on the SB hardware is braindead, and the driver -needs to busy wait while writing MIDI data. This will consume -a lot of system time. +needs to busy wait while writing MIDI data. +This will consume a lot of system time.
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Aug 7 19:07:09 UTC 2019 Modified Files: src/share/man/man4: sb.4 Log Message: New sentence, new line. Sort SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/share/man/man4/sb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 16:14:51 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h Log Message: Make rasops_erase{rows,cols}() public again; hp300/diofb uses them. Pointed out by martin. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/rasops/rasops.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/rasops/rasops.h diff -u src/sys/dev/rasops/rasops.h:1.45 src/sys/dev/rasops/rasops.h:1.46 --- src/sys/dev/rasops/rasops.h:1.45 Wed Aug 7 12:09:30 2019 +++ src/sys/dev/rasops/rasops.h Wed Aug 7 16:14:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.h,v 1.45 2019/08/07 12:09:30 rin Exp $ */ +/* $NetBSD: rasops.h,v 1.46 2019/08/07 16:14:51 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -181,14 +181,13 @@ struct rasops_info { int rasops_init(struct rasops_info *, int, int); int rasops_reconfig(struct rasops_info *, int, int); void rasops_unpack_attr(long, int *, int *, int *); +void rasops_eraserows(void *, int, int, long); +void rasops_erasecols(void *, int, int, int, long); int rasops_get_cmap(struct rasops_info *, uint8_t *, size_t); extern const uint8_t rasops_cmap[256 * 3]; #ifdef _RASOPS_PRIVATE -void rasops_eraserows(void *, int, int, long); -void rasops_erasecols(void *, int, int, int, long); - /* * Per-depth initialization functions. */
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 16:14:51 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h Log Message: Make rasops_erase{rows,cols}() public again; hp300/diofb uses them. Pointed out by martin. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/rasops/rasops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: riastradh Date: Wed Aug 7 15:37:46 UTC 2019 Modified Files: src/lib/libc/gdtoa: gdtoaimp.h Log Message: Mark the libc fegetround weak reference unused. Not all .c files that include gdtoaimp.h use it, which makes clang unhappy. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/gdtoa/gdtoaimp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gdtoa/gdtoaimp.h diff -u src/lib/libc/gdtoa/gdtoaimp.h:1.16 src/lib/libc/gdtoa/gdtoaimp.h:1.17 --- src/lib/libc/gdtoa/gdtoaimp.h:1.16 Thu Aug 1 02:27:43 2019 +++ src/lib/libc/gdtoa/gdtoaimp.h Wed Aug 7 15:37:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gdtoaimp.h,v 1.16 2019/08/01 02:27:43 riastradh Exp $ */ +/* $NetBSD: gdtoaimp.h,v 1.17 2019/08/07 15:37:46 riastradh Exp $ */ / @@ -200,7 +200,8 @@ THIS SOFTWARE. #include "gd_qnan.h" #ifdef Honor_FLT_ROUNDS #include -__weakref_visible int __libc_fegetround_ref(void) __weak_reference(fegetround); +__unused __weakref_visible int __libc_fegetround_ref(void) + __weak_reference(fegetround); #define fegetround() \ (__libc_fegetround_ref ? __libc_fegetround_ref() : FE_TONEAREST) #endif
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: riastradh Date: Wed Aug 7 15:37:46 UTC 2019 Modified Files: src/lib/libc/gdtoa: gdtoaimp.h Log Message: Mark the libc fegetround weak reference unused. Not all .c files that include gdtoaimp.h use it, which makes clang unhappy. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/gdtoa/gdtoaimp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Aug 7 15:29:03 UTC 2019 Modified Files: src/sys/dev/pci: if_jme.c Log Message: Avoid undefined behavior in jme_mii_write(). Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_jme.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_jme.c diff -u src/sys/dev/pci/if_jme.c:1.44 src/sys/dev/pci/if_jme.c:1.45 --- src/sys/dev/pci/if_jme.c:1.44 Tue Jul 9 08:46:59 2019 +++ src/sys/dev/pci/if_jme.c Wed Aug 7 15:29:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_jme.c,v 1.44 2019/07/09 08:46:59 msaitoh Exp $ */ +/* $NetBSD: if_jme.c,v 1.45 2019/08/07 15:29:02 msaitoh Exp $ */ /* * Copyright (c) 2008 Manuel Bouyer. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.44 2019/07/09 08:46:59 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.45 2019/08/07 15:29:02 msaitoh Exp $"); #include @@ -1021,7 +1021,7 @@ jme_mii_write(device_t self, int phy, in bus_space_write_4(sc->jme_bt_mac, sc->jme_bh_mac, JME_SMI, SMI_OP_WRITE | SMI_OP_EXECUTE | - ((val << SMI_DATA_SHIFT) & SMI_DATA_MASK) | + (((uint32_t)val << SMI_DATA_SHIFT) & SMI_DATA_MASK) | SMI_PHY_ADDR(phy) | SMI_REG_ADDR(reg)); for (i = JME_PHY_TIMEOUT / 10; i > 0; i--) { delay(10);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Aug 7 15:29:03 UTC 2019 Modified Files: src/sys/dev/pci: if_jme.c Log Message: Avoid undefined behavior in jme_mii_write(). Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_jme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: msaitoh Date: Wed Aug 7 14:58:04 UTC 2019 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_reg.h intel_pm.c Log Message: Use unsigned to avoid undefined behavior. Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.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/i915/i915_reg.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.9 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.10 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.9 Mon Aug 5 13:28:31 2019 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h Wed Aug 7 14:58:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_reg.h,v 1.9 2019/08/05 13:28:31 msaitoh Exp $ */ +/* $NetBSD: i915_reg.h,v 1.10 2019/08/07 14:58:04 msaitoh Exp $ */ /* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. @@ -2032,7 +2032,7 @@ enum skl_disp_power_wells { #define FBC_CFB_BASE 0x03200 /* 4k page aligned */ #define FBC_LL_BASE 0x03204 /* 4k page aligned */ #define FBC_CONTROL 0x03208 -#define FBC_CTL_EN (1<<31) +#define FBC_CTL_EN __BIT(31) #define FBC_CTL_PERIODIC (1<<30) #define FBC_CTL_INTERVAL_SHIFT (16) #define FBC_CTL_UNCOMPRESSIBLE (1<<14) @@ -3540,7 +3540,7 @@ enum skl_disp_power_wells { /* Panel fitting */ #define PFIT_CONTROL (dev_priv->info.display_mmio_offset + 0x61230) -#define PFIT_ENABLE (1 << 31) +#define PFIT_ENABLE __BIT(31) #define PFIT_PIPE_MASK (3 << 29) #define PFIT_PIPE_SHIFT 29 #define VERT_INTERP_DISABLE (0 << 10) @@ -4583,7 +4583,7 @@ enum skl_disp_power_wells { /* pnv/gen4/g4x/vlv/chv */ #define DSPFW1 (dev_priv->info.display_mmio_offset + 0x70034) #define DSPFW_SR_SHIFT 23 -#define DSPFW_SR_MASK (0x1ff<<23) +#define DSPFW_SR_MASK (0x1ffU<<23) #define DSPFW_CURSORB_SHIFT 16 #define DSPFW_CURSORB_MASK (0x3f<<16) #define DSPFW_PLANEB_SHIFT 8 Index: src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c:1.18 src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c:1.19 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c:1.18 Mon Aug 5 10:14:19 2019 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c Wed Aug 7 14:58:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_pm.c,v 1.18 2019/08/05 10:14:19 msaitoh Exp $ */ +/* $NetBSD: intel_pm.c,v 1.19 2019/08/07 14:58:04 msaitoh Exp $ */ /* * Copyright © 2012 Intel Corporation @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_pm.c,v 1.18 2019/08/05 10:14:19 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_pm.c,v 1.19 2019/08/07 14:58:04 msaitoh Exp $"); #include #include @@ -289,7 +289,7 @@ static void chv_set_memory_pm5(struct dr } #define FW_WM(value, plane) \ - (((value) << DSPFW_ ## plane ## _SHIFT) & DSPFW_ ## plane ## _MASK) + (((u32)(value) << DSPFW_ ## plane ## _SHIFT) & DSPFW_ ## plane ## _MASK) void intel_set_memory_cxsr(struct drm_i915_private *dev_priv, bool enable) {
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: msaitoh Date: Wed Aug 7 14:58:04 UTC 2019 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_reg.h intel_pm.c Log Message: Use unsigned to avoid undefined behavior. Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: rin Date: Wed Aug 7 13:46:02 UTC 2019 Modified Files: src/share/man/man9: rasops.9 Log Message: - Stop showing struct rasops_info; readers can read the header itself. - Correct description for optimized font widths. - Remove strange blank line. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man9/rasops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/wsfb
Module Name:src Committed By: rin Date: Wed Aug 7 13:23:12 UTC 2019 Modified Files: src/sys/dev/wsfb: genfb.c Log Message: We support anti-aliasing for depth 2. Use switch appropriately. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c diff -u src/sys/dev/wsfb/genfb.c:1.68 src/sys/dev/wsfb/genfb.c:1.69 --- src/sys/dev/wsfb/genfb.c:1.68 Fri Aug 2 10:34:39 2019 +++ src/sys/dev/wsfb/genfb.c Wed Aug 7 13:23:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb.c,v 1.68 2019/08/02 10:34:39 rin Exp $ */ +/* $NetBSD: genfb.c,v 1.69 2019/08/07 13:23:12 rin Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.68 2019/08/02 10:34:39 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.69 2019/08/07 13:23:12 rin Exp $"); #include #include @@ -541,6 +541,7 @@ genfb_init_screen(void *cookie, struct v struct genfb_softc *sc = cookie; struct rasops_info *ri = >scr_ri; int wantcols; + bool is_bgr; ri->ri_depth = sc->sc_depth; ri->ri_width = sc->sc_width; @@ -563,10 +564,11 @@ genfb_init_screen(void *cookie, struct v if (existing && sc->sc_want_clear) ri->ri_flg |= RI_CLEAR; - if (ri->ri_depth == 32 || ri->ri_depth == 24) { + switch (ri->ri_depth) { + case 32: + case 24: ri->ri_flg |= RI_ENABLE_ALPHA; - bool is_bgr = false; prop_dictionary_get_bool(device_properties(sc->sc_dev), "is_bgr", _bgr); if (is_bgr) { @@ -586,13 +588,25 @@ genfb_init_screen(void *cookie, struct v ri->ri_gpos = 8; ri->ri_bpos = 0; } - } + break; - if (ri->ri_depth == 16 || ri->ri_depth == 15) + case 16: + case 15: ri->ri_flg |= RI_ENABLE_ALPHA; + break; + + case 8: + if (sc->sc_cmcb != NULL) + ri->ri_flg |= RI_ENABLE_ALPHA | RI_8BIT_IS_RGB; + break; - if (ri->ri_depth == 8 && sc->sc_cmcb != NULL) - ri->ri_flg |= RI_ENABLE_ALPHA | RI_8BIT_IS_RGB; + case 2: + ri->ri_flg |= RI_ENABLE_ALPHA; + break; + + default: + break; + } wantcols = genfb_calc_cols(sc);
CVS commit: src/sys/dev/wsfb
Module Name:src Committed By: rin Date: Wed Aug 7 13:23:12 UTC 2019 Modified Files: src/sys/dev/wsfb: genfb.c Log Message: We support anti-aliasing for depth 2. Use switch appropriately. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/dev/wsfb/genfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Wed Aug 7 13:22:00 UTC 2019 Modified Files: src/share/man/man9: sysctl.9 Log Message: Document interaction of SYSCTL_SETUP functions and the module loader. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/sysctl.9 diff -u src/share/man/man9/sysctl.9:1.20 src/share/man/man9/sysctl.9:1.21 --- src/share/man/man9/sysctl.9:1.20 Mon Jul 3 21:28:48 2017 +++ src/share/man/man9/sysctl.9 Wed Aug 7 13:22:00 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.9,v 1.20 2017/07/03 21:28:48 wiz Exp $ +.\" $NetBSD: sysctl.9,v 1.21 2019/08/07 13:22:00 pgoyette Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 4, 2011 +.Dd August 7, 2019 .Dt SYSCTL 9 .Os .Sh NAME @@ -547,7 +547,7 @@ specifically ignores any arguments given .Fa oldlenp to zero, and returns success. .Sh SETUP FUNCTIONS -Though nodes can be added to the SYSCTL tree at any time, in order to +Although nodes can be added to the SYSCTL tree at any time, in order to add nodes during the kernel bootstrap phase, a proper .Dq setup function must be used. @@ -561,9 +561,17 @@ See the kernel configuration in .Xr options 4 . .Pc +.Pp The address of the function is added to a list of functions that .Fn sysctl_init traverses during initialization. +For loadable kernel modules (see +.Xr modules 9 ) , +the list of functions is called from the module loader after the module's +initialization routine. +Any sysctl nodes created for the loadable module are removed using +.Fn sysctl_teardown +before calling the module's termination code. .Pp Setup functions do not have to add nodes to the main tree, but can set up their own trees for emulation or other purposes.
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Wed Aug 7 13:22:00 UTC 2019 Modified Files: src/share/man/man9: sysctl.9 Log Message: Document interaction of SYSCTL_SETUP functions and the module loader. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/libdrm/dist/intel
Module Name:xsrc Committed By: maya Date: Wed Aug 7 13:02:16 UTC 2019 Modified Files: xsrc/external/mit/libdrm/dist/intel: intel_bufmgr_gem.c Log Message: Undo local diffs. Whitespace, and header not needed. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 \ xsrc/external/mit/libdrm/dist/intel/intel_bufmgr_gem.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/libdrm/dist/intel/intel_bufmgr_gem.c diff -u xsrc/external/mit/libdrm/dist/intel/intel_bufmgr_gem.c:1.17 xsrc/external/mit/libdrm/dist/intel/intel_bufmgr_gem.c:1.18 --- xsrc/external/mit/libdrm/dist/intel/intel_bufmgr_gem.c:1.17 Sat Jan 19 11:50:05 2019 +++ xsrc/external/mit/libdrm/dist/intel/intel_bufmgr_gem.c Wed Aug 7 13:02:16 2019 @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -1539,9 +1538,9 @@ map_gtt(drm_intel_bo *bo) } /* and mmap it */ - bo_gem->gtt_virtual = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE, - MAP_SHARED, bufmgr_gem->fd, - mmap_arg.offset); + bo_gem->gtt_virtual = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE, + MAP_SHARED, bufmgr_gem->fd, + mmap_arg.offset); if (bo_gem->gtt_virtual == MAP_FAILED) { bo_gem->gtt_virtual = NULL; ret = -errno;
CVS commit: xsrc/external/mit/libdrm/dist/intel
Module Name:xsrc Committed By: maya Date: Wed Aug 7 13:02:16 UTC 2019 Modified Files: xsrc/external/mit/libdrm/dist/intel: intel_bufmgr_gem.c Log Message: Undo local diffs. Whitespace, and header not needed. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 \ xsrc/external/mit/libdrm/dist/intel/intel_bufmgr_gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:36:36 UTC 2019 Modified Files: src/sys/dev/rasops: rasops2.c rasops4.c rasops_bitops.h Added Files: src/sys/dev/rasops: rasops1-4_putchar.h Log Message: Separate general putchar for 1-4bpp from rasops_bitops: - Support anti-aliasing for 2bpp, which works perfectly! - Support scaling underline dimensions with font height. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/dev/rasops/rasops1-4_putchar.h cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/rasops/rasops_bitops.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/rasops/rasops2.c diff -u src/sys/dev/rasops/rasops2.c:1.30 src/sys/dev/rasops/rasops2.c:1.31 --- src/sys/dev/rasops/rasops2.c:1.30 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops2.c Wed Aug 7 12:36:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops2.c,v 1.30 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops2.c,v 1.31 2019/08/07 12:36:36 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops2.c,v 1.30 2019/08/07 11:47:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops2.c,v 1.31 2019/08/07 12:36:36 rin Exp $"); #include "opt_rasops.h" @@ -51,6 +51,7 @@ static void rasops2_copycols(void *, int static void rasops2_erasecols(void *, int, int, int, long); static void rasops2_do_cursor(struct rasops_info *); static void rasops2_putchar(void *, int, int col, u_int, long); +static void rasops2_putchar_aa(void *, int, int col, u_int, long); #ifndef RASOPS_SMALL static void rasops2_putchar8(void *, int, int col, u_int, long); static void rasops2_putchar12(void *, int, int col, u_int, long); @@ -86,6 +87,11 @@ rasops2_init(struct rasops_info *ri) ri->ri_do_cursor = rasops2_do_cursor; } + if (FONT_IS_ALPHA(ri->ri_font)) { + ri->ri_ops.putchar = rasops2_putchar_aa; + return; + } + switch (ri->ri_font->fontwidth) { #ifndef RASOPS_SMALL case 8: @@ -163,4 +169,11 @@ rasops2_makestamp(struct rasops_info *ri /* * Grab routines common to depths where (bpp < 8) */ +#undef RASOPS_AA +#include "rasops1-4_putchar.h" + +#define RASOPS_AA +#include "rasops1-4_putchar.h" +#undef RASOPS_AA + #include Index: src/sys/dev/rasops/rasops4.c diff -u src/sys/dev/rasops/rasops4.c:1.25 src/sys/dev/rasops/rasops4.c:1.26 --- src/sys/dev/rasops/rasops4.c:1.25 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops4.c Wed Aug 7 12:36:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops4.c,v 1.25 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops4.c,v 1.26 2019/08/07 12:36:36 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops4.c,v 1.25 2019/08/07 11:47:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops4.c,v 1.26 2019/08/07 12:36:36 rin Exp $"); #include "opt_rasops.h" @@ -163,4 +163,7 @@ rasops4_makestamp(struct rasops_info *ri /* * Grab routines common to depths where (bpp < 8) */ +#undef RASOPS_AA +#include "rasops1-4_putchar.h" + #include Index: src/sys/dev/rasops/rasops_bitops.h diff -u src/sys/dev/rasops/rasops_bitops.h:1.23 src/sys/dev/rasops/rasops_bitops.h:1.24 --- src/sys/dev/rasops/rasops_bitops.h:1.23 Fri Aug 2 04:39:09 2019 +++ src/sys/dev/rasops/rasops_bitops.h Wed Aug 7 12:36:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops_bitops.h,v 1.23 2019/08/02 04:39:09 rin Exp $ */ +/* $NetBSD: rasops_bitops.h,v 1.24 2019/08/07 12:36:36 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -32,10 +32,6 @@ #ifndef _RASOPS_BITOPS_H_ #define _RASOPS_BITOPS_H_ 1 -#define NAME(name) NAME1(RASOPS_DEPTH, name) -#define NAME1(depth, name) NAME2(depth, name) -#define NAME2(depth, name) rasops ## depth ## _ ## name - #if RASOPS_DEPTH == 1 #define PIXEL_SHIFT 0 #elif RASOPS_DEPTH == 2 @@ -46,218 +42,9 @@ #error "Depth not supported" #endif -#define PIXEL_BITS RASOPS_DEPTH -#define COLOR_MASK __BITS(32 - PIXEL_BITS, 31) - -#if RASOPS_DEPTH != 1 -/* - * Paint a single character. This function is also applicable to - * monochrome, but that in rasops1.c is much simpler and faster. - */ -static void -NAME(putchar)(void *cookie, int row, int col, u_int uc, long attr) -{ - struct rasops_info *ri = (struct rasops_info *)cookie; - struct wsdisplay_font *font = PICK_FONT(ri, uc); - int full, cnt, bit; - uint32_t fs, rs, fb, bg, fg, lmask, rmask, lbg, rbg, clr[2]; - uint32_t height, width; - uint32_t *rp, *bp, *hp, tmp; - uint8_t *fr; - bool space; - - hp = NULL; /* XXX GCC */ - -#ifdef RASOPS_CLIPPING - /* Catches 'row < 0' case too */ - if ((unsigned)row >= (unsigned)ri->ri_rows) - return; - - if ((unsigned)col >= (unsigned)ri->ri_cols) - return; -#endif - - width = font->fontwidth <<
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:36:36 UTC 2019 Modified Files: src/sys/dev/rasops: rasops2.c rasops4.c rasops_bitops.h Added Files: src/sys/dev/rasops: rasops1-4_putchar.h Log Message: Separate general putchar for 1-4bpp from rasops_bitops: - Support anti-aliasing for 2bpp, which works perfectly! - Support scaling underline dimensions with font height. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/dev/rasops/rasops1-4_putchar.h cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/rasops/rasops_bitops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:33:48 UTC 2019 Modified Files: src/sys/dev/rasops: rasops15.c rasops24.c rasops32.c rasops8.c rasops_putchar.h Removed Files: src/sys/dev/rasops: rasops_putchar_aa.h Log Message: Merge rasops_putchar_aa.h into rasops_putchar.h. Support scaling underline dimensions by font height. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.47 -r1.48 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.43 -r1.44 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/rasops/rasops8.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/rasops/rasops_putchar.h cvs rdiff -u -r1.6 -r0 src/sys/dev/rasops/rasops_putchar_aa.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:33:48 UTC 2019 Modified Files: src/sys/dev/rasops: rasops15.c rasops24.c rasops32.c rasops8.c rasops_putchar.h Removed Files: src/sys/dev/rasops: rasops_putchar_aa.h Log Message: Merge rasops_putchar_aa.h into rasops_putchar.h. Support scaling underline dimensions by font height. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.47 -r1.48 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.43 -r1.44 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/rasops/rasops8.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/rasops/rasops_putchar.h cvs rdiff -u -r1.6 -r0 src/sys/dev/rasops/rasops_putchar_aa.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/rasops/rasops15.c diff -u src/sys/dev/rasops/rasops15.c:1.36 src/sys/dev/rasops/rasops15.c:1.37 --- src/sys/dev/rasops/rasops15.c:1.36 Wed Aug 7 11:48:43 2019 +++ src/sys/dev/rasops/rasops15.c Wed Aug 7 12:33:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops15.c,v 1.36 2019/08/07 11:48:43 rin Exp $ */ +/* $NetBSD: rasops15.c,v 1.37 2019/08/07 12:33:48 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.36 2019/08/07 11:48:43 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.37 2019/08/07 12:33:48 rin Exp $"); #include "opt_rasops.h" @@ -114,8 +114,12 @@ rasops15_init(struct rasops_info *ri) #endif } +#undef RASOPS_AA #include "rasops_putchar.h" -#include "rasops_putchar_aa.h" + +#define RASOPS_AA +#include "rasops_putchar.h" +#undef RASOPS_AA #ifndef RASOPS_SMALL /* Index: src/sys/dev/rasops/rasops24.c diff -u src/sys/dev/rasops/rasops24.c:1.47 src/sys/dev/rasops/rasops24.c:1.48 --- src/sys/dev/rasops/rasops24.c:1.47 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops24.c Wed Aug 7 12:33:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops24.c,v 1.47 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops24.c,v 1.48 2019/08/07 12:33:48 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.47 2019/08/07 11:47:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.48 2019/08/07 12:33:48 rin Exp $"); #include "opt_rasops.h" @@ -125,8 +125,12 @@ rasops24_init(struct rasops_info *ri) #endif } +#undef RASOPS_AA #include "rasops_putchar.h" -#include "rasops_putchar_aa.h" + +#define RASOPS_AA +#include "rasops_putchar.h" +#undef RASOPS_AA static __inline void rasops24_makestamp1(struct rasops_info *ri, uint32_t *xstamp, Index: src/sys/dev/rasops/rasops32.c diff -u src/sys/dev/rasops/rasops32.c:1.43 src/sys/dev/rasops/rasops32.c:1.44 --- src/sys/dev/rasops/rasops32.c:1.43 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops32.c Wed Aug 7 12:33:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops32.c,v 1.43 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops32.c,v 1.44 2019/08/07 12:33:48 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.43 2019/08/07 11:47:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.44 2019/08/07 12:33:48 rin Exp $"); #include "opt_rasops.h" @@ -115,8 +115,12 @@ rasops32_init(struct rasops_info *ri) #endif } +#undef RASOPS_AA #include "rasops_putchar.h" -#include "rasops_putchar_aa.h" + +#define RASOPS_AA +#include "rasops_putchar.h" +#undef RASOPS_AA #ifndef RASOPS_SMALL /* Index: src/sys/dev/rasops/rasops8.c diff -u src/sys/dev/rasops/rasops8.c:1.48 src/sys/dev/rasops/rasops8.c:1.49 --- src/sys/dev/rasops/rasops8.c:1.48 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops8.c Wed Aug 7 12:33:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops8.c,v 1.48 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops8.c,v 1.49 2019/08/07 12:33:48 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.48 2019/08/07 11:47:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.49 2019/08/07 12:33:48 rin Exp $"); #include "opt_rasops.h" @@ -113,8 +113,12 @@ rasops8_init(struct rasops_info *ri) #endif } +#undef RASOPS_AA #include "rasops_putchar.h" -#include "rasops_putchar_aa.h" + +#define RASOPS_AA +#include "rasops_putchar.h" +#undef RASOPS_AA #ifndef RASOPS_SMALL /* Index: src/sys/dev/rasops/rasops_putchar.h diff -u src/sys/dev/rasops/rasops_putchar.h:1.5 src/sys/dev/rasops/rasops_putchar.h:1.6 --- src/sys/dev/rasops/rasops_putchar.h:1.5 Tue Jul 30 15:29:40 2019 +++ src/sys/dev/rasops/rasops_putchar.h Wed Aug 7 12:33:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops_putchar.h,v 1.5 2019/07/30 15:29:40 rin Exp $ */ +/* $NetBSD: rasops_putchar.h,v 1.6
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:27:49 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops1.c rasops1_putchar_width.h rasops_putchar_width.h Log Message: Scaling dimensions of underline by font height. Currently, - offset of underline is fixed to 1-row from bottom of characters, and - height of underline is fixed to 1. Both are good for standard 8x16 fonts. However, it is too thin for larger fonts, especially when used on display of high resolution. Also, 1-row offset of underline is ugly for small fonts, e.g., spleen5x8. Therefore, adjust offset and height as, - no changes for standard 16-height fonts. - scaling by font height for larger fonts. - set offset to zero for fonts of height smaller than 16. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/rasops/rasops1_putchar_width.h cvs rdiff -u -r1.11 -r1.12 src/sys/dev/rasops/rasops_putchar_width.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.116 src/sys/dev/rasops/rasops.c:1.117 --- src/sys/dev/rasops/rasops.c:1.116 Wed Aug 7 11:57:40 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 12:27:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.116 2019/08/07 11:57:40 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.117 2019/08/07 12:27:49 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.116 2019/08/07 11:57:40 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.117 2019/08/07 12:27:49 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -332,7 +332,7 @@ rasops_init(struct rasops_info *ri, int int rasops_reconfig(struct rasops_info *ri, int wantrows, int wantcols) { - int bpp, s; + int bpp, height, s; size_t len; s = splhigh(); @@ -483,6 +483,11 @@ rasops_reconfig(struct rasops_info *ri, } else ri->ri_xorigin = ri->ri_yorigin = 0; + /* Scaling underline by font height */ + height = ri->ri_font->fontheight; + ri->ri_ul.off = rounddown(height, 16) / 16; /* offset from bottom */ + ri->ri_ul.height = roundup(height, 16) / 16; /* height */ + /* * Fill in defaults for operations set. XXX this nukes private * routines used by accelerated fb drivers. Index: src/sys/dev/rasops/rasops1.c diff -u src/sys/dev/rasops/rasops1.c:1.34 src/sys/dev/rasops/rasops1.c:1.35 --- src/sys/dev/rasops/rasops1.c:1.34 Fri Aug 2 04:39:09 2019 +++ src/sys/dev/rasops/rasops1.c Wed Aug 7 12:27:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops1.c,v 1.34 2019/08/02 04:39:09 rin Exp $ */ +/* $NetBSD: rasops1.c,v 1.35 2019/08/07 12:27:49 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.34 2019/08/02 04:39:09 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.35 2019/08/07 12:27:49 rin Exp $"); #include "opt_rasops.h" @@ -170,12 +170,18 @@ rasops1_putchar(void *cookie, int row, i /* Do underline */ if ((attr & WSATTR_UNDERLINE) != 0) { - DELTA(rp, -(ri->ri_stride << 1), uint32_t *); - tmp = (*rp & lmask) | (fg & rmask); - *rp = tmp; - if (ri->ri_hwbits) { -DELTA(hp, -(ri->ri_stride << 1), uint32_t *); -*hp = tmp; + DELTA(rp, - ri->ri_stride * ri->ri_ul.off, uint32_t *); + if (ri->ri_hwbits) +DELTA(hp, - ri->ri_stride * ri->ri_ul.off, +uint32_t *); + for (height = ri->ri_ul.height; height; height--) { +DELTA(rp, - ri->ri_stride, uint32_t *); +tmp = (*rp & lmask) | (fg & rmask); +*rp = tmp; +if (ri->ri_hwbits) { + DELTA(hp, - ri->ri_stride, uint32_t *); + *hp = tmp; +} } } } else { @@ -223,15 +229,21 @@ rasops1_putchar(void *cookie, int row, i /* Do underline */ if ((attr & WSATTR_UNDERLINE) != 0) { - DELTA(rp, -(ri->ri_stride << 1), uint32_t *); - tmp0 = (rp[0] & lmask) | (fg & ~lmask); - tmp1 = (rp[1] & rmask) | (fg & ~rmask); - rp[0] = tmp0; - rp[1] = tmp1; - if (ri->ri_hwbits) { -DELTA(hp, -(ri->ri_stride << 1), uint32_t *); -hp[0] = tmp0; -hp[1] = tmp1; + DELTA(rp, - ri->ri_stride * ri->ri_ul.off, uint32_t *); + if (ri->ri_hwbits) +DELTA(hp, - ri->ri_stride * ri->ri_ul.off, +uint32_t *); + for (height = ri->ri_ul.height; height; height--) { +DELTA(rp, - ri->ri_stride, uint32_t *); +tmp0 = (rp[0] & lmask) | (fg & ~lmask); +tmp1 = (rp[1] & rmask) | (fg & ~rmask); +rp[0] = tmp0; +rp[1] = tmp1; +if (ri->ri_hwbits) { + DELTA(hp, - ri->ri_stride, uint32_t *); + hp[0] = tmp0; + hp[1] = tmp1; +} } } } Index: src/sys/dev/rasops/rasops1_putchar_width.h diff -u src/sys/dev/rasops/rasops1_putchar_width.h:1.3
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:27:49 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops1.c rasops1_putchar_width.h rasops_putchar_width.h Log Message: Scaling dimensions of underline by font height. Currently, - offset of underline is fixed to 1-row from bottom of characters, and - height of underline is fixed to 1. Both are good for standard 8x16 fonts. However, it is too thin for larger fonts, especially when used on display of high resolution. Also, 1-row offset of underline is ugly for small fonts, e.g., spleen5x8. Therefore, adjust offset and height as, - no changes for standard 16-height fonts. - scaling by font height for larger fonts. - set offset to zero for fonts of height smaller than 16. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/rasops/rasops1_putchar_width.h cvs rdiff -u -r1.11 -r1.12 src/sys/dev/rasops/rasops_putchar_width.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:09:31 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h Log Message: Modify struct rasops_info again (ride 9.99.4 bump). - remove ri_buf and friends. - remove ri_stamp and frieds. - introduce ri_ul, which will be used for scaling underline with font. Also add hack for ri_ul; adjust its size to obsoleted member, ri_delta, which was only used rasops routines internally. Now, size and offsets of all members of struct rasops_info become same with netbsd-9, -8, and -7, again. So we can safelly pull up fixes to any release branches! To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/rasops/rasops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 12:09:31 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h Log Message: Modify struct rasops_info again (ride 9.99.4 bump). - remove ri_buf and friends. - remove ri_stamp and frieds. - introduce ri_ul, which will be used for scaling underline with font. Also add hack for ri_ul; adjust its size to obsoleted member, ri_delta, which was only used rasops routines internally. Now, size and offsets of all members of struct rasops_info become same with netbsd-9, -8, and -7, again. So we can safelly pull up fixes to any release branches! To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/rasops/rasops.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/rasops/rasops.h diff -u src/sys/dev/rasops/rasops.h:1.44 src/sys/dev/rasops/rasops.h:1.45 --- src/sys/dev/rasops/rasops.h:1.44 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops.h Wed Aug 7 12:09:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.h,v 1.44 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops.h,v 1.45 2019/08/07 12:09:30 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -32,6 +32,8 @@ #ifndef _RASOPS_H_ #define _RASOPS_H_ 1 +#include + #include #include @@ -113,6 +115,22 @@ struct rasops_info { int ri_emustride; /* bytes per row we actually care about */ int ri_rows; /* number of rows (characters, not pels) */ int ri_cols; /* number of columns (characters, not pels) */ +#if __NetBSD_Prereq__(9, 99, 1) + struct { + int off; /* offset of underline from bottom */ + int height; /* height of underline */ + } ri_ul; +#else + /* + * XXX + * hack to keep ABI compatibility for netbsd-9, -8, and -7. + */ + // int ri_delta; /* obsoleted */ + struct { + short off; + short height; + } __packed ri_ul; +#endif int ri_pelbytes; /* bytes per pel (may be zero) */ int ri_fontscale; /* fontheight * fontstride */ int ri_xscale; /* fontwidth * pelbytes */ @@ -131,15 +149,6 @@ struct rasops_info { /* Callbacks so we can share some code */ void (*ri_do_cursor)(struct rasops_info *); - /* buffer capable of single-row pixels */ - void *ri_buf; - size_t ri_buflen; - - /* 4x1 stamp for optimized character blitting */ - void *ri_stamp; - long ri_stamp_attr; - size_t ri_stamp_len; - #if NRASOPS_ROTATION > 0 /* Used to intercept putchar to permit display rotation */ struct wsdisplay_emulops ri_real_ops;
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:57:40 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: If RI_CLEAR is set, do not forget to clear real framebuffer. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:57:40 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: If RI_CLEAR is set, do not forget to clear real framebuffer. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.115 src/sys/dev/rasops/rasops.c:1.116 --- src/sys/dev/rasops/rasops.c:1.115 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 11:57:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.115 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.116 2019/08/07 11:57:40 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.115 2019/08/07 11:47:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.116 2019/08/07 11:57:40 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -442,8 +442,12 @@ rasops_reconfig(struct rasops_info *ri, ri->ri_hworigbits = ri->ri_hwbits; /* Clear the entire display */ - if ((ri->ri_flg & RI_CLEAR) != 0) - memset(ri->ri_bits, 0, ri->ri_stride * ri->ri_height); + if ((ri->ri_flg & RI_CLEAR) != 0) { + rasops_memset32(ri->ri_bits, 0, ri->ri_stride * ri->ri_height); + if (ri->ri_hwbits) + rasops_memset32(ri->ri_hwbits, 0, + ri->ri_stride * ri->ri_height); + } /* Now centre our window if needs be */ if ((ri->ri_flg & RI_CENTER) != 0) {
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:48:44 UTC 2019 Modified Files: src/sys/dev/rasops: rasops15.c Log Message: Oops, revert an unintentional change for now. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops15.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/rasops/rasops15.c diff -u src/sys/dev/rasops/rasops15.c:1.35 src/sys/dev/rasops/rasops15.c:1.36 --- src/sys/dev/rasops/rasops15.c:1.35 Wed Aug 7 11:47:33 2019 +++ src/sys/dev/rasops/rasops15.c Wed Aug 7 11:48:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops15.c,v 1.35 2019/08/07 11:47:33 rin Exp $ */ +/* $NetBSD: rasops15.c,v 1.36 2019/08/07 11:48:43 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.35 2019/08/07 11:47:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.36 2019/08/07 11:48:43 rin Exp $"); #include "opt_rasops.h" @@ -114,12 +114,8 @@ rasops15_init(struct rasops_info *ri) #endif } -#undef RASOPS_AA #include "rasops_putchar.h" - -#define RASOPS_AA -#include "rasops_putchar.h" -#undef RASOPS_AA +#include "rasops_putchar_aa.h" #ifndef RASOPS_SMALL /*
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:48:44 UTC 2019 Modified Files: src/sys/dev/rasops: rasops15.c Log Message: Oops, revert an unintentional change for now. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops15.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:47:33 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops.h rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c rasops_putchar_width.h Log Message: Stop allocating ri_buf and ri_stamp dynamically. As commented in rasops.h, it is not safe to use kmem_alloc(9) in rasops_init(); rasops routines can be used for early putchar, which means that UVM is not fully initialized. Should fix a problem reported by macallan: http://mail-index.netbsd.org/tech-kern/2019/08/02/msg025327.html Instead of using ri_buf, inline function rasops_memcpy32() is introduced to fill 32bit data efficiently. Instead of using ri_stamp (per device stamp), stamp_ri is introduced to distinguish for which device stamp is calculated. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.43 -r1.44 src/sys/dev/rasops/rasops.h cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.47 -r1.48 src/sys/dev/rasops/rasops8.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/rasops/rasops_putchar_width.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.114 src/sys/dev/rasops/rasops.c:1.115 --- src/sys/dev/rasops/rasops.c:1.114 Wed Aug 7 11:08:44 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 11:47:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.114 2019/08/07 11:08:44 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.115 2019/08/07 11:47:33 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.114 2019/08/07 11:08:44 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.115 2019/08/07 11:47:33 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -509,21 +509,6 @@ rasops_reconfig(struct rasops_info *ri, WSSCREEN_WSCOLORS | WSSCREEN_REVERSE; } - if (ri->ri_buf != NULL) { - kmem_free(ri->ri_buf, ri->ri_buflen); - ri->ri_buf = NULL; - } - len = (ri->ri_flg & RI_FULLCLEAR) ? ri->ri_stride : ri->ri_emustride; - ri->ri_buflen = len; - ri->ri_buf = kmem_alloc(len, KM_SLEEP); - -#ifndef RASOPS_SMALL - if (ri->ri_stamp != NULL) { - kmem_free(ri->ri_stamp, ri->ri_stamp_len); - ri->ri_stamp = NULL; - } -#endif - switch (ri->ri_depth) { #if NRASOPS1 > 0 case 1: @@ -1004,9 +989,8 @@ void rasops_eraserows(void *cookie, int row, int num, long attr) { struct rasops_info *ri = (struct rasops_info *)cookie; - uint32_t *buf = (uint32_t *)ri->ri_buf; uint32_t *rp, *hp, clr; - int stride, cnt; + int stride; hp = NULL; /* XXX GCC */ @@ -1045,13 +1029,10 @@ rasops_eraserows(void *cookie, int row, hp = (uint32_t *)(ri->ri_hwbits + row * ri->ri_yscale); } - for (cnt = 0; cnt < stride >> 2; cnt++) - buf[cnt] = clr; - while (num--) { - memcpy(rp, buf, stride); + rasops_memset32(rp, clr, stride); if (ri->ri_hwbits) { - memcpy(hp, buf, stride); + memcpy(hp, rp, stride); DELTA(hp, ri->ri_stride, uint32_t *); } DELTA(rp, ri->ri_stride, uint32_t *); @@ -1166,9 +1147,8 @@ void rasops_erasecols(void *cookie, int row, int col, int num, long attr) { struct rasops_info *ri = (struct rasops_info *)cookie; - uint32_t *buf = ri->ri_buf; - int height, cnt, clr; - uint32_t *dp, *rp, *hp; + int height, clr; + uint32_t *rp, *hp; hp = NULL; /* XXX GCC */ @@ -1196,25 +1176,13 @@ rasops_erasecols(void *cookie, int row, height = ri->ri_font->fontheight; clr = ri->ri_devcmap[((uint32_t)attr >> 16) & 0xf]; - dp = buf; - - /* Write 4 bytes per loop */ - for (cnt = num >> 2; cnt; cnt--) - *dp++ = clr; - - /* Write unaligned trailing slop */ - for (cnt = num & 3; cnt; cnt--) { - *(uint8_t *)dp = clr; - DELTA(dp, 1, uint32_t *); - } - while (height--) { - memcpy(rp, buf, num); - DELTA(rp, ri->ri_stride, uint32_t *); + rasops_memset32(rp, clr, num); if (ri->ri_hwbits) { - memcpy(hp, buf, num); + memcpy(hp, rp, num); DELTA(hp, ri->ri_stride, uint32_t *); } + DELTA(rp, ri->ri_stride, uint32_t *); } } @@ -1689,15 +1657,3 @@ rasops_get_cmap(struct rasops_info *ri, memcpy(palette, rasops_cmap, uimin(bytes, sizeof(rasops_cmap))); return 0; } - -#ifndef RASOPS_SMALL -void -rasops_allocstamp(struct rasops_info *ri, size_t len) -{ - - KASSERT(ri->ri_stamp == NULL); - ri->ri_stamp_len = len; - ri->ri_stamp = kmem_zalloc(len, KM_SLEEP); - ri->ri_stamp_attr = 0; -} -#endif Index: src/sys/dev/rasops/rasops.h diff -u src/sys/dev/rasops/rasops.h:1.43 src/sys/dev/rasops/rasops.h:1.44 --- src/sys/dev/rasops/rasops.h:1.43 Sat Aug 3 06:29:52 2019 +++
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:47:33 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops.h rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c rasops_putchar_width.h Log Message: Stop allocating ri_buf and ri_stamp dynamically. As commented in rasops.h, it is not safe to use kmem_alloc(9) in rasops_init(); rasops routines can be used for early putchar, which means that UVM is not fully initialized. Should fix a problem reported by macallan: http://mail-index.netbsd.org/tech-kern/2019/08/02/msg025327.html Instead of using ri_buf, inline function rasops_memcpy32() is introduced to fill 32bit data efficiently. Instead of using ri_stamp (per device stamp), stamp_ri is introduced to distinguish for which device stamp is calculated. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.43 -r1.44 src/sys/dev/rasops/rasops.h cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.47 -r1.48 src/sys/dev/rasops/rasops8.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/rasops/rasops_putchar_width.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:13:20 UTC 2019 Modified Files: src/sys/dev/rasops: rasops1_putchar_width.h Log Message: Use "hp" instead of "hrp" consistently with other files. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/rasops/rasops1_putchar_width.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:13:20 UTC 2019 Modified Files: src/sys/dev/rasops: rasops1_putchar_width.h Log Message: Use "hp" instead of "hrp" consistently with other files. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/rasops/rasops1_putchar_width.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/rasops/rasops1_putchar_width.h diff -u src/sys/dev/rasops/rasops1_putchar_width.h:1.2 src/sys/dev/rasops/rasops1_putchar_width.h:1.3 --- src/sys/dev/rasops/rasops1_putchar_width.h:1.2 Mon Jul 29 17:22:19 2019 +++ src/sys/dev/rasops/rasops1_putchar_width.h Wed Aug 7 11:13:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops1_putchar_width.h,v 1.2 2019/07/29 17:22:19 rin Exp $ */ +/* $NetBSD: rasops1_putchar_width.h,v 1.3 2019/08/07 11:13:20 rin Exp $ */ /* NetBSD: rasops1.c,v 1.28 2019/07/25 03:02:44 rin Exp */ /*- @@ -44,7 +44,7 @@ #if RASOPS_WIDTH == 16 /* - * rp and hrp are always half-word aligned, whereas + * rp and hp are always half-word aligned, whereas * fr may not be aligned in half-word boundary. */ #define COPY_UNIT uint16_t @@ -65,9 +65,9 @@ PUTCHAR_WIDTH(RASOPS_WIDTH)(void *cookie struct wsdisplay_font *font = PICK_FONT(ri, uc); int height, fs, rs, bg, fg; uint8_t *fr; - COPY_UNIT *rp, *hrp, tmp; + COPY_UNIT *rp, *hp, tmp; - hrp = NULL; /* XXX GCC */ + hp = NULL; /* XXX GCC */ #ifdef RASOPS_CLIPPING /* Catches 'row < 0' case too */ @@ -81,7 +81,7 @@ PUTCHAR_WIDTH(RASOPS_WIDTH)(void *cookie rp = (COPY_UNIT *)(ri->ri_bits + row * ri->ri_yscale + col * sizeof(COPY_UNIT)); if (ri->ri_hwbits) - hrp = (COPY_UNIT *)(ri->ri_hwbits + row * ri->ri_yscale + + hp = (COPY_UNIT *)(ri->ri_hwbits + row * ri->ri_yscale + col * sizeof(COPY_UNIT)); height = font->fontheight; rs = ri->ri_stride; @@ -95,8 +95,8 @@ PUTCHAR_WIDTH(RASOPS_WIDTH)(void *cookie *rp = bg; DELTA(rp, rs, COPY_UNIT *); if (ri->ri_hwbits) { -*hrp = bg; -DELTA(hrp, rs, COPY_UNIT *); +*hp = bg; +DELTA(hp, rs, COPY_UNIT *); } } } else { @@ -110,8 +110,8 @@ PUTCHAR_WIDTH(RASOPS_WIDTH)(void *cookie *rp = tmp; DELTA(rp, rs, COPY_UNIT *); if (ri->ri_hwbits) { -*hrp = tmp; -DELTA(hrp, rs, COPY_UNIT *); +*hp = tmp; +DELTA(hp, rs, COPY_UNIT *); } fr += fs; } @@ -122,8 +122,8 @@ PUTCHAR_WIDTH(RASOPS_WIDTH)(void *cookie DELTA(rp, -(ri->ri_stride << 1), COPY_UNIT *); *rp = fg; if (ri->ri_hwbits) { - DELTA(hrp, -(ri->ri_stride << 1), COPY_UNIT *); - *hrp = fg; + DELTA(hp, -(ri->ri_stride << 1), COPY_UNIT *); + *hp = fg; } } }
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:08:44 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Simplify rasops_do_cursor(): - Use static masks similar to that used in rasops_bitops.h, rather than generating them on the fly. - Use pointer for proper type to avoid unnecessary casts. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:08:44 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Simplify rasops_do_cursor(): - Use static masks similar to that used in rasops_bitops.h, rather than generating them on the fly. - Use pointer for proper type to avoid unnecessary casts. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.113 src/sys/dev/rasops/rasops.c:1.114 --- src/sys/dev/rasops/rasops.c:1.113 Wed Aug 7 11:03:14 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 11:08:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.113 2019/08/07 11:03:14 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.114 2019/08/07 11:08:44 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.113 2019/08/07 11:03:14 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.114 2019/08/07 11:08:44 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1 #define _RASOPS_PRIVATE #include +#include /* XXX for MBE */ #ifndef _KERNEL #include @@ -72,6 +73,16 @@ struct rasops_matchdata { int ident; }; +static const uint32_t rasops_lmask32[4 + 1] = { + MBE(0x), MBE(0x00ff), MBE(0x), MBE(0x00ff), + MBE(0x), +}; + +static const uint32_t rasops_rmask32[4 + 1] = { + MBE(0x), MBE(0xff00), MBE(0x), MBE(0xff00), + MBE(0x), +}; + /* ANSI colormap (R,G,B). Upper 8 are high-intensity */ const uint8_t rasops_cmap[256 * 3] = { 0x00, 0x00, 0x00, /* black */ @@ -1055,9 +1066,8 @@ static void rasops_do_cursor(struct rasops_info *ri) { int full, height, cnt, slop1, slop2, row, col; - uint32_t tmp32, msk1, msk2; - uint8_t tmp8; - uint8_t *dp, *rp, *hp; + uint32_t mask1, mask2, *dp; + uint8_t tmp8, *rp, *hp; hp = NULL; /* XXX GCC */ @@ -1121,28 +1131,24 @@ rasops_do_cursor(struct rasops_info *ri) rp = (uint8_t *)((uintptr_t)rp & ~3); hp = (uint8_t *)((uintptr_t)hp & ~3); - msk1 = !slop1 ? 0 : be32toh(0xU >> (32 - (8 * slop1))); - msk2 = !slop2 ? 0 : be32toh(0xU << (32 - (8 * slop2))); + mask1 = rasops_lmask32[4 - slop1]; + mask2 = rasops_rmask32[slop2]; while (height--) { - dp = rp; + dp = (uint32_t *)rp; if (slop1) { - tmp32 = *(uint32_t *)dp ^ msk1; - *(uint32_t *)dp = tmp32; - dp += 4; + *dp = *dp ^ mask1; + dp++; } for (cnt = full; cnt; cnt--) { - tmp32 = ~*(uint32_t *)dp; - *(uint32_t *)dp = tmp32; - dp += 4; + *dp = ~*(uint32_t *)dp; + dp++; } - if (slop2) { - tmp32 = *(uint32_t *)dp ^ msk2; - *(uint32_t *)dp = tmp32; - } + if (slop2) + *dp = *dp ^ mask2; if (ri->ri_hwbits) { memcpy(hp, rp, ((slop1 != 0) + full +
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 11:03:14 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Fix a critical bug for rasops_copyrows() introduced in rev. 1.90: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.90 When src < dst, we have to copy backward. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:59:51 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Depth 2 is monochrome. IMO, it is impossible to support ANSI colors on 2-bpp display; fore- and background can be same value even if they are different colors logically. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:59:51 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Depth 2 is monochrome. IMO, it is impossible to support ANSI colors on 2-bpp display; fore- and background can be same value even if they are different colors logically. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.111 src/sys/dev/rasops/rasops.c:1.112 --- src/sys/dev/rasops/rasops.c:1.111 Wed Aug 7 10:55:51 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 10:59:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.111 2019/08/07 10:55:51 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.112 2019/08/07 10:59:51 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.111 2019/08/07 10:55:51 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.112 2019/08/07 10:59:51 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -484,10 +484,10 @@ rasops_reconfig(struct rasops_info *ri, WSSCREEN_WSCOLORS | WSSCREEN_REVERSE); if ((ri->ri_flg & RI_FORCEMONO) != 0 || -#ifdef RASOPS_APPLE_PALETTE - ri->ri_depth == 1 -#else +#ifndef RASOPS_APPLE_PALETTE ri->ri_depth < 8 +#else + ri->ri_depth < 4 #endif ) { ri->ri_ops.allocattr = rasops_allocattr_mono;
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:55:51 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Fix black color-attribution for depths 2 and 4. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:55:51 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Fix black color-attribution for depths 2 and 4. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.110 src/sys/dev/rasops/rasops.c:1.111 --- src/sys/dev/rasops/rasops.c:1.110 Wed Aug 7 10:53:41 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 10:55:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.110 2019/08/07 10:53:41 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.111 2019/08/07 10:55:51 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.110 2019/08/07 10:53:41 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.111 2019/08/07 10:55:51 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -673,7 +673,7 @@ rasops_allocattr_mono(void *cookie, int if ((flg & (WSATTR_BLINK | WSATTR_HILIT | WSATTR_WSCOLORS)) != 0) return EINVAL; - fg = 1; + fg = 0xff; bg = 0; if ((flg & WSATTR_REVERSE) != 0) {
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:53:41 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Simplify calculation for 12-byte alignment. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.109 src/sys/dev/rasops/rasops.c:1.110 --- src/sys/dev/rasops/rasops.c:1.109 Wed Aug 7 10:51:57 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 10:53:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.109 2019/08/07 10:51:57 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.110 2019/08/07 10:53:41 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.109 2019/08/07 10:51:57 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.110 2019/08/07 10:53:41 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -446,9 +446,9 @@ rasops_reconfig(struct rasops_info *ri, xoff &= ~3; } else { /* - * Truncate to word and 24-bit color boundary. + * Truncate to both word and 24-bit color boundary. */ - xoff = (xoff / (4 * 3)) * (4 * 3); + xoff -= xoff % 12; } yoff = ((ri->ri_height - ri->ri_emuheight) >> 1) *
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:53:41 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Simplify calculation for 12-byte alignment. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:51:57 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Use _KERNEL_OPT. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Aug 7 10:51:57 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Use _KERNEL_OPT. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.108 src/sys/dev/rasops/rasops.c:1.109 --- src/sys/dev/rasops/rasops.c:1.108 Fri Aug 2 23:24:37 2019 +++ src/sys/dev/rasops/rasops.c Wed Aug 7 10:51:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.108 2019/08/02 23:24:37 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.109 2019/08/07 10:51:57 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,11 +30,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.108 2019/08/02 23:24:37 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.109 2019/08/07 10:51:57 rin Exp $"); +#ifdef _KERNEL_OPT #include "opt_rasops.h" -#include "rasops_glue.h" #include "opt_wsmsgattrs.h" +#endif + +#include "rasops_glue.h" #include #include
CVS commit: src/sys/dev
Module Name:src Committed By: maxv Date: Wed Aug 7 10:36:19 UTC 2019 Modified Files: src/sys/dev: fss.c Log Message: Check fc_type before fc_cluster, because the latter may not be initialized. This is harmless because fc_type is always initialized properly, so the next branch wouldn't have been taken. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/dev/fss.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/fss.c diff -u src/sys/dev/fss.c:1.107 src/sys/dev/fss.c:1.108 --- src/sys/dev/fss.c:1.107 Wed Feb 20 10:03:25 2019 +++ src/sys/dev/fss.c Wed Aug 7 10:36:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.107 2019/02/20 10:03:25 hannken Exp $ */ +/* $NetBSD: fss.c,v 1.108 2019/08/07 10:36:19 maxv Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.107 2019/02/20 10:03:25 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.108 2019/08/07 10:36:19 maxv Exp $"); #include #include @@ -992,16 +992,19 @@ restart: return 0; } - for (scp = sc->sc_cache; scp < scl; scp++) - if (scp->fc_cluster == cl) { - if (scp->fc_type == FSS_CACHE_VALID) { + for (scp = sc->sc_cache; scp < scl; scp++) { + if (scp->fc_type == FSS_CACHE_VALID) { + if (scp->fc_cluster == cl) { mutex_exit(>sc_slock); return 0; - } else if (scp->fc_type == FSS_CACHE_BUSY) { + } + } else if (scp->fc_type == FSS_CACHE_BUSY) { + if (scp->fc_cluster == cl) { cv_wait(>fc_state_cv, >sc_slock); goto restart; } } + } for (scp = sc->sc_cache; scp < scl; scp++) if (scp->fc_type == FSS_CACHE_FREE) {
CVS commit: src/sys/dev
Module Name:src Committed By: maxv Date: Wed Aug 7 10:36:19 UTC 2019 Modified Files: src/sys/dev: fss.c Log Message: Check fc_type before fc_cluster, because the latter may not be initialized. This is harmless because fc_type is always initialized properly, so the next branch wouldn't have been taken. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/dev/fss.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Wed Aug 7 10:20:44 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #26 and #27 To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Wed Aug 7 10:19:55 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: trap.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #27): sys/arch/aarch64/aarch64/trap.c: revision 1.18 trap_el0_32sync: add missing break to ESR_EC_FP_TRAP_A32 case To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/arch/aarch64/aarch64/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Wed Aug 7 10:19:55 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: trap.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #27): sys/arch/aarch64/aarch64/trap.c: revision 1.18 trap_el0_32sync: add missing break to ESR_EC_FP_TRAP_A32 case To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/arch/aarch64/aarch64/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/trap.c diff -u src/sys/arch/aarch64/aarch64/trap.c:1.17 src/sys/arch/aarch64/aarch64/trap.c:1.17.4.1 --- src/sys/arch/aarch64/aarch64/trap.c:1.17 Sat Apr 6 03:06:24 2019 +++ src/sys/arch/aarch64/aarch64/trap.c Wed Aug 7 10:19:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.17 2019/04/06 03:06:24 thorpej Exp $ */ +/* $NetBSD: trap.c,v 1.17.4.1 2019/08/07 10:19:54 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.17 2019/04/06 03:06:24 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.17.4.1 2019/08/07 10:19:54 martin Exp $"); #include "opt_arm_intr_impl.h" #include "opt_compat_netbsd32.h" @@ -355,6 +355,7 @@ trap_el0_32sync(struct trapframe *tf) case ESR_EC_FP_TRAP_A32: do_trapsignal(l, SIGFPE, FPE_FLTUND, NULL, esr); /* XXX */ userret(l); + break; case ESR_EC_PC_ALIGNMENT: do_trapsignal(l, SIGBUS, BUS_ADRALN, (void *)tf->tf_pc, esr);
CVS commit: [netbsd-9] src/etc
Module Name:src Committed By: martin Date: Wed Aug 7 10:18:13 UTC 2019 Modified Files: src/etc [netbsd-9]: Makefile Log Message: Pull up following revision(s) (requested by hannken in ticket #26): etc/Makefile: revision 1.439 PR kern/53590: remove -U DEBUG from config(1) invocation (that is: revert r1.413). DTrace needs the full symbol information. To generate a diff of this commit: cvs rdiff -u -r1.438 -r1.438.2.1 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.438 src/etc/Makefile:1.438.2.1 --- src/etc/Makefile:1.438 Sat Jan 12 17:25:09 2019 +++ src/etc/Makefile Wed Aug 7 10:18:13 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.438 2019/01/12 17:25:09 roy Exp $ +# $NetBSD: Makefile,v 1.438.2.1 2019/08/07 10:18:13 martin Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -590,7 +590,7 @@ build_kernels: .PHONY build_kernels: kern-${configfile} kern-${configfile}: .PHONY .MAKE cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \ - -U DEBUG -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} + -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} .if ${MKUPDATE} == "no" ${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} distclean .endif
CVS commit: [netbsd-9] src/etc
Module Name:src Committed By: martin Date: Wed Aug 7 10:18:13 UTC 2019 Modified Files: src/etc [netbsd-9]: Makefile Log Message: Pull up following revision(s) (requested by hannken in ticket #26): etc/Makefile: revision 1.439 PR kern/53590: remove -U DEBUG from config(1) invocation (that is: revert r1.413). DTrace needs the full symbol information. To generate a diff of this commit: cvs rdiff -u -r1.438 -r1.438.2.1 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Wed Aug 7 10:12:32 UTC 2019 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: When creating the /etc/fstab for new installs, the sense of the "noauto" flag was inverted (editor mishap?) To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.47 src/usr.sbin/sysinst/disks.c:1.48 --- src/usr.sbin/sysinst/disks.c:1.47 Wed Aug 7 10:08:04 2019 +++ src/usr.sbin/sysinst/disks.c Wed Aug 7 10:12:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.47 2019/08/07 10:08:04 martin Exp $ */ +/* $NetBSD: disks.c,v 1.48 2019/08/07 10:12:32 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1352,7 +1352,7 @@ make_fstab(struct install_partition_desc "%s%s\t\t%s\t%s\trw%s%s%s%s%s%s%s%s\t\t %d %d\n", s, dev, mp, fstype, ptn->mountflags & PUIMNT_LOG ? ",log" : "", - ptn->mountflags & PUIMNT_NOAUTO ? "" : ",noauto", + ptn->mountflags & PUIMNT_NOAUTO ? ",noauto" : "", ptn->mountflags & PUIMNT_ASYNC ? ",async" : "", ptn->mountflags & PUIMNT_NOATIME ? ",noatime" : "", ptn->mountflags & PUIMNT_NODEV ? ",nodev" : "",
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Wed Aug 7 10:12:32 UTC 2019 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: When creating the /etc/fstab for new installs, the sense of the "noauto" flag was inverted (editor mishap?) To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netipsec
Module Name:src Committed By: knakahara Date: Wed Aug 7 10:10:00 UTC 2019 Modified Files: src/sys/netipsec: ipsec.c Log Message: ipsec_getpolicybysock() should also call key_havesp() like ipsec_getpolicybyaddr(). That can reduce KEYDEBUG messages. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/sys/netipsec/ipsec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netipsec
Module Name:src Committed By: knakahara Date: Wed Aug 7 10:10:00 UTC 2019 Modified Files: src/sys/netipsec: ipsec.c Log Message: ipsec_getpolicybysock() should also call key_havesp() like ipsec_getpolicybyaddr(). That can reduce KEYDEBUG messages. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/sys/netipsec/ipsec.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.169 src/sys/netipsec/ipsec.c:1.170 --- src/sys/netipsec/ipsec.c:1.169 Tue Jul 9 16:56:24 2019 +++ src/sys/netipsec/ipsec.c Wed Aug 7 10:10:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.169 2019/07/09 16:56:24 maxv Exp $ */ +/* $NetBSD: ipsec.c,v 1.170 2019/08/07 10:10:00 knakahara Exp $ */ /* $FreeBSD: ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.169 2019/07/09 16:56:24 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.170 2019/08/07 10:10:00 knakahara Exp $"); /* * IPsec controller part. @@ -466,7 +466,10 @@ ipsec_getpolicybysock(struct mbuf *m, u_ case IPSEC_POLICY_ENTRUST: /* look for a policy in SPD */ - sp = KEY_LOOKUP_SP_BYSPIDX(>spidx, dir); + if (key_havesp(dir)) +sp = KEY_LOOKUP_SP_BYSPIDX(>spidx, dir); + else +sp = NULL; if (sp == NULL) /* no SP found */ sp = KEY_GET_DEFAULT_SP(af); break; @@ -478,7 +481,10 @@ ipsec_getpolicybysock(struct mbuf *m, u_ return NULL; } } else {/* unpriv, SPD has policy */ - sp = KEY_LOOKUP_SP_BYSPIDX(>spidx, dir); + if (key_havesp(dir)) + sp = KEY_LOOKUP_SP_BYSPIDX(>spidx, dir); + else + sp = NULL; if (sp == NULL) { /* no SP found */ switch (currsp->policy) { case IPSEC_POLICY_BYPASS:
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Wed Aug 7 10:08:04 UTC 2019 Modified Files: src/usr.sbin/sysinst: defs.h disklabel.c disks.c gpt.c partitions.h target.c txtwalk.c txtwalk.h src/usr.sbin/sysinst/arch/ews4800mips: md.h Log Message: Support upgrade of systems using NAME= syntax in /etc/fstab. Make supported file system types dynamic - instead of hardcoding the available types at compile time, check for available newfs_* helper binaries in the actual install environment at runtime. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/partitions.h cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/target.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/txtwalk.c \ src/usr.sbin/sysinst/txtwalk.h cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/ews4800mips/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Wed Aug 7 10:08:04 UTC 2019 Modified Files: src/usr.sbin/sysinst: defs.h disklabel.c disks.c gpt.c partitions.h target.c txtwalk.c txtwalk.h src/usr.sbin/sysinst/arch/ews4800mips: md.h Log Message: Support upgrade of systems using NAME= syntax in /etc/fstab. Make supported file system types dynamic - instead of hardcoding the available types at compile time, check for available newfs_* helper binaries in the actual install environment at runtime. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/partitions.h cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/target.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/txtwalk.c \ src/usr.sbin/sysinst/txtwalk.h cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/ews4800mips/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.42 src/usr.sbin/sysinst/defs.h:1.43 --- src/usr.sbin/sysinst/defs.h:1.42 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/defs.h Wed Aug 7 10:08:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.42 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: defs.h,v 1.43 2019/08/07 10:08:04 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -806,6 +806,7 @@ int target_file_exists_p(const char *); int target_symlink_exists_p(const char *); void unwind_mounts(void); int target_mounted(void); +void umount_root(void); /* from partman.c */ #ifndef NO_PARTMAN Index: src/usr.sbin/sysinst/disklabel.c diff -u src/usr.sbin/sysinst/disklabel.c:1.10 src/usr.sbin/sysinst/disklabel.c:1.11 --- src/usr.sbin/sysinst/disklabel.c:1.10 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/disklabel.c Wed Aug 7 10:08:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.c,v 1.10 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: disklabel.c,v 1.11 2019/08/07 10:08:04 martin Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -1016,6 +1016,32 @@ disklabel_get_alignment(const struct dis return parts->ptn_alignment; } +static part_id +disklabel_find_by_name(struct disk_partitions *arg, const char *name) +{ + const struct disklabel_disk_partitions *parts = + (const struct disklabel_disk_partitions*)arg; + char *sl, part; + ptrdiff_t n; + part_id pno; + + sl = strrchr(name, '/'); + if (sl == NULL) + return NO_PART; + n = sl - name; + if (strncmp(name, parts->l.d_packname, n) != 0) + return NO_PART; + part = name[n+1]; + if (part < 'a') + return NO_PART; + pno = part - 'a'; + if (pno >= parts->l.d_npartitions) + return NO_PART; + if (parts->l.d_partitions[pno].p_fstype == FS_UNUSED) + return NO_PART; + return pno; +} + static void disklabel_free(struct disk_partitions *arg) { @@ -1034,6 +1060,7 @@ disklabel_parts = { .read_from_disk = disklabel_parts_read, .create_new_for_disk = disklabel_parts_new, .change_disk_geom = disklabel_change_geom, + .find_by_name = disklabel_find_by_name, .get_disk_pack_name = disklabel_get_disk_pack_name, .set_disk_pack_name = disklabel_set_disk_pack_name, .delete_all_partitions = disklabel_delete_all, Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.46 src/usr.sbin/sysinst/disks.c:1.47 --- src/usr.sbin/sysinst/disks.c:1.46 Sat Aug 3 12:09:22 2019 +++ src/usr.sbin/sysinst/disks.c Wed Aug 7 10:08:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.46 2019/08/03 12:09:22 martin Exp $ */ +/* $NetBSD: disks.c,v 1.47 2019/08/07 10:08:04 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -80,13 +81,22 @@ struct disk_desc { daddr_t dd_totsec; }; -static const char name_prefix[] = "NAME="; +#define NAME_PREFIX "NAME=" +static const char name_prefix[] = NAME_PREFIX; + +/* things we could have as /sbin/newfs_* and /sbin/fsck_* */ +static const char *extern_fs_with_chk[] = { + "ext2fs", "lfs", "msdos", "v7fs" +}; + +/* things we could have as /sbin/newfs_* but not /sbin/fsck_* */ +static const char *extern_fs_newfs_only[] = { + "sysvbfs", "udf" +}; /* Local prototypes */ -static int foundffs(struct data *, size_t); -#ifdef USE_SYSVBFS -static int foundsysvbfs(struct data *, size_t); -#endif +static int found_fs(struct data *, size_t, const struct lookfor*); +static int found_fs_nocheck(struct data *, size_t, const struct lookfor*); static int fsck_preen(const char *, const char *, bool silent); static void fixsb(const char *, const char *); @@ -1153,20 +1163,16 @@ make_filesystems(struct install_partitio mnt_opts = "-tmsdos"; fsname = "msdos";
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maya Date: Wed Aug 7 10:01:05 UTC 2019 Modified Files: src/sys/dev/usb: usbnet.c Log Message: Don't tell userland about ENETRESET even if a usbnet driver didn't define un_ioctl_cb. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/usbnet.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/usbnet.c diff -u src/sys/dev/usb/usbnet.c:1.8 src/sys/dev/usb/usbnet.c:1.9 --- src/sys/dev/usb/usbnet.c:1.8 Wed Aug 7 01:47:18 2019 +++ src/sys/dev/usb/usbnet.c Wed Aug 7 10:01:05 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usbnet.c,v 1.8 2019/08/07 01:47:18 mrg Exp $ */ +/* $NetBSD: usbnet.c,v 1.9 2019/08/07 10:01:05 maya Exp $ */ /* * Copyright (c) 2019 Matthew R. Green @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.8 2019/08/07 01:47:18 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.9 2019/08/07 10:01:05 maya Exp $"); #include #include @@ -817,8 +817,12 @@ usbnet_ioctl(struct ifnet *ifp, u_long c return (*un->un_override_ioctl_cb)(ifp, cmd, data); error = ether_ioctl(ifp, cmd, data); - if (error == ENETRESET && un->un_ioctl_cb) - error = (*un->un_ioctl_cb)(ifp, cmd, data); + if (error == ENETRESET) { + if (un->un_ioctl_cb) + error = (*un->un_ioctl_cb)(ifp, cmd, data); + else + error = 0; + } return error; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maya Date: Wed Aug 7 10:01:05 UTC 2019 Modified Files: src/sys/dev/usb: usbnet.c Log Message: Don't tell userland about ENETRESET even if a usbnet driver didn't define un_ioctl_cb. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/usbnet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: jmcneill Date: Wed Aug 7 09:49:40 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: trap.c Log Message: trap_el0_32sync: add missing break to ESR_EC_FP_TRAP_A32 case To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: jmcneill Date: Wed Aug 7 09:49:40 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: trap.c Log Message: trap_el0_32sync: add missing break to ESR_EC_FP_TRAP_A32 case To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/trap.c diff -u src/sys/arch/aarch64/aarch64/trap.c:1.17 src/sys/arch/aarch64/aarch64/trap.c:1.18 --- src/sys/arch/aarch64/aarch64/trap.c:1.17 Sat Apr 6 03:06:24 2019 +++ src/sys/arch/aarch64/aarch64/trap.c Wed Aug 7 09:49:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.17 2019/04/06 03:06:24 thorpej Exp $ */ +/* $NetBSD: trap.c,v 1.18 2019/08/07 09:49:40 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.17 2019/04/06 03:06:24 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.18 2019/08/07 09:49:40 jmcneill Exp $"); #include "opt_arm_intr_impl.h" #include "opt_compat_netbsd32.h" @@ -355,6 +355,7 @@ trap_el0_32sync(struct trapframe *tf) case ESR_EC_FP_TRAP_A32: do_trapsignal(l, SIGFPE, FPE_FLTUND, NULL, esr); /* XXX */ userret(l); + break; case ESR_EC_PC_ALIGNMENT: do_trapsignal(l, SIGBUS, BUS_ADRALN, (void *)tf->tf_pc, esr);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maxv Date: Wed Aug 7 08:47:09 UTC 2019 Modified Files: src/sys/dev/usb: usb.h usb_subr.c Log Message: Introduce USB_DESCRIPTOR_SIZE (3), and fix two bugs: 1) In usbd_find_idesc(), make sure the tables we're reading fit in the allocated buffer, otherwise small overflow (seen on KASAN, with bLength=1). 2) Modify usbd_find_edesc(), to fix the same issues as 1). ok mrg@ To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/dev/usb/usb.h cvs rdiff -u -r1.236 -r1.237 src/sys/dev/usb/usb_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usb.h diff -u src/sys/dev/usb/usb.h:1.116 src/sys/dev/usb/usb.h:1.117 --- src/sys/dev/usb/usb.h:1.116 Tue Jul 31 16:44:30 2018 +++ src/sys/dev/usb/usb.h Wed Aug 7 08:47:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.h,v 1.116 2018/07/31 16:44:30 khorben Exp $ */ +/* $NetBSD: usb.h,v 1.117 2019/08/07 08:47:09 maxv Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -207,6 +207,7 @@ typedef struct { uByte bDescriptorType; uByte bDescriptorSubtype; } UPACKED usb_descriptor_t; +#define USB_DESCRIPTOR_SIZE 3 typedef struct { uByte bLength; Index: src/sys/dev/usb/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.236 src/sys/dev/usb/usb_subr.c:1.237 --- src/sys/dev/usb/usb_subr.c:1.236 Wed Jul 31 19:40:59 2019 +++ src/sys/dev/usb/usb_subr.c Wed Aug 7 08:47:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.236 2019/07/31 19:40:59 maxv Exp $ */ +/* $NetBSD: usb_subr.c,v 1.237 2019/08/07 08:47:09 maxv Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.236 2019/07/31 19:40:59 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.237 2019/08/07 08:47:09 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -359,29 +359,41 @@ usbd_find_idesc(usb_config_descriptor_t USBHIST_FUNC(); USBHIST_CALLED(usbdebug); char *p = (char *)cd; char *end = p + UGETW(cd->wTotalLength); - usb_interface_descriptor_t *d; + usb_descriptor_t *desc; + usb_interface_descriptor_t *idesc; int curidx, lastidx, curaidx = 0; for (curidx = lastidx = -1; p < end; ) { - d = (usb_interface_descriptor_t *)p; + desc = (usb_descriptor_t *)p; + DPRINTFN(4, "idx=%jd(%jd) altidx=%jd(%jd)", ifaceidx, curidx, altidx, curaidx); - DPRINTFN(4, "len=%jd type=%jd", d->bLength, d->bDescriptorType, - 0, 0); - if (d->bLength == 0) - break; /* bad descriptor */ - p += d->bLength; - if (p <= end && d->bDescriptorType == UDESC_INTERFACE) { - if (d->bInterfaceNumber != lastidx) { -lastidx = d->bInterfaceNumber; -curidx++; -curaidx = 0; - } else -curaidx++; - if (ifaceidx == curidx && altidx == curaidx) -return d; + DPRINTFN(4, "len=%jd type=%jd", desc->bLength, + desc->bDescriptorType, 0, 0); + + if (desc->bLength < USB_DESCRIPTOR_SIZE) + break; + p += desc->bLength; + if (p > end) + break; + + if (desc->bDescriptorType != UDESC_INTERFACE) + continue; + idesc = (usb_interface_descriptor_t *)desc; + if (idesc->bLength < USB_INTERFACE_DESCRIPTOR_SIZE) + break; + + if (idesc->bInterfaceNumber != lastidx) { + lastidx = idesc->bInterfaceNumber; + curidx++; + curaidx = 0; + } else { + curaidx++; } + if (ifaceidx == curidx && altidx == curaidx) + return idesc; } + return NULL; } @@ -391,29 +403,39 @@ usbd_find_edesc(usb_config_descriptor_t { char *p = (char *)cd; char *end = p + UGETW(cd->wTotalLength); - usb_interface_descriptor_t *d; - usb_endpoint_descriptor_t *e; + usb_interface_descriptor_t *idesc; + usb_endpoint_descriptor_t *edesc; + usb_descriptor_t *desc; int curidx; - d = usbd_find_idesc(cd, ifaceidx, altidx); - if (d == NULL) + idesc = usbd_find_idesc(cd, ifaceidx, altidx); + if (idesc == NULL) return NULL; - if (endptidx >= d->bNumEndpoints) /* quick exit */ + if (endptidx >= idesc->bNumEndpoints) /* quick exit */ return NULL; curidx = -1; - for (p = (char *)d + d->bLength; p < end; ) { - e = (usb_endpoint_descriptor_t *)p; - if (e->bLength == 0) - break; /* bad descriptor */ - p += e->bLength; - if (p <= end && e->bDescriptorType == UDESC_INTERFACE) - return NULL; - if (p <= end && e->bDescriptorType == UDESC_ENDPOINT) { - curidx++; - if (curidx == endptidx) -return e; - } + for (p = (char *)idesc + idesc->bLength; p < end; ) { + desc = (usb_descriptor_t *)p; + + if (desc->bLength < USB_DESCRIPTOR_SIZE) + break; + p += desc->bLength; + if (p > end) + break; + + if (desc->bDescriptorType == UDESC_INTERFACE) + break; + if (desc->bDescriptorType != UDESC_ENDPOINT) + continue; + + edesc = (usb_endpoint_descriptor_t *)desc; + if (edesc->bLength < USB_ENDPOINT_DESCRIPTOR_SIZE) + break; + + curidx++; + if (curidx ==
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maxv Date: Wed Aug 7 08:47:09 UTC 2019 Modified Files: src/sys/dev/usb: usb.h usb_subr.c Log Message: Introduce USB_DESCRIPTOR_SIZE (3), and fix two bugs: 1) In usbd_find_idesc(), make sure the tables we're reading fit in the allocated buffer, otherwise small overflow (seen on KASAN, with bLength=1). 2) Modify usbd_find_edesc(), to fix the same issues as 1). ok mrg@ To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/dev/usb/usb.h cvs rdiff -u -r1.236 -r1.237 src/sys/dev/usb/usb_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Wed Aug 7 08:29:46 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #24 and #25 To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.7 src/doc/CHANGES-9.0:1.1.2.8 --- src/doc/CHANGES-9.0:1.1.2.7 Tue Aug 6 16:24:59 2019 +++ src/doc/CHANGES-9.0 Wed Aug 7 08:29:46 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.7 2019/08/06 16:24:59 martin Exp $ +# $NetBSD: CHANGES-9.0,v 1.1.2.8 2019/08/07 08:29:46 martin Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -293,4 +293,19 @@ sys/sys/event.h 1.33 Make EV_SET() casts compatible with the C++ code. [kamil, ticket #22] +bin/ps/keyword.c1.57 +bin/ps/ps.1 1.110 + + Restore maxrss, idrss, isrss, ixrss printing in ps(1) + [kamil, ticket #24] + +sys/net/npf/npf.c1.39 +sys/net/npf/npf_conn.c1.28,1.29 +sys/net/npf/npf_conn.h1.17 + + - Introduce an npf_conn_destroy_idx() that can handle partially + constructed conn structures. + - npf_conn_init(): fix a race when initialising the G/C thread. + - Fix a bug when partially initialised connection is destroyed on error. + [rmind, ticket #25]
CVS commit: [netbsd-9] src/sys/net/npf
Module Name:src Committed By: martin Date: Wed Aug 7 08:28:37 UTC 2019 Modified Files: src/sys/net/npf [netbsd-9]: npf.c npf_conn.c npf_conn.h Log Message: Pull up following revision(s) (requested by rmind in ticket #25): sys/net/npf/npf_conn.h: revision 1.17 sys/net/npf/npf.c: revision 1.39 sys/net/npf/npf_conn.c: revision 1.28 sys/net/npf/npf_conn.c: revision 1.29 Introduce an npf_conn_destroy_idx() that can handle partially constructed conn structures. - npf_conn_init(): fix a race when initialising the G/C thread. - Fix a bug when partially initialised connection is destroyed on error. (from rmind@) To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.2.1 src/sys/net/npf/npf.c cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/net/npf/npf_conn.c cvs rdiff -u -r1.16 -r1.16.2.1 src/sys/net/npf/npf_conn.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/net/npf/npf.c diff -u src/sys/net/npf/npf.c:1.38 src/sys/net/npf/npf.c:1.38.2.1 --- src/sys/net/npf/npf.c:1.38 Tue Jul 23 00:52:01 2019 +++ src/sys/net/npf/npf.c Wed Aug 7 08:28:37 2019 @@ -33,7 +33,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.38 2019/07/23 00:52:01 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.38.2.1 2019/08/07 08:28:37 martin Exp $"); #include #include @@ -79,13 +79,17 @@ npf_create(int flags, const npf_mbufops_ npf_param_init(npf); npf_state_sysinit(npf); npf_ifmap_init(npf, ifops); - npf_conn_init(npf, flags); + npf_conn_init(npf); npf_portmap_init(npf); npf_alg_init(npf); npf_ext_init(npf); /* Load an empty configuration. */ npf_config_init(npf); + + if ((flags & NPF_NO_GC) == 0) { + npf_worker_register(npf, npf_conn_worker); + } return npf; } Index: src/sys/net/npf/npf_conn.c diff -u src/sys/net/npf/npf_conn.c:1.27 src/sys/net/npf/npf_conn.c:1.27.2.1 --- src/sys/net/npf/npf_conn.c:1.27 Tue Jul 23 00:52:01 2019 +++ src/sys/net/npf/npf_conn.c Wed Aug 7 08:28:37 2019 @@ -107,7 +107,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.27 2019/07/23 00:52:01 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.27.2.1 2019/08/07 08:28:37 martin Exp $"); #include #include @@ -149,7 +149,7 @@ static nvlist_t *npf_conn_export(npf_t * */ void -npf_conn_init(npf_t *npf, int flags) +npf_conn_init(npf_t *npf) { npf->conn_cache[0] = pool_cache_init( offsetof(npf_conn_t, c_keys[NPF_CONNKEY_V4WORDS * 2]), @@ -161,10 +161,6 @@ npf_conn_init(npf_t *npf, int flags) mutex_init(>conn_lock, MUTEX_DEFAULT, IPL_NONE); npf->conn_tracking = CONN_TRACKING_OFF; npf->conn_db = npf_conndb_create(); - - if ((flags & NPF_NO_GC) == 0) { - npf_worker_register(npf, npf_conn_worker); - } npf_conndb_sysinit(npf); } @@ -429,6 +425,7 @@ npf_conn_establish(npf_cache_t *npc, int con->c_proto = npc->npc_proto; CTASSERT(sizeof(con->c_proto) >= sizeof(npc->npc_proto)); + con->c_alen = alen; /* Initialize the protocol state. */ if (!npf_state_init(npc, >c_state)) { @@ -499,9 +496,7 @@ err: void npf_conn_destroy(npf_t *npf, npf_conn_t *con) { - const npf_connkey_t *key = npf_conn_getforwkey(con); - const unsigned alen = NPF_CONNKEY_ALEN(key); - const unsigned idx __unused = NPF_CONNCACHE(alen); + const unsigned idx __unused = NPF_CONNCACHE(con->c_alen); KASSERT(con->c_refcnt == 0); @@ -794,6 +789,7 @@ npf_conn_export(npf_t *npf, npf_conn_t * fw = npf_conn_getforwkey(con); alen = NPF_CONNKEY_ALEN(fw); + KASSERT(alen == con->c_alen); bk = npf_conn_getbackkey(con, alen); kdict = npf_connkey_export(fw); Index: src/sys/net/npf/npf_conn.h diff -u src/sys/net/npf/npf_conn.h:1.16 src/sys/net/npf/npf_conn.h:1.16.2.1 --- src/sys/net/npf/npf_conn.h:1.16 Tue Jul 23 00:52:01 2019 +++ src/sys/net/npf/npf_conn.h Wed Aug 7 08:28:37 2019 @@ -50,7 +50,8 @@ struct npf_conn { * Protocol, address length, the interface ID (if zero, * then the state is global) and connection flags. */ - unsigned c_proto; + uint16_t c_proto; + uint16_t c_alen; unsigned c_ifid; unsigned c_flags; @@ -123,7 +124,7 @@ void npf_connkey_print(const npf_connke /* * Connection tracking interface. */ -void npf_conn_init(npf_t *, int); +void npf_conn_init(npf_t *); void npf_conn_fini(npf_t *); void npf_conn_tracking(npf_t *, bool); void npf_conn_load(npf_t *, npf_conndb_t *, bool);
CVS commit: [netbsd-9] src/sys/net/npf
Module Name:src Committed By: martin Date: Wed Aug 7 08:28:37 UTC 2019 Modified Files: src/sys/net/npf [netbsd-9]: npf.c npf_conn.c npf_conn.h Log Message: Pull up following revision(s) (requested by rmind in ticket #25): sys/net/npf/npf_conn.h: revision 1.17 sys/net/npf/npf.c: revision 1.39 sys/net/npf/npf_conn.c: revision 1.28 sys/net/npf/npf_conn.c: revision 1.29 Introduce an npf_conn_destroy_idx() that can handle partially constructed conn structures. - npf_conn_init(): fix a race when initialising the G/C thread. - Fix a bug when partially initialised connection is destroyed on error. (from rmind@) To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.2.1 src/sys/net/npf/npf.c cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/net/npf/npf_conn.c cvs rdiff -u -r1.16 -r1.16.2.1 src/sys/net/npf/npf_conn.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/bin/ps
Module Name:src Committed By: martin Date: Wed Aug 7 08:25:32 UTC 2019 Modified Files: src/bin/ps [netbsd-9]: keyword.c ps.1 Log Message: Pull up following revision(s) (requested by kamil in ticket #24): bin/ps/ps.1: revision 1.110 bin/ps/keyword.c: revision 1.57 Restore maxrss, idrss, isrss, ixrss printing in ps(1) The RSS related statistics are now back in the NetBSD kernel. These values were disabled since day0 until today. libkvm(3) users will still receive inappropriate values as RSS statistics= are updated upon sysctl(3) call. Patch submitted by To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.56.4.1 src/bin/ps/keyword.c cvs rdiff -u -r1.109 -r1.109.6.1 src/bin/ps/ps.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/bin/ps
Module Name:src Committed By: martin Date: Wed Aug 7 08:25:32 UTC 2019 Modified Files: src/bin/ps [netbsd-9]: keyword.c ps.1 Log Message: Pull up following revision(s) (requested by kamil in ticket #24): bin/ps/ps.1: revision 1.110 bin/ps/keyword.c: revision 1.57 Restore maxrss, idrss, isrss, ixrss printing in ps(1) The RSS related statistics are now back in the NetBSD kernel. These values were disabled since day0 until today. libkvm(3) users will still receive inappropriate values as RSS statistics= are updated upon sysctl(3) call. Patch submitted by To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.56.4.1 src/bin/ps/keyword.c cvs rdiff -u -r1.109 -r1.109.6.1 src/bin/ps/ps.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ps/keyword.c diff -u src/bin/ps/keyword.c:1.56 src/bin/ps/keyword.c:1.56.4.1 --- src/bin/ps/keyword.c:1.56 Wed Apr 11 18:52:05 2018 +++ src/bin/ps/keyword.c Wed Aug 7 08:25:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: keyword.c,v 1.56 2018/04/11 18:52:05 christos Exp $ */ +/* $NetBSD: keyword.c,v 1.56.4.1 2019/08/07 08:25:32 martin Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: keyword.c,v 1.56 2018/04/11 18:52:05 christos Exp $"); +__RCSID("$NetBSD: keyword.c,v 1.56.4.1 2019/08/07 08:25:32 martin Exp $"); #endif #endif /* not lint */ @@ -60,13 +60,6 @@ __RCSID("$NetBSD: keyword.c,v 1.56 2018/ static VAR *findvar(const char *); static int vcmp(const void *, const void *); -#if 0 /* kernel doesn't calculate these */ - PUVAR("idrss", "IDRSS", 0, p_uru_idrss, UINT64, PRIu64), - PUVAR("isrss", "ISRSS", 0, p_uru_isrss, UINT64, PRId64), - PUVAR("ixrss", "IXRSS", 0, p_uru_ixrss, UINT64, PRId64), - PUVAR("maxrss", "MAXRSS", 0, p_uru_maxrss, UINT64, PRIu64), -#endif - /* Compute offset in common structures. */ #define POFF(x) offsetof(struct kinfo_proc2, x) #define LOFF(x) offsetof(struct kinfo_lwp, x) @@ -135,9 +128,12 @@ VAR var[] = { VAR4("groups", "GROUPS", LJUST, groups), /* holdcnt: unused, left for compat. */ LVAR("holdcnt", "HOLDCNT", 0, l_holdcnt, INT, "d"), + PUVAR("idrss", "IDRSS", 0, p_uru_idrss, UINT64, PRIu64), VAR3("ignored", "sigignore", ALIAS), PUVAR("inblk", "INBLK", 0, p_uru_inblock, UINT64, PRIu64), VAR3("inblock", "inblk", ALIAS), + PUVAR("isrss", "ISRSS", 0, p_uru_isrss, UINT64, PRId64), + PUVAR("ixrss", "IXRSS", 0, p_uru_ixrss, UINT64, PRId64), PVAR("jobc", "JOBC", 0, p_jobc, SHORT, "d"), PVAR("ktrace", "KTRACE", 0, p_traceflag, INT, "x"), /*XXX*/ PVAR("ktracep", "KTRACEP", 0, p_tracep, KPTR, PRIx64), @@ -151,6 +147,7 @@ VAR var[] = { VAR4("lstate", "STAT", LJUST|LWP, lstate), VAR6("ltime", "LTIME", LWP, lcputime, 0, CPUTIME), PUVAR("majflt", "MAJFLT", 0, p_uru_majflt, UINT64, PRIu64), + PUVAR("maxrss", "MAXRSS", 0, p_uru_maxrss, UINT64, PRIu64), PUVAR("minflt", "MINFLT", 0, p_uru_minflt, UINT64, PRIu64), PUVAR("msgrcv", "MSGRCV", 0, p_uru_msgrcv, UINT64, PRIu64), PUVAR("msgsnd", "MSGSND", 0, p_uru_msgsnd, UINT64, PRIu64), Index: src/bin/ps/ps.1 diff -u src/bin/ps/ps.1:1.109 src/bin/ps/ps.1:1.109.6.1 --- src/bin/ps/ps.1:1.109 Mon Aug 28 05:57:37 2017 +++ src/bin/ps/ps.1 Wed Aug 7 08:25:32 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: ps.1,v 1.109 2017/08/28 05:57:37 wiz Exp $ +.\" $NetBSD: ps.1,v 1.109.6.1 2019/08/07 08:25:32 martin Exp $ .\" .\" Copyright (c) 1980, 1990, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" -.Dd August 28, 2017 +.Dd August 6, 2019 .Dt PS 1 .Os .Sh NAME @@ -316,6 +316,8 @@ The exact time the command started, usin .Dq \&%c format described in .Xr strftime 3 . +.It Ar maxrss +the maxiumum resident set size of the process (in 1024 byte units). .It Ar nice The process scheduling increment (see .Xr setpriority 2 ) . @@ -513,6 +515,12 @@ group name (from gid) group names (from group access list) .It Ar groups group access list +.It Ar idrss +integral unshared data +.It Ar isrss +integral unshared stack +.It Ar ixrss +integral shared memory size .It Ar inblk total blocks read (alias .Ar inblock ) @@ -543,6 +551,8 @@ symbolic LWP state CPU time of the LWP .It Ar majflt total page faults +.It Ar maxrss +maximum resident set size .It Ar minflt total page reclaims .It Ar msgrcv
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Wed Aug 7 08:22:41 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.2 Log Message: Ticket #1330 To generate a diff of this commit: cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-8.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.2 diff -u src/doc/CHANGES-8.2:1.1.2.20 src/doc/CHANGES-8.2:1.1.2.21 --- src/doc/CHANGES-8.2:1.1.2.20 Tue Aug 6 18:22:57 2019 +++ src/doc/CHANGES-8.2 Wed Aug 7 08:22:41 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.2,v 1.1.2.20 2019/08/06 18:22:57 martin Exp $ +# $NetBSD: CHANGES-8.2,v 1.1.2.21 2019/08/07 08:22:41 martin Exp $ A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2 release: @@ -534,3 +534,8 @@ sys/dev/pci/if_et.c1.23,1.25 and 1.2 - Code cleanup. [msaitoh, ticket #1329] +sys/kern/uipc_socket2.c1.134 + + Fix kernel heap info leaks in sys_recvmsg(). + [maxv, ticket #1330] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Wed Aug 7 08:22:41 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.2 Log Message: Ticket #1330 To generate a diff of this commit: cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-8.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Wed Aug 7 08:21:55 UTC 2019 Modified Files: src/sys/kern [netbsd-8]: uipc_socket2.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1330): sys/kern/uipc_socket2.c: revision 1.134 Fix info leaks: the alignment of the structures causes uninitialized heap memory to be copied to userland in sys_recvmsg(). To generate a diff of this commit: cvs rdiff -u -r1.124.8.3 -r1.124.8.4 src/sys/kern/uipc_socket2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.