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



CVS commit: src/lib/libc/sys

2019-10-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Oct 27 12:28:13 UTC 2019

Modified Files:
src/lib/libc/sys: accept.2

Log Message:
accept() is a function, not an argument!


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/accept.2

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



CVS commit: src/lib/libc/sys

2019-10-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Oct 27 12:28:13 UTC 2019

Modified Files:
src/lib/libc/sys: accept.2

Log Message:
accept() is a function, not an argument!


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/accept.2

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

Modified files:

Index: src/lib/libc/sys/accept.2
diff -u src/lib/libc/sys/accept.2:1.33 src/lib/libc/sys/accept.2:1.34
--- src/lib/libc/sys/accept.2:1.33	Tue May  9 06:41:56 2017
+++ src/lib/libc/sys/accept.2	Sun Oct 27 12:28:13 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: accept.2,v 1.33 2017/05/09 06:41:56 abhinav Exp $
+.\"	$NetBSD: accept.2,v 1.34 2019/10/27 12:28:13 pgoyette Exp $
 .\"
 .\" Copyright (c) 1983, 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)accept.2	8.2 (Berkeley) 12/11/93
 .\"
-.Dd February 8, 2017
+.Dd October 27, 2019
 .Dt ACCEPT 2
 .Os
 .Sh NAME
@@ -58,7 +58,7 @@ and is listening for connections after a
 .Xr listen 2 .
 The
 .Fn accept
-argument
+function
 extracts the first connection request on the queue of pending
 connections, creates a new socket with the same properties of
 .Fa s



Re: CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2019-10-15 Thread Paul Goyette

On Tue, 15 Oct 2019, J. Hannken-Illjes wrote:


Should be fixed with Rev. 1.4 of
  src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_diff.c


Yup - thanks!


++--+---+
| 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/external/cddl/osnet/dist/uts/common/fs/zfs

2019-10-14 Thread Paul Goyette

I'm now seeing a build error:

#   compile  libzpool/dmu_diff.pico
/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  -Wreturn-type -Wswitch 
-Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter 
-Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2  
-Wno-format-zero-length   -Wno-missing-field-initializers 
-Wno-strict-prototypes -Wno-cast-qual  -Wno-discarded-qualifiers  -Wno-switch 
-Wno-missing-prototypes -Wno-unused-variable -Wno-shadow 
-Wno-missing-field-initializers -Wno-parentheses   -fPIE
-Wno-unknown-pragmas -Wno-sign-compare -D_KERNTYPES -D_KERNTYPES 
--sysroot=/build/netbsd-local/dest/amd64 -std=c99 -D_SUNOS_VTOC_16 
-D_PROPLIB_ZFS_CONFLICT -I/build/netbsd-local/src_ro/external/cddl/osnet 
-I/build/netbsd-local/src_ro/external/cddl/osnet/include 
-I/build/netbsd-local/src_ro/external/cddl/osnet/sys 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/common/zfs 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/head 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libdevinfo 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libnvpair 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libshare/common 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libumem 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libuutil/common 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libzfs/common 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libzfs_core/common 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/lib/libzpool/common 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/common 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/uts/common 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/uts/common/zfs 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/uts/common/fs/zfs 
-I/build/netbsd-local/src_ro/external/cddl/osnet/dist/uts/common/sys -std=c99  
-c-fPIC   -g 
/build/netbsd-local/src_ro/external/cddl/osnet/lib/libzpool/../../dist/uts/common/fs/zfs/dmu_diff.c
 -o dmu_diff.pico
/build/netbsd-local/src_ro/external/cddl/osnet/lib/libzpool/../../dist/uts/common/fs/zfs/dmu_diff.c:
 In function 'write_bytes':
/build/netbsd-local/src_ro/external/cddl/osnet/lib/libzpool/../../dist/uts/common/fs/zfs/dmu_diff.c:70:6:
 error: 'struct uio' has no member named 'uio_vmspace'
  auio.uio_vmspace = vmspace_kernel();
  ^
/build/netbsd-local/src_ro/external/cddl/osnet/lib/libzpool/../../dist/uts/common/fs/zfs/dmu_diff.c:70:21:
 warning: implicit declaration of function 'vmspace_kernel' 
[-Wimplicit-function-declaration]
  auio.uio_vmspace = vmspace_kernel();
 ^~
/build/netbsd-local/src_ro/external/cddl/osnet/lib/libzpool/../../dist/uts/common/fs/zfs/dmu_diff.c:56:13:
 warning: variable 'auio' set but not used [-Wunused-but-set-variable]
  struct uio auio;
 ^~~~
*** [dmu_diff.pico] Error code 1





++--+---+
| 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/sys/arch/amd64/conf

2019-10-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Oct  5 17:36:47 UTC 2019

Modified Files:
src/sys/arch/amd64/conf: NOCOMPAT

Log Message:
Add a commented-out entry for COMPAT_90 for completeness

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/conf/NOCOMPAT

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/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.3 src/sys/arch/amd64/conf/NOCOMPAT:1.4
--- src/sys/arch/amd64/conf/NOCOMPAT:1.3	Wed Jun 12 23:17:40 2019
+++ src/sys/arch/amd64/conf/NOCOMPAT	Sat Oct  5 17:36:47 2019
@@ -1,6 +1,6 @@
 include "arch/amd64/conf/GENERIC"
 
-#ident		"NOCOMPAT-$Revision: 1.3 $"
+#ident		"NOCOMPAT-$Revision: 1.4 $"
 
 no options 	SYSVMSG		# System V-like message queues
 no options 	SYSVSEM		# System V-like semaphores
@@ -29,6 +29,7 @@ no options	COMPAT_15
 #no options	COMPAT_60
 #no options	COMPAT_70
 #no options	COMPAT_80
+#no options	COMPAT_90
  
 no options 	COMPAT_OSSAUDIO
 no options 	COMPAT_NETBSD32



CVS commit: src/sys/arch/amd64/conf

2019-10-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Oct  5 17:36:47 UTC 2019

Modified Files:
src/sys/arch/amd64/conf: NOCOMPAT

Log Message:
Add a commented-out entry for COMPAT_90 for completeness

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/conf/NOCOMPAT

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



CVS commit: src/sys/compat/common

2019-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct  3 19:56:16 UTC 2019

Modified Files:
src/sys/compat/common: compat_80_mod.c

Log Message:
Since we now have a compat_90 module, the compat_80 module should depend
on it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/compat_80_mod.c

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



CVS commit: src/sys/compat/common

2019-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Oct  3 19:56:16 UTC 2019

Modified Files:
src/sys/compat/common: compat_80_mod.c

Log Message:
Since we now have a compat_90 module, the compat_80 module should depend
on it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/compat_80_mod.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/compat/common/compat_80_mod.c
diff -u src/sys/compat/common/compat_80_mod.c:1.4 src/sys/compat/common/compat_80_mod.c:1.5
--- src/sys/compat/common/compat_80_mod.c:1.4	Fri May 17 07:37:11 2019
+++ src/sys/compat/common/compat_80_mod.c	Thu Oct  3 19:56:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_80_mod.c,v 1.4 2019/05/17 07:37:11 msaitoh Exp $	*/
+/*	$NetBSD: compat_80_mod.c,v 1.5 2019/10/03 19:56:16 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.4 2019/05/17 07:37:11 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.5 2019/10/03 19:56:16 pgoyette Exp $");
 
 #include 
 #include 
@@ -66,7 +66,7 @@ compat_80_fini(void)
 	return 0;
 }
 
-MODULE(MODULE_CLASS_EXEC, compat_80, NULL);
+MODULE(MODULE_CLASS_EXEC, compat_80, "compat_90");
 
 static int
 compat_80_modcmd(modcmd_t cmd, void *arg)



CVS commit: src/doc

2019-09-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep 29 00:57:12 UTC 2019

Modified Files:
src/doc: TODO.modules

Log Message:
Another issue, as identified on IRC/ICB


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/doc/TODO.modules

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



CVS commit: src/doc

2019-09-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep 29 00:57:12 UTC 2019

Modified Files:
src/doc: TODO.modules

Log Message:
Another issue, as identified on IRC/ICB


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.19 src/doc/TODO.modules:1.20
--- src/doc/TODO.modules:1.19	Wed Feb 20 04:32:51 2019
+++ src/doc/TODO.modules	Sun Sep 29 00:57:11 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.modules,v 1.19 2019/02/20 04:32:51 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.20 2019/09/29 00:57:11 pgoyette Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
@@ -219,3 +219,12 @@ christos and pgoyette.
 detail, but I have to wonder how code that compiles cleanly in a
 normal kernel has these issues when compiled in a module, when both
 are done with WARNS=5).
+
+23. The current process of "load all the emulation/exec modules in case
+one of them might handle the image currently being exec'd" isn't
+really cool.  (See sys/kern/kern_exec.c?)  It ends up auto-loading
+a whole bunch of modules, involving file-system access, just to have
+most of the modules getting unloaded a few seconds later.  We don't
+have any way to identify which module is needed for which image (ie,
+we can't determine that an image needs compat_linux vs some other
+module).



CVS commit: src/sys

2019-09-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Sep 27 00:32:04 UTC 2019

Modified Files:
src/sys/compat/common: kern_uipc_socket_50.c
src/sys/kern: uipc_socket.c
src/sys/sys: compat_stub.h param.h

Log Message:
Actually return the updated pointer-to-mbuf-pointer to the caller
rather than discarding-after-assignment.  Introduced from the
[pgoyette-compat] branch work.

Welcome to 9.99.14 !!!  (Module hook routine prototype changed.)

Found by the lgtm bot, reported via private Email from maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/kern_uipc_socket_50.c
cvs rdiff -u -r1.283 -r1.284 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.18 -r1.19 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.613 -r1.614 src/sys/sys/param.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-09-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Sep 27 00:32:04 UTC 2019

Modified Files:
src/sys/compat/common: kern_uipc_socket_50.c
src/sys/kern: uipc_socket.c
src/sys/sys: compat_stub.h param.h

Log Message:
Actually return the updated pointer-to-mbuf-pointer to the caller
rather than discarding-after-assignment.  Introduced from the
[pgoyette-compat] branch work.

Welcome to 9.99.14 !!!  (Module hook routine prototype changed.)

Found by the lgtm bot, reported via private Email from maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/kern_uipc_socket_50.c
cvs rdiff -u -r1.283 -r1.284 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.18 -r1.19 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.613 -r1.614 src/sys/sys/param.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_uipc_socket_50.c
diff -u src/sys/compat/common/kern_uipc_socket_50.c:1.2 src/sys/compat/common/kern_uipc_socket_50.c:1.3
--- src/sys/compat/common/kern_uipc_socket_50.c:1.2	Mon Apr 15 10:53:17 2019
+++ src/sys/compat/common/kern_uipc_socket_50.c	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_uipc_socket_50.c,v 1.2 2019/04/15 10:53:17 pgoyette Exp $	*/
+/*	$NetBSD: kern_uipc_socket_50.c,v 1.3 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_uipc_socket_50.c,v 1.2 2019/04/15 10:53:17 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_uipc_socket_50.c,v 1.3 2019/09/27 00:32:03 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -210,7 +210,7 @@ uipc_socket_50_setopt1(int opt, struct s
 }
 
 static int
-uipc_socket_50_sbts(int opt, struct mbuf **mp)
+uipc_socket_50_sbts(int opt, struct mbuf ***mp)
 {
 	struct timeval50 tv50;
 	struct timeval tv;
@@ -220,10 +220,10 @@ uipc_socket_50_sbts(int opt, struct mbuf
 	if (opt & SO_OTIMESTAMP) {
 
 		timeval_to_timeval50(, );
-		*mp = sbcreatecontrol(, sizeof(tv50), SCM_OTIMESTAMP,
+		**mp = sbcreatecontrol(, sizeof(tv50), SCM_OTIMESTAMP,
 		SOL_SOCKET);
-		if (*mp)
-			mp = &(*mp)->m_next;
+		if (**mp)
+			*mp = &(**mp)->m_next;
 		return 0;
 	} else
 		return EPASSTHROUGH;

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.283 src/sys/kern/uipc_socket.c:1.284
--- src/sys/kern/uipc_socket.c:1.283	Sat Sep 14 15:06:33 2019
+++ src/sys/kern/uipc_socket.c	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.283 2019/09/14 15:06:33 mlelstv Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.284 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.283 2019/09/14 15:06:33 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.284 2019/09/27 00:32:03 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -2419,7 +2419,7 @@ sbsavetimestamp(int opt, struct mbuf **m
 
 	microtime();
 
-	MODULE_HOOK_CALL(uipc_socket_50_sbts_hook, (opt, mp), enosys(), error);
+	MODULE_HOOK_CALL(uipc_socket_50_sbts_hook, (opt, ), enosys(), error);
 	if (error == 0)
 		return mp;
 

Index: src/sys/sys/compat_stub.h
diff -u src/sys/sys/compat_stub.h:1.18 src/sys/sys/compat_stub.h:1.19
--- src/sys/sys/compat_stub.h:1.18	Sat Jul 20 20:59:05 2019
+++ src/sys/sys/compat_stub.h	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_stub.h,v 1.18 2019/07/20 20:59:05 mrg Exp $	*/
+/*	$NetBSD: compat_stub.h,v 1.19 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -231,7 +231,7 @@ MODULE_HOOK(uipc_socket_50_setopt1_hook,
 (int, struct socket *, const struct sockopt *));
 MODULE_HOOK(uipc_socket_50_getopt1_hook, int,
 (int, struct socket *, struct sockopt *));
-MODULE_HOOK(uipc_socket_50_sbts_hook, int, (int, struct mbuf **));
+MODULE_HOOK(uipc_socket_50_sbts_hook, int, (int, struct mbuf ***));
 
 /*
  * uipc_syscalls_50 compatibility

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.613 src/sys/sys/param.h:1.614
--- src/sys/sys/param.h:1.613	Sun Sep 22 22:59:40 2019
+++ src/sys/sys/param.h	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.613 2019/09/22 22:59:40 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.614 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999001300	/* NetBSD 9.99.13 */
+#define	__NetBSD_Version__	999001400	/* NetBSD 9.99.14 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/doc

2019-08-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Aug 20 02:42:04 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Fix year in previous entry's datestamp


To generate a diff of this commit:
cvs rdiff -u -r1.2571 -r1.2572 src/doc/CHANGES

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



CVS commit: src/doc

2019-08-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Aug 20 02:42:04 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Fix year in previous entry's datestamp


To generate a diff of this commit:
cvs rdiff -u -r1.2571 -r1.2572 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2571 src/doc/CHANGES:1.2572
--- src/doc/CHANGES:1.2571	Tue Aug 20 01:48:48 2019
+++ src/doc/CHANGES	Tue Aug 20 02:42:04 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2571 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2572 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -30,4 +30,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		ure(4), url(4), and urndis(4) drivers fixing many bugs and
 		porting to NET_MPSAFE in the process.  [mrg 20190814]
 	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
-	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20180818]
+	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818]



Re: CVS commit: src/doc

2019-08-19 Thread Paul Goyette

Is the date-stamp correct?  It should be 2019 not 2018!


On Tue, 20 Aug 2019, Emmanuel Dreyfus wrote:


Module Name:src
Committed By:   manu
Date:   Tue Aug 20 01:48:48 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20180818]


To generate a diff of this commit:
cvs rdiff -u -r1.2570 -r1.2571 src/doc/CHANGES

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


!DSPAM:5d5b51c2211894209137647!




++--+---+
| 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/share/mk

2019-08-13 Thread Paul Goyette

So 9.99.7 does not install *_pic.a any longer while earlier versions did.
Shouldn't they be marked as "obsolete" in the set lists?


this would break builds that do want them.

they've been built conditionally for a long time, we just changed
the default value of the condition is all.

i understand where you are coming from -- i have to clean my
destdir for dozens of builds now -- but there's no easy answer
to this besides manual fixing..

(it fortunately does not leave anything in the objdir, as these
files are created as part of creating the shlibs -- the only
difference now is that we don't install them by dfeault.)


Ah, got it!  Thanks for the detailed explanation.



++--+---+
| 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/share/mk

2019-08-13 Thread Paul Goyette

On Wed, 14 Aug 2019, Thomas Klausner wrote:


On Sat, Aug 10, 2019 at 08:20:17AM -0400, Christos Zoulas wrote:

Module Name:src
Committed By:   christos
Date:   Sat Aug 10 12:20:17 UTC 2019

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Don't install PIC libraries by default because they are too big since they
contain debug symbols. I supplied a patch in PR/54449 to remove the debugging
symbols but folks preferred to not install them at all.


So 9.99.7 does not install *_pic.a any longer while earlier versions did.
Shouldn't they be marked as "obsolete" in the set lists?


Yes.  They should be obsolete.


++--+---+
| 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/sys/kern

2019-08-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Aug  8 18:08:41 UTC 2019

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

Log Message:
When modules are unloaded, we call sysctl_teardown() before calling
the module's modcmd(CMD_FINI) code.  If the modcmd() call returns an
error, we attempted to re-instate the module's sysctl stuff.

This doesn't work well for built-in modulesi (where "unload" actually
means "disable"), since they don't have any ``struct kobj''.

So check first, and don't try to find the __link_set_sysctl_funcs for
built-in modules.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/kern/kern_module.c

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

Modified files:

Index: src/sys/kern/kern_module.c
diff -u src/sys/kern/kern_module.c:1.137 src/sys/kern/kern_module.c:1.138
--- src/sys/kern/kern_module.c:1.137	Wed Aug  7 00:38:02 2019
+++ src/sys/kern/kern_module.c	Thu Aug  8 18:08:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.137 2019/08/07 00:38:02 pgoyette Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.138 2019/08/08 18:08:41 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.137 2019/08/07 00:38:02 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.138 2019/08/08 18:08:41 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -949,7 +949,7 @@ module_do_builtin(const module_t *pmod, 
 /*
  * module_load_sysctl
  *
- * Check to see if the module has any SYSCTL_SETUP() routine(s)
+ * Check to see if a non-builtin module has any SYSCTL_SETUP() routine(s)
  * registered.  If so, call it (them).
  */
 
@@ -961,6 +961,13 @@ module_load_sysctl(module_t *mod)
 	size_t ls_size, count;
 	int error;
 
+	/*
+	 * Built-in modules don't have a mod_kobj so we cannot search
+	 * for their link_set_sysctl_funcs
+	 */
+	if (mod->mod_source == MODULE_SOURCE_KERNEL)
+		return;
+
 	error = kobj_find_section(mod->mod_kobj, "link_set_sysctl_funcs",
 	_start, _size);
 	if (error == 0) {



CVS commit: src/sys/kern

2019-08-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Aug  8 18:08:41 UTC 2019

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

Log Message:
When modules are unloaded, we call sysctl_teardown() before calling
the module's modcmd(CMD_FINI) code.  If the modcmd() call returns an
error, we attempted to re-instate the module's sysctl stuff.

This doesn't work well for built-in modulesi (where "unload" actually
means "disable"), since they don't have any ``struct kobj''.

So check first, and don't try to find the __link_set_sysctl_funcs for
built-in modules.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/kern/kern_module.c

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



CVS commit: src/share/man/man9

2019-08-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Aug  7 13:22:00 UTC 2019

Modified Files:
src/share/man/man9: sysctl.9

Log Message:
Document interaction of SYSCTL_SETUP functions and the module loader.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/sysctl.9

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

Modified files:

Index: src/share/man/man9/sysctl.9
diff -u src/share/man/man9/sysctl.9:1.20 src/share/man/man9/sysctl.9:1.21
--- src/share/man/man9/sysctl.9:1.20	Mon Jul  3 21:28:48 2017
+++ src/share/man/man9/sysctl.9	Wed Aug  7 13:22:00 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.9,v 1.20 2017/07/03 21:28:48 wiz Exp $
+.\"	$NetBSD: sysctl.9,v 1.21 2019/08/07 13:22:00 pgoyette Exp $
 .\"
 .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 4, 2011
+.Dd August 7, 2019
 .Dt SYSCTL 9
 .Os
 .Sh NAME
@@ -547,7 +547,7 @@ specifically ignores any arguments given
 .Fa oldlenp
 to zero, and returns success.
 .Sh SETUP FUNCTIONS
-Though nodes can be added to the SYSCTL tree at any time, in order to
+Although nodes can be added to the SYSCTL tree at any time, in order to
 add nodes during the kernel bootstrap phase, a proper
 .Dq setup
 function must be used.
@@ -561,9 +561,17 @@ See the
 kernel configuration in
 .Xr options 4 .
 .Pc
+.Pp
 The address of the function is added to a list of functions that
 .Fn sysctl_init
 traverses during initialization.
+For loadable kernel modules (see
+.Xr modules 9 ) ,
+the list of functions is called from the module loader after the module's
+initialization routine.
+Any sysctl nodes created for the loadable module are removed using
+.Fn sysctl_teardown
+before calling the module's termination code.
 .Pp
 Setup functions do not have to add nodes to the main tree, but can set
 up their own trees for emulation or other purposes.



CVS commit: src/share/man/man9

2019-08-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Aug  7 13:22:00 UTC 2019

Modified Files:
src/share/man/man9: sysctl.9

Log Message:
Document interaction of SYSCTL_SETUP functions and the module loader.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/sysctl.9

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



CVS commit: src/sys/sys

2019-08-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Aug  7 00:39:23 UTC 2019

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

Log Message:
Welcome to 9.99.4 (the module sysctl stuff changes struct module, so
be safe and bump the kernel version).


To generate a diff of this commit:
cvs rdiff -u -r1.602 -r1.603 src/sys/sys/param.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-08-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Aug  7 00:39:23 UTC 2019

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

Log Message:
Welcome to 9.99.4 (the module sysctl stuff changes struct module, so
be safe and bump the kernel version).


To generate a diff of this commit:
cvs rdiff -u -r1.602 -r1.603 src/sys/sys/param.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/param.h
diff -u src/sys/sys/param.h:1.602 src/sys/sys/param.h:1.603
--- src/sys/sys/param.h:1.602	Tue Aug  6 00:19:57 2019
+++ src/sys/sys/param.h	Wed Aug  7 00:39:23 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.602 2019/08/06 00:19:57 mrg Exp $	*/
+/*	$NetBSD: param.h,v 1.603 2019/08/07 00:39:23 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999000300	/* NetBSD 9.99.3 */
+#define	__NetBSD_Version__	999000400	/* NetBSD 9.99.4 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys

2019-08-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Aug  7 00:38:02 UTC 2019

Modified Files:
src/sys/dev: ccd.c
src/sys/dev/iscsi: iscsi_main.c
src/sys/dev/usb: usbnet.c
src/sys/kern: kern_module.c sysv_ipc.c sysv_msg.c sysv_sem.c sysv_shm.c
src/sys/miscfs/genfs: layer_vfsops.c
src/sys/sys: module.h msg.h sem.h shm.h

Log Message:
Many years ago someone created a new __link_set_sysctl_funcs to hold
the list of routines that need to be called for setting up sysctl
variables.  This worked great for all code included in the kernel
itself, but didn't deal with modules that want to create their own
sysctl data.  So, we ended up with a lot of #ifdef _MODULE blocks
so modules could explicitly call their setup functions when loaded
as non-built-in modules.

So today, we complete the task that was started so many years ago.

When modules are loaded, after we've called xxx_modcmd(INIT...) we
check if the module contains its own __link_set_sysctl_funcs, and
if so we call the functions listed.  We add a struct sysctllog member
to the struct module so we can call sysctl_teardown() when the module
gets unloaded.  (The sequence of events ensures that the sysctl stuff
doesn't get created until the rest of the module's init code does any
required memory allocation.)

So, no more need to explicitly call the sysctl setup routines when
built as a loadable module.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/dev/ccd.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/iscsi/iscsi_main.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.136 -r1.137 src/sys/kern/kern_module.c \
src/sys/kern/sysv_shm.c
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.74 -r1.75 src/sys/kern/sysv_msg.c
cvs rdiff -u -r1.97 -r1.98 src/sys/kern/sysv_sem.c
cvs rdiff -u -r1.51 -r1.52 src/sys/miscfs/genfs/layer_vfsops.c
cvs rdiff -u -r1.46 -r1.47 src/sys/sys/module.h
cvs rdiff -u -r1.27 -r1.28 src/sys/sys/msg.h
cvs rdiff -u -r1.33 -r1.34 src/sys/sys/sem.h
cvs rdiff -u -r1.52 -r1.53 src/sys/sys/shm.h

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

Modified files:

Index: src/sys/dev/ccd.c
diff -u src/sys/dev/ccd.c:1.179 src/sys/dev/ccd.c:1.180
--- src/sys/dev/ccd.c:1.179	Wed Mar 27 19:13:34 2019
+++ src/sys/dev/ccd.c	Wed Aug  7 00:38:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ccd.c,v 1.179 2019/03/27 19:13:34 martin Exp $	*/
+/*	$NetBSD: ccd.c,v 1.180 2019/08/07 00:38:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.179 2019/03/27 19:13:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.180 2019/08/07 00:38:01 pgoyette Exp $");
 
 #include 
 #include 
@@ -216,10 +216,6 @@ static	void printiinfo(struct ccdiinfo *
 static LIST_HEAD(, ccd_softc) ccds = LIST_HEAD_INITIALIZER(ccds);
 static kmutex_t ccd_lock;
 
-#ifdef _MODULE
-static struct sysctllog *ccd_clog;
-#endif
-
 SYSCTL_SETUP_PROTO(sysctl_kern_ccd_setup);
 
 static struct ccd_softc *
@@ -1681,7 +1677,6 @@ ccd_modcmd(modcmd_t cmd, void *arg)
 
 		error = devsw_attach("ccd", _bdevsw, ,
 		_cdevsw, );
-		sysctl_kern_ccd_setup(_clog);
 #endif
 		break;
 
@@ -1696,7 +1691,6 @@ ccd_modcmd(modcmd_t cmd, void *arg)
 			error = devsw_detach(_bdevsw, _cdevsw);
 			ccddetach();
 		}
-		sysctl_teardown(_clog);
 #endif
 		break;
 

Index: src/sys/dev/iscsi/iscsi_main.c
diff -u src/sys/dev/iscsi/iscsi_main.c:1.30 src/sys/dev/iscsi/iscsi_main.c:1.31
--- src/sys/dev/iscsi/iscsi_main.c:1.30	Sat Jul 13 17:06:00 2019
+++ src/sys/dev/iscsi/iscsi_main.c	Wed Aug  7 00:38:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_main.c,v 1.30 2019/07/13 17:06:00 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_main.c,v 1.31 2019/08/07 00:38:02 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -677,7 +677,6 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 #ifdef _MODULE
 	devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
 	int error;
-	static struct sysctllog *clog;
 #endif
 
 	switch (cmd) {
@@ -723,8 +722,6 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 			config_cfdriver_detach(_cd);
 			return ENXIO;
 		}
-
-		sysctl_iscsi_setup();
 #endif
 		return 0;
 		break;
@@ -735,8 +732,6 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 		if (error)
 			return error;
 
-		sysctl_teardown();
-
 		config_cfattach_detach(iscsi_cd.cd_name, _ca);
 		config_cfdriver_detach(_cd);
 		devsw_detach(NULL, _cdevsw);

Index: src/sys/dev/usb/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.6 src/sys/dev/usb/usbnet.c:1.7
--- src/sys/dev/usb/usbnet.c:1.6	Tue Aug  6 01:42:22 2019
+++ src/sys/dev/usb/usbnet.c	Wed Aug  7 00:38:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.6 2019/08/06 01:42:22 mrg Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.7 2019/08/07 00:38:02 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 

CVS commit: src/sys

2019-08-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Aug  7 00:38:02 UTC 2019

Modified Files:
src/sys/dev: ccd.c
src/sys/dev/iscsi: iscsi_main.c
src/sys/dev/usb: usbnet.c
src/sys/kern: kern_module.c sysv_ipc.c sysv_msg.c sysv_sem.c sysv_shm.c
src/sys/miscfs/genfs: layer_vfsops.c
src/sys/sys: module.h msg.h sem.h shm.h

Log Message:
Many years ago someone created a new __link_set_sysctl_funcs to hold
the list of routines that need to be called for setting up sysctl
variables.  This worked great for all code included in the kernel
itself, but didn't deal with modules that want to create their own
sysctl data.  So, we ended up with a lot of #ifdef _MODULE blocks
so modules could explicitly call their setup functions when loaded
as non-built-in modules.

So today, we complete the task that was started so many years ago.

When modules are loaded, after we've called xxx_modcmd(INIT...) we
check if the module contains its own __link_set_sysctl_funcs, and
if so we call the functions listed.  We add a struct sysctllog member
to the struct module so we can call sysctl_teardown() when the module
gets unloaded.  (The sequence of events ensures that the sysctl stuff
doesn't get created until the rest of the module's init code does any
required memory allocation.)

So, no more need to explicitly call the sysctl setup routines when
built as a loadable module.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/dev/ccd.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/iscsi/iscsi_main.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.136 -r1.137 src/sys/kern/kern_module.c \
src/sys/kern/sysv_shm.c
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.74 -r1.75 src/sys/kern/sysv_msg.c
cvs rdiff -u -r1.97 -r1.98 src/sys/kern/sysv_sem.c
cvs rdiff -u -r1.51 -r1.52 src/sys/miscfs/genfs/layer_vfsops.c
cvs rdiff -u -r1.46 -r1.47 src/sys/sys/module.h
cvs rdiff -u -r1.27 -r1.28 src/sys/sys/msg.h
cvs rdiff -u -r1.33 -r1.34 src/sys/sys/sem.h
cvs rdiff -u -r1.52 -r1.53 src/sys/sys/shm.h

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



CVS commit: src/lib/libc/sys

2019-07-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jul 31 23:53:25 UTC 2019

Modified Files:
src/lib/libc/sys: _lwp_park.2

Log Message:
Fix a couple of typos


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/sys/_lwp_park.2

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



CVS commit: src/lib/libc/sys

2019-07-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jul 31 23:53:25 UTC 2019

Modified Files:
src/lib/libc/sys: _lwp_park.2

Log Message:
Fix a couple of typos


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/sys/_lwp_park.2

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

Modified files:

Index: src/lib/libc/sys/_lwp_park.2
diff -u src/lib/libc/sys/_lwp_park.2:1.11 src/lib/libc/sys/_lwp_park.2:1.12
--- src/lib/libc/sys/_lwp_park.2:1.11	Fri Dec  8 09:14:36 2017
+++ src/lib/libc/sys/_lwp_park.2	Wed Jul 31 23:53:25 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: _lwp_park.2,v 1.11 2017/12/08 09:14:36 wiz Exp $
+.\"	$NetBSD: _lwp_park.2,v 1.12 2019/07/31 23:53:25 pgoyette Exp $
 .\"
 .\" Copyright (c) 2003, 2007, 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 7, 2017
+.Dd July 30, 2019
 .Dt _LWP_PARK 2
 .Os
 .Sh NAME
@@ -54,7 +54,7 @@ argument is
 and the time it specifies has passed.
 The
 .Fa ts
-time can be an relative interval to wait if the
+time can be a relative interval to wait if the
 .Ar flags
 argument does not contain
 .Dv TIMER_ABSTIME
@@ -102,7 +102,7 @@ to execute.
 .Pp
 The optional
 .Fa hint
-argument specifies the address of object upon which the LWP is
+argument specifies the address of an object upon which the LWP is
 synchronizing.
 When the
 .Fa hint



CVS commit: src/sys/kern

2019-07-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jul 16 22:57:55 UTC 2019

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

Log Message:
Move the assignment of SCTP-specific function hooks/pointers.

Without this, a rumpkernel (appropriately modified) built with SCTP
enabled will try to assign the function pointers, but the targets
are only available in rumpnet.  We cannot link the rumpkernel against
rumpnet because rumpnet is already linked against rumpkernel and we
would end up with a circular dependency.

As reported in private Email by rjs@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.280 -r1.281 src/sys/kern/uipc_socket.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.13 src/sys/kern/compat_stub.c:1.14
--- src/sys/kern/compat_stub.c:1.13	Tue Jun 25 15:33:55 2019
+++ src/sys/kern/compat_stub.c	Tue Jul 16 22:57:55 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.13 2019/06/25 15:33:55 rjs Exp $	*/
+/* $NetBSD: compat_stub.c,v 1.14 2019/07/16 22:57:55 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -33,7 +33,6 @@
 
 #ifdef _KERNEL_OPT
 #include "opt_ntp.h"
-#include "opt_sctp.h"
 #endif
 
 #include 
@@ -44,10 +43,6 @@
 #include 
 #endif
 
-#ifdef SCTP
-#include 
-#endif
-
 /*
  * Routine vectors for compat_50___sys_ntp_gettime
  *
@@ -68,15 +63,15 @@ void (*vec_ntp_adjtime1)(struct timex *)
  * Routine vectors for sctp (called from within rtsock)
  *
  * MP-hooks not needed since the SCTP code is not modular
+ *
+ * For now, just point these at NULL.  Network initialization code
+ * in if.c will overwrite these with correct values.  This is needed
+ * to enable building of rumpkern library without creating circular
+ * dependency with rumpnet library
  */
 
-#ifdef SCTP
-void (*vec_sctp_add_ip_address)(struct ifaddr *) = sctp_add_ip_address;
-void (*vec_sctp_delete_ip_address)(struct ifaddr *) = sctp_delete_ip_address;
-#else
 void (*vec_sctp_add_ip_address)(struct ifaddr *) = NULL;
 void (*vec_sctp_delete_ip_address)(struct ifaddr *) = NULL;
-#endif 
 
 
 /*

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.280 src/sys/kern/uipc_socket.c:1.281
--- src/sys/kern/uipc_socket.c:1.280	Sat Jun  1 15:20:51 2019
+++ src/sys/kern/uipc_socket.c	Tue Jul 16 22:57:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.280 2019/06/01 15:20:51 maxv Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.281 2019/07/16 22:57:55 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.280 2019/06/01 15:20:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.281 2019/07/16 22:57:55 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -113,6 +113,10 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_socket.
 #include 
 #include 
 
+#ifdef SCTP
+#include 
+#endif
+
 MALLOC_DEFINE(M_SONAME, "soname", "socket name");
 
 extern const struct fileops socketops;
@@ -439,6 +443,13 @@ soinit(void)
 
 	sysctl_kern_socket_setup();
 
+#ifdef SCTP
+	/* Update the SCTP function hooks if necessary*/
+
+vec_sctp_add_ip_address = sctp_add_ip_address;
+vec_sctp_delete_ip_address = sctp_delete_ip_address; 
+#endif
+
 	mutex_init(_pendfree_lock, MUTEX_DEFAULT, IPL_VM);
 	softnet_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
 	cv_init(_cv, "sokva");



CVS commit: src/sys/kern

2019-07-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jul 16 22:57:55 UTC 2019

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

Log Message:
Move the assignment of SCTP-specific function hooks/pointers.

Without this, a rumpkernel (appropriately modified) built with SCTP
enabled will try to assign the function pointers, but the targets
are only available in rumpnet.  We cannot link the rumpkernel against
rumpnet because rumpnet is already linked against rumpkernel and we
would end up with a circular dependency.

As reported in private Email by rjs@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.280 -r1.281 src/sys/kern/uipc_socket.c

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-07-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jul 15 19:34:45 UTC 2019

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

Log Message:
Move a comment line get it next to the line it describes, avoiding
intervening unrelated text.

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/sys/proc.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-07-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jul 15 19:34:45 UTC 2019

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

Log Message:
Move a comment line get it next to the line it describes, avoiding
intervening unrelated text.

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/sys/proc.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/proc.h
diff -u src/sys/sys/proc.h:1.354 src/sys/sys/proc.h:1.355
--- src/sys/sys/proc.h:1.354	Fri Jun 21 01:03:51 2019
+++ src/sys/sys/proc.h	Mon Jul 15 19:34:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.354 2019/06/21 01:03:51 kamil Exp $	*/
+/*	$NetBSD: proc.h,v 1.355 2019/07/15 19:34:45 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -153,8 +153,8 @@ struct emul {
 	const uint32_t	*e_nomodbits;	/* sys_nosys/sys_nomodule flags
 	 * for syscall_disestablish() */
 	const char * const *e_syscallnames; /* System call name array */
+	struct sc_autoload *e_sc_autoload; /* List of autoloadable syscalls */
 	/* Signal sending function */
-	struct sc_autoload *e_sc_autoload;	/* List of autoloadable syscalls */
 	void		(*e_sendsig)(const struct ksiginfo *,
 	  const sigset_t *);
 	void		(*e_trapsignal)(struct lwp *, struct ksiginfo *);



CVS commit: src/sys/arch/sandpoint/stand/altboot

2019-06-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun 26 00:54:04 UTC 2019

Modified Files:
src/sys/arch/sandpoint/stand/altboot: main.c

Log Message:
Similar to changes made for x86, allow for the boot-loader to auto-push
a list of modules for file-system support.  This allows, for example,
booting from an ext2fs file-system when the kernel has no built-in ufs
or ext2fs modules.

XXX Untested, as I have no sandpoint hardware.  I'd appreciate it if
XXX someone with hardware can build and test.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sandpoint/stand/altboot/main.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/sandpoint/stand/altboot/main.c
diff -u src/sys/arch/sandpoint/stand/altboot/main.c:1.29 src/sys/arch/sandpoint/stand/altboot/main.c:1.30
--- src/sys/arch/sandpoint/stand/altboot/main.c:1.29	Thu Feb  8 09:05:18 2018
+++ src/sys/arch/sandpoint/stand/altboot/main.c	Wed Jun 26 00:54:04 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.29 2018/02/08 09:05:18 dholland Exp $ */
+/* $NetBSD: main.c,v 1.30 2019/06/26 00:54:04 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -90,6 +90,7 @@ uint32_t kmodloadp;
 int modules_enabled = 0;
 
 void module_add(const char *);
+void module_add_split(const char *);
 void module_load(const char *);
 int module_open(struct boot_module *);
 
@@ -367,7 +368,7 @@ main(int argc, char *argv[], char *boota
 
 		if (modules_enabled) {
 			if (fsmod != NULL)
-module_add(fsmod);
+module_add_split(fsmod);
 			kmodloadp = marks[MARK_END];
 			btinfo_modulelist = NULL;
 			module_load(bname);
@@ -423,6 +424,42 @@ bi_add(void *new, int type, int size)
 	bi_next += size;
 }
 
+/*
+ * Add a /-separated list of module names to the boot list
+ */
+static void
+module_add_split(const char *name)
+{
+	char mod_name[MAXMODNAME];
+	int i;
+	const char *mp = name;
+	char *ep;
+
+	while (*mp) {/* scan list of module names */
+		i = MAXMODNAME;
+		ep = mod_name;
+		while (--i) {			/* scan for end of first name */
+			*ep = *mp;
+			if (*ep == '/')		/* NUL-terminate the name */
+*ep = '\0';
+
+			if (*ep == 0 ) {	/* add non-empty name */
+if (ep != mod_name)
+	module_add(mod_name);
+break;
+			}
+			ep++; mp++;
+		}
+		if (*ep != 0) {
+			printf("module name too long\n");
+			return;
+		}
+		if  (*mp == '/') {		/* skip separator if more */
+			mp++;
+		}
+	}
+}
+
 void
 module_add(const char *name)
 {



  1   2   3   4   5   6   >