CVS commit: src

2021-09-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 11 16:10:37 UTC 2021

Modified Files:
src/distrib/sets/lists/debug: module.mi
src/distrib/sets/lists/modules: mi
src/sys/modules: Makefile

Log Message:
Build and install the if_run module.  run(4) is not necessarily included
in all GENERIC kernels (as reported on libera IRC).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/debug/module.mi
cvs rdiff -u -r1.145 -r1.146 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.254 -r1.255 src/sys/modules/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/debug/module.mi
diff -u src/distrib/sets/lists/debug/module.mi:1.11 src/distrib/sets/lists/debug/module.mi:1.12
--- src/distrib/sets/lists/debug/module.mi:1.11	Thu Aug 19 05:09:24 2021
+++ src/distrib/sets/lists/debug/module.mi	Sat Sep 11 16:10:37 2021
@@ -1,4 +1,4 @@
-# $NetBSD: module.mi,v 1.11 2021/08/19 05:09:24 christos Exp $
+# $NetBSD: module.mi,v 1.12 2021/09/11 16:10:37 pgoyette Exp $
 ./usr/libdata/debug/@MODULEDIR@	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/accf_dataready			modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/accf_dataready/accf_dataready.kmod.debug	modules-base-kernel	kmod,debug
@@ -202,6 +202,8 @@
 ./usr/libdata/debug/@MODULEDIR@/if_ppp/if_ppp.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_pppoemodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_pppoe/if_pppoe.kmod.debug		modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/if_runmodules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/if_run/if_run.kmod.debug	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_slmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_sl/if_sl.kmod.debug			modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_smscmodules-base-kernel	kmod,debug

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.145 src/distrib/sets/lists/modules/mi:1.146
--- src/distrib/sets/lists/modules/mi:1.145	Tue Aug 17 17:31:59 2021
+++ src/distrib/sets/lists/modules/mi	Sat Sep 11 16:10:37 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.145 2021/08/17 17:31:59 christos Exp $
+# $NetBSD: mi,v 1.146 2021/09/11 16:10:37 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -225,6 +225,8 @@
 ./@MODULEDIR@/if_ppp/if_ppp.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_pppoemodules-base-kernel	kmod
 ./@MODULEDIR@/if_pppoe/if_pppoe.kmod		modules-base-kernel	kmod
+./@MODULEDIR@/if_runmodules-base-kernel	kmod
+./@MODULEDIR@/if_run/if_run.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/if_slmodules-base-kernel	kmod
 ./@MODULEDIR@/if_sl/if_sl.kmod			modules-base-kernel	kmod
 ./@MODULEDIR@/if_smscmodules-base-kernel	kmod

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.254 src/sys/modules/Makefile:1.255
--- src/sys/modules/Makefile:1.254	Wed Aug 18 09:07:07 2021
+++ src/sys/modules/Makefile	Sat Sep 11 16:10:37 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.254 2021/08/18 09:07:07 christos Exp $
+#	$NetBSD: Makefile,v 1.255 2021/09/11 16:10:37 pgoyette Exp $
 
 .include 
 
@@ -89,6 +89,7 @@ SUBDIR+=	if_mue
 SUBDIR+=	if_npflog
 SUBDIR+=	if_ppp
 SUBDIR+=	if_pppoe
+SUBDIR+=	if_run
 SUBDIR+=	if_sl
 SUBDIR+=	if_smsc
 SUBDIR+=	if_srt srt



CVS commit: src

2021-09-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 11 16:10:37 UTC 2021

Modified Files:
src/distrib/sets/lists/debug: module.mi
src/distrib/sets/lists/modules: mi
src/sys/modules: Makefile

Log Message:
Build and install the if_run module.  run(4) is not necessarily included
in all GENERIC kernels (as reported on libera IRC).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/debug/module.mi
cvs rdiff -u -r1.145 -r1.146 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.254 -r1.255 src/sys/modules/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/lib/libcurses

2021-07-26 Thread Paul Goyette

On Mon, 26 Jul 2021, nia wrote:


"Some modern terminals may display characters with the standout
attribute set identically to those with the bold or reverse attribute
set."


I would remove the word "modern" completely.


++--+------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


Re: CVS commit: src

2021-06-29 Thread Paul Goyette

On Tue, 29 Jun 2021, Paul Goyette wrote:


Please note that both riastradh@ and dh@ have plans to ride this
version bump.  You might want to delay any ``cvs up'' commands for
a short while.

:)


Looks like both commits are done, so ``cvs up'' should get you a
workable source tree.


++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


Re: CVS commit: src/sys

2021-06-29 Thread Paul Goyette

On Tue, 29 Jun 2021, David A. Holland wrote:


Module Name:src
Committed By:   dholland
Date:   Tue Jun 29 22:39:21 UTC 2021

Modified Files:
src/sys/fs/puffs: puffs_vnops.c
src/sys/fs/union: union_vnops.c
src/sys/fs/unionfs: unionfs_subr.c
src/sys/kern: vfs_getcwd.c vfs_lookup.c
src/sys/sys: namei.src

Log Message:
Now remove cn_consume from struct componentname.

This change requires a kernel bump.


Note that we're riding the 9.99.86 bump from earlier today.


Note though that I'm not going to version the VOP_LOOKUP args
structure (or any other args structure) as code that doesn't touch
cn_consume doesn't need attention and code that does will fail on it
without further intervention.


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/sys/fs/puffs/puffs_vnops.c
cvs rdiff -u -r1.76 -r1.77 src/sys/fs/union/union_vnops.c
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/unionfs/unionfs_subr.c
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/vfs_getcwd.c
cvs rdiff -u -r1.228 -r1.229 src/sys/kern/vfs_lookup.c
cvs rdiff -u -r1.59 -r1.60 src/sys/sys/namei.src

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:60dba34c228001125714949!




++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


Re: CVS commit: src

2021-06-29 Thread Paul Goyette

Please note that both riastradh@ and dh@ have plans to ride this
version bump.  You might want to delay any ``cvs up'' commands for
a short while.

:)


On Tue, 29 Jun 2021, Paul Goyette wrote:


Module Name:src
Committed By:   pgoyette
Date:   Tue Jun 29 21:03:37 UTC 2021

Modified Files:
src/lib/libpci: Makefile
src/sys/arch/arm/amlogic: gxlphy.c
src/sys/dev: dev_verbose.c dev_verbose.h devlist2h.awk
src/sys/dev/hdaudio: hdaudio.c
src/sys/dev/mii: Makefile.miidevs gentbi.c mii_physubr.c mii_verbose.c
mii_verbose.h miivar.h ukphy.c
src/sys/dev/pci: pci_subr.c
src/sys/dev/pci/ixgbe: ixgbe.c
src/sys/rump/librump/rumpdev: Makefile.rumpdev
src/sys/sys: param.h
Removed Files:
src/sys/dev/mii: devlist2h.awk

Log Message:
Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE.  This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
 of MII_STR_oui_model definitions and use of oui and model rather than
 vendor and product.  This also changes the compressed data in the
 xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
 digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
 very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
 DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
 xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
 (to deal with the vendor/product vs oui/model issue), we need to
 make sure it gets compiled with -Wno-error=format-nonliteral, even
 in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO).  This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libpci/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/gxlphy.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/dev_verbose.c src/sys/dev/devlist2h.awk
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/dev_verbose.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/hdaudio/hdaudio.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/mii/Makefile.miidevs
cvs rdiff -u -r1.11 -r0 src/sys/dev/mii/devlist2h.awk
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/mii/gentbi.c
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/mii/mii_verbose.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/mii/mii_verbose.h
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/mii/miivar.h
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/mii/ukphy.c
cvs rdiff -u -r1.225 -r1.226 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.284 -r1.285 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/librump/rumpdev/Makefile.rumpdev
cvs rdiff -u -r1.696 -r1.697 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:60db8aaf294301898520769!




++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


Re: slk.c still broken on some architecetures

2021-06-24 Thread Paul Goyette

On Fri, 25 Jun 2021, Brett Lymn wrote:


On Thu, Jun 24, 2021 at 08:40:46AM -0700, Paul Goyette wrote:

Perhaps this should use ``%zd'' in the format string, rather than
using ``%ld'' ???



Thanks to Martin for fixing, he used %zu which looks good to me.


Yup, %zu is good.



++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


Re: slk.c still broken on some architecetures

2021-06-24 Thread Paul Goyette

On Thu, 24 Jun 2021, Martin Husemann wrote:


On Thu, Jun 24, 2021 at 08:33:45AM -0700, Paul Goyette wrote:

/build/netbsd-current/src_ro/lib/libcurses/slk.c: In function '__slk_wset':
/build/netbsd-current/src_ro/lib/libcurses/slk.c:571:52: error: format '%ld' 
expects argument of type 'long int', but argument 3 has type 'size_t' {aka 
'unsigned int'} [-Werror=format=]
  571 |  __CTRACE(__CTRACE_INPUT, "__slk_wset: wcsrtombs %ld\n", len);
  |  ~~^ ~~~
  || |
  || size_t {aka 
unsigned int}
  |long int
  |  %d


I fixed that printf format, but the code should not be enabled in default
builds (it is #ifdef DEBUG). Somehow you must have enabled that DEBUG code.


Oooppss!  I had disabled MKDEBUG and MKKDEBUG, but I forgot to disable 
MKDEBUGLIB (these are enabled by default in my build.sh wrapper).


Thanks for fixing.


++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


Re: slk.c still broken on some architecetures

2021-06-24 Thread Paul Goyette

Perhaps this should use ``%zd'' in the format string, rather than
using ``%ld'' ???


On Thu, 24 Jun 2021, Paul Goyette wrote:


Module Name:src
Committed By:   blymn
Date:   Thu Jun 24 05:53:05 UTC 2021

Modified Files:
src/lib/libcurses: slk.c

Log Message:
Make sure we don't use wide char routines when DISABLE_WCHAR is in
effect.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/slk.c



Even with rev 1.10 of slk.c I am still seeing the following breakage
for dreamcast, evbsh3-eb, evbsh3-el, hpcsh, landisk, and mmeye.  I have
not tried all other architectures, but I did _not_ see this error on
cats.

dependall ===> lib/libcurses/PSD.doc
/build/netbsd-current/src_ro/lib/libcurses/slk.c: In function '__slk_wset':
/build/netbsd-current/src_ro/lib/libcurses/slk.c:571:52: error: format '%ld' 
expects argument of type 'long int', but argument 3 has type 'size_t' {aka 
'unsigned int'} [-Werror=format=]

 571 |  __CTRACE(__CTRACE_INPUT, "__slk_wset: wcsrtombs %ld\n", len);
 |  ~~^ ~~~
 || |
 || size_t {aka 
unsigned int}

 |long int
 |  %d
cc1: all warnings being treated as errors
*** Failed target: slk.go
*** Failed commands:
   ${_MKTARGET_COMPILE}
   ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} 
${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}

*** [slk.go] Error code 1
nbmake[7]: stopped in /build/netbsd-current/src_ro/lib/libcurses
1 error


++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+

!DSPAM:60d4a603239705180217527!




++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


slk.c still broken on some architecetures

2021-06-24 Thread Paul Goyette

Module Name:src
Committed By:   blymn
Date:   Thu Jun 24 05:53:05 UTC 2021

Modified Files:
src/lib/libcurses: slk.c

Log Message:
Make sure we don't use wide char routines when DISABLE_WCHAR is in
effect.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/slk.c



Even with rev 1.10 of slk.c I am still seeing the following breakage
for dreamcast, evbsh3-eb, evbsh3-el, hpcsh, landisk, and mmeye.  I have
not tried all other architectures, but I did _not_ see this error on
cats.

dependall ===> lib/libcurses/PSD.doc
/build/netbsd-current/src_ro/lib/libcurses/slk.c: In function '__slk_wset':
/build/netbsd-current/src_ro/lib/libcurses/slk.c:571:52: error: format '%ld' 
expects argument of type 'long int', but argument 3 has type 'size_t' {aka 
'unsigned int'} [-Werror=format=]
  571 |  __CTRACE(__CTRACE_INPUT, "__slk_wset: wcsrtombs %ld\n", len);
  |  ~~^ ~~~
  || |
  || size_t {aka 
unsigned int}
  |long int
  |  %d
cc1: all warnings being treated as errors
*** Failed target: slk.go
*** Failed commands:
${_MKTARGET_COMPILE}
${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} 
${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
*** [slk.go] Error code 1
nbmake[7]: stopped in /build/netbsd-current/src_ro/lib/libcurses
1 error


++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
||  | pgoyett...@gmail.com |
++--+--+


Re: CVS commit: src/sys/dev

2021-06-09 Thread Paul Goyette

On Wed, 9 Jun 2021, Paul Goyette wrote:


Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  9 23:22:51 UTC 2021

Modified Files:
src/sys/dev: dev_verbose.h

Log Message:
Use the localcount(9)-based module_hook mechanism to prevent the verbose
modules' code and data being unloaded while in use.  Should prevent some
crashes reported by Riastradh@ to occur during suspend/resume operation.


FYI, this commit "rides the bump" introduced a few hours ago by martin@


++--+-----+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com   |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org |
++--+-+


Re: CVS commit: src/sys/dev

2021-04-23 Thread Paul Goyette

On Sat, 24 Apr 2021, Robert Elz wrote:


   Date:Sat, 24 Apr 2021 00:15:37 +
   From:"Michael Lorenz" 
   Message-ID:  <20210424001537.c5c83f...@cvs.netbsd.org>

 | add an ioctl() to get a list of fonts currently available via wsfont

It seems to me it would be useful for that ioctl to copyout()
the fi_numentries field of the struct (if addr != NULL) from
wsdisplayio_listfonts() just before the ENOMEM check (so it is
updated, even if ENOMEM is returned).   (Does it make any sense
for addr to be NULL, or should that be an error?  EINVAL or something.)

Otherwise, there doesn't seem to be any easy way for the user of
the ioctl to know how many fonts were returned (checking which elements
of the array were modified is not "easy") or how big the buffer would
need to be to fetch all of them in the ENOMEM case.


In several other places, we return "total space needed" separately,
regardless of how much data was actually copied.  The general paradigm
is (more or less)

buff = NULL;
size = 0;
err = func(..., buff, size, );
while (err == 0) {
if (need > size) {
free(buff);
buff = malloc(need);
if (buff == NULL)
err = ENOMEM;

}
}

For a real-life example look at the modctl(2) code for MODULE_STAT



++------+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern (kern_event.c)

2021-01-22 Thread Paul Goyette

On Fri, 22 Jan 2021, Paul Goyette wrote:


On Thu, 21 Jan 2021, Paul Goyette wrote:


Ooopppsss ignore me - looks like this was already fixed and my update
missed it.

I'll retry.


OK, I built and installed a new kernel+userland.

Most everything works, and syslogd seems to work fine (at least, it
no longer panics during startup).

HOWEVER, firefox seems to be badly broken.  Attempting to open certain
pages results in never-ending-hang, and nothing ever gets rendered.  I
can use the Stop-Reloading "X" button, and the "oscillating dot" load
indicator stops oscillating, but nothing ever happens.  At that point,
the tab is hung and cannot load any other page, not even pages that
loaded successfully previously!  I _can_ delete the tab, and opening a
new tab works.

Some of the "failing" pages are:

airnow.gov
gmail.com
www.prudential.com/login
www.myaccountviewonline.com/AccountView/Logon


Slight correction:  above I said "nothing ever happens" but while I've
been composing this Email a couple of the above pages seem to have made
some progress (although none of them have finished and stopped the
"oscillating dot").  So "ever" is at least 5 minutes or longer ...  :)


I don't know if the kern_event.c changes are responsible, but I haven't
seen anything else recently.


I reverted kern_event.c to rev 1.110 and firefox behaves correctly.  So
it's pretty fair bet that the subsequent kern_event.c changes are the
reason for the breakage.

PR kern/55946 has been filed.


+----+--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern (kern_event.c)

2021-01-22 Thread Paul Goyette

On Thu, 21 Jan 2021, Paul Goyette wrote:


Ooopppsss ignore me - looks like this was already fixed and my update
missed it.

I'll retry.


OK, I built and installed a new kernel+userland.

Most everything works, and syslogd seems to work fine (at least, it
no longer panics during startup).

HOWEVER, firefox seems to be badly broken.  Attempting to open certain
pages results in never-ending-hang, and nothing ever gets rendered.  I
can use the Stop-Reloading "X" button, and the "oscillating dot" load
indicator stops oscillating, but nothing ever happens.  At that point,
the tab is hung and cannot load any other page, not even pages that
loaded successfully previously!  I _can_ delete the tab, and opening a
new tab works.

Some of the "failing" pages are:

airnow.gov
gmail.com
www.prudential.com/login
www.myaccountviewonline.com/AccountView/Logon


Slight correction:  above I said "nothing ever happens" but while I've
been composing this Email a couple of the above pages seem to have made
some progress (although none of them have finished and stopped the
"oscillating dot").  So "ever" is at least 5 minutes or longer ...  :)


I don't know if the kern_event.c changes are responsible, but I haven't
seen anything else recently.

FWIW, I'm running firefox 83.0 from pkgsrc, around 2020-12-08





On Thu, 21 Jan 2021, Paul Goyette wrote:


This change seems to break everything!  As soon as I try to start
syslogd I hit the panic() that you added

[  28.0253983] panic: kqueue_scan,1491: kq=0xdc13890bc4c0 
kq->kq_count(1) != count(0), nmarker=1


[  28.0253983] cpu0: Begin traceback...
[  28.0253983] vpanic() at netbsd:vpanic+0x156
[  28.0253983] snprintf() at netbsd:snprintf
[  28.0253983] kqueue_check() at netbsd:kqueue_check+0x183
[  28.0253983] kevent1() at netbsd:kevent1+0x49f
[  28.0253983] sys___kevent50() at netbsd:sys___kevent50+0x33
[  28.0253983] syscall() at netbsd:syscall+0x23e
[  28.0253983] --- syscall (number 435) ---
[  28.0253983] netbsd:syscall+0x23e:
[  28.0253983] cpu0: End traceback...
[  28.0253983] fatal breakpoint trap in supervisor mode
[  28.0253983] trap type 1 code 0 rip 0x8021f415 cs 0x8 rflags 
0x202 cr2 0x78742459e000 ilevel 0x8 rsp 0xa809281ebb50
[  28.0253983] curlwp 0xdc138aa46540 pid 1352.1352 lowest kstack 
0xa809281e72c0

Stopped in pid 1352.1352 (syslogd) at   netbsd:breakpoint+0x5:  leave

I have a full crash dump if you need any further info.


Module Name:src
Committed By:   jdolecek
Date:   Thu Jan 21 18:09:23 UTC 2021

Modified Files:
   src/sys/kern: kern_event.c

Log Message:
adjust kq_check() (enabled with DEBUG) to new reality - it's now perfectly
normal to have kq_count bigger than number of the linked entries
on the kqueue

PR kern/50094, problem pointed out by Chuck Silvers


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/kern_event.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


+----+------+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+



+----+------+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+



+----+------+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern (kern_event.c)

2021-01-21 Thread Paul Goyette

Ooopppsss ignore me - looks like this was already fixed and my update
missed it.

I'll retry.


On Thu, 21 Jan 2021, Paul Goyette wrote:


This change seems to break everything!  As soon as I try to start
syslogd I hit the panic() that you added

[  28.0253983] panic: kqueue_scan,1491: kq=0xdc13890bc4c0 kq->kq_count(1) 
!= count(0), nmarker=1


[  28.0253983] cpu0: Begin traceback...
[  28.0253983] vpanic() at netbsd:vpanic+0x156
[  28.0253983] snprintf() at netbsd:snprintf
[  28.0253983] kqueue_check() at netbsd:kqueue_check+0x183
[  28.0253983] kevent1() at netbsd:kevent1+0x49f
[  28.0253983] sys___kevent50() at netbsd:sys___kevent50+0x33
[  28.0253983] syscall() at netbsd:syscall+0x23e
[  28.0253983] --- syscall (number 435) ---
[  28.0253983] netbsd:syscall+0x23e:
[  28.0253983] cpu0: End traceback...
[  28.0253983] fatal breakpoint trap in supervisor mode
[  28.0253983] trap type 1 code 0 rip 0x8021f415 cs 0x8 rflags 0x202 
cr2 0x78742459e000 ilevel 0x8 rsp 0xa809281ebb50
[  28.0253983] curlwp 0xdc138aa46540 pid 1352.1352 lowest kstack 
0xa809281e72c0

Stopped in pid 1352.1352 (syslogd) at   netbsd:breakpoint+0x5:  leave

I have a full crash dump if you need any further info.


Module Name:src
Committed By:   jdolecek
Date:   Thu Jan 21 18:09:23 UTC 2021

Modified Files:
   src/sys/kern: kern_event.c

Log Message:
adjust kq_check() (enabled with DEBUG) to new reality - it's now perfectly
normal to have kq_count bigger than number of the linked entries
on the kqueue

PR kern/50094, problem pointed out by Chuck Silvers


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/kern_event.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+



++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern (kern_event.c)

2021-01-21 Thread Paul Goyette

This change seems to break everything!  As soon as I try to start
syslogd I hit the panic() that you added

[  28.0253983] panic: kqueue_scan,1491: kq=0xdc13890bc4c0 kq->kq_count(1) 
!= count(0), nmarker=1

[  28.0253983] cpu0: Begin traceback...
[  28.0253983] vpanic() at netbsd:vpanic+0x156
[  28.0253983] snprintf() at netbsd:snprintf
[  28.0253983] kqueue_check() at netbsd:kqueue_check+0x183
[  28.0253983] kevent1() at netbsd:kevent1+0x49f
[  28.0253983] sys___kevent50() at netbsd:sys___kevent50+0x33
[  28.0253983] syscall() at netbsd:syscall+0x23e
[  28.0253983] --- syscall (number 435) ---
[  28.0253983] netbsd:syscall+0x23e:
[  28.0253983] cpu0: End traceback...
[  28.0253983] fatal breakpoint trap in supervisor mode
[  28.0253983] trap type 1 code 0 rip 0x8021f415 cs 0x8 rflags 0x202 
cr2 0x78742459e000 ilevel 0x8 rsp 0xa809281ebb50
[  28.0253983] curlwp 0xdc138aa46540 pid 1352.1352 lowest kstack 
0xa809281e72c0
Stopped in pid 1352.1352 (syslogd) at   netbsd:breakpoint+0x5:  leave

I have a full crash dump if you need any further info.


Module Name:src
Committed By:   jdolecek
Date:   Thu Jan 21 18:09:23 UTC 2021

Modified Files:
src/sys/kern: kern_event.c

Log Message:
adjust kq_check() (enabled with DEBUG) to new reality - it's now 
perfectly

normal to have kq_count bigger than number of the linked entries
on the kqueue

PR kern/50094, problem pointed out by Chuck Silvers


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/kern_event.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/distrib/sets/lists/debug

2021-01-14 Thread Paul Goyette

Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 14 19:07:03 UTC 2021

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
/home/paul/XXX.txt


Crap - meant to include the text file...  Here's the good log info...


Update sets lists to accomodate KERNEL_DIR.  When both KERNEL_DIR and
MKDEBUG are defined, we create an empty $DESTDIR/usr/libdata/debug/netbsd/
directory.

Should fix ``build.sh release'' issue reported in kern/55923

XXX Since nothing ever seems to populate this directory, perhaps we should
XXX simply prevent its creation?  If we do create it, should its creation
XXX perhaps be conditioned on MKKDEBUG rather than MKDEBUG?

XXX There is still another problem with ``build.sh install-image'' but I
XXX open a new PR for that.

On Thu, 14 Jan 2021, Paul Goyette wrote:


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/distrib/sets/lists/games

2021-01-01 Thread Paul Goyette

Please also add the appropriate entry to src/distrib/sets/lists/debug.mi
for those of us who build with MKDEBUG=YES

:)



On Sat, 2 Jan 2021, Nathanial Sloss wrote:


Module Name:src
Committed By:   nat
Date:   Sat Jan  2 03:24:02 UTC 2021

Modified Files:
src/distrib/sets/lists/games: mi

Log Message:
Add testpat(6) to the games set.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/distrib/sets/lists/games/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5fefe793123761591715016!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: please put back cat man pages, and what's the deal with warp?

2020-11-10 Thread Paul Goyette

On Tue, 10 Nov 2020, Kamil Rytarowski wrote:


I'm going to submit a dedicated mail! Restoration of BSD games was
discussed and performed by perry@. Only warp and dungeon were still
missing (and documented as so in games/Makefile). I have got the dungeon
sources now too, but it needs rewrite (from Fortrant) and to avoid (c)
issues.


Dungeon is already available in pkgsrc, and it has already been
translated to C.  It is 100% functional, and has an improved user
interface, too.  There is no need to import dungeon.  (Furthermore,
there might be some license issues which make it unsuitable for
inclusion - see the package's license for details.)


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-11-07 Thread Paul Goyette

Thanks for checking!

I agree with your proposed changes.  If noone else objects, please
go ahead and commit.


On Sun, 8 Nov 2020, Rin Okuyama wrote:


Thanks Paul for finding out the bug!

Then, compat_netbsd32 and compat_netbsd32_coredump modules are
successfully load for kernel without COMPAT_NETBSD32 option.

However, OABI binaries still do not work. I found this is due to
there remains ``#ifdef COMPAT_NETBSD32'' codes in sys/arch/arm.

By fixing them, OABI binaries work and dump valid core files!

I changed two files.

(1) arm_netbsd_elf32_probe() in arm/cpu_exec.c

Previously, determine whether emulation is native or netbsd32 by
testing ``epp->ep_esch->es_emul == _netbsd32''. This requires
COMPAT_NETBSD32 option. However, we can use
``epp->ep_esch->es_emul != _netbsd'' for this purpose.

(2) arm_netbsd_elf32_coredump_setup() in arm/core_machdep.c

This seems simply a mistake; kernel sets EABI flag to OABI core
files. We can remove entire COMPAT_NETBSD32 codes.

I will commit them soon if there's no objection.

Thanks,
rin

On 2020/11/08 6:53, Paul Goyette wrote:

Thanks for fixing ...

On Sat, 7 Nov 2020, Christos Zoulas wrote:


/usr/obj/evbarm-earmv7/tools/bin/nbmake-evbarm -V MACHINE_ARCH
earmv7


christos


On Nov 7, 2020, at 4:27 PM, Paul Goyette  wrote:

OK, I think I found the problem, but I don't know how to solve it...

All of the undefined symbols are supposed to be provided by

.../sys/arch/arm/arm32/netbsd32_machdep.c

but there is no netbsd32_machdep.o included in the compat_netbsd32
module.?? This file should be included by the following code in 
.../sys/modules/compat_netbsd32/Makefile


.if ${MACHINE_ARCH} == "arm"
.PATH:?? ${S}/arch/arm/arm32
SRCS+=?? netbsd32_machdep.c
.endif

but it seems not to work (or at least, it doesn't do what it was
intended to do).






On Thu, 5 Nov 2020, Rin Okuyama wrote:


On 2020/11/05 5:43, Paul Goyette wrote:

BTW, the patch you submitted with the initial message in this thread
looks good for avoiding the issue.?? But I'm not sure it is a complete
solution.
In particular, you would need to build a 32-bit arm that contains ``no
options COMPAT_NETBSD32'' and then boot and load the compat_netbsd32
and compat_netbsd32_coredump modules

?? modload compat_netbsd32
?? modload compat_netbsd32_coredump
Then see if emulation of the old ABI still works, and check if core-
dump works for old-ADI programs; the test program I've been using for
core-dump checking is

?? #include 
?? int main(int argc, void *argv) { abort(); }
I really have to leave and take care of some personal business, so I
would greatly appreciate if you can check this out.


Hmm, ``modload compat_netbsd32'' does not work on evbarmv6hf-el:


# uname -ap
NetBSD?? 9.99.75 NetBSD 9.99.75 (RPI0) #11: Thu Nov?? 5 20:26:39 JST 
2020 rin@latipes:/sys/arch/evbarm/compile/RPI0 evbarm earmv6hf

# modload compat_netbsd32
[?? 29.6328410] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `netbsd32_vm_default_addr' not found
[?? 29.6460400] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `netbsd32_machdep_md_init' not found
[?? 29.6560750] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `netbsd32_sendsig' not found
[?? 29.6661200] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `cpu_mcontext32_validate' not found
[?? 29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `cpu_setmcontext32' not found
[?? 29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `netbsd32_machdep_md_fini' not found
[?? 29.6948370] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `startlwp32' not found
[?? 29.7048770] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `cpu_getmcontext32' not found
[?? 29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `machine32' not found
[?? 29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: 
symbol `netbsd32_sysarch' not found
[?? 29.7318320] WARNING: module error: unable to affix module 
`compat_netbsd32', error 8

modload: compat_netbsd32: Exec format error


This should be because there are ``#ifdef COMPAT_NETBSD32'' codes in 
files

not included in compat_netbsd32 module. compat_netbsd32 module must not
work also for aarch64 and mips64 for the same reason, whereas amd64 and
sparc64 seem OK.

Thanks,
rin






++--+-------+
| Paul Goyette | PGP Key fingerprint: | E-mail 
addresses: |
| (Retired)?? | FA29 0E3B 35AF E8AE 6651 | 
p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org 
|

++--+---+





++--+-------+
| Paul Goyette | PGP Key fingerprint:??

Re: CVS commit: src/sys

2020-11-07 Thread Paul Goyette

Thanks for fixing ...

On Sat, 7 Nov 2020, Christos Zoulas wrote:


/usr/obj/evbarm-earmv7/tools/bin/nbmake-evbarm -V MACHINE_ARCH
earmv7


christos


On Nov 7, 2020, at 4:27 PM, Paul Goyette  wrote:

OK, I think I found the problem, but I don't know how to solve it...

All of the undefined symbols are supposed to be provided by

.../sys/arch/arm/arm32/netbsd32_machdep.c

but there is no netbsd32_machdep.o included in the compat_netbsd32
module.  This file should be included by the following code in 
.../sys/modules/compat_netbsd32/Makefile

.if ${MACHINE_ARCH} == "arm"
.PATH:  ${S}/arch/arm/arm32
SRCS+=  netbsd32_machdep.c
.endif

but it seems not to work (or at least, it doesn't do what it was
intended to do).






On Thu, 5 Nov 2020, Rin Okuyama wrote:


On 2020/11/05 5:43, Paul Goyette wrote:

BTW, the patch you submitted with the initial message in this thread
looks good for avoiding the issue.  But I'm not sure it is a complete
solution.
In particular, you would need to build a 32-bit arm that contains ``no
options COMPAT_NETBSD32'' and then boot and load the compat_netbsd32
and compat_netbsd32_coredump modules

modload compat_netbsd32
modload compat_netbsd32_coredump
Then see if emulation of the old ABI still works, and check if core-
dump works for old-ADI programs; the test program I've been using for
core-dump checking is

#include 
int main(int argc, void *argv) { abort(); }
I really have to leave and take care of some personal business, so I
would greatly appreciate if you can check this out.


Hmm, ``modload compat_netbsd32'' does not work on evbarmv6hf-el:


# uname -ap
NetBSD  9.99.75 NetBSD 9.99.75 (RPI0) #11: Thu Nov  5 20:26:39 JST 2020 
rin@latipes:/sys/arch/evbarm/compile/RPI0 evbarm earmv6hf
# modload compat_netbsd32
[  29.6328410] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_vm_default_addr' not found
[  29.6460400] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_machdep_md_init' not found
[  29.6560750] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_sendsig' not found
[  29.6661200] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_mcontext32_validate' not found
[  29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_setmcontext32' not found
[  29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_machdep_md_fini' not found
[  29.6948370] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`startlwp32' not found
[  29.7048770] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_getmcontext32' not found
[  29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`machine32' not found
[  29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_sysarch' not found
[  29.7318320] WARNING: module error: unable to affix module `compat_netbsd32', 
error 8
modload: compat_netbsd32: Exec format error


This should be because there are ``#ifdef COMPAT_NETBSD32'' codes in files
not included in compat_netbsd32 module. compat_netbsd32 module must not
work also for aarch64 and mips64 for the same reason, whereas amd64 and
sparc64 seem OK.

Thanks,
rin

!DSPAM:5fa3f309175521945872603!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+





++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-11-07 Thread Paul Goyette

OK, I think I found the problem, but I don't know how to solve it...

All of the undefined symbols are supposed to be provided by

.../sys/arch/arm/arm32/netbsd32_machdep.c

but there is no netbsd32_machdep.o included in the compat_netbsd32
module.  This file should be included by the following code in 
.../sys/modules/compat_netbsd32/Makefile


.if ${MACHINE_ARCH} == "arm"
.PATH:  ${S}/arch/arm/arm32
SRCS+=  netbsd32_machdep.c
.endif

but it seems not to work (or at least, it doesn't do what it was
intended to do).






On Thu, 5 Nov 2020, Rin Okuyama wrote:


On 2020/11/05 5:43, Paul Goyette wrote:

BTW, the patch you submitted with the initial message in this thread
looks good for avoiding the issue.  But I'm not sure it is a complete
solution.

In particular, you would need to build a 32-bit arm that contains ``no
options COMPAT_NETBSD32'' and then boot and load the compat_netbsd32
and compat_netbsd32_coredump modules

 modload compat_netbsd32
 modload compat_netbsd32_coredump

Then see if emulation of the old ABI still works, and check if core-
dump works for old-ADI programs; the test program I've been using for
core-dump checking is

 #include 
 int main(int argc, void *argv) { abort(); }

I really have to leave and take care of some personal business, so I
would greatly appreciate if you can check this out.


Hmm, ``modload compat_netbsd32'' does not work on evbarmv6hf-el:


# uname -ap
NetBSD  9.99.75 NetBSD 9.99.75 (RPI0) #11: Thu Nov  5 20:26:39 JST 2020 
rin@latipes:/sys/arch/evbarm/compile/RPI0 evbarm earmv6hf

# modload compat_netbsd32
[  29.6328410] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_vm_default_addr' not found
[  29.6460400] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_machdep_md_init' not found
[  29.6560750] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_sendsig' not found
[  29.6661200] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_mcontext32_validate' not found
[  29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_setmcontext32' not found
[  29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_machdep_md_fini' not found
[  29.6948370] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`startlwp32' not found
[  29.7048770] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_getmcontext32' not found
[  29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`machine32' not found
[  29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_sysarch' not found
[  29.7318320] WARNING: module error: unable to affix module 
`compat_netbsd32', error 8

modload: compat_netbsd32: Exec format error


This should be because there are ``#ifdef COMPAT_NETBSD32'' codes in files
not included in compat_netbsd32 module. compat_netbsd32 module must not
work also for aarch64 and mips64 for the same reason, whereas amd64 and
sparc64 seem OK.

Thanks,
rin

!DSPAM:5fa3f309175521945872603!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-11-05 Thread Paul Goyette

I will investigate.

Can you confirm that it works correctly if you have the built-in
module?  (ie, kernel with ``options COMPAT_NETBSD32'')


On Thu, 5 Nov 2020, Rin Okuyama wrote:


On 2020/11/05 5:43, Paul Goyette wrote:

BTW, the patch you submitted with the initial message in this thread
looks good for avoiding the issue.  But I'm not sure it is a complete
solution.

In particular, you would need to build a 32-bit arm that contains ``no
options COMPAT_NETBSD32'' and then boot and load the compat_netbsd32
and compat_netbsd32_coredump modules

 modload compat_netbsd32
 modload compat_netbsd32_coredump

Then see if emulation of the old ABI still works, and check if core-
dump works for old-ADI programs; the test program I've been using for
core-dump checking is

 #include 
 int main(int argc, void *argv) { abort(); }

I really have to leave and take care of some personal business, so I
would greatly appreciate if you can check this out.


Hmm, ``modload compat_netbsd32'' does not work on evbarmv6hf-el:


# uname -ap
NetBSD  9.99.75 NetBSD 9.99.75 (RPI0) #11: Thu Nov  5 20:26:39 JST 2020 
rin@latipes:/sys/arch/evbarm/compile/RPI0 evbarm earmv6hf

# modload compat_netbsd32
[  29.6328410] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_vm_default_addr' not found
[  29.6460400] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_machdep_md_init' not found
[  29.6560750] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_sendsig' not found
[  29.6661200] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_mcontext32_validate' not found
[  29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_setmcontext32' not found
[  29.6791570] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_machdep_md_fini' not found
[  29.6948370] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`startlwp32' not found
[  29.7048770] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`cpu_getmcontext32' not found
[  29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`machine32' not found
[  29.7168550] kobj_checksyms, 994: [compat_netbsd32]: linker error: symbol 
`netbsd32_sysarch' not found
[  29.7318320] WARNING: module error: unable to affix module 
`compat_netbsd32', error 8

modload: compat_netbsd32: Exec format error


This should be because there are ``#ifdef COMPAT_NETBSD32'' codes in files
not included in compat_netbsd32 module. compat_netbsd32 module must not
work also for aarch64 and mips64 for the same reason, whereas amd64 and
sparc64 seem OK.

Thanks,
rin

!DSPAM:5fa3f309175521945872603!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-11-04 Thread Paul Goyette

BTW, the patch you submitted with the initial message in this thread
looks good for avoiding the issue.  But I'm not sure it is a complete
solution.

In particular, you would need to build a 32-bit arm that contains ``no
options COMPAT_NETBSD32'' and then boot and load the compat_netbsd32
and compat_netbsd32_coredump modules

modload compat_netbsd32
modload compat_netbsd32_coredump

Then see if emulation of the old ABI still works, and check if core-
dump works for old-ADI programs; the test program I've been using for
core-dump checking is

#include 
int main(int argc, void *argv) { abort(); }

I really have to leave and take care of some personal business, so I
would greatly appreciate if you can check this out.

Thanks!



On Wed, 4 Nov 2020, Paul Goyette wrote:


I guess I don't understand why a 32-bit architecture would also have
COMPAT_NETBSD32.

Christos, can you help out on this?



On Wed, 4 Nov 2020, Rin Okuyama wrote:


Hello again,

On 2020/11/02 3:51, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sun Nov  1 18:51:03 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_core.c
src/sys/kern: compat_stub.c files.kern kern_core.c kern_sig.c
sys_ptrace_common.c
src/sys/modules: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/coredump: Makefile
src/sys/sys: compat_stub.h param.h signalvar.h
Added Files:
src/sys/modules/compat_netbsd32_coredump: Makefile

Log Message:
Separate the compat_netbsd32_coredump from the compat_netbsd32 and
coredump modules, into its own module.

Welcome to 7.99.75 !!!


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/netbsd32/netbsd32_core.c
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.53 -r1.54 src/sys/kern/files.kern
cvs rdiff -u -r1.33 -r1.34 src/sys/kern/kern_core.c
cvs rdiff -u -r1.394 -r1.395 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.88 -r1.89 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.247 -r1.248 src/sys/modules/Makefile
cvs rdiff -u -r1.35 -r1.36 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_netbsd32_coredump/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.24 -r1.25 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.677 -r1.678 src/sys/sys/param.h
cvs rdiff -u -r1.102 -r1.103 src/sys/sys/signalvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


This commit breaks arm, i.e., ILP32 arch with COMPAT_NETBSD32. For arm,
coredump_elf32_hook is already hooked in the main kernel. Therefore,
compat_netbsd32_coredump_modcmd(MODULE_CMD_INIT) causes KASSERT failure:

	panic: kernel diagnostic assertion "!*hooked" failed: file 
"../../../../kern/kern_module_hook.c", line 70


Does the attached patch seem reasonable to you?

Thanks,
rin





++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+

!DSPAM:5fa2ae10252946113815662!




++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern

2020-11-04 Thread Paul Goyette

OK, this is my mistake.  When I change the calls in the ptrace_common
modcmd, I should also have renamed the functions (including their
entries in sys/ptrace.h).  I will commit this shortly, before I leave.

Thanks for the "recipe" for reproducing the problem - I will try it 
later when I return.



On Wed, 4 Nov 2020, Rin Okuyama wrote:


On 2020/11/04 22:52, Paul Goyette wrote:

On Wed, 4 Nov 2020, Rin Okuyama wrote:


ptrace_common_{init,fini} are called from the ptrace_common module's
modcmd routine in kern/sys_ptrace_common.c.  The modcmd routine in
turn is called at module initialization time.  In the case of a
built-in module, it will be called by module_init via init_main; if
the module is loaded (or auto-loaded) module_load will call the
modcmd routine.

The module will be built-in if either ``options PTRACE'' or ``file-
system PROCFS'' is set in the kernel configuration file.


Oops, sorry, I meant ptrace_{init,fini}(). These functions are not called
at all since this commit, which forbids ptrace(2) for non-root users.


If the module is built-in (``options PTRACE'' selected in the config
file), then the module will already have been initialized.

If the module is not built-in, then a privileged user will need to
modload(8) the module.

Prior to this change, the built-in ptrace_common module was calling
the ptrace module's init/fini routine.  Quite likely ptrace_common
was built-in (due to inclusion of file-system PROCFS), so the init
was handled during init_main().  This change ensures that the ptrace
init/fini routines are called ONLY if the ptrace module itself (not
the ptrace_common) routine is built-in.

Please check to make sure that ``options PTRACE'' is included in
your kernel config.


Yes:

$ config -x netbsd.gdb | grep PTRACE
###> optionsPTRACE  # Include ptrace(2) syscall
###> optionsPTRACE_HOOKS# Include ptrace hooks

The problem is that ptrace_{init,fini}() are not called from
ptrace_modcmd():

https://nxr.netbsd.org/xref/src/sys/kern/sys_ptrace.c#184

   184 static int
   185 ptrace_modcmd(modcmd_t cmd, void *arg)
   186 {
   187  int error;
   188
   189  switch (cmd) {
   190  case MODULE_CMD_INIT:
   191 		error = syscall_establish(_netbsd, 
ptrace_syscalls);

   192  break;
   193  case MODULE_CMD_FINI:
   194 		error = syscall_disestablish(_netbsd, 
ptrace_syscalls);

   195  break;
   196  default:
   197  error = ENOTTY;
   198  break;
   199  }
   200  return error;
   201 }

Can you easily confirm that ktrace(2) is unusable for non-privileged
users on 9.99.75 kernel:

$ gdb echo
GNU gdb (GDB) 8.3
...
(gdb) b main
Breakpoint 1 at 0x950: file /usr/src/bin/echo/echo.c, line 58.
(gdb) r
Starting program: /bin/echo
warning: Could not trace the inferior process.
Error:
warning: ptrace: Operation not permitted
terminate called after throwing an instance of 
'gdb_exception_RETURN_MASK_ERROR'

[1]   Abort trap (core dumped) gdb echo

Also, ptrace_{init,fini} should be moved from sys_ptrace_common.c to
sys_ptrace.c, IMO.

Thanks,
rin

!DSPAM:5fa2b869233318156490363!




++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern

2020-11-04 Thread Paul Goyette

On Wed, 4 Nov 2020, Rin Okuyama wrote:


On 2020/11/04 22:52, Paul Goyette wrote:

On Wed, 4 Nov 2020, Rin Okuyama wrote:


ptrace_common_{init,fini} are called from the ptrace_common module's
modcmd routine in kern/sys_ptrace_common.c.  The modcmd routine in
turn is called at module initialization time.  In the case of a
built-in module, it will be called by module_init via init_main; if
the module is loaded (or auto-loaded) module_load will call the
modcmd routine.

The module will be built-in if either ``options PTRACE'' or ``file-
system PROCFS'' is set in the kernel configuration file.


Oops, sorry, I meant ptrace_{init,fini}(). These functions are not called
at all since this commit, which forbids ptrace(2) for non-root users.


If the module is built-in (``options PTRACE'' selected in the config
file), then the module will already have been initialized.

If the module is not built-in, then a privileged user will need to
modload(8) the module.

Prior to this change, the built-in ptrace_common module was calling
the ptrace module's init/fini routine.  Quite likely ptrace_common
was built-in (due to inclusion of file-system PROCFS), so the init
was handled during init_main().  This change ensures that the ptrace
init/fini routines are called ONLY if the ptrace module itself (not
the ptrace_common) routine is built-in.

Please check to make sure that ``options PTRACE'' is included in
your kernel config.


Yes:

$ config -x netbsd.gdb | grep PTRACE
###> optionsPTRACE  # Include ptrace(2) syscall
###> optionsPTRACE_HOOKS# Include ptrace hooks

The problem is that ptrace_{init,fini}() are not called from
ptrace_modcmd():

https://nxr.netbsd.org/xref/src/sys/kern/sys_ptrace.c#184

   184 static int
   185 ptrace_modcmd(modcmd_t cmd, void *arg)
   186 {
   187  int error;
   188
   189  switch (cmd) {
   190  case MODULE_CMD_INIT:
   191 		error = syscall_establish(_netbsd, 
ptrace_syscalls);

   192  break;
   193  case MODULE_CMD_FINI:
   194 		error = syscall_disestablish(_netbsd, 
ptrace_syscalls);

   195  break;
   196  default:
   197  error = ENOTTY;
   198  break;
   199  }
   200  return error;
   201 }


Yes that would be a problem.


Can you easily confirm that ktrace(2) is unusable for non-privileged
users on 9.99.75 kernel:

$ gdb echo
GNU gdb (GDB) 8.3
...
(gdb) b main
Breakpoint 1 at 0x950: file /usr/src/bin/echo/echo.c, line 58.
(gdb) r
Starting program: /bin/echo
warning: Could not trace the inferior process.
Error:
warning: ptrace: Operation not permitted
terminate called after throwing an instance of 
'gdb_exception_RETURN_MASK_ERROR'

[1]   Abort trap (core dumped) gdb echo

Also, ptrace_{init,fini} should be moved from sys_ptrace_common.c to
sys_ptrace.c, IMO.


I have some prior obligations, so I won't be able to look at this
until this evening.

Thanks for the detailed analysis.



++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern

2020-11-04 Thread Paul Goyette

On Wed, 4 Nov 2020, Rin Okuyama wrote:


ptrace_common_{init,fini} are called from the ptrace_common module's
modcmd routine in kern/sys_ptrace_common.c.  The modcmd routine in
turn is called at module initialization time.  In the case of a
built-in module, it will be called by module_init via init_main; if
the module is loaded (or auto-loaded) module_load will call the
modcmd routine.

The module will be built-in if either ``options PTRACE'' or ``file-
system PROCFS'' is set in the kernel configuration file.


Oops, sorry, I meant ptrace_{init,fini}(). These functions are not called
at all since this commit, which forbids ptrace(2) for non-root users.


If the module is built-in (``options PTRACE'' selected in the config
file), then the module will already have been initialized.

If the module is not built-in, then a privileged user will need to
modload(8) the module.

Prior to this change, the built-in ptrace_common module was calling
the ptrace module's init/fini routine.  Quite likely ptrace_common
was built-in (due to inclusion of file-system PROCFS), so the init
was handled during init_main().  This change ensures that the ptrace
init/fini routines are called ONLY if the ptrace module itself (not
the ptrace_common) routine is built-in.

Please check to make sure that ``options PTRACE'' is included in
your kernel config.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+

Re: CVS commit: src/sys

2020-11-04 Thread Paul Goyette

I guess I don't understand why a 32-bit architecture would also have
COMPAT_NETBSD32.

Christos, can you help out on this?



On Wed, 4 Nov 2020, Rin Okuyama wrote:


Hello again,

On 2020/11/02 3:51, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sun Nov  1 18:51:03 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_core.c
src/sys/kern: compat_stub.c files.kern kern_core.c kern_sig.c
sys_ptrace_common.c
src/sys/modules: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/coredump: Makefile
src/sys/sys: compat_stub.h param.h signalvar.h
Added Files:
src/sys/modules/compat_netbsd32_coredump: Makefile

Log Message:
Separate the compat_netbsd32_coredump from the compat_netbsd32 and
coredump modules, into its own module.

Welcome to 7.99.75 !!!


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/netbsd32/netbsd32_core.c
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.53 -r1.54 src/sys/kern/files.kern
cvs rdiff -u -r1.33 -r1.34 src/sys/kern/kern_core.c
cvs rdiff -u -r1.394 -r1.395 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.88 -r1.89 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.247 -r1.248 src/sys/modules/Makefile
cvs rdiff -u -r1.35 -r1.36 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_netbsd32_coredump/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.24 -r1.25 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.677 -r1.678 src/sys/sys/param.h
cvs rdiff -u -r1.102 -r1.103 src/sys/sys/signalvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


This commit breaks arm, i.e., ILP32 arch with COMPAT_NETBSD32. For arm,
coredump_elf32_hook is already hooked in the main kernel. Therefore,
compat_netbsd32_coredump_modcmd(MODULE_CMD_INIT) causes KASSERT failure:

	panic: kernel diagnostic assertion "!*hooked" failed: file 
"../../../../kern/kern_module_hook.c", line 70


Does the attached patch seem reasonable to you?

Thanks,
rin


!DSPAM:5fa25cf9259143308188765!


++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern

2020-11-04 Thread Paul Goyette

On Wed, 4 Nov 2020, Rin Okuyama wrote:


Hi,

On 2020/10/26 0:55, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sun Oct 25 15:55:37 UTC 2020

Modified Files:
src/sys/kern: sys_ptrace_common.c

Log Message:
ptrace_Common is a module unto itself.  Don't use the ptrace module's
init/fini routines.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/kern/sys_ptrace_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


This commit makes ptrace(2) unusable for non-privileged users;
ptrace_common_{init,fini}() should be called from somewhere.


ptrace_common_{init,fini} are called from the ptrace_common module's
modcmd routine in kern/sys_ptrace_common.c.  The modcmd routine in
turn is called at module initialization time.  In the case of a
built-in module, it will be called by module_init via init_main; if
the module is loaded (or auto-loaded) module_load will call the
modcmd routine.

The module will be built-in if either ``options PTRACE'' or ``file-
system PROCFS'' is set in the kernel configuration file.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-11-01 Thread Paul Goyette

On Sun, 1 Nov 2020, Paul Goyette wrote:


Module Name:src
Committed By:   pgoyette
Date:   Sun Nov  1 18:51:03 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_core.c
src/sys/kern: compat_stub.c files.kern kern_core.c kern_sig.c
sys_ptrace_common.c
src/sys/modules: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/coredump: Makefile
src/sys/sys: compat_stub.h param.h signalvar.h
Added Files:
src/sys/modules/compat_netbsd32_coredump: Makefile

Log Message:
Separate the compat_netbsd32_coredump from the compat_netbsd32 and
coredump modules, into its own module.

Welcome to 7.99.75 !!!


Of course, this should be "Welcome to 9.99.75"

:)

++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-10-20 Thread Paul Goyette

This still isn't quite correct.

For i386, a custom kernel build fails.  Here's the diff between GENERIC
and the custom config (this mirrors the config I used on amd64 to file
the original PR kern/55731):

--- GENERIC 2020-09-27 22:28:13.468056102 -0700
+++ TEST2020-10-20 07:41:41.302325022 -0700
@@ -22,6 +22,17 @@

 optionsINCLUDE_CONFIG_FILE # embed config file in kernel binary

+# Remove standard options, as they are provided by modules
+
+no options EXEC_SCRIPT
+no options EXEC_ELF32
+no options COREDUMP
+no options AIO
+no options MQUEUE
+no options SEMAPHORE
+no options PTRACE
+
+
 #ident "GENERIC-$Revision: 1.1233 $"

 maxusers   64  # estimated number of users
@@ -120,7 +131,7 @@
 # Diagnostic/debugging support options
 optionsDIAGNOSTIC  # inexpensive kernel consistency checks
# XXX to be commented out on release branch
-#options   DEBUG   # expensive debugging checks/support
+optionsDEBUG   # expensive debugging checks/support
 #options   LOCKDEBUG   # expensive locking checks/support
 optionsDDB # in-kernel debugger
 #options   DDB_ONPANIC=1   # see also sysctl(7): `ddb.onpanic'


Here's the build failure (with sources updated Tue Oct 20 14:02:24 UTC)

...
#  link  TEST/netbsd
/build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld -Map netbsd.map 
--cref -T netbsd.ldscript -Ttext c010 -e start -X -o netbsd 
${SYSTEM_OBJ:[@]:Nswapnetbsd.o} ${EXTRA_OBJ} vers.o swapnetbsd.o
/build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: 
process_machdep.o: in function `ptrace_machdep_dorequest':
/build/netbsd-compat/src/sys/arch/i386/i386/process_machdep.c:298: undefined 
reference to `ptrace_update_lwp'
/build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: 
/build/netbsd-compat/src/sys/arch/i386/i386/process_machdep.c:324: undefined 
reference to `ptrace_update_lwp'
/build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_fpregs.o: 
in function `procfs_dofpregs':
/build/netbsd-compat/src/sys/miscfs/procfs/procfs_fpregs.c:96: undefined 
reference to `process_dofpregs'
/build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_fpregs.o: 
in function `procfs_validfpregs':
/build/netbsd-compat/src/sys/miscfs/procfs/procfs_fpregs.c:103: undefined 
reference to `process_validfpregs'
/build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_regs.o: 
in function `procfs_doregs':
/build/netbsd-compat/src/sys/miscfs/procfs/procfs_regs.c:93: undefined 
reference to `process_doregs'
/build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_regs.o: 
in function `procfs_validregs':
/build/netbsd-compat/src/sys/miscfs/procfs/procfs_regs.c:100: undefined 
reference to `process_validregs'
*** [netbsd] Error code 1

nbmake: stopped in /build/netbsd-compat/obj/i386/sys/arch/i386/compile/TEST
1 error



On Mon, 19 Oct 2020, Christos Zoulas wrote:


Module Name:src
Committed By:   christos
Date:   Mon Oct 19 19:33:02 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: MODULAR files.amd64
src/sys/kern: compat_stub.c core_elf32.c files.kern kern_core.c
kern_sig.c
src/sys/modules/coredump: Makefile
src/sys/modules/exec_elf32: Makefile
src/sys/modules/exec_elf64: Makefile
src/sys/modules/ptrace_common: Makefile
src/sys/sys: compat_stub.h exec_elf.h
Added Files:
src/sys/modules/ptrace_common: machdep.mk

Log Message:
Arrange so that no options COREDUMP and no options PTRACE work together.
Thanks to Paul Goyette for testing.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/conf/MODULAR
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/amd64/conf/files.amd64
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.65 -r1.66 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/files.kern
cvs rdiff -u -r1.30 -r1.31 src/sys/kern/kern_core.c
cvs rdiff -u -r1.390 -r1.391 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.6 -r1.7 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/exec_elf32/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/exec_elf64/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/ptrace_common/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/ptrace_common/machdep.mk
cvs rdiff -u -r1.23 -r1.24 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.167 -r1.168 src/sys/sys/exec_elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5f8dea32273387311682910!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-10-20 Thread Paul Goyette

I am getting errors, too, when I build a NOCOMPAT kernel:

#  link  NOCOMPAT/netbsd
/build/netbsd-compat/tools/x86_64/amd64/bin/x86_64--netbsd-ld -Map netbsd.map 
--cref -T netbsd.ldscript -Ttext 0x8020 -e start -z 
max-page-size=0x20 -X -o netbsd ${SYSTEM_OBJ:[@]:Nswapnetbsd.o} 
${EXTRA_OBJ} vers.o swapnetbsd.o
/build/netbsd-compat/tools/x86_64/amd64/bin/x86_64--netbsd-ld: kern_core.o: in 
function `coredump_modcmd':
/build/netbsd-compat/src_ro/sys/kern/kern_core.c:91: undefined reference to 
`real_coredump_elf32'
*** [netbsd] Error code 1


On Tue, 20 Oct 2020, Rin Okuyama wrote:


Hi,

This causes build failures for LP64 archs without COMPAT_NETBSD32,
i.e., alpha and ie64:

kern_core.o: in function `coredump_modcmd':
(.text+0x1c4): undefined reference to `real_coredump_elf32

https://releng.netbsd.org/builds/HEAD/202010200300Z/

(Failure for aarch64eb is irrelevant, and already fixed by ryo.)

Protect the code with COMPAT_NETBSD32 or EXEC_ELF32?

Thanks,
rin

On 2020/10/20 4:33, Christos Zoulas wrote:

Module Name:src
Committed By:   christos
Date:   Mon Oct 19 19:33:02 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: MODULAR files.amd64
src/sys/kern: compat_stub.c core_elf32.c files.kern kern_core.c
kern_sig.c
src/sys/modules/coredump: Makefile
src/sys/modules/exec_elf32: Makefile
src/sys/modules/exec_elf64: Makefile
src/sys/modules/ptrace_common: Makefile
src/sys/sys: compat_stub.h exec_elf.h
Added Files:
src/sys/modules/ptrace_common: machdep.mk

Log Message:
Arrange so that no options COREDUMP and no options PTRACE work together.
Thanks to Paul Goyette for testing.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/conf/MODULAR
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/amd64/conf/files.amd64
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.65 -r1.66 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/files.kern
cvs rdiff -u -r1.30 -r1.31 src/sys/kern/kern_core.c
cvs rdiff -u -r1.390 -r1.391 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.6 -r1.7 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/exec_elf32/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/exec_elf64/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/ptrace_common/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/ptrace_common/machdep.mk
cvs rdiff -u -r1.23 -r1.24 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.167 -r1.168 src/sys/sys/exec_elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5f8ed8b3121927188711769!



++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern

2020-08-02 Thread Paul Goyette

On Sun, 2 Aug 2020, Kamil Rytarowski wrote:


On 02.08.2020 15:57, Taylor R Campbell wrote:

But it sounds like the original motivation is that it triggered
-Wvla...which frankly strikes me as a compiler bug since there's
obviously no actual VLA created in sizeof; as far as I can tell
there's no semantic difference between sizeof(device_t[n]) and
sizeof(device_t) * n.



This is not true:

#include 

int
main(int argc, char **argv)
{
   printf("sizeof = %zu\n", sizeof(int[argc]));
   return 0;
}

$ ./a.out

sizeof = 4
$ ./a.out 12 3
sizeof = 12
$ ./a.out 12 3 45 6
sizeof = 20


Modifying your example slightly, I print both variations:

#include 

int
main(int argc, char **argv)
{
printf("sizeof = %zu\t%zu\n", sizeof(int[argc]), sizeof(int) * argc);
return 0;
}
speedy:paul {653} ./a.out
sizeof = 4  4
speedy:paul {654} ./a.out 12 3
sizeof = 12 12
speedy:paul {655} ./a.out 12 3 45 6
sizeof = 20 20


Looks the same to me!


++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src

2020-07-04 Thread Paul Goyette

On Sat, 4 Jul 2020, Chuck Silvers wrote:


Hi Paul,

it's not clear to me why you were trying to do the thing that
you were having trouble with in that PR...  there shouldn't
have been any need to include any xen headers or have any
xen-conditional code in a module in the first place.

x86/cpu_ucode.c provides the same set of functions for both XEN and native
kernels, so it would be fine to call those functions from a compat module.
and it looks like x86/compat_60_cpu_ucode.c already does that.


Yeah, but the code #include'd some md headers that ended up being
xen headers, which brought in other xen stuff, which resulted in
some stuff being in the wrong order to get good values.

I'm pretty sure that I managed to exclude compat_60_cpu_ucode.c from
the compat_60 module to avoid this - the .if at the bottom was to
include compat_60_cpu_ucode.cONLY for i386 or amd64 but NOT xen.

With your recent commits I'll see if it works now.





-Chuck


On Sat, Jul 04, 2020 at 04:11:14PM -0700, Paul Goyette wrote:

Chuck,

Does this mean that PR port-xen/53130 is no longer relevant?  And I
can now include microcode-loader compat code in the appropriate
compat_xx module?

:)


On Sat, 4 Jul 2020, Chuck Silvers wrote:


Module Name:src
Committed By:   chs
Date:   Sat Jul  4 21:02:16 UTC 2020

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.i386
src/share/mk: bsd.own.mk
src/sys/arch/x86/x86: x86_machdep.c
src/sys/modules/arch: archdirs.mk
Removed Files:
src/sys/modules/arch/x86/amd64-xen: Makefile bsd.amd64-xen.mk
src/sys/modules/arch/x86/i386pae-xen: Makefile bsd.i386pae-xen.mk

Log Message:
the x86 xen and non-xen modules are identical,
so remove the unneeded extra copies.
Xen kernels now use the same modules as native kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/distrib/sets/lists/modules/md.amd64 \
   src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.1199 -r1.1200 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/arch/archdirs.mk
cvs rdiff -u -r1.1 -r0 src/sys/modules/arch/x86/amd64-xen/Makefile
cvs rdiff -u -r1.2 -r0 src/sys/modules/arch/x86/amd64-xen/bsd.amd64-xen.mk
cvs rdiff -u -r1.1 -r0 src/sys/modules/arch/x86/i386pae-xen/Makefile
cvs rdiff -u -r1.2 -r0 \
   src/sys/modules/arch/x86/i386pae-xen/bsd.i386pae-xen.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.







++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


!DSPAM:5f0129f9286362089320970!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src

2020-07-04 Thread Paul Goyette

Chuck,

Does this mean that PR port-xen/53130 is no longer relevant?  And I
can now include microcode-loader compat code in the appropriate
compat_xx module?

:)


On Sat, 4 Jul 2020, Chuck Silvers wrote:


Module Name:src
Committed By:   chs
Date:   Sat Jul  4 21:02:16 UTC 2020

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.i386
src/share/mk: bsd.own.mk
src/sys/arch/x86/x86: x86_machdep.c
src/sys/modules/arch: archdirs.mk
Removed Files:
src/sys/modules/arch/x86/amd64-xen: Makefile bsd.amd64-xen.mk
src/sys/modules/arch/x86/i386pae-xen: Makefile bsd.i386pae-xen.mk

Log Message:
the x86 xen and non-xen modules are identical,
so remove the unneeded extra copies.
Xen kernels now use the same modules as native kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/distrib/sets/lists/modules/md.amd64 \
   src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.1199 -r1.1200 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/arch/archdirs.mk
cvs rdiff -u -r1.1 -r0 src/sys/modules/arch/x86/amd64-xen/Makefile
cvs rdiff -u -r1.2 -r0 src/sys/modules/arch/x86/amd64-xen/bsd.amd64-xen.mk
cvs rdiff -u -r1.1 -r0 src/sys/modules/arch/x86/i386pae-xen/Makefile
cvs rdiff -u -r1.2 -r0 \
   src/sys/modules/arch/x86/i386pae-xen/bsd.i386pae-xen.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5f00ee9a272741339312858!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/tests/lib/libarchive

2020-06-16 Thread Paul Goyette

On Tue, 16 Jun 2020, Martin Husemann wrote:


On Tue, Jun 16, 2020 at 09:12:40AM -0700, Paul Goyette wrote:

It might be better to run the test in a rump-kernel rather than in a
"live" environment


The test this is about is a plain userland test:

it extracts/compresses/decompresses various archive formats and compares
results.

Only thing "special" is that it is in big parts cpu bound, and multi-threaded.

If NetBSD can not gracefully deal with that, something is very wrong
(which since about a month it is). This PR is on the "must be fixed before
branching netbsd-10" list, and I hope it will be fixed quickly.


Ah, my bad.  I thought it was the watch-dog that was being tested.

I certainly agree that it needs to fixed ASAP.


++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/tests/lib/libarchive

2020-06-16 Thread Paul Goyette

On Tue, 16 Jun 2020, Greg Troxel wrote:


Jason Thorpe  writes:


On Jun 16, 2020, at 8:43 AM, Martin Husemann  wrote:

No, that is definitively not OK, which is what the PR is about.

It is not OK for a regular atf run to cause a reboot of the test machine
though, so this is a temporary hack around the issue (and admitedly a very
ugly hack).


At the very least, the user-land watchdog tickler should wire itself down.


My impression of the point is that it be normal, so that the system
reboots if normal processes cannot be run.It seems like once
whatever bug exists is fixed, wiring is probably not necessary anyway.


It might be better to run the test in a rump-kernel rather than in a
"live" environment


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/dev/usb

2020-05-27 Thread Paul Goyette

On Wed, 27 May 2020, Taylor R Campbell wrote:


Not really, because we just need to know whether usb_once_init has
been run.


OK, great!


Now, should we use something other than RUN_ONCE, which can both set
up and tear down?  Sure, that might be better in principle, but there
probably aren't that many systems that have hotpluggable USB in which
you might unplug _all_ of the USBs and where you really want to save
the cost of a couple kernel threads.  So not likely worth much effort.


I was thinking more in terms of someone using drvctl(8) to cause the
detach.  But yeah, it's not a very common use-case, so as long as we
don't _need_ the decrement, it's not worth losing any sleep.   :)

Thanks for the reply.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/dev/usb

2020-05-27 Thread Paul Goyette

Do you also need to decrement the number of busses when one is
detached?

On Wed, 27 May 2020, Nick Hudson wrote:


Module Name:src
Committed By:   skrll
Date:   Wed May 27 07:17:45 UTC 2020

Modified Files:
src/sys/dev/usb: usb.c

Log Message:
Don't allow open of /dev/usb if there are no attached busses.

PR kern/55303 mutex_vector_enter,512: uninitialized lock


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/dev/usb/usb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5ece145a266021866921056!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src

2020-04-26 Thread Paul Goyette

On Sun, 26 Apr 2020, Maxime Villard wrote:


Le 26/04/2020 à 14:05, Paul Goyette a écrit :

Why are these files being placed in src/tests/modules?


Because I modeled my tests after the ufetchstore and threadpool tests
which are both in this directory and provide user access to kernel
internals via modules, which is exactly what I'm doing.

Also it looks like the t_kcov one doesn't match your definition of
what this directory should be about.


Yes, those are also mis-placed.


That directory is supposed to contain tests of the module feature;
it is not intended to place modules-that-support-tests-of-other-
features.

Can you please put these in src/tests/sys/ or somewhere more
appropriate?




On Sun, 26 Apr 2020, Maxime Villard wrote:


Module Name:    src
Committed By:    maxv
Date:    Sun Apr 26 09:08:41 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: md.amd64
src/distrib/sets/lists/tests: md.amd64
src/tests/modules: Makefile
Added Files:
src/tests/modules: t_x86_pte.c
src/tests/modules/x86_pte_tester: Makefile x86_pte_tester.c

Log Message:
Add tests on the x86 PTEs. We scan the MMU page tables directly and verify
certain properties.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/tests/md.amd64
cvs rdiff -u -r1.18 -r1.19 src/tests/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/modules/t_x86_pte.c
cvs rdiff -u -r0 -r1.1 src/tests/modules/x86_pte_tester/Makefile \
   src/tests/modules/x86_pte_tester/x86_pte_tester.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.







++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


!DSPAM:5ea57d44212103157353641!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+

Re: CVS commit: src

2020-04-26 Thread Paul Goyette

Why are these files being placed in src/tests/modules?

That directory is supposed to contain tests of the module feature;
it is not intended to place modules-that-support-tests-of-other-
features.

Can you please put these in src/tests/sys/ or somewhere more
appropriate?




On Sun, 26 Apr 2020, Maxime Villard wrote:


Module Name:src
Committed By:   maxv
Date:   Sun Apr 26 09:08:41 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: md.amd64
src/distrib/sets/lists/tests: md.amd64
src/tests/modules: Makefile
Added Files:
src/tests/modules: t_x86_pte.c
src/tests/modules/x86_pte_tester: Makefile x86_pte_tester.c

Log Message:
Add tests on the x86 PTEs. We scan the MMU page tables directly and verify
certain properties.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/tests/md.amd64
cvs rdiff -u -r1.18 -r1.19 src/tests/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/modules/t_x86_pte.c
cvs rdiff -u -r0 -r1.1 src/tests/modules/x86_pte_tester/Makefile \
   src/tests/modules/x86_pte_tester/x86_pte_tester.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5ea54fda15308349521!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/include

2020-04-17 Thread Paul Goyette

On Fri, 17 Apr 2020, Kamil Rytarowski wrote:


On 17.04.2020 22:22, Joerg Sonnenberger wrote:

On Fri, Apr 17, 2020 at 03:22:35PM +, Kamil Rytarowski wrote:

Module Name:src
Committed By:   kamil
Date:   Fri Apr 17 15:22:35 UTC 2020

Modified Files:
src/include: assert.h

Log Message:
Remove the static_assert() fallback for pre-C11 and pre-C++11

C++ without real static_assert() can be incompatible with the C fallback
as presented in openjdk.

A pre-C11 compiler can be picky on the implementation.


So did you actually test that the tree compiles with this? Just asking,
since your own ptrace tests depend on static_assert...

Joerg



I will fix it!


And please test...   :)


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/include

2020-04-17 Thread Paul Goyette

On Fri, 17 Apr 2020, Joerg Sonnenberger wrote:


On Fri, Apr 17, 2020 at 03:22:35PM +, Kamil Rytarowski wrote:

Module Name:src
Committed By:   kamil
Date:   Fri Apr 17 15:22:35 UTC 2020

Modified Files:
src/include: assert.h

Log Message:
Remove the static_assert() fallback for pre-C11 and pre-C++11

C++ without real static_assert() can be incompatible with the C fallback
as presented in openjdk.

A pre-C11 compiler can be picky on the implementation.


So did you actually test that the tree compiles with this? Just asking,
since your own ptrace tests depend on static_assert...


Obviousliy this change was not tested...

dependall ===> tests/lib/libc/sys
#   compile  sys/t_ptrace_wait.o
/build/netbsd-local/tools/x86_64/amd64/bin/x86_64--netbsd-gcc -O2   -std=gnu99  
  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-sign-compare  -Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings  
-Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra 
-Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2  
-Wno-format-zero-length  -Werror -Wno-missing-noreturn -fPIE  -g   
--sysroot=/build/netbsd-local/dest/amd64 
-I/build/netbsd-local/src_ro/tests/lib/libc/sys/../../..  -c   -D_KERNTYPES 
-D__TEST_FENV -DENABLE_TESTS 
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:77:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_report_event) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:79:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_report_event and si_pe_report_event must be of the same size");
 ^
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:80:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_other_pid) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:82:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_other_pid and si_pe_other_pid must be of the same size");
 ^~~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:83:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_lwp) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:85:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_lwp and si_pe_lwp must be of the same size");
 ^~~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:86:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_other_pid) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:88:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_other_pid and pe_lwp must be of the same size");
 ^~
*** [t_ptrace_wait.o] Error code 1
nbmake: stopped in /build/netbsd-local/src_ro



++----------+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Paul Goyette

On Wed, 1 Apr 2020, Kamil Rytarowski wrote:


On 01.04.2020 15:47, Robert Elz wrote:

Date:Wed, 1 Apr 2020 11:45:53 +
From:"Kamil Rytarowski" 
Message-ID:  <20200401114554.05167f...@cvs.netbsd.org>

  | Log Message:
  | Avoid comparison between signed and unsigned integer
  |
  | Cast PAGE_SIZE to size_t.

This kind of pedantry is going way too far, PAGE_SIZE is a compile
time constant (1 << PAGE_SHIFT) which is an int (and so signed,
nominally) but one which is known to be positive.



I got reports that certain ports no longer build due to:

src/sys/modules/examples/fopsmapper/fopsmapper.c:118:11: error:
comparison between signed and unsigned integer expressions
[-Werror=sign-compare]
 if (size != PAGE_SIZE)
  ^~
cc1: all warnings being treated as errors



There's a lot of modules that fail for this with WARNS=5 when being
built as loadable modules.

That's why so many of the individual module Makefiles have explicit
WARNS=4.  (It seems that when modules are built-in as part of the
kernel, they are by default built with WARNS=4.)



++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src

2020-03-23 Thread Paul Goyette

On Mon, 23 Mar 2020, Paul Goyette wrote:


On Mon, 23 Mar 2020, J. Hannken-Illjes wrote:


Are sure it is ok to detach a non-attached event?


No, it is not OK!  And it is also not necessary to check (paranoia on
my part).

I'm rebuilding now, and will commit as soon as I verify that the tests
run successfully.


Committed.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src

2020-03-23 Thread Paul Goyette

On Mon, 23 Mar 2020, J. Hannken-Illjes wrote:


Are sure it is ok to detach a non-attached event?


No, it is not OK!  And it is also not necessary to check (paranoia on
my part).

I'm rebuilding now, and will commit as soon as I verify that the tests
run successfully.

Sorry for the disruption.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src

2020-03-23 Thread Paul Goyette

I will investigate


On Mon, 23 Mar 2020, J. Hannken-Illjes wrote:


On 22. Mar 2020, at 14:30, Paul Goyette  wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sun Mar 22 13:30:11 UTC 2020

Modified Files:
src/lib/librumpuser: rumpuser_dl.c
src/sys/rump/include/rump: rumpuser.h
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Teach rump to process __link_set_evcnts entries.  (Second part of
fix for PR kern/55088)


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/librumpuser/rumpuser_dl.c
cvs rdiff -u -r1.115 -r1.116 src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.342 -r1.343 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


This gives me 885 failed test cases for tests/fs:

Core was generated by `t_vnops'.
Program terminated with signal SIGSEGV, Segmentation fault.

#0  0x70040647dac3 in evcnt_detach (ev=0x700404e031c0)
   at src/lib/librump/../../sys/rump/../kern/subr_evcnt.c:193
#1  0x7004064b93da in add_static_evcnt (ev=0x700404e031c0)
   at src/lib/librump/../../sys/rump/librump/rumpkern/rump.c:657
#2  0x70040600442a in process_object (
   doevcntattach=0x7004064b93d1 ,
   docompload=0x7004064b93f1 ,
   domodinit=0x7004064b93e3 , handle=0x70040bbd9000)
   at src/lib/librumpuser/rumpuser_dl.c:392
#3  rumpuser_dl_bootstrap (
   domodinit=domodinit@entry=0x7004064b93e3 ,
   symload=symload@entry=0x7004064b94e2 ,
   compload=compload@entry=0x7004064b93f1 ,
   doevcntattach=doevcntattach@entry=0x7004064b93d1 )
   at src/lib/librumpuser/rumpuser_dl.c:499
#4  0x7004064b9b5f in rump_init ()
   at src/lib/librump/../../sys/rump/librump/rumpkern/rump.c:426

Are sure it is ok to detach a non-attached event?

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig



++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/dev/usb

2020-03-13 Thread Paul Goyette

On Sat, 14 Mar 2020, Valery Ushakov wrote:


On Fri, Mar 13, 2020 at 14:17:42 -0400, Christos Zoulas wrote:


Log Message:
PR/55068: sc.dying: Fix printf formats:

[...]

- 0x% -> %#


This was not a part of the PR and is completely cosmetic (surely it
supports plain %x if it does support %#x).  Why was this necessary?
(I know I would be quite miffed if someone made a change like that to
my code).


Plain %x - no  :(

In order to enable sysctl-transport to userland, all the args need to
be promoted to %jx, and the format strings need to ensure that they
consume that size.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/compat/netbsd32

2020-03-08 Thread Paul Goyette

On Mon, 9 Mar 2020, Paul Goyette wrote:


Module Name:src
Committed By:   pgoyette
Date:   Mon Mar  9 01:06:34 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32_mod.c

Log Message:
If a syscall requires a module to be autoloaded, the initial invocation
of that syscall will return ERESTART.  For amd64's netbsd32_syscall()
that means we need to back up the PC saved in the trap frame so we can
re-issue the syscall instruction.  For "normal" syscall traps, we saved
the instruction length in the trap frame, but this was missing for the
oosyscall/lcall path.  Since the PC was not backed up, the kernel-only
value ERESTART was returned to userland, causing all sort of grief for
old compat_netbsd32 executables!


While here, I also added some comments on some recent #endif to better
identify their associated #if - no functional change intended for this.



XXX Pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/netbsd32/netbsd32_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5e6596db22973983836595!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


re: CVS commit: src/sys/conf

2020-03-05 Thread Paul Goyette

On Fri, 6 Mar 2020, matthew green wrote:


Paul Goyette writes:

On Thu, 5 Mar 2020, Paul Goyette wrote:


also aarch64 has no EXEC_AOUT.


Does aarch64 have COMPAT_NETBSD32?  If so, I will adjust my fix.  (I
built 67 different architectures, including all of the ones that the
releng build cluster is building, and did not have any problems with
aarch64 or any other.)


As near as I can tell, aarch64 sets MACHINE_CPU to "aarch64", so it
will not try to build COMPAT_NETBSD32 due to the following tests in
$SRC/sys/compat/netbsd32/netbsd32.mk

.if ${MACHINE_ARCH} == "x86_64" \
 || ${MACHINE_CPU} == "arm" \
 || ${MACHINE_ARCH} == "sparc64" \
 || (!empty(MACHINE_ARCH:Mmips64*) && !defined(BSD_MK_COMPAT_FILE))
COMPAT_USE_NETBSD32?=yes
.else
COMPAT_USE_NETBSD32?=no
.endif


Perhaps the <<<< line should be changed to "aarch64" instead of "arm" ?


what <<< line? :-)

arm64 should be adde here, yes.  arm should remain -- it's
a fake netbsd32 in that it handles the old 32 bit ABI on
32 bit arm systems, so it's still useful.  we're not able
to support both that and EABI on arm64 currently (not sure
how it would be easy without making it possible to compile
the netbsd32 code twice, since there are additional layout
differences that are difficult to handle without letting
the compiler do it for you.)

sorry, i should have added arm64 here when i was looking
at it but i missed it.


Ooopppsss, forgot to tag the <<< line!

Anyway, I actually fixed it differently, in sys/conf/files
rev 1.1259


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/conf

2020-03-05 Thread Paul Goyette

OK, I reproduced it, and have commited a fix for aarch64.  I will also
include this in the pullup requests for -9 and -8

On Thu, 5 Mar 2020, Paul Goyette wrote:


On Fri, 6 Mar 2020, Ryo Shimizu wrote:




also aarch64 has no EXEC_AOUT.


Does aarch64 have COMPAT_NETBSD32?  If so, I will adjust my fix.  (I
built 67 different architectures, including all of the ones that the
releng build cluster is building, and did not have any problems with
aarch64 or any other.)


it seems that releng build was failed. 
http://releng.netbsd.org/builds/HEAD/202003050510Z/evbarm-aarch64.build.failed


Hmmm, I wonder why I didn't see this.  I have another build running to
reproduce.


Yes, optinos COMPAT_NETBSD32 is exists in sys/arch/evbarm/conf/GENERIC64.
but EXEC_AOUT is not supported. (yet?)


OK, I'll get this all fixed up as soon as I can.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+

!DSPAM:5e614c09108991373011237!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/conf

2020-03-05 Thread Paul Goyette

On Fri, 6 Mar 2020, Ryo Shimizu wrote:




also aarch64 has no EXEC_AOUT.


Does aarch64 have COMPAT_NETBSD32?  If so, I will adjust my fix.  (I
built 67 different architectures, including all of the ones that the
releng build cluster is building, and did not have any problems with
aarch64 or any other.)


it seems that releng build was failed. 
http://releng.netbsd.org/builds/HEAD/202003050510Z/evbarm-aarch64.build.failed


Hmmm, I wonder why I didn't see this.  I have another build running to
reproduce.


Yes, optinos COMPAT_NETBSD32 is exists in sys/arch/evbarm/conf/GENERIC64.
but EXEC_AOUT is not supported. (yet?)


OK, I'll get this all fixed up as soon as I can.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/conf

2020-03-05 Thread Paul Goyette

On Thu, 5 Mar 2020, Paul Goyette wrote:


also aarch64 has no EXEC_AOUT.


Does aarch64 have COMPAT_NETBSD32?  If so, I will adjust my fix.  (I
built 67 different architectures, including all of the ones that the
releng build cluster is building, and did not have any problems with
aarch64 or any other.)


As near as I can tell, aarch64 sets MACHINE_CPU to "aarch64", so it
will not try to build COMPAT_NETBSD32 due to the following tests in
$SRC/sys/compat/netbsd32/netbsd32.mk

.if ${MACHINE_ARCH} == "x86_64" \
|| ${MACHINE_CPU} == "arm" \
|| ${MACHINE_ARCH} == "sparc64" \
|| (!empty(MACHINE_ARCH:Mmips64*) && !defined(BSD_MK_COMPAT_FILE))
COMPAT_USE_NETBSD32?=yes
.else
COMPAT_USE_NETBSD32?=no
.endif


Perhaps the <<<< line should be changed to "aarch64" instead of "arm" ?


+----+--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/conf

2020-03-05 Thread Paul Goyette

On Thu, 5 Mar 2020, Ryo Shimizu wrote:




Module Name:src
Committed By:   pgoyette
Date:   Wed Mar  4 02:20:57 UTC 2020

Modified Files:
src/sys/conf: files

Log Message:
mips64 has compat_netbsd32 but cannot have exec_aout; all other users
of compat_netbsd32 need exec_aout

Addresses PR kern/55037.

XXX pullup-9


also aarch64 has no EXEC_AOUT.


Does aarch64 have COMPAT_NETBSD32?  If so, I will adjust my fix.  (I
built 67 different architectures, including all of the ones that the
releng build cluster is building, and did not have any problems with
aarch64 or any other.)


BTW, s/COMPAT_NETBSD64/COMPAT_NETBSD32/ in comment?


Ooops!  I just fixed that, and will add it to the pull-up requests.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/conf

2020-03-03 Thread Paul Goyette

On Wed, 4 Mar 2020, Paul Goyette wrote:


Module Name:src
Committed By:   pgoyette
Date:   Wed Mar  4 02:20:57 UTC 2020

Modified Files:
src/sys/conf: files

Log Message:
mips64 has compat_netbsd32 but cannot have exec_aout; all other users
of compat_netbsd32 need exec_aout

Addresses PR kern/55037.

XXX pullup-9


Also XXX pullup-8



Re: CVS commit: src/tests/modules

2020-02-22 Thread Paul Goyette

On Sat, 22 Feb 2020, Kamil Rytarowski wrote:


While there, it would be good to implement modctl(MODCTL_MODSTAT,
) to check whether a specific module is loaded into the kernel
and retrieve modstat_t describing it.

modstat_t m;
strlcpy(_name, "haxm", MAXMODNAME);
if (modctl(MODCTL_MODSTAT, ) == -1)
 err(EXIT_FAILURE, "modctl: haxm");

I have got use-cases for these checks and I envision their wider usage
in future. We already have 3 use-cases in ATF tests.


I can probably do this fairly quickly.?? But I'll have to look closer
at the argument/result passing, especially WRT the module's list of
"required" modules.


Thinking a bit more, it's probably easiest just to retrieve the entire
list of modules with modctl(MODCTL_STAT, ...) and then scan the returned
list and compare against ms_name, as is done in modstat(8).

Before I invest much time in this, I'd appreciate other opinions on
whether a new option is necessary/desirable.




Performance is probably not critical so it sounds fine.

I would like to have at least get_modstat_info() from t_modctl.c in
libutil.


Sure that seems reasonable to me.

Assuming that noone else objects, please feel free to move it.  I
think we should also update the test program to use the new libutil
version (rather than duplicating the code).  Also update the libutil
man page?

I guess that the return type of get_modstat_info() should be changed
to int rather than bool?  And that it shouldn't directly print error
messages?  :)



++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+

Re: CVS commit: src/tests/modules

2020-02-22 Thread Paul Goyette

On Sat, 22 Feb 2020, Paul Goyette wrote:


While there, it would be good to implement modctl(MODCTL_MODSTAT,
) to check whether a specific module is loaded into the kernel
and retrieve modstat_t describing it.

modstat_t m;
strlcpy(_name, "haxm", MAXMODNAME);
if (modctl(MODCTL_MODSTAT, ) == -1)
   err(EXIT_FAILURE, "modctl: haxm");

I have got use-cases for these checks and I envision their wider usage
in future. We already have 3 use-cases in ATF tests.


I can probably do this fairly quickly.  But I'll have to look closer
at the argument/result passing, especially WRT the module's list of
"required" modules.


Thinking a bit more, it's probably easiest just to retrieve the entire
list of modules with modctl(MODCTL_STAT, ...) and then scan the returned
list and compare against ms_name, as is done in modstat(8).

Before I invest much time in this, I'd appreciate other opinions on
whether a new option is necessary/desirable.


++--+-------+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/tests/modules

2020-02-22 Thread Paul Goyette

On Sat, 22 Feb 2020, Kamil Rytarowski wrote:


I have got no opinion. Please rearrange the directories as needed.


It's too much bother for now to move things around.  But for future
changes it would be good to put new "helper" modules in the same area
as the tests being helped.


While there, it would be good to implement modctl(MODCTL_MODSTAT,
) to check whether a specific module is loaded into the kernel
and retrieve modstat_t describing it.

modstat_t m;
strlcpy(_name, "haxm", MAXMODNAME);
if (modctl(MODCTL_MODSTAT, ) == -1)
   err(EXIT_FAILURE, "modctl: haxm");

I have got use-cases for these checks and I envision their wider usage
in future. We already have 3 use-cases in ATF tests.


I can probably do this fairly quickly.  But I'll have to look closer
at the argument/result passing, especially WRT the module's list of
"required" modules.


++------+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/tests/modules

2020-02-21 Thread Paul Goyette

OK, I over-reacted and didn't completely read the original commit
message.

The t_builtin.c stuff is indeed a test-of-module-functionality
so it does belong here.

But some of the other stuff here does not belong, such as the 
threadpool, fetchstore, and kcov stuff.  As far as I can see,

those all belong somewhere else, probably in the tests/sys/...
hierarchy.

Anyway, my apologies for over-reacting to this commit.  And
thanks to riastradh@ for pointing this out (on IRC).



On Fri, 21 Feb 2020, Paul Goyette wrote:


Really, the tests/modules directory should be only used for tests-that-
relate-to-module-functionality.  It should NOT be used for modules-
that-support-tests-of-other-functionality.

In the future, please do not put support modules here;  put them in the
samae place as the tests that they support.


On Sat, 22 Feb 2020, Kamil Rytarowski wrote:


Module Name:src
Committed By:   kamil
Date:   Sat Feb 22 00:18:55 UTC 2020

Modified Files:
src/tests/modules: t_builtin.c

Log Message:
Avoid undefined behavior in disabledstat

t_builtin.c:174:16, member access within misaligned address 0x741271c25004
for type 'struct modstat_t'

t_builtin.c:175:4, member access within misaligned address 0x741271c251c4
for type 'struct modstat_t'


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/modules/t_builtin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5e5073af66043393299806!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+



++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/tests/modules

2020-02-21 Thread Paul Goyette

Really, the tests/modules directory should be only used for tests-that-
relate-to-module-functionality.  It should NOT be used for modules-
that-support-tests-of-other-functionality.

In the future, please do not put support modules here;  put them in the
samae place as the tests that they support.


On Sat, 22 Feb 2020, Kamil Rytarowski wrote:


Module Name:src
Committed By:   kamil
Date:   Sat Feb 22 00:18:55 UTC 2020

Modified Files:
src/tests/modules: t_builtin.c

Log Message:
Avoid undefined behavior in disabledstat

t_builtin.c:174:16, member access within misaligned address 0x741271c25004
for type 'struct modstat_t'

t_builtin.c:175:4, member access within misaligned address 0x741271c251c4
for type 'struct modstat_t'


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/modules/t_builtin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5e5073af66043393299806!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/sys

2020-01-29 Thread Paul Goyette

On Wed, 29 Jan 2020, Andrew Doran wrote:


  | Log Message:
  | Put pri_t back to an int.  It looks like there might be a sign extension
  | issue somewhere but it's not worth the hassle trying to find it.

This changes the kernel internal ABI doesn't it?   It would have needed
a kernel version bump when the reverted change was made, and now needs
one it has been removed, doesn't it?


Yes it does.  I made one later yesterday.  My changes today need another but
Jason already bumped the version earlier in the day, and I think one a day
is enough!


Yeah - ride the bump!



++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys [freeze on boot]

2020-01-20 Thread Paul Goyette

On Mon, 20 Jan 2020, Patrick Welche wrote:


On Mon, Jan 20, 2020 at 12:51:00PM +, Andrew Doran wrote:

This also happened the last time I touched rw_downgrade(), and I backed out
the change then, but both times I don't see the bug.  I have some questions:

- Are you running DIAGNOSTIC and/or LOCKDEBUG?  I would be very interested
  to see what happens with a LOCKDEBUG kernel here.


Hmmm, at least on x86, in the LOCKDEBUG case we don't use the assembler
stubs;  we simply use the C versions.

On IRC/ICB, mlelstv has indicated there's something wrong in the stubs,
but I don't see it.


One worked with the addition of LOCKDEBUG. The other didn't, but it seems
to be unrelated:


Yeah, that backtrace looks unrelated.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys [freeze on boot]

2020-01-20 Thread Paul Goyette

On Mon, 20 Jan 2020, Andrew Doran wrote:


Hi,

This also happened the last time I touched rw_downgrade(), and I backed out
the change then, but both times I don't see the bug.  I have some questions:

- Are you running DIAGNOSTIC and/or LOCKDEBUG?  I would be very interested
 to see what happens with a LOCKDEBUG kernel here.


I am running a stock GENERIC kernel, as part of an ``anita install''
operation.  Since it can't boot the install process, it's not possible
to use a custom kernel.  AFAIR, GENERIC includes DIAGNOSTIC but does
not include LOCKDEBUG.


- Do you have an ATI Radeon graphics chip?


The qemu install uses serial console.  It does emulate some graphics
card, but not sure which one.


- Are you using ZFS?


Definitely not!


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys

2020-01-19 Thread Paul Goyette

On Mon, 20 Jan 2020, Ryo ONODERA wrote:


Hi,

After this commit, the kernel stalls just before root file system
will be found on my NetBSD/amd64 laptop.

Reverting
src/sys/kern/kern_rwlock.c to r1.60
and
src/sys/sys/rwlock.h to r1.12
in latest -current tree and I can get the kernel that works like
before.

And on another laptop, the problematic kernel stalls before root file
system detection like my laptop.

It may be universal problem.

Could you take a look at this problem?


I ran into the same problem trying to do an ``anita install'' under
qemu.  It got as far as identifying the boot device, and then hang.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+



Re: boottime

2020-01-04 Thread Paul Goyette

As discussed on IRC/ICB, while we don't claim compatability, in this
case it doesn't hurt to provide it.

On Sat, 4 Jan 2020, m...@netbsd.org wrote:


- Forwarded message from Paul Goyette  -
Log Message:
Resurrect boottime, but only in the compat_90 module (whether built-in
or separately loaded).  This will enable running of old vmstat(1) images
on newer kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/compat_90_mod.c



Why? we don't claim compatibility for libkvm users.

!DSPAM:5e105996108288244013799!




++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/arch (multiboot2 support)

2019-12-10 Thread Paul Goyette

This commit seems to have broken amd64 booting!  When booting into
a qemu environment (as set up by misc/py-anita), it just hangs while
printing the "progress numbers with the spinny cursor".  Others on
irc/icb have indicated an immediate crash.

Seems like non-efi booting is borked.



Module Name:src
Committed By:   manu
Date:   Tue Dec 10 02:06:07 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: locore.S machdep.c
src/sys/arch/amd64/conf: GENERIC files.amd64 kern.ldscript
src/sys/arch/x86/x86: efi.c multiboot2.c

Log Message:
Add multiboot 2 support to amd64 kernel


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.342 -r1.343 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.548 -r1.549 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/amd64/conf/files.amd64
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/conf/kern.ldscript
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/x86/efi.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/x86/multiboot2.c


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/kern

2019-12-09 Thread Paul Goyette

On Mon, 9 Dec 2019, Andrew Doran wrote:


Module Name:src
Committed By:   ad
Date:   Mon Dec  9 21:05:23 UTC 2019

Modified Files:
src/sys/kern: kern_mutex.c

Log Message:
- Add a mutex_owner_running() for the benefit of the pagedaemon, which
 needs help with locking things in reverse order.


Should this be added to the mutex(9) man page?


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/sys/arch

2019-12-06 Thread Paul Goyette

On Fri, 6 Dec 2019, Martin Husemann wrote:


On Sat, Dec 07, 2019 at 06:30:55AM +1100, matthew green wrote:

Why? I consider this totaly useless bloat, what was wrong with the boot.cfg
solution?


policy:  no default modules in the installation unless licenses
issues force such, until module+kernel solution.


OK, but this is gone awry. The boot.cfg solution is great if anoyne
really needs this dmesg sugar, everyone else can go on using pcictl
later instead.


If they need the sugar they can always edit their own /etc/boot.cfg
and/or drop to the boot loader and manually load the module.


So now the (reasonable) policy forces a (relatively harmless, as easily
overidable but still useless) change into bloat for everyone. Can we
just revert to the state before the initial boot.cfg change instead?


Agreed.  No need to bloat for everyone, just bloat-on-demand (as
above, or build a local kernel with ``options PCIVERBOSE'' defined).


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


CVS commit: src/distrib/sets/lists/tests

2019-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov 30 04:06:23 UTC 2019

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add the new unit-tests for make(1) to the sets list, fixing the build.


To generate a diff of this commit:
cvs rdiff -u -r1.822 -r1.823 src/distrib/sets/lists/tests/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/tests

2019-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov 30 04:06:23 UTC 2019

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add the new unit-tests for make(1) to the sets list, fixing the build.


To generate a diff of this commit:
cvs rdiff -u -r1.822 -r1.823 src/distrib/sets/lists/tests/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.822 src/distrib/sets/lists/tests/mi:1.823
--- src/distrib/sets/lists/tests/mi:1.822	Sat Oct  5 18:06:16 2019
+++ src/distrib/sets/lists/tests/mi	Sat Nov 30 04:06:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.822 2019/10/05 18:06:16 jhigh Exp $
+# $NetBSD: mi,v 1.823 2019/11/30 04:06:22 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4177,6 +4177,8 @@
 ./usr/tests/usr.bin/make/unit-tests/varcmd.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmisc.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmisc.mk	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varmod-edge.exp	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varmod-edge.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varquote.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varquote.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varshell.exp	tests-usr.bin-tests	compattestfile,atf



CVS commit: src/distrib/notes/common

2019-11-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 25 15:40:18 UTC 2019

Modified Files:
src/distrib/notes/common: main

Log Message:
Improve heading a bit.  While here, use quotes to group some of the
words to avoid the 9-arg limitation of .Ss


To generate a diff of this commit:
cvs rdiff -u -r1.555 -r1.556 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/notes/common

2019-11-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 25 15:40:18 UTC 2019

Modified Files:
src/distrib/notes/common: main

Log Message:
Improve heading a bit.  While here, use quotes to group some of the
words to avoid the 9-arg limitation of .Ss


To generate a diff of this commit:
cvs rdiff -u -r1.555 -r1.556 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.555 src/distrib/notes/common/main:1.556
--- src/distrib/notes/common/main:1.555	Sun Nov 24 16:16:21 2019
+++ src/distrib/notes/common/main	Mon Nov 25 15:40:18 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.555 2019/11/24 16:16:21 pgoyette Exp $
+.\"	$NetBSD: main,v 1.556 2019/11/25 15:40:18 pgoyette Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -519,8 +519,8 @@ would not exist.
 .
 .ie \n[RELEASE_BRANCH] .Ss Changes Between The NetBSD \n[oldvers] \
 and \n[major] Releases
-.el .Ss Changes Between The NetBSD \n[oldvers], \
-the \n[major] Releases, and newer.
+.el .Ss "Changes Between The NetBSD \n[oldvers] and" \
+\n[major] Releases, and newer.
 .Pp
 The
 .Nx



CVS commit: src/distrib/notes/common

2019-11-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Nov 24 16:16:21 UTC 2019

Modified Files:
src/distrib/notes/common: main

Log Message:
Add "Oxford comma"


To generate a diff of this commit:
cvs rdiff -u -r1.554 -r1.555 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.554 src/distrib/notes/common/main:1.555
--- src/distrib/notes/common/main:1.554	Sun Nov 24 11:15:33 2019
+++ src/distrib/notes/common/main	Sun Nov 24 16:16:21 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.554 2019/11/24 11:15:33 martin Exp $
+.\"	$NetBSD: main,v 1.555 2019/11/24 16:16:21 pgoyette Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -520,7 +520,7 @@ would not exist.
 .ie \n[RELEASE_BRANCH] .Ss Changes Between The NetBSD \n[oldvers] \
 and \n[major] Releases
 .el .Ss Changes Between The NetBSD \n[oldvers], \
-the \n[major] Releases and newer.
+the \n[major] Releases, and newer.
 .Pp
 The
 .Nx



CVS commit: src/distrib/notes/common

2019-11-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Nov 24 16:16:21 UTC 2019

Modified Files:
src/distrib/notes/common: main

Log Message:
Add "Oxford comma"


To generate a diff of this commit:
cvs rdiff -u -r1.554 -r1.555 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-11-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Nov 22 15:57:49 UTC 2019

Modified Files:
src/sys/kern: core_elf32.c

Log Message:
Use __diagused


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/kern/core_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-11-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Nov 22 15:57:49 UTC 2019

Modified Files:
src/sys/kern: core_elf32.c

Log Message:
Use __diagused


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/kern/core_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/core_elf32.c
diff -u src/sys/kern/core_elf32.c:1.59 src/sys/kern/core_elf32.c:1.60
--- src/sys/kern/core_elf32.c:1.59	Wed Nov 20 19:37:53 2019
+++ src/sys/kern/core_elf32.c	Fri Nov 22 15:57:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_elf32.c,v 1.59 2019/11/20 19:37:53 pgoyette Exp $	*/
+/*	$NetBSD: core_elf32.c,v 1.60 2019/11/22 15:57:49 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.59 2019/11/20 19:37:53 pgoyette Exp $");
+__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.60 2019/11/22 15:57:49 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -113,9 +113,7 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	off_t notestart;
 	size_t notesize;
 	int error, i;
-#ifdef DIAGNOSTIC
-	off_t offset;
-#endif
+	off_t offset __diagused;
 
 	struct note_state ns;
 	struct note_buf *nb;



CVS commit: src/sys

2019-11-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 20 19:37:54 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: core_machdep.c netbsd32_machdep.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/alpha/alpha: core_machdep.c
src/sys/arch/amd64/amd64: netbsd32_machdep.c
src/sys/arch/arm/arm: core_machdep.c
src/sys/arch/arm/conf: files.arm
src/sys/arch/hppa/hppa: core_machdep.c
src/sys/arch/ia64/conf: files.ia64
src/sys/arch/m68k/m68k: core_machdep.c
src/sys/arch/mips/mips: core_machdep.c netbsd32_machdep.c vm_machdep.c
src/sys/arch/powerpc/powerpc: core_machdep.c
src/sys/arch/riscv/conf: files.riscv
src/sys/arch/riscv/riscv: core_machdep.c
src/sys/arch/sh3/sh3: coff_exec.c core_machdep.c process_machdep.c
src/sys/arch/sparc/sparc: core_machdep.c
src/sys/arch/sparc64/sparc64: core_machdep.c netbsd32_machdep.c
src/sys/arch/vax/vax: core_machdep.c
src/sys/arch/x86/x86: core_machdep.c
src/sys/compat/m68k4k: m68k4k_exec.c
src/sys/compat/netbsd32: netbsd32_core.c netbsd32_mod.c
src/sys/compat/vax1k: vax1k_exec.c
src/sys/kern: compat_stub.c core_elf32.c core_netbsd.c exec_aout.c
exec_ecoff.c exec_elf32.c exec_elf64.c files.kern kern_core.c
kern_sig.c
src/sys/modules/compat_aoutm68k: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/coredump: Makefile
src/sys/modules/exec_aout: Makefile
src/sys/modules/exec_elf32: Makefile
src/sys/modules/exec_elf64: Makefile
src/sys/sys: compat_stub.h exec.h param.h signalvar.h
src/sys/uvm: files.uvm

Log Message:
Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation.  Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/core_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/alpha/core_machdep.c
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/core_machdep.c
cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/conf/files.ia64
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/core_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/mips/mips/vm_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/powerpc/core_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/conf/files.riscv
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/riscv/core_machdep.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sh3/sh3/coff_exec.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sh3/sh3/core_machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sh3/sh3/process_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/sparc/core_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/sparc64/core_machdep.c
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/vax/vax/core_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/core_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/m68k4k/m68k4k_exec.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/netbsd32/netbsd32_core.c
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/vax1k/vax1k_exec.c
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/core_netbsd.c
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/exec_aout.c
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/exec_ecoff.c
cvs rdiff -u -r1.142 -r1.143 src/sys/kern/exec_elf32.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/exec_elf64.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/files.kern
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/kern_core.c
cvs rdiff -u -r1.378 -r1.379 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_aoutm68k/Makefile
cvs rdiff -u -r1.29 -r1.30 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_aout/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/exec_elf32/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_elf64/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.156 -r1.157 src/sys/sys/exec.h
cvs rdiff -u -r1.618 -r1.619 src/sys/sys/param.h
cvs rdiff -u -r1.99 -r1.100 

CVS commit: src/sys

2019-11-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 20 19:37:54 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: core_machdep.c netbsd32_machdep.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/alpha/alpha: core_machdep.c
src/sys/arch/amd64/amd64: netbsd32_machdep.c
src/sys/arch/arm/arm: core_machdep.c
src/sys/arch/arm/conf: files.arm
src/sys/arch/hppa/hppa: core_machdep.c
src/sys/arch/ia64/conf: files.ia64
src/sys/arch/m68k/m68k: core_machdep.c
src/sys/arch/mips/mips: core_machdep.c netbsd32_machdep.c vm_machdep.c
src/sys/arch/powerpc/powerpc: core_machdep.c
src/sys/arch/riscv/conf: files.riscv
src/sys/arch/riscv/riscv: core_machdep.c
src/sys/arch/sh3/sh3: coff_exec.c core_machdep.c process_machdep.c
src/sys/arch/sparc/sparc: core_machdep.c
src/sys/arch/sparc64/sparc64: core_machdep.c netbsd32_machdep.c
src/sys/arch/vax/vax: core_machdep.c
src/sys/arch/x86/x86: core_machdep.c
src/sys/compat/m68k4k: m68k4k_exec.c
src/sys/compat/netbsd32: netbsd32_core.c netbsd32_mod.c
src/sys/compat/vax1k: vax1k_exec.c
src/sys/kern: compat_stub.c core_elf32.c core_netbsd.c exec_aout.c
exec_ecoff.c exec_elf32.c exec_elf64.c files.kern kern_core.c
kern_sig.c
src/sys/modules/compat_aoutm68k: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/coredump: Makefile
src/sys/modules/exec_aout: Makefile
src/sys/modules/exec_elf32: Makefile
src/sys/modules/exec_elf64: Makefile
src/sys/sys: compat_stub.h exec.h param.h signalvar.h
src/sys/uvm: files.uvm

Log Message:
Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation.  Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/core_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/alpha/core_machdep.c
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/core_machdep.c
cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/conf/files.ia64
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/core_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/mips/mips/vm_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/powerpc/core_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/conf/files.riscv
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/riscv/core_machdep.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sh3/sh3/coff_exec.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sh3/sh3/core_machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sh3/sh3/process_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/sparc/core_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/sparc64/core_machdep.c
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/vax/vax/core_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/core_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/m68k4k/m68k4k_exec.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/netbsd32/netbsd32_core.c
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/vax1k/vax1k_exec.c
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/core_netbsd.c
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/exec_aout.c
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/exec_ecoff.c
cvs rdiff -u -r1.142 -r1.143 src/sys/kern/exec_elf32.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/exec_elf64.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/files.kern
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/kern_core.c
cvs rdiff -u -r1.378 -r1.379 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_aoutm68k/Makefile
cvs rdiff -u -r1.29 -r1.30 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_aout/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/exec_elf32/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_elf64/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.156 -r1.157 src/sys/sys/exec.h
cvs rdiff -u -r1.618 -r1.619 src/sys/sys/param.h
cvs rdiff -u -r1.99 -r1.100 

CVS commit: src/sys/kern

2019-11-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov 16 03:26:19 UTC 2019

Modified Files:
src/sys/kern: compat_stub.c

Log Message:
Remove some XXX'd comments that were remnants of when I was working
on the [pgoyette-compat] code.

NFC


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/compat_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.17 src/sys/kern/compat_stub.c:1.18
--- src/sys/kern/compat_stub.c:1.17	Sun Nov 10 14:20:50 2019
+++ src/sys/kern/compat_stub.c	Sat Nov 16 03:26:19 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.17 2019/11/10 14:20:50 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.18 2019/11/16 03:26:19 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -118,13 +118,6 @@ struct raidframe_netbsd32_ioctl_hook_t r
 struct puffs_out_50_hook_t puffs_out_50_hook;
 struct puffs_in_50_hook_t puffs_in_50_hook;
 
-/* XXX
-int (*puffs50_compat_outgoing)(struct puffs_req *, struct puffs_req **,
-ssize_t *) = (void *)enosys;
-void (*puffs50_compat_incoming)(struct puffs_req *, struct puffs_req *) =
-(void *)voidop;
-   XXX */
-
 /*
  * wsevents compatability
  */



CVS commit: src/sys/kern

2019-11-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov 16 03:26:19 UTC 2019

Modified Files:
src/sys/kern: compat_stub.c

Log Message:
Remove some XXX'd comments that were remnants of when I was working
on the [pgoyette-compat] code.

NFC


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/compat_stub.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

2019-11-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 13 16:11:28 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep_13.c netbsd32_machdep_16.c
src/sys/arch/arm/arm32: netbsd32_machdep.c netbsd32_machdep_13.c
netbsd32_machdep_16.c
src/sys/arch/mips/mips: netbsd32_machdep_13.c netbsd32_machdep_16.c
src/sys/arch/riscv/riscv: vm_machdep.c

Log Message:
Clean-up unnecessary inclusions of opt_coredump.h


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amd64/amd64/netbsd32_machdep_13.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/amd64/netbsd32_machdep_16.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm32/netbsd32_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm32/netbsd32_machdep_13.c \
src/sys/arch/arm/arm32/netbsd32_machdep_16.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/mips/netbsd32_machdep_13.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/mips/netbsd32_machdep_16.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/riscv/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/netbsd32_machdep_13.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep_13.c:1.2 src/sys/arch/amd64/amd64/netbsd32_machdep_13.c:1.3
--- src/sys/arch/amd64/amd64/netbsd32_machdep_13.c:1.2	Sun Jan 27 02:08:37 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep_13.c	Wed Nov 13 16:11:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep_13.c,v 1.2 2019/01/27 02:08:37 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep_13.c,v 1.3 2019/11/13 16:11:27 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,11 +36,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.2 2019/01/27 02:08:37 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.3 2019/11/13 16:11:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
-#include "opt_coredump.h"
 #include "opt_execfmt.h"
 #include "opt_user_ldt.h"
 #include "opt_mtrr.h"

Index: src/sys/arch/amd64/amd64/netbsd32_machdep_16.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.3 src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.4
--- src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.3	Fri Mar  1 11:06:55 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep_16.c	Wed Nov 13 16:11:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep_16.c,v 1.3 2019/03/01 11:06:55 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep_16.c,v 1.4 2019/11/13 16:11:27 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,11 +36,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.3 2019/03/01 11:06:55 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.4 2019/11/13 16:11:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
-#include "opt_coredump.h"
 #include "opt_execfmt.h"
 #endif
 

Index: src/sys/arch/arm/arm32/netbsd32_machdep.c
diff -u src/sys/arch/arm/arm32/netbsd32_machdep.c:1.8 src/sys/arch/arm/arm32/netbsd32_machdep.c:1.9
--- src/sys/arch/arm/arm32/netbsd32_machdep.c:1.8	Sun Jan 27 02:08:37 2019
+++ src/sys/arch/arm/arm32/netbsd32_machdep.c	Wed Nov 13 16:11:27 2019
@@ -29,12 +29,11 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep.c,v 1.8 2019/01/27 02:08:37 pgoyette Exp $");
+__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep.c,v 1.9 2019/11/13 16:11:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #include "opt_compat_netbsd32.h"
-#include "opt_coredump.h"
 #endif
 
 #include 

Index: src/sys/arch/arm/arm32/netbsd32_machdep_13.c
diff -u src/sys/arch/arm/arm32/netbsd32_machdep_13.c:1.2 src/sys/arch/arm/arm32/netbsd32_machdep_13.c:1.3
--- src/sys/arch/arm/arm32/netbsd32_machdep_13.c:1.2	Sun Jan 27 02:08:37 2019
+++ src/sys/arch/arm/arm32/netbsd32_machdep_13.c	Wed Nov 13 16:11:27 2019
@@ -29,12 +29,11 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep_13.c,v 1.2 2019/01/27 02:08:37 pgoyette Exp $");
+__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep_13.c,v 1.3 2019/11/13 16:11:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #include "opt_compat_netbsd32.h"
-#include "opt_coredump.h"
 #endif
 
 #include 
Index: src/sys/arch/arm/arm32/netbsd32_machdep_16.c
diff -u src/sys/arch/arm/arm32/netbsd32_machdep_16.c:1.2 src/sys/arch/arm/arm32/netbsd32_machdep_16.c:1.3
--- src/sys/arch/arm/arm32/netbsd32_machdep_16.c:1.2	Sun Jan 27 02:08:37 2019
+++ src/sys/arch/arm/arm32/netbsd32_machdep_16.c	Wed Nov 13 16:11:27 2019
@@ -29,12 +29,11 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep_16.c,v 1.2 2019/01/27 02:08:37 pgoyette Exp $");
+__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep_16.c,v 1.3 2019/11/13 16:11:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #include "opt_compat_netbsd32.h"
-#include "opt_coredump.h"
 #endif
 
 #include 


CVS commit: src/sys/arch

2019-11-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 13 16:11:28 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep_13.c netbsd32_machdep_16.c
src/sys/arch/arm/arm32: netbsd32_machdep.c netbsd32_machdep_13.c
netbsd32_machdep_16.c
src/sys/arch/mips/mips: netbsd32_machdep_13.c netbsd32_machdep_16.c
src/sys/arch/riscv/riscv: vm_machdep.c

Log Message:
Clean-up unnecessary inclusions of opt_coredump.h


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amd64/amd64/netbsd32_machdep_13.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/amd64/netbsd32_machdep_16.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm32/netbsd32_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm32/netbsd32_machdep_13.c \
src/sys/arch/arm/arm32/netbsd32_machdep_16.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/mips/netbsd32_machdep_13.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/mips/netbsd32_machdep_16.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/riscv/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-11-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 13 15:48:36 UTC 2019

Modified Files:
src/sys/kern: sys_ptrace_common.c

Log Message:
Return success if no coredump module is loaded/hooked.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/kern/sys_ptrace_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/sys_ptrace_common.c
diff -u src/sys/kern/sys_ptrace_common.c:1.70 src/sys/kern/sys_ptrace_common.c:1.71
--- src/sys/kern/sys_ptrace_common.c:1.70	Sun Nov 10 14:20:50 2019
+++ src/sys/kern/sys_ptrace_common.c	Wed Nov 13 15:48:36 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_ptrace_common.c,v 1.70 2019/11/10 14:20:50 pgoyette Exp $	*/
+/*	$NetBSD: sys_ptrace_common.c,v 1.71 2019/11/13 15:48:36 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.70 2019/11/10 14:20:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.71 2019/11/13 15:48:36 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ptrace.h"
@@ -959,7 +959,7 @@ ptrace_dumpcore(struct lwp *lt, char *pa
 		path[len] = '\0';
 	}
 	DPRINTF(("%s: lwp=%d\n", __func__, lt->l_lid));
-	MODULE_HOOK_CALL(coredump_hook, (lt, path), enosys(), error);
+	MODULE_HOOK_CALL(coredump_hook, (lt, path), 0, error);
 out:
 	if (path)
 		kmem_free(path, len + 1);



CVS commit: src/sys/kern

2019-11-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 13 15:48:36 UTC 2019

Modified Files:
src/sys/kern: sys_ptrace_common.c

Log Message:
Return success if no coredump module is loaded/hooked.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/kern/sys_ptrace_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/misc

2019-11-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 11 04:11:53 UTC 2019

Modified Files:
src/share/misc: acronyms

Log Message:
Add UPC - universal product code


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/share/misc/acronyms

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.289 src/share/misc/acronyms:1.290
--- src/share/misc/acronyms:1.289	Sun Oct 20 21:53:42 2019
+++ src/share/misc/acronyms	Mon Nov 11 04:11:53 2019
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.289 2019/10/20 21:53:42 sevan Exp $
+$NetBSD: acronyms,v 1.290 2019/11/11 04:11:53 pgoyette Exp $
 10Q	thank you
 10X	thanks
 1337	elite ("leet")
@@ -574,6 +574,7 @@ TY	thank you
 TYVM	thank you very much
 U/L	upload
 UGT	universal greeting time
+UPC	Universal Product Code
 UR	your
 UR	{you're, you are}
 UTSL	use the source, Luke



CVS commit: src/share/misc

2019-11-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Nov 11 04:11:53 UTC 2019

Modified Files:
src/share/misc: acronyms

Log Message:
Add UPC - universal product code


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/share/misc/acronyms

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2019-11-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Nov 10 14:20:50 UTC 2019

Modified Files:
src/sys/kern: compat_stub.c kern_core.c kern_sig.c sys_ptrace_common.c
src/sys/sys: compat_stub.h signalvar.h

Log Message:
Convert the coredump_vec modular function pointer to use the new
compat_hook mechanism.

XXX Should be pulled up to -9 despite the kernel <--> module ABI
XXX change.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/kern_core.c
cvs rdiff -u -r1.377 -r1.378 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.69 -r1.70 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.98 -r1.99 src/sys/sys/signalvar.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/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.16 src/sys/kern/compat_stub.c:1.17
--- src/sys/kern/compat_stub.c:1.16	Sun Nov 10 13:28:06 2019
+++ src/sys/kern/compat_stub.c	Sun Nov 10 14:20:50 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.16 2019/11/10 13:28:06 pgoyette Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.17 2019/11/10 14:20:50 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -279,3 +279,8 @@ struct netbsd32_reg_validate_hook_t netb
  * Hook for sendsig_sigcontext_16
  */
 struct sendsig_sigcontext_16_hook_t sendsig_sigcontext_16_hook;
+
+/*
+ * Hook for coredumps
+ */
+struct coredump_hook_t coredump_hook;

Index: src/sys/kern/kern_core.c
diff -u src/sys/kern/kern_core.c:1.26 src/sys/kern/kern_core.c:1.27
--- src/sys/kern/kern_core.c:1.26	Wed Oct 16 18:29:49 2019
+++ src/sys/kern/kern_core.c	Sun Nov 10 14:20:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_core.c,v 1.26 2019/10/16 18:29:49 christos Exp $	*/
+/*	$NetBSD: kern_core.c,v 1.27 2019/11/10 14:20:50 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.26 2019/10/16 18:29:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.27 2019/11/10 14:20:50 pgoyette Exp $");
 
 #include 
 #include 
@@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_core.c,
 #include 
 #include 
 #include 
+#include 
 
 MODULE(MODULE_CLASS_MISC, coredump, NULL);
 
@@ -69,17 +70,17 @@ coredump_modcmd(modcmd_t cmd, void *arg)
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		coredump_vec = coredump;
+		MODULE_HOOK_SET(coredump_hook, "coredump", coredump);
 		return 0;
 	case MODULE_CMD_FINI:
 		/*
-		 * In theory we don't need to patch this, as the various
+		 * In theory we don't need to UNSET this, as the various
 		 * exec formats depend on this module.  If this module has
 		 * no references, and so can be unloaded, no user programs
 		 * can be running and so nothing can call *coredump_vec.
 		 */
-		coredump_vec = __FPTRCAST(
-		int (*)(struct lwp *, const char *), enosys);
+
+		MODULE_HOOK_UNSET(coredump_hook);
 		return 0;
 	default:
 		return ENOTTY;

Index: src/sys/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.377 src/sys/kern/kern_sig.c:1.378
--- src/sys/kern/kern_sig.c:1.377	Sun Nov 10 13:28:06 2019
+++ src/sys/kern/kern_sig.c	Sun Nov 10 14:20:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.377 2019/11/10 13:28:06 pgoyette Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.378 2019/11/10 14:20:50 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.377 2019/11/10 13:28:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.378 2019/11/10 14:20:50 pgoyette Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_dtrace.h"
@@ -132,9 +132,6 @@ static void	sigswitch_unlock_and_switch_
 static void	sigacts_poolpage_free(struct pool *, void *);
 static void	*sigacts_poolpage_alloc(struct pool *, int);
 
-int (*coredump_vec)(struct lwp *, const char *) =
-__FPTRCAST(int (*)(struct lwp *, const char *), enosys);
-
 /*
  * DTrace SDT provider definitions
  */
@@ -2289,7 +2286,7 @@ sigexit(struct lwp *l, int signo)
 
 	if (docore) {
 		mutex_exit(p->p_lock);
-		error = (*coredump_vec)(l, NULL);
+		MODULE_HOOK_CALL(coredump_hook, (l, NULL), enosys(), error);
 
 		if (kern_logsigexit) {
 			int uid = l->l_cred ?

Index: src/sys/kern/sys_ptrace_common.c
diff -u src/sys/kern/sys_ptrace_common.c:1.69 src/sys/kern/sys_ptrace_common.c:1.70
--- src/sys/kern/sys_ptrace_common.c:1.69	Wed Oct 16 18:29:49 2019
+++ src/sys/kern/sys_ptrace_common.c	Sun Nov 10 14:20:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_ptrace_common.c,v 1.69 2019/10/16 18:29:49 christos Exp $	*/
+/*	$NetBSD: sys_ptrace_common.c,v 1.70 2019/11/10 14:20:50 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.69 2019/10/16 18:29:49 

CVS commit: src/sys

2019-11-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Nov 10 14:20:50 UTC 2019

Modified Files:
src/sys/kern: compat_stub.c kern_core.c kern_sig.c sys_ptrace_common.c
src/sys/sys: compat_stub.h signalvar.h

Log Message:
Convert the coredump_vec modular function pointer to use the new
compat_hook mechanism.

XXX Should be pulled up to -9 despite the kernel <--> module ABI
XXX change.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/kern_core.c
cvs rdiff -u -r1.377 -r1.378 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.69 -r1.70 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.98 -r1.99 src/sys/sys/signalvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2019-11-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Nov 10 13:28:07 UTC 2019

Modified Files:
src/sys/compat/common: kern_sig_16.c
src/sys/kern: compat_stub.c kern_sig.c sys_sig.c
src/sys/sys: compat_stub.h signalvar.h

Log Message:
Convert the sendsig_sigcontext_16 function pointer to use the new
compat_hook mechanism.

XXX Despite being a kernel<-->module abi change, this should be
XXX pulled up to -9


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/common/kern_sig_16.c
cvs rdiff -u -r1.15 -r1.16 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.376 -r1.377 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/sys_sig.c
cvs rdiff -u -r1.19 -r1.20 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.97 -r1.98 src/sys/sys/signalvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2019-11-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Nov 10 13:28:07 UTC 2019

Modified Files:
src/sys/compat/common: kern_sig_16.c
src/sys/kern: compat_stub.c kern_sig.c sys_sig.c
src/sys/sys: compat_stub.h signalvar.h

Log Message:
Convert the sendsig_sigcontext_16 function pointer to use the new
compat_hook mechanism.

XXX Despite being a kernel<-->module abi change, this should be
XXX pulled up to -9


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/common/kern_sig_16.c
cvs rdiff -u -r1.15 -r1.16 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.376 -r1.377 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/sys_sig.c
cvs rdiff -u -r1.19 -r1.20 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.97 -r1.98 src/sys/sys/signalvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/kern_sig_16.c
diff -u src/sys/compat/common/kern_sig_16.c:1.3 src/sys/compat/common/kern_sig_16.c:1.4
--- src/sys/compat/common/kern_sig_16.c:1.3	Sun Jan 27 02:08:39 2019
+++ src/sys/compat/common/kern_sig_16.c	Sun Nov 10 13:28:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig_16.c,v 1.3 2019/01/27 02:08:39 pgoyette Exp $	*/
+/*	$NetBSD: kern_sig_16.c,v 1.4 2019/11/10 13:28:06 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.3 2019/01/27 02:08:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.4 2019/11/10 13:28:06 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -84,6 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_sig_16.
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -155,8 +156,8 @@ kern_sig_16_init(void)
 	emul_netbsd.e_esigcode = esigcode;
 	emul_netbsd.e_sigobject = _netbsd_object;
 	rw_exit(_lock);
-	KASSERT(sendsig_sigcontext_vec == NULL);
-	sendsig_sigcontext_vec = sendsig_sigcontext;
+	MODULE_HOOK_SET(sendsig_sigcontext_16_hook, "sndsig16",
+	   sendsig_sigcontext);
 #endif
 
 	return 0;
@@ -188,7 +189,6 @@ kern_sig_16_fini(void)
 		syscall_establish(NULL, kern_sig_16_syscalls);
 		return EBUSY;
 	}
-	sendsig_sigcontext_vec = NULL;
 
 #if defined(COMPAT_SIGCONTEXT)
 	/*
@@ -204,6 +204,8 @@ kern_sig_16_fini(void)
 	emul_netbsd.e_esigcode = NULL;
 	emul_netbsd.e_sigobject = NULL;
 	rw_exit(_lock);
+
+	MODULE_HOOK_UNSET(sendsig_sigcontext_16_hook);
 #endif
 	return 0;
 }

Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.15 src/sys/kern/compat_stub.c:1.16
--- src/sys/kern/compat_stub.c:1.15	Sat Jul 20 18:23:05 2019
+++ src/sys/kern/compat_stub.c	Sun Nov 10 13:28:06 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.15 2019/07/20 18:23:05 christos Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.16 2019/11/10 13:28:06 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -274,3 +274,8 @@ struct ifmedia_80_post_hook_t ifmedia_80
  */
 struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
 struct netbsd32_reg_validate_hook_t netbsd32_reg_validate_hook;
+
+/*
+ * Hook for sendsig_sigcontext_16
+ */
+struct sendsig_sigcontext_16_hook_t sendsig_sigcontext_16_hook;

Index: src/sys/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.376 src/sys/kern/kern_sig.c:1.377
--- src/sys/kern/kern_sig.c:1.376	Mon Oct 21 17:07:00 2019
+++ src/sys/kern/kern_sig.c	Sun Nov 10 13:28:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.376 2019/10/21 17:07:00 mgorny Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.377 2019/11/10 13:28:06 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.376 2019/10/21 17:07:00 mgorny Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.377 2019/11/10 13:28:06 pgoyette Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_dtrace.h"
@@ -100,6 +100,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v
 #include 
 #include 
 #include 
+#include 
 
 #ifdef PAX_SEGVGUARD
 #include 
@@ -131,7 +132,6 @@ static void	sigswitch_unlock_and_switch_
 static void	sigacts_poolpage_free(struct pool *, void *);
 static void	*sigacts_poolpage_alloc(struct pool *, int);
 
-void (*sendsig_sigcontext_vec)(const struct ksiginfo *, const sigset_t *);
 int (*coredump_vec)(struct lwp *, const char *) =
 __FPTRCAST(int (*)(struct lwp *, const char *), enosys);
 
@@ -2147,10 +2147,8 @@ sendsig(const struct ksiginfo *ksi, cons
 	case 0:
 	case 1:
 		/* Compat for 1.6 and earlier. */
-		if (sendsig_sigcontext_vec == NULL) {
-			break;
-		}
-		(*sendsig_sigcontext_vec)(ksi, mask);
+		MODULE_HOOK_CALL_VOID(sendsig_sigcontext_16_hook, (ksi, mask),
+		break);
 		return;
 	case 2:
 	case 3:

Index: src/sys/kern/sys_sig.c
diff -u src/sys/kern/sys_sig.c:1.49 src/sys/kern/sys_sig.c:1.50
--- src/sys/kern/sys_sig.c:1.49	Sat Nov  9 23:34:13 2019
+++ 

CVS commit: src/sys/kern

2019-11-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov  9 23:34:13 UTC 2019

Modified Files:
src/sys/kern: sys_sig.c

Log Message:
If we need to handle old-version signals, load the version-specific
"compat_16" module.  There is no longer a monolithic "compat" module!

XXX pullup-9 needed


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/kern/sys_sig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-11-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov  9 23:34:13 UTC 2019

Modified Files:
src/sys/kern: sys_sig.c

Log Message:
If we need to handle old-version signals, load the version-specific
"compat_16" module.  There is no longer a monolithic "compat" module!

XXX pullup-9 needed


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/kern/sys_sig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/sys_sig.c
diff -u src/sys/kern/sys_sig.c:1.48 src/sys/kern/sys_sig.c:1.49
--- src/sys/kern/sys_sig.c:1.48	Sun Sep  8 07:00:20 2019
+++ src/sys/kern/sys_sig.c	Sat Nov  9 23:34:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_sig.c,v 1.48 2019/09/08 07:00:20 maxv Exp $	*/
+/*	$NetBSD: sys_sig.c,v 1.49 2019/11/09 23:34:13 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.48 2019/09/08 07:00:20 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.49 2019/11/09 23:34:13 pgoyette Exp $");
 
 #include "opt_dtrace.h"
 
@@ -414,7 +414,7 @@ sigaction1(struct lwp *l, int signum, co
 			else if ((p->p_lflag & PL_SIGCOMPAT) == 0) {
 kernconfig_lock();
 if (sendsig_sigcontext_vec == NULL) {
-	(void)module_autoload("compat",
+	(void)module_autoload("compat_16",
 	MODULE_CLASS_ANY);
 }
 if (sendsig_sigcontext_vec != NULL) {



CVS commit: src/sys/sys

2019-11-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov  9 16:46:09 UTC 2019

Modified Files:
src/sys/sys: disklabel.h

Log Message:
Fix a typo is christos long comment.  :)


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/sys/disklabel.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2019-11-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Nov  9 16:46:09 UTC 2019

Modified Files:
src/sys/sys: disklabel.h

Log Message:
Fix a typo is christos long comment.  :)


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/sys/disklabel.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/disklabel.h
diff -u src/sys/sys/disklabel.h:1.121 src/sys/sys/disklabel.h:1.122
--- src/sys/sys/disklabel.h:1.121	Sat Nov  9 16:40:38 2019
+++ src/sys/sys/disklabel.h	Sat Nov  9 16:46:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.h,v 1.121 2019/11/09 16:40:38 christos Exp $	*/
+/*	$NetBSD: disklabel.h,v 1.122 2019/11/09 16:46:09 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -121,7 +121,7 @@ struct	partition {		/* the partition tab
  * We'd rather have disklabel be the same size on 32 and 64 bit systems
  * but it really isn't. In revision 108 matt@ tried to do that by adding
  * un_d_pad as a uint64_t. This was really smart because the net effect
- * as to grow the struct by 4 bytes on most LP32 machines and make it
+ * was to grow the struct by 4 bytes on most LP32 machines and make it
  * the same as LP64 without changing the layout (which is a nono because
  * it is stored on existing disks). The easy way would have been to add
  * padding at the end, but that would have been confusing (although that



CVS commit: src/usr.bin/calendar/calendars

2019-11-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov  6 13:46:04 UTC 2019

Modified Files:
src/usr.bin/calendar/calendars: calendar.usholiday

Log Message:
Belatedly update several entries that move from year to year.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/calendar/calendars/calendar.usholiday

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/calendar/calendars

2019-11-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov  6 13:46:04 UTC 2019

Modified Files:
src/usr.bin/calendar/calendars: calendar.usholiday

Log Message:
Belatedly update several entries that move from year to year.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/calendar/calendars/calendar.usholiday

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.usholiday
diff -u src/usr.bin/calendar/calendars/calendar.usholiday:1.8 src/usr.bin/calendar/calendars/calendar.usholiday:1.9
--- src/usr.bin/calendar/calendars/calendar.usholiday:1.8	Sat Jun  2 05:55:47 2018
+++ src/usr.bin/calendar/calendars/calendar.usholiday	Wed Nov  6 13:46:04 2019
@@ -15,18 +15,18 @@
 05/12*	Mother's Day (2nd Sunday of May)
 05/18*	Armed Forces Day (3rd Saturday of May)
 05/27*	Memorial Day (Last Monday of May)
-06/16*	Father's Day (3rd Sunday of June)
+06/17*	Father's Day (3rd Sunday of June)
 06/21*	Summer Solstice
 07/04	Independence Day
-09/03*	Labor Day (1st Monday of September)
-09/09*	Grandparent's Day (2nd Sunday of September; varies from state to state)
+09/02*	Labor Day (1st Monday of September)
+09/08*	Grandparent's Day (2nd Sunday of September; varies from state to state)
 09/23*	Autumnal Equinox
-10/08*	Columbus Day (2nd Monday of October)
+10/14*	Columbus Day (2nd Monday of October)
 10/31	All Hallows Eve  (Halloween)
-11/04*	Daylight Savings Time ends; clocks move back (First Sunday in November)
-11/06*	Election Day (1st Tuesday after 1st Monday)
+11/03*	Daylight Savings Time ends; clocks move back (First Sunday in November)
+11/05*	Election Day (1st Tuesday after 1st Monday)
 11/11	Veterans' Day
-11/22*	Thanksgiving Day (Fourth Thursday in November)
+11/28*	Thanksgiving Day (Fourth Thursday in November)
 12/21*	Winter Solstice
 12/24	Christmas Eve
 12/25	Christmas



CVS commit: src/sys/modules

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 16:03:55 UTC 2019

Modified Files:
src/sys/modules: Makefile
src/sys/modules/filemon: Makefile

Log Message:
Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/modules/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/filemon/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.229 src/sys/modules/Makefile:1.230
--- src/sys/modules/Makefile:1.229	Mon Oct 28 13:19:50 2019
+++ src/sys/modules/Makefile	Mon Oct 28 16:03:55 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.229 2019/10/28 13:19:50 maya Exp $
+#	$NetBSD: Makefile,v 1.230 2019/10/28 16:03:55 pgoyette Exp $
 
 .include 
 
@@ -54,7 +54,7 @@ SUBDIR+=	exec_script
 SUBDIR+=	fdesc
 SUBDIR+=	ffs
 SUBDIR+=	filecore
-#SUBDIR+=	filemon
+SUBDIR+=	filemon
 SUBDIR+=	flash
 SUBDIR+=	fss
 SUBDIR+=	gpio

Index: src/sys/modules/filemon/Makefile
diff -u src/sys/modules/filemon/Makefile:1.3 src/sys/modules/filemon/Makefile:1.4
--- src/sys/modules/filemon/Makefile:1.3	Sun Oct 13 07:28:13 2019
+++ src/sys/modules/filemon/Makefile	Mon Oct 28 16:03:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:13 mrg Exp $
+# $NetBSD: Makefile,v 1.4 2019/10/28 16:03:55 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -11,4 +11,10 @@ NOMAN = no
 
 COPTS.filemon_wrapper.c+=	${GCC_NO_CAST_FUNCTION_TYPE}
 
+# Due to security concerns, we don't install the filemon module.  We
+# do, however, want to keep building it to prevent bit-rot.  Define
+# an empty install target for this.
+
+kmodinstall:
+
 .include 



CVS commit: src/sys/modules

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 16:03:55 UTC 2019

Modified Files:
src/sys/modules: Makefile
src/sys/modules/filemon: Makefile

Log Message:
Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/modules/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/filemon/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/debug

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 15:42:08 UTC 2019

Modified Files:
src/distrib/sets/lists/debug: md.amd64

Log Message:
Add debug entry for newly introduced nvmmctl utility.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/distrib/sets/lists/debug/md.amd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/debug

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 15:42:08 UTC 2019

Modified Files:
src/distrib/sets/lists/debug: md.amd64

Log Message:
Add debug entry for newly introduced nvmmctl utility.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/distrib/sets/lists/debug/md.amd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/debug/md.amd64
diff -u src/distrib/sets/lists/debug/md.amd64:1.105 src/distrib/sets/lists/debug/md.amd64:1.106
--- src/distrib/sets/lists/debug/md.amd64:1.105	Tue Feb  5 13:00:03 2019
+++ src/distrib/sets/lists/debug/md.amd64	Mon Oct 28 15:42:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.105 2019/02/05 13:00:03 maxv Exp $
+# $NetBSD: md.amd64,v 1.106 2019/10/28 15:42:07 pgoyette Exp $
 ./usr/lib/i386/12.202++_g.a			comp-c-debuglib		debuglib,compat,12.202xx
 ./usr/lib/i386/libi386_g.a			comp-c-debuglib		debuglib,compat
 ./usr/lib/i386/libiberty_g.a			comp-obsolete		obsolete
@@ -18,6 +18,7 @@
 ./usr/libdata/debug/usr/libexec/ld.elf_so-i386.debug	comp-sys-debug		debug,compat
 ./usr/libdata/debug/usr/sbin/acpidump.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/amldb.debug	comp-sysutil-debug	debug
+./usr/libdata/debug/usr/sbin/nvmmctl.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait3.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait4.debug	tests-obsolete	obsolete



  1   2   3   4   5   6   >