Searched hist:1.409 (Results 1 - 25 of 52) sorted by relevance

123

/src/tests/lib/libc/gen/execve/
H A Dt_execve.c1.4 Thu Mar 13 00:48:22 GMT 2025 riastradh execve(2), posix_spawn(2): Don't flush _all_ pending signals.

We need only flush those pending signals whose dispositions have been
reset to the default action when that action is to ignore them --
e.g., if the parent had a signal handler function for SIGCHLD or
SIGWINCH, this is reset to the default disposition, which is to
ignore the signal, so any pending SIGCHLD or SIGWINCH need to be
flushed.

And we have logic to do this already in execsigs(9), via
sigclearset(9), which clears the specified set of signals:

402 sigemptyset(&tset);
403 for (signo = 1; signo < NSIG; signo++) {
404 if (sigismember(&p->p_sigctx.ps_sigcatch, signo)) {
405 prop = sigprop[signo];
406 if (prop & SA_IGNORE) {
407 if ((prop & SA_CONT) == 0)
408 sigaddset(&p->p_sigctx.ps_sigignore,
409 signo);
410 sigaddset(&tset, signo);
411 }
412 SIGACTION_PS(ps, signo).sa_handler = SIG_DFL;
...
420 sigclearall(p, &tset, &kq);

https://nxr.netbsd.org/xref/src/sys/kern/kern_sig.c?r=1.409#394

But back in 2003, when ksiginfo_t was introduced, before that logic
was written, we sprouted an exithook to clear _all_ the signals (and,
more importantly for the time, free the ksiginfo_t records to avoid
leaking memory) -- and we wired it up as an _exechook_ too:

+/*
+ * free all pending ksiginfo on exit
+ */
+static void
+ksiginfo_exithook(struct proc *p, void *v)
+{
+ ksiginfo_t *ksi, *hp = p->p_sigctx.ps_siginfo;
+
+ if (hp == NULL)
+ return;
+ for (;;) {
+ pool_put(&ksiginfo_pool, ksi);
+ if ((ksi = ksi->ksi_next) == hp)
+ break;
+ }
+}
...
+ exithook_establish(ksiginfo_exithook, NULL);
+ exechook_establish(ksiginfo_exithook, NULL);

https://mail-index.netbsd.org/source-changes/2003/09/14/msg133910.html

(The first iteration of ksiginfo_exithook had another bug, of course!
But it was soon fixed; that's not the issue here.)

Later, during the newlock2 branch, sigclearall got added for execsigs
to free only the ksiginfo_t records for those signals whose
disposition is being reset to a default action of ignoring the
signal:

void
execsigs(struct proc *p)
{
...
+ sigset_t tset;
...
- for (signum = 1; signum < NSIG; signum++) {
- if (sigismember(&p->p_sigctx.ps_sigcatch, signum)) {
- prop = sigprop[signum];
+ sigemptyset(&tset);
+ for (signo = 1; signo < NSIG; signo++) {
+ if (sigismember(&p->p_sigctx.ps_sigcatch, signo)) {
+ prop = sigprop[signo];
if (prop & SA_IGNORE) {
if ((prop & SA_CONT) == 0)
sigaddset(&p->p_sigctx.ps_sigignore,
- signum);
- sigdelset(&p->p_sigctx.ps_siglist, signum);
+ signo);
+ sigaddset(&tset, signo);
...
}
+ sigclearall(p, &tset);

https://mail-index.netbsd.org/source-changes/2006/10/21/msg176390.html

And the _exithook_ was removed somewhere along the way in the
newlock2 branch (in favour of simply calling sigclearall in exit1),
but the _exechook_ remained:

-static void ksiginfo_exithook(struct proc *, void *);
+static void ksiginfo_exechook(struct proc *, void *);
...
- exithook_establish(ksiginfo_exithook, NULL);
- exechook_establish(ksiginfo_exithook, NULL);
+ exechook_establish(ksiginfo_exechook, NULL);
...
/*
- * ksiginfo_exithook:
+ * ksiginfo_exechook:
*
- * Free all pending ksiginfo entries from a process on exit.
+ * Free all pending ksiginfo entries from a process on exec.
* Additionally, drain any unused ksiginfo structures in the
* system back to the pool.
+ *
+ * XXX This should not be a hook, every process has signals.
*/
static void
-ksiginfo_exithook(struct proc *p, void *v)
+ksiginfo_exechook(struct proc *p, void *v)
{

https://mail-index.netbsd.org/source-changes/2007/02/05/msg180796.html

The symptom of this mistake is that a signal delivered _during_
execve(2) may be simply discarded, even if it should be caught and
cause the process to terminate.

On the bright side, isn't it a nice feeling when you can solve
problems by commits that consist exclusively of deletions?

PR kern/58091: after fork/execve or posix_spawn, parent kill(child,
SIGTERM) has race condition making it unreliable

/src/tests/lib/libc/gen/posix_spawn/
H A Dt_spawn.c1.10 Thu Mar 13 00:48:22 GMT 2025 riastradh execve(2), posix_spawn(2): Don't flush _all_ pending signals.

We need only flush those pending signals whose dispositions have been
reset to the default action when that action is to ignore them --
e.g., if the parent had a signal handler function for SIGCHLD or
SIGWINCH, this is reset to the default disposition, which is to
ignore the signal, so any pending SIGCHLD or SIGWINCH need to be
flushed.

And we have logic to do this already in execsigs(9), via
sigclearset(9), which clears the specified set of signals:

402 sigemptyset(&tset);
403 for (signo = 1; signo < NSIG; signo++) {
404 if (sigismember(&p->p_sigctx.ps_sigcatch, signo)) {
405 prop = sigprop[signo];
406 if (prop & SA_IGNORE) {
407 if ((prop & SA_CONT) == 0)
408 sigaddset(&p->p_sigctx.ps_sigignore,
409 signo);
410 sigaddset(&tset, signo);
411 }
412 SIGACTION_PS(ps, signo).sa_handler = SIG_DFL;
...
420 sigclearall(p, &tset, &kq);

https://nxr.netbsd.org/xref/src/sys/kern/kern_sig.c?r=1.409#394

But back in 2003, when ksiginfo_t was introduced, before that logic
was written, we sprouted an exithook to clear _all_ the signals (and,
more importantly for the time, free the ksiginfo_t records to avoid
leaking memory) -- and we wired it up as an _exechook_ too:

+/*
+ * free all pending ksiginfo on exit
+ */
+static void
+ksiginfo_exithook(struct proc *p, void *v)
+{
+ ksiginfo_t *ksi, *hp = p->p_sigctx.ps_siginfo;
+
+ if (hp == NULL)
+ return;
+ for (;;) {
+ pool_put(&ksiginfo_pool, ksi);
+ if ((ksi = ksi->ksi_next) == hp)
+ break;
+ }
+}
...
+ exithook_establish(ksiginfo_exithook, NULL);
+ exechook_establish(ksiginfo_exithook, NULL);

https://mail-index.netbsd.org/source-changes/2003/09/14/msg133910.html

(The first iteration of ksiginfo_exithook had another bug, of course!
But it was soon fixed; that's not the issue here.)

Later, during the newlock2 branch, sigclearall got added for execsigs
to free only the ksiginfo_t records for those signals whose
disposition is being reset to a default action of ignoring the
signal:

void
execsigs(struct proc *p)
{
...
+ sigset_t tset;
...
- for (signum = 1; signum < NSIG; signum++) {
- if (sigismember(&p->p_sigctx.ps_sigcatch, signum)) {
- prop = sigprop[signum];
+ sigemptyset(&tset);
+ for (signo = 1; signo < NSIG; signo++) {
+ if (sigismember(&p->p_sigctx.ps_sigcatch, signo)) {
+ prop = sigprop[signo];
if (prop & SA_IGNORE) {
if ((prop & SA_CONT) == 0)
sigaddset(&p->p_sigctx.ps_sigignore,
- signum);
- sigdelset(&p->p_sigctx.ps_siglist, signum);
+ signo);
+ sigaddset(&tset, signo);
...
}
+ sigclearall(p, &tset);

https://mail-index.netbsd.org/source-changes/2006/10/21/msg176390.html

And the _exithook_ was removed somewhere along the way in the
newlock2 branch (in favour of simply calling sigclearall in exit1),
but the _exechook_ remained:

-static void ksiginfo_exithook(struct proc *, void *);
+static void ksiginfo_exechook(struct proc *, void *);
...
- exithook_establish(ksiginfo_exithook, NULL);
- exechook_establish(ksiginfo_exithook, NULL);
+ exechook_establish(ksiginfo_exechook, NULL);
...
/*
- * ksiginfo_exithook:
+ * ksiginfo_exechook:
*
- * Free all pending ksiginfo entries from a process on exit.
+ * Free all pending ksiginfo entries from a process on exec.
* Additionally, drain any unused ksiginfo structures in the
* system back to the pool.
+ *
+ * XXX This should not be a hook, every process has signals.
*/
static void
-ksiginfo_exithook(struct proc *p, void *v)
+ksiginfo_exechook(struct proc *p, void *v)
{

https://mail-index.netbsd.org/source-changes/2007/02/05/msg180796.html

The symptom of this mistake is that a signal delivered _during_
execve(2) may be simply discarded, even if it should be caught and
cause the process to terminate.

On the bright side, isn't it a nice feeling when you can solve
problems by commits that consist exclusively of deletions?

PR kern/58091: after fork/execve or posix_spawn, parent kill(child,
SIGTERM) has race condition making it unreliable

/src/sys/kern/
H A Dkern_sig.c1.410 Thu Mar 13 00:48:21 GMT 2025 riastradh execve(2), posix_spawn(2): Don't flush _all_ pending signals.

We need only flush those pending signals whose dispositions have been
reset to the default action when that action is to ignore them --
e.g., if the parent had a signal handler function for SIGCHLD or
SIGWINCH, this is reset to the default disposition, which is to
ignore the signal, so any pending SIGCHLD or SIGWINCH need to be
flushed.

And we have logic to do this already in execsigs(9), via
sigclearset(9), which clears the specified set of signals:

402 sigemptyset(&tset);
403 for (signo = 1; signo < NSIG; signo++) {
404 if (sigismember(&p->p_sigctx.ps_sigcatch, signo)) {
405 prop = sigprop[signo];
406 if (prop & SA_IGNORE) {
407 if ((prop & SA_CONT) == 0)
408 sigaddset(&p->p_sigctx.ps_sigignore,
409 signo);
410 sigaddset(&tset, signo);
411 }
412 SIGACTION_PS(ps, signo).sa_handler = SIG_DFL;
...
420 sigclearall(p, &tset, &kq);

https://nxr.netbsd.org/xref/src/sys/kern/kern_sig.c?r=1.409#394

But back in 2003, when ksiginfo_t was introduced, before that logic
was written, we sprouted an exithook to clear _all_ the signals (and,
more importantly for the time, free the ksiginfo_t records to avoid
leaking memory) -- and we wired it up as an _exechook_ too:

+/*
+ * free all pending ksiginfo on exit
+ */
+static void
+ksiginfo_exithook(struct proc *p, void *v)
+{
+ ksiginfo_t *ksi, *hp = p->p_sigctx.ps_siginfo;
+
+ if (hp == NULL)
+ return;
+ for (;;) {
+ pool_put(&ksiginfo_pool, ksi);
+ if ((ksi = ksi->ksi_next) == hp)
+ break;
+ }
+}
...
+ exithook_establish(ksiginfo_exithook, NULL);
+ exechook_establish(ksiginfo_exithook, NULL);

https://mail-index.netbsd.org/source-changes/2003/09/14/msg133910.html

(The first iteration of ksiginfo_exithook had another bug, of course!
But it was soon fixed; that's not the issue here.)

Later, during the newlock2 branch, sigclearall got added for execsigs
to free only the ksiginfo_t records for those signals whose
disposition is being reset to a default action of ignoring the
signal:

void
execsigs(struct proc *p)
{
...
+ sigset_t tset;
...
- for (signum = 1; signum < NSIG; signum++) {
- if (sigismember(&p->p_sigctx.ps_sigcatch, signum)) {
- prop = sigprop[signum];
+ sigemptyset(&tset);
+ for (signo = 1; signo < NSIG; signo++) {
+ if (sigismember(&p->p_sigctx.ps_sigcatch, signo)) {
+ prop = sigprop[signo];
if (prop & SA_IGNORE) {
if ((prop & SA_CONT) == 0)
sigaddset(&p->p_sigctx.ps_sigignore,
- signum);
- sigdelset(&p->p_sigctx.ps_siglist, signum);
+ signo);
+ sigaddset(&tset, signo);
...
}
+ sigclearall(p, &tset);

https://mail-index.netbsd.org/source-changes/2006/10/21/msg176390.html

And the _exithook_ was removed somewhere along the way in the
newlock2 branch (in favour of simply calling sigclearall in exit1),
but the _exechook_ remained:

-static void ksiginfo_exithook(struct proc *, void *);
+static void ksiginfo_exechook(struct proc *, void *);
...
- exithook_establish(ksiginfo_exithook, NULL);
- exechook_establish(ksiginfo_exithook, NULL);
+ exechook_establish(ksiginfo_exechook, NULL);
...
/*
- * ksiginfo_exithook:
+ * ksiginfo_exechook:
*
- * Free all pending ksiginfo entries from a process on exit.
+ * Free all pending ksiginfo entries from a process on exec.
* Additionally, drain any unused ksiginfo structures in the
* system back to the pool.
+ *
+ * XXX This should not be a hook, every process has signals.
*/
static void
-ksiginfo_exithook(struct proc *p, void *v)
+ksiginfo_exechook(struct proc *p, void *v)
{

https://mail-index.netbsd.org/source-changes/2007/02/05/msg180796.html

The symptom of this mistake is that a signal delivered _during_
execve(2) may be simply discarded, even if it should be caught and
cause the process to terminate.

On the bright side, isn't it a nice feeling when you can solve
problems by commits that consist exclusively of deletions?

PR kern/58091: after fork/execve or posix_spawn, parent kill(child,
SIGTERM) has race condition making it unreliable

1.409 Sat Feb 10 09:24:18 GMT 2024 andvar branches: 1.409.2;
s/musn't/mustn't/ in comments.

1.409 Sat Feb 10 09:24:18 GMT 2024 andvar branches: 1.409.2;
s/musn't/mustn't/ in comments.

/src/share/man/man9/
H A DMakefile1.409 Sat Apr 15 13:52:51 GMT 2017 kamil branches: 1.409.2;
Add new documentation locking(9)

It's a document from June 2015.

DESCRIPTION
The NetBSD kernel provides several synchronization and interrupt control
primitives. This manpage aims at giving an overview of these interfaces
and their proper application. This document includes also basic kernel
thread control primitives and rough overview of the NetBSD kernel design.

Part of interfaces are missing, like new mechanisms for networking SMP,
as this documentation page predates them.

Initial review back in 2015 by Thomas Klausner <wiz>

1.409 Sat Apr 15 13:52:51 GMT 2017 kamil branches: 1.409.2;
Add new documentation locking(9)

It's a document from June 2015.

DESCRIPTION
The NetBSD kernel provides several synchronization and interrupt control
primitives. This manpage aims at giving an overview of these interfaces
and their proper application. This document includes also basic kernel
thread control primitives and rough overview of the NetBSD kernel design.

Part of interfaces are missing, like new mechanisms for networking SMP,
as this documentation page predates them.

Initial review back in 2015 by Thomas Klausner <wiz>

/src/share/man/man4/
H A Doptions.41.409 Sun Oct 02 16:39:46 GMT 2011 jmcneill branches: 1.409.2;
Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.

1.409 Sun Oct 02 16:39:46 GMT 2011 jmcneill branches: 1.409.2;
Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.

/src/sys/dev/usb/
H A Dusbdevs.h1.409 Mon Jul 04 17:43:15 GMT 2005 drochner branches: 1.409.2;
regen

1.409 Mon Jul 04 17:43:15 GMT 2005 drochner branches: 1.409.2;
regen

H A Dusbdevs1.409 Wed Aug 03 23:07:08 GMT 2005 augustss Add a Dell keyboard.
H A Dusbdevs_data.h1.409 Mon Jul 04 05:55:26 GMT 2005 augustss Regen.
/src/sys/arch/alpha/conf/
H A DGENERIC1.409 Sun Sep 27 23:59:37 GMT 2020 thorpej Add a "qemu" driver to access services provided by the Qemu VM. First
order of business is to use the Qemu "get-time" console service call as
the perferred system timecounter.

/src/share/misc/
H A Dacronyms.comp1.409 Thu Jun 12 15:45:49 GMT 2025 jschauma EKU extended key usage (x509)

/src/sys/uvm/
H A Duvm_map.c1.409 Tue Sep 12 16:17:22 GMT 2023 ad Back out recent change to replace pool_cache with then general allocator.
Will return to this when I have time again.

/src/sys/arch/sparc64/sparc64/
H A Dlocore.s1.409 Sun Feb 19 18:25:45 GMT 2017 palle sun4v: rft_user needs special handling (a manual fill) since the restore instruction may cause the number of trap levels to exceed the maximum for sun4v - inspired by code from the the openbsd rft_user code path - verified using qemu for both sun4u and sun4v
/src/sys/dev/ata/
H A Dwd.c1.409 Fri Jul 25 08:10:36 GMT 2014 dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

/src/sys/arch/i386/conf/
H A DALL1.409 Fri Dec 23 11:27:10 GMT 2016 maya add SCTP_DEBUG to ALL kernels

H A Dfiles.i3861.409 Tue Jan 07 14:37:09 GMT 2025 imil Enable pv(4) for i386

/src/sys/arch/arm/arm32/
H A Dpmap.c1.409 Sun Apr 19 08:50:54 GMT 2020 skrll Fix typo in UVMHIST_LOG

/src/distrib/notes/common/
H A Dmain1.409 Thu Sep 04 14:18:04 GMT 2008 tsutsui - add more developers per their requests
- fix one more sort botch
- fix typo
/src/distrib/sets/lists/debug/
H A Dmi1.409 Sun Jul 30 09:22:02 GMT 2023 riastradh ld.elf_so: Add some known-answer tests for hash functions.

Make sure the testing mechanism detects the traditional overflow bug.
/src/etc/
H A DMakefile1.409 Wed May 01 15:57:44 GMT 2013 agc Fix typo in previous

/src/share/mk/
H A Dbsd.README1.409 Thu Jul 02 10:22:28 GMT 2020 jmcneill Document OBJMACHINE_ARCH

H A Dbsd.lib.mk1.409 Thu Oct 31 21:53:40 GMT 2024 rillig bsd.lib.mk: in 'lint' target, don't list defined but unused symbols

When building a library, it is common that there are many symbols that
are defined but not used, as that's exactly the point of a library.

When running the 'lint' target manually, don't complain about these
symbols, by creating a "dummy" library. That dummy library is not
installed anywhere.

For libxcb, the output shrinks from more than 3000 lines down to 5.

/src/sys/dev/raidframe/
H A Drf_netbsdkintf.c1.409 Sun Aug 28 00:26:04 GMT 2022 oster
RAIDframe must be initialized for the RAIDFRAME_SET_LAST_UNIT
and RAIDFRAME_SHUTDOWN ioctls.

XXX Pullup-9

Reported-by: syzbot+1c20fcbe34d72cd7fbda@syzkaller.appspotmail.com

/src/sys/dev/pci/
H A Dfiles.pci1.409 Tue Nov 20 00:23:01 GMT 2018 skrll Add support for MSI/MSI-X to ahcisata at pci.

The options AHCISATA_DISABLE_MSI and AHCISATA_DISABLE_MSIX are available
if required.

/src/usr.bin/xlint/lint1/
H A Dcgram.y1.409 Sat Apr 30 21:38:03 GMT 2022 rillig lint: inline macro 'tflag'

The definition of the macro tested both allow_trad and allow_c90, but
there is only a single mode in which allow_c90 is false, therefore it
suffices to test only that.

While double-checking each occurrence of tflag individually, I learned
why lint performs lookups of struct members only by name, independently
of the struct in which they are declared. See typeok_arrow for details.

No functional change.

H A Ddecl.c1.409 Thu Nov 28 22:32:53 GMT 2024 rillig lint: add queries for typedefs to struct/union and their pointers

As suggested in share/misc/style since 1.75 from August 2023.

These are queries instead of warnings as the number of false positives or
historical practice is too high; these queries are only intended for
detecting these typedefs on newly added types.

Completed in 419 milliseconds

123