Now
MAIN commitmail json YAML
src/sys/dev/efi.c@1.7
/
diff
/
nxr@1.7
src/sys/dev/efivar.h@1.2 / diff / nxr@1.2
src/sys/sys/efiio.h@1.3 / diff / nxr@1.3
src/sys/dev/efivar.h@1.2 / diff / nxr@1.2
src/sys/sys/efiio.h@1.3 / diff / nxr@1.3
efi(4): Implement MI parts of EFIIOC_GET_TABLE.
Intended to be compatible with FreeBSD.
Not yet supported on any architectures.
PR kern/57076
XXX pullup-10
Intended to be compatible with FreeBSD.
Not yet supported on any architectures.
PR kern/57076
XXX pullup-10
MAIN commitmail json YAML
MAIN commitmail json YAML
dtrace_fbt: Read and write instructions appropriately-endian on arm.
arm is a little more complicated because it has three cases:
- big-endian data, big-endian instructions
- big-endian data, little-endian instructions
- little-endian data, little-endian instructions
arm is a little more complicated because it has three cases:
- big-endian data, big-endian instructions
- big-endian data, little-endian instructions
- little-endian data, little-endian instructions
MAIN commitmail json YAML
dk(4): Add locking notes.
MAIN commitmail json YAML
dk(4): Explain why no need for device reference in dksize, dkdump.
MAIN commitmail json YAML
dk(4): Strengthen preconditions of various devsw operations.
These can only happen between dkopen and dkclose, so there's no need
to test -- we can assert instead that the wedge exists and is fully
initialized.
These can only happen between dkopen and dkclose, so there's no need
to test -- we can assert instead that the wedge exists and is fully
initialized.
MAIN commitmail json YAML
dk(4): Strengthen dkclose preconditions.
Like dkopen, except it is possible for this to be called after the
wedge has transitioned to dying.
XXX sc_state read here races with sc_state write in dkwedge_detach.
Could change this to atomic_load/store.
Like dkopen, except it is possible for this to be called after the
wedge has transitioned to dying.
XXX sc_state read here races with sc_state write in dkwedge_detach.
Could change this to atomic_load/store.
MAIN commitmail json YAML
dk(4): Strengthen dkopen preconditions.
This cannot be called before dkwedge_attach for the same unit
returns, so sc->sc_dev is guaranteed to be set to a nonnull device_t
and the state is guaranteed not to be larval.
And this cannot be called concurrently with dkwedge_detach, or after
dkwedge_detach does vdevgone until another wedge with the same number
is attached (which can't happen until dkwedge_detach completes), so
the state is guaranteed not to be dying or dead.
Hence sc->sc_dev != NULL and sc->sc_state == DKW_STATE_RUNNING.
This cannot be called before dkwedge_attach for the same unit
returns, so sc->sc_dev is guaranteed to be set to a nonnull device_t
and the state is guaranteed not to be larval.
And this cannot be called concurrently with dkwedge_detach, or after
dkwedge_detach does vdevgone until another wedge with the same number
is attached (which can't happen until dkwedge_detach completes), so
the state is guaranteed not to be dying or dead.
Hence sc->sc_dev != NULL and sc->sc_state == DKW_STATE_RUNNING.
MAIN commitmail json YAML
dk(4): Prevent race between dkwedge_get_parent_name and wedge detach.
Still races with parent detach but maybe this is better.
XXX Maybe we should ditch dkwedge_get_parent_name -- it's used only
by rf_containsboot, which kinda suggests it shouldn't exist.
Still races with parent detach but maybe this is better.
XXX Maybe we should ditch dkwedge_get_parent_name -- it's used only
by rf_containsboot, which kinda suggests it shouldn't exist.
MAIN commitmail json YAML
dk(4): Split unsafe lookups into safe subroutines and unsafe wrappers.
No functional change intended.
Eventually we should adjust the callers to use the safe subroutines
instead and device_release when done.
No functional change intended.
Eventually we should adjust the callers to use the safe subroutines
instead and device_release when done.
MAIN commitmail json YAML
dk(4): Don't hold lock around uiomove in dkwedge_list.
Instead, hold a device reference. dkwedge_detach will not run until
the device reference is released.
Instead, hold a device reference. dkwedge_detach will not run until
the device reference is released.
MAIN commitmail json YAML
dk(4): Skip larval wedges in various lookup routines.
These have not yet finished a concurent dkwedge_attach, so there's
nothing we can safely do with them. Just pretend they don't exist --
as if we had arrived at the lookup a moment earlier.
These have not yet finished a concurent dkwedge_attach, so there's
nothing we can safely do with them. Just pretend they don't exist --
as if we had arrived at the lookup a moment earlier.
MAIN commitmail json YAML
dk(4): Simplify dkwedge_delall by detaching directly.
No need for O(n^2) algorithm and potentially racy lookups -- not that
n is large enough for n^2 to matter, but the mechanism is simpler
this way.
No need for O(n^2) algorithm and potentially racy lookups -- not that
n is large enough for n^2 to matter, but the mechanism is simpler
this way.
MAIN commitmail json YAML
dk(4): Use device_lookup_private for dkwedge_lookup.
No longer necessary to go through the dkwedges array.
Currently device_lookup_private still involves touching other global
locks, but that will change eventually to a lockless pserialized fast
path.
No longer necessary to go through the dkwedges array.
Currently device_lookup_private still involves touching other global
locks, but that will change eventually to a lockless pserialized fast
path.
MAIN commitmail json YAML
dk(4): dkunit is no longer needed; nix it.
dkwedges array indexing now coincides with autoconf device numbering.
dkwedges array indexing now coincides with autoconf device numbering.
MAIN commitmail json YAML
dk(4): Use config_attach_pseudo_acquire to create wedges.
This way, indexing of the dkwedges array coincides with numbering of
autoconf dk(4) instances.
As a side effect, this plugs a race in dkwedge_add with concurrent
drvctl -r. There are a lot of such races in dk(4) left -- to be
addressed with more device references.
This way, indexing of the dkwedges array coincides with numbering of
autoconf dk(4) instances.
As a side effect, this plugs a race in dkwedge_add with concurrent
drvctl -r. There are a lot of such races in dk(4) left -- to be
addressed with more device references.
MAIN commitmail json YAML
autoconf(9): New functions for referenced attach/detach.
New functions:
- config_found_acquire(dev, aux, print, cfargs)
- config_attach_acquire(parent, cf, aux, print, cfargs)
- config_attach_pseudo_acquire(cf, aux)
- config_detach_release(dev, flags)
- device_acquire(dev)
The config_*_acquire functions are like the non-acquire versions, but
they return a referenced device_t, which is guaranteed to be safe to
use until released. The device's detach function may run while it is
referenced, but the device_t will not be freed and the parent's
.ca_childdetached routine will not be called.
=> config_attach_pseudo_acquire additionally lets you pass an aux
argument to the device's .ca_attach routine, unlike
config_attach_pseudo which always passes NULL.
=> Eventually, config_found, config_attach, and config_attach_pseudo
should be made to return void, because use of the device_t they
return is unsafe without the kernel lock and difficult to use
safely even with the kernel lock or in a UP system. For now,
they require the caller to hold the kernel lock, while
config_*_acquire do not.
config_detach_release is like device_release and then config_detach,
but avoids the race inherent with that sequence.
=> Eventually, config_detach should be eliminated, because getting at
the device_t it needs is unsafe without the kernel lock and
difficult to use safely even with the kernel lock or in a UP
system. For now, it requires the caller to hold the kernel lock,
while config_detach_release does not.
device_acquire acquires a reference to a device. It never fails and
can be used in thread context (but not interrupt context, hard or
soft). Caller is responsible for ensuring that the device_t cannot
be freed; in other words, the device_t must be made unavailable to
any device_acquire callers before the .ca_detach function returns.
Typically device_acquire will be used in a read section (mutex,
rwlock, pserialize, &c.) in a data structure lookup, with
corresponding logic in the .ca_detach function to remove the device
from the data structure and wait for all read sections to complete.
Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/05/10/msg028889.html
New functions:
- config_found_acquire(dev, aux, print, cfargs)
- config_attach_acquire(parent, cf, aux, print, cfargs)
- config_attach_pseudo_acquire(cf, aux)
- config_detach_release(dev, flags)
- device_acquire(dev)
The config_*_acquire functions are like the non-acquire versions, but
they return a referenced device_t, which is guaranteed to be safe to
use until released. The device's detach function may run while it is
referenced, but the device_t will not be freed and the parent's
.ca_childdetached routine will not be called.
=> config_attach_pseudo_acquire additionally lets you pass an aux
argument to the device's .ca_attach routine, unlike
config_attach_pseudo which always passes NULL.
=> Eventually, config_found, config_attach, and config_attach_pseudo
should be made to return void, because use of the device_t they
return is unsafe without the kernel lock and difficult to use
safely even with the kernel lock or in a UP system. For now,
they require the caller to hold the kernel lock, while
config_*_acquire do not.
config_detach_release is like device_release and then config_detach,
but avoids the race inherent with that sequence.
=> Eventually, config_detach should be eliminated, because getting at
the device_t it needs is unsafe without the kernel lock and
difficult to use safely even with the kernel lock or in a UP
system. For now, it requires the caller to hold the kernel lock,
while config_detach_release does not.
device_acquire acquires a reference to a device. It never fails and
can be used in thread context (but not interrupt context, hard or
soft). Caller is responsible for ensuring that the device_t cannot
be freed; in other words, the device_t must be made unavailable to
any device_acquire callers before the .ca_detach function returns.
Typically device_acquire will be used in a read section (mutex,
rwlock, pserialize, &c.) in a data structure lookup, with
corresponding logic in the .ca_detach function to remove the device
from the data structure and wait for all read sections to complete.
Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/05/10/msg028889.html
MAIN commitmail json YAML
tty(9): Make ttwrite update uio with only how much it has consumed.
As is, it leaves uio in an inconsistent state. Good enough for the
write(2) return value to be correct for a userland caller to restart
write(2) where it left off, but not good enough for a loop in the
kernel to reuse the same uio.
Reported-by: syzbot+e0f56178d0add0d8be20@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=6290eb02b8fe73361dc15c7bc44e1208601e6af8
Reported-by: syzbot+7caa189e8fccd926357e@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=c0a3b77b4831dfa81fc855857bde81755d246bd3
Reported-by: syzbot+4a1eff91eb4e7c1970b6@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=10523a633a4ad9749f57dc7cf03f9447d518c5b8
Reported-by: syzbot+1d3c280f59099dc82e17@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8e02ebb0da76a8e286461f33502117a1d30275c6
Reported-by: syzbot+080d51214d0634472b12@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=1f617747db8087e5554d3df1b79a545dee26a650
Reported-by: syzbot+dd50b448e49e5020131a@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=f71c8cef4110b7eeac6eca67b6a4d1f4a8b3e96f
Reported-by: syzbot+26b675ecf0cc9dfd8586@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=57b1901f5b3e090a964d08dd0d729f9909f203be
Reported-by: syzbot+87f0df2c9056313a5c4b@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=67994a3da32d075144e25d1ac314be1d9694ae6e
Reported-by: syzbot+e5bc98e18aa42f0cb25d@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=6374bd286532423c63f2b331748280729134224c
Reported-by: syzbot+7e587f4c5aaaf80e84b3@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=976210ed438d48ac275d77d7ebf4a086e43b5fcb
As is, it leaves uio in an inconsistent state. Good enough for the
write(2) return value to be correct for a userland caller to restart
write(2) where it left off, but not good enough for a loop in the
kernel to reuse the same uio.
Reported-by: syzbot+e0f56178d0add0d8be20@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=6290eb02b8fe73361dc15c7bc44e1208601e6af8
Reported-by: syzbot+7caa189e8fccd926357e@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=c0a3b77b4831dfa81fc855857bde81755d246bd3
Reported-by: syzbot+4a1eff91eb4e7c1970b6@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=10523a633a4ad9749f57dc7cf03f9447d518c5b8
Reported-by: syzbot+1d3c280f59099dc82e17@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8e02ebb0da76a8e286461f33502117a1d30275c6
Reported-by: syzbot+080d51214d0634472b12@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=1f617747db8087e5554d3df1b79a545dee26a650
Reported-by: syzbot+dd50b448e49e5020131a@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=f71c8cef4110b7eeac6eca67b6a4d1f4a8b3e96f
Reported-by: syzbot+26b675ecf0cc9dfd8586@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=57b1901f5b3e090a964d08dd0d729f9909f203be
Reported-by: syzbot+87f0df2c9056313a5c4b@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=67994a3da32d075144e25d1ac314be1d9694ae6e
Reported-by: syzbot+e5bc98e18aa42f0cb25d@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=6374bd286532423c63f2b331748280729134224c
Reported-by: syzbot+7e587f4c5aaaf80e84b3@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=976210ed438d48ac275d77d7ebf4a086e43b5fcb
MAIN commitmail json YAML
src/share/man/man9/uiomove.9@1.21
/
diff
/
nxr@1.21
src/sys/kern/subr_copy.c@1.19 / diff / nxr@1.19
src/sys/sys/systm.h@1.302 / diff / nxr@1.302
src/sys/kern/subr_copy.c@1.19 / diff / nxr@1.19
src/sys/sys/systm.h@1.302 / diff / nxr@1.302
uiomove(9): Add uiopeek/uioskip operations.
This allows a caller to grab some data, consume part of it, and
atomically update the uio with only the amount it consumed. This
way, the caller can use a buffer of a size that doesn't depend on how
much it will actually consume, which it may not know in advance --
e.g., because it depends on how much an underlying hardware tty
device will accept before it decides it has had too much.
Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/05/09/msg028883.html
(Opinions were divided between `uioadvance' and `uioskip'. I stuck
with `uioskip' because that was less work for me.)
This allows a caller to grab some data, consume part of it, and
atomically update the uio with only the amount it consumed. This
way, the caller can use a buffer of a size that doesn't depend on how
much it will actually consume, which it may not know in advance --
e.g., because it depends on how much an underlying hardware tty
device will accept before it decides it has had too much.
Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/05/09/msg028883.html
(Opinions were divided between `uioadvance' and `uioskip'. I stuck
with `uioskip' because that was less work for me.)
MAIN commitmail json YAML
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc@1.7
/
diff
/
nxr@1.7
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ec.inc@1.2 / diff / nxr@1.2
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ec.inc@1.2 / diff / nxr@1.2
openssl: Limit armv8 stuff to aarch64.
Strictly speaking there is armv8 aarch32, e.g. AES instructions are
exposed to 32-bit mode, but OpenSSL's `*_armv8.S' files are staunchly
aarch64 and don't work when built for aarch64 32-bit compat libraries
(which could take advantage of armv8 instructions, but only if the
code is actually aarch32, which it isn't).
The armv8 stuff is still included in aarch64 /usr/lib/libcrypto, just
not in the 32-bit compat libraries.
With any luck, this will fix the aarch64 clang build (again).
Strictly speaking there is armv8 aarch32, e.g. AES instructions are
exposed to 32-bit mode, but OpenSSL's `*_armv8.S' files are staunchly
aarch64 and don't work when built for aarch64 32-bit compat libraries
(which could take advantage of armv8 instructions, but only if the
code is actually aarch32, which it isn't).
The armv8 stuff is still included in aarch64 /usr/lib/libcrypto, just
not in the 32-bit compat libraries.
With any luck, this will fix the aarch64 clang build (again).
MAIN commitmail json YAML
src/distrib/sets/lists/base/mi@1.1319
/
diff
/
nxr@1.1319
src/etc/mtree/NetBSD.dist.compat.in@1.3 / diff / nxr@1.3
src/etc/mtree/NetBSD.dist.compat.in@1.3 / diff / nxr@1.3
openssl compat: Try this again!
compatdir appears to be for things like /usr/lib that have
/usr/lib/eabi as a subdirectory, so for /usr/lib/openssl it would
mean we have /usr/lib/openssl/eabi as a subdirectory. But that's not
what we have; we have /usr/lib/eabi/openssl.
Let's try using NetBSD.dist.compat.in instead, which appears to be
intended for this purpose, from what I can gather.
compatdir appears to be for things like /usr/lib that have
/usr/lib/eabi as a subdirectory, so for /usr/lib/openssl it would
mean we have /usr/lib/openssl/eabi as a subdirectory. But that's not
what we have; we have /usr/lib/eabi/openssl.
Let's try using NetBSD.dist.compat.in instead, which appears to be
intended for this purpose, from what I can gather.
MAIN commitmail json YAML
kern/sys_descrip.c: Nix trailing whitespace.
MAIN commitmail json YAML
src/sys/arch/i386/stand/efiboot/boot.c@1.23
/
diff
/
nxr@1.23
src/sys/arch/i386/stand/efiboot/bootia32/efibootia32.c@1.7 / diff / nxr@1.7
src/sys/arch/i386/stand/efiboot/efidisk.c@1.10 / diff / nxr@1.10
src/sys/arch/i386/stand/efiboot/efimemory.c@1.10 / diff / nxr@1.10
src/sys/arch/i386/stand/efiboot/bootia32/efibootia32.c@1.7 / diff / nxr@1.7
src/sys/arch/i386/stand/efiboot/efidisk.c@1.10 / diff / nxr@1.10
src/sys/arch/i386/stand/efiboot/efimemory.c@1.10 / diff / nxr@1.10
x86/efiboot: Nix trailing whitespace.
MAIN commitmail json YAML
src/sys/arch/amd64/amd64/locore.S@1.221
/
diff
/
nxr@1.221
src/sys/arch/i386/i386/locore.S@1.195 / diff / nxr@1.195
src/sys/arch/i386/i386/locore.S@1.195 / diff / nxr@1.195
x86/locore.S: Nix trailing whitespace.
MAIN commitmail json YAML
x86/boot(8): Nix trailing whitespace.
MAIN commitmail json YAML
options(4): Nix trailing whitespace.
MAIN commitmail json YAML
openssl: More set list fixes.
MAIN commitmail json YAML
src/tests/crypto/libcrypto/bn/bn/Makefile@1.2
/
diff
/
nxr@1.2
src/tests/crypto/libcrypto/engine/Makefile@1.2 / diff / nxr@1.2
src/tests/crypto/libcrypto/evp/Makefile@1.4 / diff / nxr@1.4
src/tests/crypto/libcrypto/srp/Makefile@1.2 / diff / nxr@1.2
src/tests/crypto/libcrypto/threads/Makefile@1.7 / diff / nxr@1.7
src/tests/crypto/libcrypto/engine/Makefile@1.2 / diff / nxr@1.2
src/tests/crypto/libcrypto/evp/Makefile@1.4 / diff / nxr@1.4
src/tests/crypto/libcrypto/srp/Makefile@1.2 / diff / nxr@1.2
src/tests/crypto/libcrypto/threads/Makefile@1.7 / diff / nxr@1.7
openssl: More tests need -Wno-missing-field-initializers.
MAIN commitmail json YAML
openssl: libcrypto bf test needs -Wno-missing-field-initializers
MAIN commitmail json YAML
src/distrib/sets/lists/base/ad.aarch64@1.38
/
diff
/
nxr@1.38
src/etc/mtree/NetBSD.dist.aarch64@1.10 / diff / nxr@1.10
src/etc/mtree/NetBSD.dist.aarch64@1.10 / diff / nxr@1.10
aarch64: New directories for compat openssl on aarch64.
Hope I got the setlist tags right, not really sure how this works.
Hope I got the setlist tags right, not really sure how this works.
MAIN commitmail json YAML
libfido2: Needs -Wno-error=pointer-sign on arm.
MAIN commitmail json YAML
libcryptotest: Suppress some warnings.
Detected by clang aarch64 32-bit arm compat library build.
Detected by clang aarch64 32-bit arm compat library build.
MAIN commitmail json YAML
src/compat/arm/eabi/bsd.eabi.mk@1.7
/
diff
/
nxr@1.7
src/compat/arm/eabihf/bsd.eabihf.mk@1.5 / diff / nxr@1.5
src/share/mk/bsd.own.mk@1.1319 / diff / nxr@1.1319
src/compat/arm/eabihf/bsd.eabihf.mk@1.5 / diff / nxr@1.5
src/share/mk/bsd.own.mk@1.1319 / diff / nxr@1.1319
compat: Disable relro in 32-bit arm compat.
Not supported by binutils:
ld: warning: -z relro ignored
PR toolchain/57405
Not supported by binutils:
ld: warning: -z relro ignored
PR toolchain/57405
MAIN commitmail json YAML
src/compat/arm/eabi/bsd.eabi.mk@1.6
/
diff
/
nxr@1.6
src/compat/arm/eabihf/bsd.eabihf.mk@1.4 / diff / nxr@1.4
src/compat/dirshack/Makefile@1.4 / diff / nxr@1.4
src/compat/exec.mk@1.7 / diff / nxr@1.7
src/compat/arm/eabihf/bsd.eabihf.mk@1.4 / diff / nxr@1.4
src/compat/dirshack/Makefile@1.4 / diff / nxr@1.4
src/compat/exec.mk@1.7 / diff / nxr@1.7
compat: Nix trailing whitespace.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): Need pdk->dk_openlock to read pdk->dk_wedges.
MAIN commitmail json YAML
src/distrib/sets/lists/base/mi@1.1317
/
diff
/
nxr@1.1317
src/distrib/sets/lists/comp/mi@1.2428 / diff / nxr@1.2428
src/distrib/sets/lists/comp/mi@1.2428 / diff / nxr@1.2428
distrib/sets/lists: Nix trailing whitespace.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): Make it clearer that dkopen EROFS branch doesn't leak.
It looked like we may need to sometimes call dklastclose in error
branch for the case of (flags & ~sc->sc_mode & FWRITE) != 0, but it
is not actually possible to reach that case: if the caller requested
read/write, and the parent is read-only, and it is the first time
we've opened the parent, then dkfirstopen will fail with EROFS so we
never get there.
But this is confusing and it looked like the error branch is wrong,
so let's rearrange the conditional to make it clearer that we cannot
goto out after dkfirstopen has succeeded. And then assert that the
case cannot happen when we do call dkfirstopen.
It looked like we may need to sometimes call dklastclose in error
branch for the case of (flags & ~sc->sc_mode & FWRITE) != 0, but it
is not actually possible to reach that case: if the caller requested
read/write, and the parent is read-only, and it is the first time
we've opened the parent, then dkfirstopen will fail with EROFS so we
never get there.
But this is confusing and it looked like the error branch is wrong,
so let's rearrange the conditional to make it clearer that we cannot
goto out after dkfirstopen has succeeded. And then assert that the
case cannot happen when we do call dkfirstopen.
MAIN commitmail json YAML
opl(4): Use config_detach_children.
MAIN commitmail json YAML
acpi(4): Fix membars in ACPI_ACQUIRE/RELEASE_GLOBAL_LOCK.
XXX pullup-8 (by patch with membar_enter/exit)
XXX pullup-9 (by patch with membar_enter/exit)
XXX pullup-10
XXX pullup-8 (by patch with membar_enter/exit)
XXX pullup-9 (by patch with membar_enter/exit)
XXX pullup-10
MAIN commitmail json YAML
uts(4): Use config_detach_children.
MAIN commitmail json YAML
udsbr(4): Use config_detach_children.
MAIN commitmail json YAML
irmce(4): Use config_detach_children.
MAIN commitmail json YAML
xirc(4): Use config_detach_children.
MAIN commitmail json YAML
pcmcom(4): Use config_detach_children.
MAIN commitmail json YAML
mhzc(4): Use config_detach_children.
MAIN commitmail json YAML
ismt(4): Use config_detach_children.
MAIN commitmail json YAML
esa(4): Use config_detach_children.
MAIN commitmail json YAML
emuxki(4): Use config_detach_children.
MAIN commitmail json YAML
cxdtv(4): Use config_detach_children.
MAIN commitmail json YAML
auich(4): Use config_detach_children.
MAIN commitmail json YAML
nandemulator(4): Use config_detach_children.
MAIN commitmail json YAML
wb(4): Use config_detach_children.
MAIN commitmail json YAML
spc(4): Use config_detach_children.
MAIN commitmail json YAML
aic(4): Use config_detach_children.
MAIN commitmail json YAML
ims(4): Use config_detach_children.
MAIN commitmail json YAML
hpf1275a(4): Use config_detach_children.
MAIN commitmail json YAML
hilms(4): Use config_detach_children.
MAIN commitmail json YAML
gpiosim(4): Use config_detach_children.
MAIN commitmail json YAML
gpioow(4): Use config_detach_children.
MAIN commitmail json YAML
gpioiic(4): Use config_detach_children.
MAIN commitmail json YAML
acpiwmi(4): Use config_detach_children.
MAIN commitmail json YAML
sandpoint: Use config_detach_children to reduce error branch bugs.
MAIN commitmail json YAML
src/sys/arch/powerpc/booke/dev/pq3cfi.c@1.8
/
diff
/
nxr@1.8
src/sys/arch/powerpc/booke/dev/pq3nandfcm.c@1.5 / diff / nxr@1.5
src/sys/arch/powerpc/booke/dev/pq3nandfcm.c@1.5 / diff / nxr@1.5
powerpc: Use config_detach_children to reduce error branch bugs.
MAIN commitmail json YAML
src/sys/arch/mips/ralink/ralink_cfi.c@1.2
/
diff
/
nxr@1.2
src/sys/arch/mips/rmi/rmixl_nand.c@1.8 / diff / nxr@1.8
src/sys/arch/mips/rmi/rmixl_nand.c@1.8 / diff / nxr@1.8
mips: Use config_detach_children to reduce error branch bugs.
MAIN commitmail json YAML
src/sys/arch/x86/pci/imcsmb/imc.c@1.6
/
diff
/
nxr@1.6
src/sys/arch/x86/pci/imcsmb/imcsmb.c@1.6 / diff / nxr@1.6
src/sys/arch/x86/pci/imcsmb/imcsmb.c@1.6 / diff / nxr@1.6
x86/imc(4): Use config_detach_children.
MAIN commitmail json YAML
ichlpcib(4): Use config_detach_children.
Delete a lot of unnecessary code with broken error branches involving
config_detach which have probably seldom if ever been exercised.
No substantive functional change intended. Low risk because
ichlpcib(4) is not a removable device, so you have to go out of your
way to exercise detach.
Delete a lot of unnecessary code with broken error branches involving
config_detach which have probably seldom if ever been exercised.
No substantive functional change intended. Low risk because
ichlpcib(4) is not a removable device, so you have to go out of your
way to exercise detach.
MAIN commitmail json YAML
ichlpcib(4): KNF. No functional change intended.
MAIN commitmail json YAML
bsd.lib.mk: Nix trailing whitespace.
MAIN commitmail json YAML
dtrace_fbt: Read and write instruction words in little-endian.
Step toward making this work on aarch64eb.
Step toward making this work on aarch64eb.
MAIN commitmail json YAML
dk(4): Fix typo: sc_state, not sc_satte.
Had tested a patch series, but not every patch in it, and I
inadvertently fixed the typo in a later patch in the series, not in
the one I committed.
Had tested a patch series, but not every patch in it, and I
inadvertently fixed the typo in a later patch in the series, not in
the one I committed.
MAIN commitmail json YAML
dk(4): Omit needless sc_iopend, sc_dkdrn mechanism.
vdevgone guarantees that all instances are closed by the time it
returns, which in turn guarantees all I/O operations (read, write,
ioctl, &c.) have completed, and, if the block device is open,
vinvalbuf(V_SAVE) -> vflushbuf has completed, which forces all
buffered transfers to be issued and waits for them to complete.
So by the time vdevgone returns, no further transfers can be
submitted and the bufq must be empty.
vdevgone guarantees that all instances are closed by the time it
returns, which in turn guarantees all I/O operations (read, write,
ioctl, &c.) have completed, and, if the block device is open,
vinvalbuf(V_SAVE) -> vflushbuf has completed, which forces all
buffered transfers to be issued and waits for them to complete.
So by the time vdevgone returns, no further transfers can be
submitted and the bufq must be empty.
MAIN commitmail json YAML
src/sys/dev/dkwedge/dk.c@1.154
/
diff
/
nxr@1.154
src/sys/kern/subr_disk.c@1.137 / diff / nxr@1.137
src/sys/sys/disk.h@1.78 / diff / nxr@1.78
src/sys/kern/subr_disk.c@1.137 / diff / nxr@1.137
src/sys/sys/disk.h@1.78 / diff / nxr@1.78
ioctl(DIOCRMWEDGES): Delete only idle wedges.
Don't forcibly delete busy wedges.
Reported-by: syzbot+e46f31fe56e04f567d88@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8a00fd7f2e7459748d7a274098180a4708ff0f61
Fixes accidental destruction of the busy wedge that the root file
system is mounted on, triggered by syzbot's ioctl(DIOCRMWEDGES).
Don't forcibly delete busy wedges.
Reported-by: syzbot+e46f31fe56e04f567d88@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8a00fd7f2e7459748d7a274098180a4708ff0f61
Fixes accidental destruction of the busy wedge that the root file
system is mounted on, triggered by syzbot's ioctl(DIOCRMWEDGES).
MAIN commitmail json YAML
dk(4): dkclose must handle a dying wedge too to close the parent.
Otherwise the parent open leaks on detach (or revoke) when the wedge
was open and had to be forcibly closed.
Reported-by: syzbot+e46f31fe56e04f567d88@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8a00fd7f2e7459748d7a274098180a4708ff0f61
Fixes assertion sc->sc_dk.dk_openmask == 0.
Otherwise the parent open leaks on detach (or revoke) when the wedge
was open and had to be forcibly closed.
Reported-by: syzbot+e46f31fe56e04f567d88@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8a00fd7f2e7459748d7a274098180a4708ff0f61
Fixes assertion sc->sc_dk.dk_openmask == 0.
MAIN commitmail json YAML
mutex(9): Write comments in terms of ordering semantics.
Phrasing things in terms of implementation details like `acquiring
and locking cache lines' both suggests a particular cache coherency
protocol, paints an incomplete picture for more involved protocols,
and doesn't really help to prove theorems the way ordering relations
do.
No functional change intended.
Phrasing things in terms of implementation details like `acquiring
and locking cache lines' both suggests a particular cache coherency
protocol, paints an incomplete picture for more involved protocols,
and doesn't really help to prove theorems the way ordering relations
do.
No functional change intended.
MAIN commitmail json YAML
mutex(9): Omit needless membar_consumer.
In practical terms, this is not necessary because MUTEX_SET_WAITERS
already issues MUTEX_MEMBAR_ENTER, which on all architectures is a
sequential consistency barrier, i.e., read/write-before-read/write,
subsuming membar_consumer.
In theoretical terms, MUTEX_MEMBAR_ENTER might imply only
write-before-read/write, so one might imagine that the
read-before-read ordering of membar_consumer _could_ be necessary.
However, the memory operations that are significant here are:
1. load owner := mtx->mtx_owner
2. store mtx->mtx_owner := owner | MUTEX_BIT_WAITERS
3. load owner->l_cpu->ci_curlwp to test if equal to owner
(1) is program-before (2) and at the same memory location,
mtx->mtx_owner, so (1) happens-before (2).
And (2) is separated in program order by MUTEX_MEMBAR_ENTER from (3),
so (2) happens-before (3).
So even if the membar_consumer were intended to guarantee that (1)
happens-before (3), it's not necessary, because we can already prove
it from MUTEX_MEMBAR_ENTER.
But actually, we don't really need (1) happens-before (3), exactly;
what we really need is (2) happens-before (3), since this is a little
manifestation of Dekker's algorithm between cpu_switchto and
mutex_exit, where each CPU sets one flag and must ensure it is
visible to the other CPUs before testing the other flag -- one flag
here is the MUTEX_BIT_WAITERS bit, and the other `flag' here is the
condition owner->l_cpu->ci_curlwp == owner; the corresponding logic,
in cpu_switchto, is:
1'. store owner->l_cpu->ci_curlwp := owner
2'. load mtx->mtx_owner to test if MUTEX_BIT_WAITERS set
In practical terms, this is not necessary because MUTEX_SET_WAITERS
already issues MUTEX_MEMBAR_ENTER, which on all architectures is a
sequential consistency barrier, i.e., read/write-before-read/write,
subsuming membar_consumer.
In theoretical terms, MUTEX_MEMBAR_ENTER might imply only
write-before-read/write, so one might imagine that the
read-before-read ordering of membar_consumer _could_ be necessary.
However, the memory operations that are significant here are:
1. load owner := mtx->mtx_owner
2. store mtx->mtx_owner := owner | MUTEX_BIT_WAITERS
3. load owner->l_cpu->ci_curlwp to test if equal to owner
(1) is program-before (2) and at the same memory location,
mtx->mtx_owner, so (1) happens-before (2).
And (2) is separated in program order by MUTEX_MEMBAR_ENTER from (3),
so (2) happens-before (3).
So even if the membar_consumer were intended to guarantee that (1)
happens-before (3), it's not necessary, because we can already prove
it from MUTEX_MEMBAR_ENTER.
But actually, we don't really need (1) happens-before (3), exactly;
what we really need is (2) happens-before (3), since this is a little
manifestation of Dekker's algorithm between cpu_switchto and
mutex_exit, where each CPU sets one flag and must ensure it is
visible to the other CPUs before testing the other flag -- one flag
here is the MUTEX_BIT_WAITERS bit, and the other `flag' here is the
condition owner->l_cpu->ci_curlwp == owner; the corresponding logic,
in cpu_switchto, is:
1'. store owner->l_cpu->ci_curlwp := owner
2'. load mtx->mtx_owner to test if MUTEX_BIT_WAITERS set
MAIN commitmail json YAML
drm: KASSERT(A && B) -> KASSERT(A); KASSERT(B)
MAIN commitmail json YAML
xen_clock(4): Sprinkle dtrace probes.
MAIN commitmail json YAML
sys/sdt.h: Omit spurious trailing semicolon in DTRACE_PROBE*.
MAIN commitmail json YAML
sys/sdt.h: Nix needless SDT_VAR_DECL.
Previously introduced as a provisional build fix, its need has been
obviated by making SDT_PROBE* do __USE on the arguments in builds
without KDTRACE_HOOKS.
Previously introduced as a provisional build fix, its need has been
obviated by making SDT_PROBE* do __USE on the arguments in builds
without KDTRACE_HOOKS.
MAIN commitmail json YAML
kern/vfs_subr.c: Revert previous build fixes, no longer needed.
SDT_PROBE* will now DTRT here.
SDT_PROBE* will now DTRT here.
MAIN commitmail json YAML
sys/sdt.h: Make sure SDT_PROBE*, DTRACE_PROBE* compile the arguments.
This way there's no need to fuss around with conditional declarations
and assignments in the callers to avoid `variable set but not used'
errors in builds without KDTRACE_HOOKS.
This way there's no need to fuss around with conditional declarations
and assignments in the callers to avoid `variable set but not used'
errors in builds without KDTRACE_HOOKS.
MAIN commitmail json YAML
sys/cdefs.h: New __MACROUSE for macros to type-check arguments.
This way, if there's a macro F(x) with a conditional definition --
e.g., conditional on DIAGNOSTIC or KDTRACE_HOOKS -- it can do
__MACROUSE(x) in the definition that's supposed to compile away,
without triggering `variable set but not used' errors, while still
catching type errors in the expression x. But there's no cost or
side effects incurred in the generated code because the value is not
computed.
This should be the same as __USE, but I haven't figured out how to
make it work for both bit fields (which are likely to appear in macro
arguments) and aggregates (structs/unions, which are likely to appear
as variable declarations), so for now we use two separate macros.
This way, if there's a macro F(x) with a conditional definition --
e.g., conditional on DIAGNOSTIC or KDTRACE_HOOKS -- it can do
__MACROUSE(x) in the definition that's supposed to compile away,
without triggering `variable set but not used' errors, while still
catching type errors in the expression x. But there's no cost or
side effects incurred in the generated code because the value is not
computed.
This should be the same as __USE, but I haven't figured out how to
make it work for both bit fields (which are likely to appear in macro
arguments) and aggregates (structs/unions, which are likely to appear
as variable declarations), so for now we use two separate macros.
MAIN commitmail json YAML
sys/sdt.h: Whitespace cleanup (and internal macro semicolon tidying).
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
sys/sdt.h: Properly parenthesize macro arguments.
MAIN commitmail json YAML
sys/sdt.h: Nix trailing whitspace.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): Rename label for consistency. No functional change intended.
MAIN commitmail json YAML
vfs: Sprinkle dtrace probes into syncer.
MAIN commitmail json YAML
vfs(9): Move SDT_PROVIDER_DEFINE(vfs) from vfs_cache.c to vfs_init.c.
Not a namecache-specific thing.
Not a namecache-specific thing.
MAIN commitmail json YAML
kern/vfs_init.c: Sort includes. No functional change intended.
MAIN commitmail json YAML
sys/vnode_impl.h: Declare vfs sdt provider.
This way it can be used by more than just vfs_cache.c.
This way it can be used by more than just vfs_cache.c.
MAIN commitmail json YAML
kern/vfs_subr.c: Sort includes. No functional change intended.
MAIN commitmail json YAML
tmpfs: Assert no arithmetic overflow in directory node tn_size.
Need >2^57 directory entries before this is a problem. If we created
a million per second, this would take over 4000 years.
Need >2^57 directory entries before this is a problem. If we created
a million per second, this would take over 4000 years.
MAIN commitmail json YAML
tmpfs: Refuse sizes that overflow round_page.
Reported-by: syzbot+8dbeee84de15f86df65b@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=4a27b9fe074f8d4b0afbe22969339b8dfdb157e8
Reported-by: syzbot+8dbeee84de15f86df65b@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=4a27b9fe074f8d4b0afbe22969339b8dfdb157e8
MAIN commitmail json YAML
kern/vfs_syscalls.c: Nix trailing whitesapce.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
src/sys/fs/tmpfs/tmpfs_mem.c@1.14
/
diff
/
nxr@1.14
src/sys/fs/tmpfs/tmpfs_subr.c@1.115 / diff / nxr@1.115
src/sys/fs/tmpfs/tmpfs_subr.c@1.115 / diff / nxr@1.115
tmpfs: Nix trailing whitespace. No functional change intended.
MAIN commitmail json YAML
sys/vnode_impl.h: Nix trailing whitespace.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): Fix lock assertion in size increase: parent's, not wedge's.
Reported-by: syzbot+d4dc610473cacc5183dd@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=e18ddae8283d6fab44cfb1ac7e3f8e791f8c0700
Reported-by: syzbot+d4dc610473cacc5183dd@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=e18ddae8283d6fab44cfb1ac7e3f8e791f8c0700
MAIN commitmail json YAML
dlopen(3): Read _rtld_objtail under the lock.
XXX pullup-8
XXX pullup-9
XXX pullup-10
XXX pullup-8
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
rumpdev: Catch up to buf_syncwait -> vfs_syncwait rename.
Do similarly with a do_sys_sync weak stub so we can drop the rumpvfs
dependency.
Do similarly with a do_sys_sync weak stub so we can drop the rumpvfs
dependency.
MAIN commitmail json YAML
rumpvfs: Link in secmodel_extensions_vfs.c as intended, like kernel.
Forgot to commit this part when splitting up secmodel_extensions.c.
Forgot to commit this part when splitting up secmodel_extensions.c.
MAIN commitmail json YAML
specfs: KNF. No functional change intended.
MAIN commitmail json YAML
src/sys/kern/kern_descrip.c@1.257
/
diff
/
nxr@1.257
src/sys/kern/sys_descrip.c@1.46 / diff / nxr@1.46
src/sys/kern/sys_descrip.c@1.46 / diff / nxr@1.46
fcntl(2), flock(2): Assert FHASLOCK is clear if no fo_advlock.
MAIN commitmail json YAML
fcntl(2), flock(2): Unify error branches.
Let's make this a bit less error-prone by having everything converge
in the same place instead of multiple returns in different contexts.
Let's make this a bit less error-prone by having everything converge
in the same place instead of multiple returns in different contexts.
MAIN commitmail json YAML
fcntl(2), flock(2): Fix missing fd_putfile in error branch.
Oops!
Oops!
MAIN commitmail json YAML
Welcome to 10.99.4, courtesy of struct fileops additions!
MAIN commitmail json YAML
src/sys/rump/librump/rumpkern/Makefile.rumpkern@1.190
/
diff
/
nxr@1.190
src/sys/rump/librump/rumpvfs/Makefile.rumpvfs@1.51 / diff / nxr@1.51
src/sys/rump/librump/rumpvfs/Makefile.rumpvfs@1.51 / diff / nxr@1.51
rump: Move vnode_if.c from rumpkern to rumpvfs.
This has become increasingly less of a `fully dynamic interface', and
the need for it in the rest of sys/kern/ has been obviated, so let's
put it where it belongs in rumpvfs.
This has become increasingly less of a `fully dynamic interface', and
the need for it in the rest of sys/kern/ has been obviated, so let's
put it where it belongs in rumpvfs.
MAIN commitmail json YAML
src/sys/rump/librump/rumpkern/Makefile.rumpkern@1.189
/
diff
/
nxr@1.189
src/sys/rump/librump/rumpkern/secmodel_extensions_rump.c@1.1 / diff / nxr@1.1
src/sys/secmodel/extensions/extensions_impl.h@1.1 / diff / nxr@1.1
src/sys/secmodel/extensions/files.extensions@1.2 / diff / nxr@1.2
src/sys/secmodel/extensions/secmodel_extensions.c@1.16 / diff / nxr@1.16
src/sys/secmodel/extensions/secmodel_extensions_vfs.c@1.1 / diff / nxr@1.1
src/sys/rump/librump/rumpkern/secmodel_extensions_rump.c@1.1 / diff / nxr@1.1
src/sys/secmodel/extensions/extensions_impl.h@1.1 / diff / nxr@1.1
src/sys/secmodel/extensions/files.extensions@1.2 / diff / nxr@1.2
src/sys/secmodel/extensions/secmodel_extensions.c@1.16 / diff / nxr@1.16
src/sys/secmodel/extensions/secmodel_extensions_vfs.c@1.1 / diff / nxr@1.1
secmodel_extensions: Split vfs part into separate .c file.
This way we can provide weak rumpkern stubs that don't require
rumpvfs for things that are relevant to vfs, but if you do link
rumpvfs then you get the same logic in secmodel extensions.
This way we can provide weak rumpkern stubs that don't require
rumpvfs for things that are relevant to vfs, but if you do link
rumpvfs then you get the same logic in secmodel extensions.
MAIN commitmail json YAML
src/sys/rump/librump/rumpkern/vm.c@1.196
/
diff
/
nxr@1.196
src/sys/rump/librump/rumpvfs/vm_vfs.c@1.42 / diff / nxr@1.42
src/sys/rump/librump/rumpvfs/vm_vfs.c@1.42 / diff / nxr@1.42
rump: Move ubc_uiomove, ubc_zerorange from rumpvfs to rumpkern.
Needed by kern_ksyms.c. We could split kern_ksyms.c up into kernel-
internal interfaces and the user/kernel /dev/ksyms interface, but
there's nothing vfs-specific about ubc_uiomove and ubc_zerorange
anyway, so let's just define them in rumpkern.
Needed by kern_ksyms.c. We could split kern_ksyms.c up into kernel-
internal interfaces and the user/kernel /dev/ksyms interface, but
there's nothing vfs-specific about ubc_uiomove and ubc_zerorange
anyway, so let's just define them in rumpkern.
MAIN commitmail json YAML
rumpkern: Provide stub pnbuf_cache weak alias.
Needed only by sys_module.c handle_modctl_load, which won't work if
there's no rumpvfs linked in anyway.
Needed only by sys_module.c handle_modctl_load, which won't work if
there's no rumpvfs linked in anyway.
MAIN commitmail json YAML
rumpkern: Provide stub uvm_vnodeops weak alias.
Needed for UVM_OBJ_IS_VNODE, but not for anything else in rumpkern
without rumpvfs.
Needed for UVM_OBJ_IS_VNODE, but not for anything else in rumpkern
without rumpvfs.
MAIN commitmail json YAML
rumpkern: Provide fs_filtops weak alias.
We should introduce a link set for sys_kfilters, but this works
around the problem for now -- librump's dependency on librumpvfs
symbols.
We should introduce a link set for sys_kfilters, but this works
around the problem for now -- librump's dependency on librumpvfs
symbols.
MAIN commitmail json YAML
src/sys/kern/sys_descrip.c@1.43
/
diff
/
nxr@1.43
src/sys/kern/sys_pipe.c@1.160 / diff / nxr@1.160
src/sys/kern/sys_socket.c@1.81 / diff / nxr@1.81
src/sys/kern/vfs_vnops.c@1.241 / diff / nxr@1.241
src/sys/sys/file.h@1.92 / diff / nxr@1.92
src/sys/kern/sys_pipe.c@1.160 / diff / nxr@1.160
src/sys/kern/sys_socket.c@1.81 / diff / nxr@1.81
src/sys/kern/vfs_vnops.c@1.241 / diff / nxr@1.241
src/sys/sys/file.h@1.92 / diff / nxr@1.92
file(9): New fo_posix_fadvise operation.
XXX kernel revbump -- changes struct fileops API and ABI
XXX kernel revbump -- changes struct fileops API and ABI
MAIN commitmail json YAML
src/sys/kern/kern_event.c@1.148
/
diff
/
nxr@1.148
src/sys/kern/sys_descrip.c@1.42 / diff / nxr@1.42
src/sys/kern/sys_pipe.c@1.159 / diff / nxr@1.159
src/sys/kern/sys_socket.c@1.80 / diff / nxr@1.80
src/sys/kern/vfs_vnops.c@1.240 / diff / nxr@1.240
src/sys/sys/file.h@1.91 / diff / nxr@1.91
src/sys/kern/sys_descrip.c@1.42 / diff / nxr@1.42
src/sys/kern/sys_pipe.c@1.159 / diff / nxr@1.159
src/sys/kern/sys_socket.c@1.80 / diff / nxr@1.80
src/sys/kern/vfs_vnops.c@1.240 / diff / nxr@1.240
src/sys/sys/file.h@1.91 / diff / nxr@1.91
file(9): New fo_fpathconf operation.
XXX kernel revbump -- struct fileops API and ABI change
XXX kernel revbump -- struct fileops API and ABI change
MAIN commitmail json YAML
src/sys/kern/kern_descrip.c@1.256
/
diff
/
nxr@1.256
src/sys/kern/sys_descrip.c@1.41 / diff / nxr@1.41
src/sys/kern/vfs_vnops.c@1.239 / diff / nxr@1.239
src/sys/sys/file.h@1.90 / diff / nxr@1.90
src/sys/kern/sys_descrip.c@1.41 / diff / nxr@1.41
src/sys/kern/vfs_vnops.c@1.239 / diff / nxr@1.239
src/sys/sys/file.h@1.90 / diff / nxr@1.90
file(9): New fo_advlock operation.
This moves the vnode-specific logic from sys_descrip.c into
vfs_vnode.c, like we did for fo_seek.
XXX kernel revbump -- struct fileops API and ABI change
This moves the vnode-specific logic from sys_descrip.c into
vfs_vnode.c, like we did for fo_seek.
XXX kernel revbump -- struct fileops API and ABI change
MAIN commitmail json YAML
sys/file.h: Sort forward declarations.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): Convert tests to assertions in various devsw operations.
.d_cancel, .d_strategy, .d_read, .d_write, .d_ioctl, and .d_discard
are only ever used between successful .d_open return and entry to
.d_close. .d_open doesn't return until sc is nonnull and sc_state is
RUNNING, and dkwedge_detach waits for the last .d_close before
setting sc_state to DEAD. So there is no possibility for sc to be
null or for sc_state to be anything other than RUNNING or DYING.
There is a small functional change here but only in the event of a
race: in the short window between when dkwedge_detach is entered, and
when .d_close runs, any I/O operations (read, write, ioctl, &c.) may
be issued that would have failed with ENXIO before.
This shouldn't matter for anything: disk I/O operations are supposed
to complete reasonably promptly, and these operations _could_ have
begun milliseconds prior, before dkwedge_detach was entered, so it's
not a significant distinction.
Notes:
- .d_open must still contend with trying to open a nonexistent wedge,
of course.
- .d_close must also contend with closing a nonexistent wedge, in
case there were two calls to open in quick succession and the first
failed while the second hadn't yet determined it would fail.
- .d_size and .d_dump are used from ddb without any open/close.
.d_cancel, .d_strategy, .d_read, .d_write, .d_ioctl, and .d_discard
are only ever used between successful .d_open return and entry to
.d_close. .d_open doesn't return until sc is nonnull and sc_state is
RUNNING, and dkwedge_detach waits for the last .d_close before
setting sc_state to DEAD. So there is no possibility for sc to be
null or for sc_state to be anything other than RUNNING or DYING.
There is a small functional change here but only in the event of a
race: in the short window between when dkwedge_detach is entered, and
when .d_close runs, any I/O operations (read, write, ioctl, &c.) may
be issued that would have failed with ENXIO before.
This shouldn't matter for anything: disk I/O operations are supposed
to complete reasonably promptly, and these operations _could_ have
begun milliseconds prior, before dkwedge_detach was entered, so it's
not a significant distinction.
Notes:
- .d_open must still contend with trying to open a nonexistent wedge,
of course.
- .d_close must also contend with closing a nonexistent wedge, in
case there were two calls to open in quick succession and the first
failed while the second hadn't yet determined it would fail.
- .d_size and .d_dump are used from ddb without any open/close.
MAIN commitmail json YAML
dk(4): Fix racy access to sc->sc_dk.dk_openmask in dkwedge_delall1.
Need sc->sc_parent->dk_rawlock for this, as used in dkopen/dkclose.
Need sc->sc_parent->dk_rawlock for this, as used in dkopen/dkclose.
MAIN commitmail json YAML
disk(9): Fix missing unlock in error branch in previous change.
Reported-by: syzbot+870665adaf8911c0d94d@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=a4ae17cf66b5bb999182ae77fd3c7ad9ad18c891
Reported-by: syzbot+870665adaf8911c0d94d@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=a4ae17cf66b5bb999182ae77fd3c7ad9ad18c891
MAIN commitmail json YAML
readdir(2), lseek(2): Fix races in access to struct file::f_offset.
For non-directory vnodes:
- reading f_offset requires a shared or exclusive vnode lock
- writing f_offset requires an exclusive vnode lock
For directory vnodes, access (read or write) requires either:
- a shared vnode lock AND f_lock, or
- an exclusive vnode lock.
This way, two files for the same underlying directory vnode can still
do VOP_READDIR in parallel, but if two readdir(2) or lseek(2) calls
run in parallel on the same file, the load and store of f_offset is
atomic (otherwise, e.g., on 32-bit systems it might be torn and lead
to corrupt offsets).
There is still a potential problem: the _whole transaction_ of
readdir(2) may not be atomic. For example, if thread A and thread B
read n bytes of directory content, thread A might get bytes [0,n) and
thread B might get bytes [n,2n) but f_offset might end up at n
instead of 2n once both operations complete. (However, f_offset
wouldn't be some corrupt garbled number like n & 0xffffffff00000000.)
Fixing this would require either:
(a) using an exclusive vnode lock in vn_readdir,
(b) introducing a new lock that serializes vn_readdir on the same
file (but ont necessarily the same vnode), or
(c) proving it is safe to hold f_lock across VOP_READDIR, VOP_SEEK,
and VOP_GETATTR.
For non-directory vnodes:
- reading f_offset requires a shared or exclusive vnode lock
- writing f_offset requires an exclusive vnode lock
For directory vnodes, access (read or write) requires either:
- a shared vnode lock AND f_lock, or
- an exclusive vnode lock.
This way, two files for the same underlying directory vnode can still
do VOP_READDIR in parallel, but if two readdir(2) or lseek(2) calls
run in parallel on the same file, the load and store of f_offset is
atomic (otherwise, e.g., on 32-bit systems it might be torn and lead
to corrupt offsets).
There is still a potential problem: the _whole transaction_ of
readdir(2) may not be atomic. For example, if thread A and thread B
read n bytes of directory content, thread A might get bytes [0,n) and
thread B might get bytes [n,2n) but f_offset might end up at n
instead of 2n once both operations complete. (However, f_offset
wouldn't be some corrupt garbled number like n & 0xffffffff00000000.)
Fixing this would require either:
(a) using an exclusive vnode lock in vn_readdir,
(b) introducing a new lock that serializes vn_readdir on the same
file (but ont necessarily the same vnode), or
(c) proving it is safe to hold f_lock across VOP_READDIR, VOP_SEEK,
and VOP_GETATTR.
MAIN commitmail json YAML
dk(4): Narrow the scope of the device numbering lookup on detach.
Just need it for vdevgone, order relative to other things in detach
doesn't matter.
No functional change intended.
Just need it for vdevgone, order relative to other things in detach
doesn't matter.
No functional change intended.
MAIN commitmail json YAML
dk(4): dkdump: Simplify. No functional change intended.
MAIN commitmail json YAML
dk(4): Omit needless locking in dksize, dkdump.
All the members these use are stable after initialization, except for
the wedge size, which dkwedge_size safely reads a snapshot of without
locking in the caller.
All the members these use are stable after initialization, except for
the wedge size, which dkwedge_size safely reads a snapshot of without
locking in the caller.
MAIN commitmail json YAML
dk(4): Take a read-lock on dkwedges_lock if we're only reading.
- dkwedge_find_by_name
- dkwedge_find_by_parent
- dkwedge_print_wnames
- dkwedge_find_by_name
- dkwedge_find_by_parent
- dkwedge_print_wnames
MAIN commitmail json YAML
dk(4): Set .d_cfdriver and .d_devtounit to plug open/detach race.
This way, opening dkN or rdkN will wait if attach or detach is still
in progress, and vdevgone will wake up such pending opens and make
them fail. So it is no longer possible for a wedge to be detached
after dkopen has already started using it.
For now, we use a custom .d_devtounit function that looks up the
autoconf unit number via the dkwedges array, which conceivably may
use an independent unit numbering system -- nothing guarantees they
match up. (In practice they will mostly match up, but concurrent
wedge creation could lead to different numbering.) Eventually this
should be changed so the two numbering systems match, which would let
us delete the new dkunit function and just use dev_minor_unit like
many other drivers can.
This way, opening dkN or rdkN will wait if attach or detach is still
in progress, and vdevgone will wake up such pending opens and make
them fail. So it is no longer possible for a wedge to be detached
after dkopen has already started using it.
For now, we use a custom .d_devtounit function that looks up the
autoconf unit number via the dkwedges array, which conceivably may
use an independent unit numbering system -- nothing guarantees they
match up. (In practice they will mostly match up, but concurrent
wedge creation could lead to different numbering.) Eventually this
should be changed so the two numbering systems match, which would let
us delete the new dkunit function and just use dev_minor_unit like
many other drivers can.
MAIN commitmail json YAML
dk(4): Use disk_begindetach and rely on vdevgone to close instances.
The first step is to decide whether we can detach (if forced, yes; if
not forced, only if not already open), and prevent new opens if so.
There's no need to start closing open instances at this point --
we're just making a decision to detach, and preventing new opens by
transitioning state that dkopen will respect[*].
The second step is to force all open instances to close. This is
done by vdevgone. By the time vdevgone returns, there can be no open
instances, so if there _were_ any, closing them via vdevgone will
have passed through dklastclose.
After that point, there can be no opens and no I/O operations, so
dk_openmask must already be zero and the bufq must be empty.
Thus, there's no need to have an explicit call to dklastclose (via
dkwedge_cleanup_parent) before or after making the decision to
detach.
[*] Currently access to this state is racy: nothing serializes
dkwedge_detach's state transition with dkopen's test. TBD in a
separate commit shortly.
The first step is to decide whether we can detach (if forced, yes; if
not forced, only if not already open), and prevent new opens if so.
There's no need to start closing open instances at this point --
we're just making a decision to detach, and preventing new opens by
transitioning state that dkopen will respect[*].
The second step is to force all open instances to close. This is
done by vdevgone. By the time vdevgone returns, there can be no open
instances, so if there _were_ any, closing them via vdevgone will
have passed through dklastclose.
After that point, there can be no opens and no I/O operations, so
dk_openmask must already be zero and the bufq must be empty.
Thus, there's no need to have an explicit call to dklastclose (via
dkwedge_cleanup_parent) before or after making the decision to
detach.
[*] Currently access to this state is racy: nothing serializes
dkwedge_detach's state transition with dkopen's test. TBD in a
separate commit shortly.
MAIN commitmail json YAML
dk(4): Fix callout detach race.
1. Set a flag sc_iostop under the lock sc_iolock so dkwedge_detach
and dkstart don't race over it.
2. Decline to schedule the callout if sc_iostop is set. The callout
is already only ever scheduled while the lock is held.
3. Use callout_halt to wait for any concurrent callout to complete.
At this point, it can't reschedule itself.
Without this change, the callout could be concurrently rescheduling
itself as we issue callout_stop, leading to use-after-free later.
1. Set a flag sc_iostop under the lock sc_iolock so dkwedge_detach
and dkstart don't race over it.
2. Decline to schedule the callout if sc_iostop is set. The callout
is already only ever scheduled while the lock is held.
3. Use callout_halt to wait for any concurrent callout to complete.
At this point, it can't reschedule itself.
Without this change, the callout could be concurrently rescheduling
itself as we issue callout_stop, leading to use-after-free later.
MAIN commitmail json YAML
dk(4): Add null d_cancel routine to devsw.
This way, dkclose is guaranteed that dkopen, dkread, dkwrite,
dkioctl, &c., have all returned before it runs. For block opens,
setting d_cancel also guarantees that any buffered writes are flushed
with vinvalbuf before dkclose is called.
This way, dkclose is guaranteed that dkopen, dkread, dkwrite,
dkioctl, &c., have all returned before it runs. For block opens,
setting d_cancel also guarantees that any buffered writes are flushed
with vinvalbuf before dkclose is called.
MAIN commitmail json YAML
disk(9): Fix use-after-free race with concurrent disk_set_info.
This can happen with dk(4), which allows wedges to have their size
increased without destroying and recreating the device instance.
Drivers which allow concurrent disk_set_info and disk_ioctl must
serialize disk_set_info with dk_openlock.
This can happen with dk(4), which allows wedges to have their size
increased without destroying and recreating the device instance.
Drivers which allow concurrent disk_set_info and disk_ioctl must
serialize disk_set_info with dk_openlock.
MAIN commitmail json YAML
dk(4): Require dk_openlock in dk_set_geometry.
Not strictly necessary but this makes reasoning easier and documents
with an assertion how disk_set_info is serialized.
Not strictly necessary but this makes reasoning easier and documents
with an assertion how disk_set_info is serialized.
MAIN commitmail json YAML
dk(4): Assert dkwedges[unit] is the sc we're about to free.
MAIN commitmail json YAML
dk(4): Assert parent vp is nonnull before we stash it away.
Let's enable early attribution if this goes wrong.
If it's not the parent's first open, also assert the parent vp is
already nonnull.
Let's enable early attribution if this goes wrong.
If it's not the parent's first open, also assert the parent vp is
already nonnull.
MAIN commitmail json YAML
dk(4): Don't touch dkwedges or ndkwedges outside dkwedges_lock.
MAIN commitmail json YAML
dk(4): Move CFDRIVER_DECL and CFATTACH_DECL3_NEW earlier in file.
Follows the pattern of most drivers, and will be necessary for
referencing dk_cd in dk_bdevsw and dk_cdevsw soon, to prevent
open/detach races.
No functional change intended.
Follows the pattern of most drivers, and will be necessary for
referencing dk_cd in dk_bdevsw and dk_cdevsw soon, to prevent
open/detach races.
No functional change intended.
MAIN commitmail json YAML
dk(4): Prevent races in access to struct dkwedge_softc::sc_size.
Rules:
1. Only ever increases, never decreases.
(Decreases require removing and readding the wedge.)
2. Increases are serialized by dk_openlock.
3. Reads can happen unlocked in any context where the softc is valid.
Access is gathered into dkwedge_size* subroutines -- don't touch
sc_size outside these. For now, we use rwlock(9) to keep the
reasoning simple. This should be done with atomics on 64-bit
platforms and a seqlock on 32-bit platforms to avoid contention.
However, we can do that in a later change.
Rules:
1. Only ever increases, never decreases.
(Decreases require removing and readding the wedge.)
2. Increases are serialized by dk_openlock.
3. Reads can happen unlocked in any context where the softc is valid.
Access is gathered into dkwedge_size* subroutines -- don't touch
sc_size outside these. For now, we use rwlock(9) to keep the
reasoning simple. This should be done with atomics on 64-bit
platforms and a seqlock on 32-bit platforms to avoid contention.
However, we can do that in a later change.
MAIN commitmail json YAML
dk(4): <sys/rwlock.h> for rwlock(9).
MAIN commitmail json YAML
dk(4): KNF: Sort includes.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): ENXIO, not ENODEV, means no such device.
ENXIO is `device not configured', meaning there is no such device.
ENODEV is `operation not supported by device', meaning the device is
there but refuses the operation, like writing to a read-only medium.
Exception: For undefined ioctl commands, it's not ENODEV _or_ ENXIO,
but rather ENOTTY, because why make any of this obvious when you
could make it obscure Unix lore?
ENXIO is `device not configured', meaning there is no such device.
ENODEV is `operation not supported by device', meaning the device is
there but refuses the operation, like writing to a read-only medium.
Exception: For undefined ioctl commands, it's not ENODEV _or_ ENXIO,
but rather ENOTTY, because why make any of this obvious when you
could make it obscure Unix lore?
MAIN commitmail json YAML
dk(4): Fix typo in comment: dkstrategy, not dkstragegy.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): Omit needless void * cast.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): KNF: Whitespace.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): KNF: return (v) -> return v.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
dk(4): Avoid holding dkwedges_lock while allocating array.
This is not great -- we shouldn't be choosing the unit number here
anyway; we should just let autoconf do it for us -- but it's better
than potentially blocking any dk_openlock or dk_rawlock (which are
sometimes held when waiting for dkwedges_lock) for memory allocation.
This is not great -- we shouldn't be choosing the unit number here
anyway; we should just let autoconf do it for us -- but it's better
than potentially blocking any dk_openlock or dk_rawlock (which are
sometimes held when waiting for dkwedges_lock) for memory allocation.
MAIN commitmail json YAML
dk(4): Restore assertions in dklastclose.
We only enter dklastclose if the wedge is open (sc->sc_dk.dk_openmask
!= 0), which can happen only if dkfirstopen has succeeded, in which
case we hold a dk_rawopens reference to the parent that prevents
anyone else from closing it. Hence sc->sc_parent->dk_rawopens > 0.
On open, sc->sc_parent->dk_rawvp is set to nonnull, and it is only
reset to null on close. Hence if the parent is still open, as it
must be here, sc->sc_parent->dk_rawvp must be nonnull.
We only enter dklastclose if the wedge is open (sc->sc_dk.dk_openmask
!= 0), which can happen only if dkfirstopen has succeeded, in which
case we hold a dk_rawopens reference to the parent that prevents
anyone else from closing it. Hence sc->sc_parent->dk_rawopens > 0.
On open, sc->sc_parent->dk_rawvp is set to nonnull, and it is only
reset to null on close. Hence if the parent is still open, as it
must be here, sc->sc_parent->dk_rawvp must be nonnull.
MAIN commitmail json YAML
autoconf(9): Add a comment where we risk arithmetic overflow.
MAIN commitmail json YAML
src/sys/dev/isapnp/sb_isapnp.c@1.54
/
diff
/
nxr@1.54
src/sys/dev/ofisa/sb_ofisa.c@1.24 / diff / nxr@1.24
src/sys/dev/ofisa/sb_ofisa.c@1.24 / diff / nxr@1.24
sb(4): Fix missing mutex initialization at isapnp and ofisa.
PR kern/57363
XXX pullup-8
XXX pullup-9
XXX pullup-10
PR kern/57363
XXX pullup-8
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
viocon(4): Show error in assertion failure.
MAIN commitmail json YAML
virtio@pci: Fix assertion on detach.
If the child never attached in the first place, it's OK for it to not
have detached.
XXX This should not be a set of flags; this should be a state
enumeration, because some flags make no sense, like FINISHED|FAILED.
XXX This should not be asserted separately in each bus; there should
be a single place in virtio.c to assert this, uniformly in all buses.
PR kern/57357
XXX pullup-10
If the child never attached in the first place, it's OK for it to not
have detached.
XXX This should not be a set of flags; this should be a state
enumeration, because some flags make no sense, like FINISHED|FAILED.
XXX This should not be asserted separately in each bus; there should
be a single place in virtio.c to assert this, uniformly in all buses.
PR kern/57357
XXX pullup-10
MAIN commitmail json YAML
autoconf(9): Assert alldevs_lock held in config_unit_nextfree.
The one caller, config_unit_alloc, guarantees it through
config_alldevs_enter/exit.
The one caller, config_unit_alloc, guarantees it through
config_alldevs_enter/exit.
MAIN commitmail json YAML
autoconf(9): Avoid potential ABA bug in config_makeroom.
When we unlock alldevs_lock to allocate a new cd_devs array nsp,
other threads may have:
1. freed the old one (osp),
2. done some other memory allocation,
3. allocated a new _larger_ array whose address happens to concide
with osp (e.g., in (2) the page was recycled for a different pool
cache), and
4. updated cd_devs back to osp but increased cd_ndevs.
In that case, the memory may be corrupted: we try to copy the wrong
number of device_t pointers into nsp and we free osp with the wrong
(stale) length.
Avoid this by checking whether cd_ndevs has changed too -- if not,
osp might have been recycled but at least the lengths we're about to
copy and free are still correct so there's no harm in an ABA
situation.
XXX pullup-8
XXX pullup-9
XXX pullup-10
When we unlock alldevs_lock to allocate a new cd_devs array nsp,
other threads may have:
1. freed the old one (osp),
2. done some other memory allocation,
3. allocated a new _larger_ array whose address happens to concide
with osp (e.g., in (2) the page was recycled for a different pool
cache), and
4. updated cd_devs back to osp but increased cd_ndevs.
In that case, the memory may be corrupted: we try to copy the wrong
number of device_t pointers into nsp and we free osp with the wrong
(stale) length.
Avoid this by checking whether cd_ndevs has changed too -- if not,
osp might have been recycled but at least the lengths we're about to
copy and free are still correct so there's no harm in an ABA
situation.
XXX pullup-8
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
pserialize(9): Fix buggy assertion inside assertion.
If there has been a context switch, then we can't be in a pserialize
read section -- _and_ whatever we read out of curcpu() is stale, so
we can't assert anything based on it. So just delete the assertion.
Reported-by: syzbot+d7065ab16d7cd9cc09af@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=0c63db890575d29c6a51fb24b003d3bab1f7f04b
If there has been a context switch, then we can't be in a pserialize
read section -- _and_ whatever we read out of curcpu() is stale, so
we can't assert anything based on it. So just delete the assertion.
Reported-by: syzbot+d7065ab16d7cd9cc09af@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=0c63db890575d29c6a51fb24b003d3bab1f7f04b
MAIN commitmail json YAML
pserialize(9): Fix bug in recent micro-optimization.
curcpu() is always a valid struct cpu_info pointer, but curlwp->l_cpu
is not necessarily -- early at boot on some architectures (like x86,
apparently) it may be null.
Not clear that l->l_cpu is always a cost win over curcpu(): on some
architectures curcpu() is basically a macro for curlwp->l_cpu, while
on others it is a fixed VA. So let's use the one that always works
instead of the one that's sometimes cheaper and sometimes crashier.
curcpu() is always a valid struct cpu_info pointer, but curlwp->l_cpu
is not necessarily -- early at boot on some architectures (like x86,
apparently) it may be null.
Not clear that l->l_cpu is always a cost win over curcpu(): on some
architectures curcpu() is basically a macro for curlwp->l_cpu, while
on others it is a fixed VA. So let's use the one that always works
instead of the one that's sometimes cheaper and sometimes crashier.
MAIN commitmail json YAML
dk(4): Explain why dk_rawopens can't overflow and assert it.
MAIN commitmail json YAML
sys/modules/Makefile: Use MACHINE_CPU, not MACHINE_ARCH, for aarch64.
This way it covers both little-endian and big-endian.
This way it covers both little-endian and big-endian.
MAIN commitmail json YAML
powerpc/ddb: Fix one more load to use db_read_bytes.
Fix some typos in crash(8) comments too.
XXX pullup-8
XXX pullup-9
XXX pullup-10
Fix some typos in crash(8) comments too.
XXX pullup-8
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
src/sys/arch/powerpc/powerpc/db_disasm.c@1.31
/
diff
/
nxr@1.31
src/sys/arch/powerpc/powerpc/db_trace.c@1.62 / diff / nxr@1.62
src/sys/arch/powerpc/powerpc/db_trace.c@1.62 / diff / nxr@1.62
powerpc/ddb: Use db_read_bytes, not direct pointer access.
Mark some powerpc-variant ifdefs with XXX crash(8), not sure yet what
to do about them.
XXX pullup-8
XXX pullup-9
XXX pullup-10
Mark some powerpc-variant ifdefs with XXX crash(8), not sure yet what
to do about them.
XXX pullup-8
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
src/sys/arch/powerpc/powerpc/db_disasm.c@1.30
/
diff
/
nxr@1.30
src/sys/arch/powerpc/powerpc/db_trace.c@1.61 / diff / nxr@1.61
src/usr.sbin/crash/Makefile@1.47 / diff / nxr@1.47
src/usr.sbin/crash/arch/generic.c@1.2 / diff / nxr@1.2
src/usr.sbin/crash/arch/powerpc.c@1.1 / diff / nxr@1.1
src/usr.sbin/crash/arch/powerpc64.c@1.1 / diff / nxr@1.1
src/usr.sbin/crash/crash.c@1.15 / diff / nxr@1.15
src/sys/arch/powerpc/powerpc/db_trace.c@1.61 / diff / nxr@1.61
src/usr.sbin/crash/Makefile@1.47 / diff / nxr@1.47
src/usr.sbin/crash/arch/generic.c@1.2 / diff / nxr@1.2
src/usr.sbin/crash/arch/powerpc.c@1.1 / diff / nxr@1.1
src/usr.sbin/crash/arch/powerpc64.c@1.1 / diff / nxr@1.1
src/usr.sbin/crash/crash.c@1.15 / diff / nxr@1.15
crash(8): Add powerpc support.
XXX pullup-8
XXX pullup-9
XXX pullup-10
XXX pullup-8
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
Welcome to 10.99.3!
Courtesy of:
- deleted ttycheckoutq parameter
- deleted mutex_owner symbol
- tco(4) at ichsmb(4)
- new m_get_n, m_gethdr_n symbols
Courtesy of:
- deleted ttycheckoutq parameter
- deleted mutex_owner symbol
- tco(4) at ichsmb(4)
- new m_get_n, m_gethdr_n symbols
MAIN commitmail json YAML
mbuf(9): New m_get_n, m_gethdr_n.
m_get_n(how, type, alignbytes, nbytes) returns an mbuf with no packet
header having space for nbytes, with an internal buffer pointer
aligned by alignbytes (typically ETHER_ALIGN or similar, if not
zero).
m_gethdr_n(how, type, alignbytes, nbytes) does the same but for an
mbuf with a packet header.
These return NULL on failure, which can happen either:
(a) because how is M_DONTWAIT and allocating memory would sleep, or
(b) because alignbytes + nbytes > MCLBYTES.
On exit, m_len is set to nbytes, as is m_pkthdr.len for m_gethdr_n.
These should be used to systematically replace all calls to m_get,
m_gethdr, MGET, MGETHDR, and m_getcl. Most calls to m_clget and
MCLGET will probably evaporate as a consequence.
Proposed on tech-net last year:
https://mail-index.netbsd.org/tech-net/2022/07/16/msg008285.html
m_get_n(how, type, alignbytes, nbytes) returns an mbuf with no packet
header having space for nbytes, with an internal buffer pointer
aligned by alignbytes (typically ETHER_ALIGN or similar, if not
zero).
m_gethdr_n(how, type, alignbytes, nbytes) does the same but for an
mbuf with a packet header.
These return NULL on failure, which can happen either:
(a) because how is M_DONTWAIT and allocating memory would sleep, or
(b) because alignbytes + nbytes > MCLBYTES.
On exit, m_len is set to nbytes, as is m_pkthdr.len for m_gethdr_n.
These should be used to systematically replace all calls to m_get,
m_gethdr, MGET, MGETHDR, and m_getcl. Most calls to m_clget and
MCLGET will probably evaporate as a consequence.
Proposed on tech-net last year:
https://mail-index.netbsd.org/tech-net/2022/07/16/msg008285.html
MAIN commitmail json YAML
src/sys/arch/amd64/conf/GENERIC@1.602
/
diff
/
nxr@1.602
src/sys/arch/x86/pci/files.pci@1.27 / diff / nxr@1.27
src/sys/arch/x86/pci/ichlpcib.c@1.59 / diff / nxr@1.59
src/sys/arch/x86/pci/tco.c@1.10 / diff / nxr@1.10
src/sys/arch/x86/pci/tco.h@1.5 / diff / nxr@1.5
src/sys/dev/ic/i82801lpcreg.h@1.17 / diff / nxr@1.17
src/sys/dev/pci/files.pci@1.446 / diff / nxr@1.446
src/sys/dev/pci/ichsmb.c@1.82 / diff / nxr@1.82
src/sys/arch/x86/pci/files.pci@1.27 / diff / nxr@1.27
src/sys/arch/x86/pci/ichlpcib.c@1.59 / diff / nxr@1.59
src/sys/arch/x86/pci/tco.c@1.10 / diff / nxr@1.10
src/sys/arch/x86/pci/tco.h@1.5 / diff / nxr@1.5
src/sys/dev/ic/i82801lpcreg.h@1.17 / diff / nxr@1.17
src/sys/dev/pci/files.pci@1.446 / diff / nxr@1.446
src/sys/dev/pci/ichsmb.c@1.82 / diff / nxr@1.82
ichsmb(4), tco(4): Add support for TCO on newer Intel chipsets.
TCO (`Total Cost of Ownership', Intel's bizarre name for a watchdog
timer) used to hang off the Intel I/O platform controller hub's (ICH)
low-pin-count interface bridge (LPC IB), or ichlpcib(4). On newer
devices, it hangs off the ICH SMBus instead.
Tested on INTEL 100SERIES_SMB (works) and INTEL 100SERIES_LP_SMB
(doesn't work, still not sure why).
XXX kernel revbump: This breaks the module ABI -- tco(4) modules
older than the change to make ta_has_rcba into ta_version will
incorrectly attach at buses they do not understand. (However, the
tco(4) driver is statically built into GENERIC, so maybe it's safe
for pullup since the module wouldn't have worked anyway.)
TCO (`Total Cost of Ownership', Intel's bizarre name for a watchdog
timer) used to hang off the Intel I/O platform controller hub's (ICH)
low-pin-count interface bridge (LPC IB), or ichlpcib(4). On newer
devices, it hangs off the ICH SMBus instead.
Tested on INTEL 100SERIES_SMB (works) and INTEL 100SERIES_LP_SMB
(doesn't work, still not sure why).
XXX kernel revbump: This breaks the module ABI -- tco(4) modules
older than the change to make ta_has_rcba into ta_version will
incorrectly attach at buses they do not understand. (However, the
tco(4) driver is statically built into GENERIC, so maybe it's safe
for pullup since the module wouldn't have worked anyway.)
MAIN commitmail json YAML
src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c@1.12
/
diff
/
nxr@1.12
src/sys/kern/kern_mutex.c@1.105 / diff / nxr@1.105
src/sys/rump/librump/rumpkern/locks.c@1.84 / diff / nxr@1.84
src/sys/rump/librump/rumpkern/locks_up.c@1.12 / diff / nxr@1.12
src/sys/sys/mutex.h@1.27 / diff / nxr@1.27
src/sys/kern/kern_mutex.c@1.105 / diff / nxr@1.105
src/sys/rump/librump/rumpkern/locks.c@1.84 / diff / nxr@1.84
src/sys/rump/librump/rumpkern/locks_up.c@1.12 / diff / nxr@1.12
src/sys/sys/mutex.h@1.27 / diff / nxr@1.27
kern: Nix mutex_owner.
There is no valid reason to use this except in assertions of the form
KASSERT(mutex_owner(lock) == curlwp),
which is more obviously spelled as
KASSERT(mutex_owned(lock)).
Exception: There's one horrible kludge in zfs that abuses this, which
should be eliminated.
XXX kernel revbump -- deleting symbol
PR kern/47114
There is no valid reason to use this except in assertions of the form
KASSERT(mutex_owner(lock) == curlwp),
which is more obviously spelled as
KASSERT(mutex_owned(lock)).
Exception: There's one horrible kludge in zfs that abuses this, which
should be eliminated.
XXX kernel revbump -- deleting symbol
PR kern/47114
MAIN commitmail json YAML
src/sys/kern/subr_prf.c@1.200
/
diff
/
nxr@1.200
src/sys/kern/tty.c@1.310 / diff / nxr@1.310
src/sys/sys/tty.h@1.104 / diff / nxr@1.104
src/sys/kern/tty.c@1.310 / diff / nxr@1.310
src/sys/sys/tty.h@1.104 / diff / nxr@1.104
ttycheckoutq(9): wait=0 always, parameter no longer useful, nix it.
XXX kernel revbump
XXX kernel revbump
MAIN commitmail json YAML
lfs: Assert page identity doesn't change.
Forgot what I was debugging when I inserted a relookup in my local
tree months or years ago, but whatever it was, if that solved a
problem, this KDASSERT will make the problem more obvious.
Forgot what I was debugging when I inserted a relookup in my local
tree months or years ago, but whatever it was, if that solved a
problem, this KDASSERT will make the problem more obvious.
MAIN commitmail json YAML
style(5): Omit redundant proscription against .c externs in previous.
MAIN commitmail json YAML
rndctl(8): Take omitted name/type as empty device name.
This can now be used to change flags for all sources at once.
XXX pullup-10
This can now be used to change flags for all sources at once.
XXX pullup-10
MAIN commitmail json YAML
x86: Omit needless membar_sync in intr_disestablish_xcall.
Details in comments.
Details in comments.
MAIN commitmail json YAML
thmap(9): kmem_zalloc(KM_SLEEP) never fails. Prune dead branch.
MAIN commitmail json YAML
com(4): Note ttylock in comment, not tty_lock.
MAIN commitmail json YAML
evbarm/plcom(4): Note ttylock in comment, not tty_lock.
MAIN commitmail json YAML
src/sys/arch/evbarm/dev/plcom.c@1.68
/
diff
/
nxr@1.68
src/sys/arch/evbarm/dev/plcomreg.h@1.8 / diff / nxr@1.8
src/sys/arch/evbarm/dev/plcomvar.h@1.20 / diff / nxr@1.20
src/sys/arch/evbarm/dev/plcomreg.h@1.8 / diff / nxr@1.8
src/sys/arch/evbarm/dev/plcomvar.h@1.20 / diff / nxr@1.20
evbarm/plcom(4): Sync some recent changes from com(4).
- Nix quirky `integrate' macro.
- Omit needless spltty in plcomstart.
- Comment on lock order.
- Update confusing comment about hangup delay.
- Add include guards.
- Nix quirky `integrate' macro.
- Omit needless spltty in plcomstart.
- Comment on lock order.
- Update confusing comment about hangup delay.
- Add include guards.
MAIN commitmail json YAML
com(4): Note timecounter_lock in lock order comments.
MAIN commitmail json YAML
src/distrib/sets/lists/debug/module.ad.aarch64@1.6
/
diff
/
nxr@1.6
src/distrib/sets/lists/modules/ad.aarch64@1.12 / diff / nxr@1.12
src/sys/modules/Makefile@1.276 / diff / nxr@1.276
src/distrib/sets/lists/modules/ad.aarch64@1.12 / diff / nxr@1.12
src/sys/modules/Makefile@1.276 / diff / nxr@1.276
aarch64: Build drm modules.
MAIN commitmail json YAML
ttwrite(9): Assert we mangle uio_resid only if we also return error.
MAIN commitmail json YAML
uiomove(9): Stronger assertions about iov array.
MAIN commitmail json YAML
kmsan: Format exact instruction addresses relative to symbols.
MAIN commitmail json YAML
usb(9): Assert ud_ifaces is null before we clobber it.
MAIN commitmail json YAML
arm/rockchip: Omit needless functions.
MAIN commitmail json YAML
xhci(4): Avoid crash in suspend/resume/resume if first resume fails.
Rather than try to recover from this, just make new commands fail so
at least we don't deadlock.
XXX pullup-9
XXX pullup-10
Rather than try to recover from this, just make new commands fail so
at least we don't deadlock.
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
uvm: Simplify assertion in uvn_get.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
nfs: Simplify assertion. No functional change intended.
MAIN commitmail json YAML
dwc2: KASSERT(A && B) -> KASSERT(A); KASSERT(B)
MAIN commitmail json YAML
compat_linux32: KASSERT(A && B) -> KASSERT(A); KASSERT(B)
MAIN commitmail json YAML
genfs: KASSERT(A && B) -> KASSERT(A); KASSERT(B)
MAIN commitmail json YAML
pool(9): Tweak branch prediction in pool_cache_get_paddr assertion.
No functional change intended.
No functional change intended.
MAIN commitmail json YAML
kpause(9): Simplify assertion. No functional change intended.
MAIN commitmail json YAML
pool(9): Simplify assertion in pool_update_curpage.
Add message while here.
Add message while here.
MAIN commitmail json YAML
src/sys/kern/exec_subr.c@1.85
/
diff
/
nxr@1.85
src/sys/kern/kern_event.c@1.147 / diff / nxr@1.147
src/sys/kern/kern_lwp.c@1.252 / diff / nxr@1.252
src/sys/kern/kern_proc.c@1.270 / diff / nxr@1.270
src/sys/kern/kern_sig.c@1.405 / diff / nxr@1.405
src/sys/kern/kern_sleepq.c@1.74 / diff / nxr@1.74
src/sys/kern/kern_softint.c@1.73 / diff / nxr@1.73
src/sys/kern/kern_sysctl.c@1.269 / diff / nxr@1.269
src/sys/kern/kern_turnstile.c@1.46 / diff / nxr@1.46
src/sys/kern/kern_veriexec.c@1.27 / diff / nxr@1.27
src/sys/kern/subr_asan.c@1.28 / diff / nxr@1.28
src/sys/kern/subr_cpufreq.c@1.10 / diff / nxr@1.10
src/sys/kern/subr_kcpuset.c@1.15 / diff / nxr@1.15
src/sys/kern/subr_pcu.c@1.28 / diff / nxr@1.28
src/sys/kern/subr_pool.c@1.288 / diff / nxr@1.288
src/sys/kern/subr_prf.c@1.199 / diff / nxr@1.199
src/sys/kern/subr_time.c@1.36 / diff / nxr@1.36
src/sys/kern/subr_vmem.c@1.109 / diff / nxr@1.109
src/sys/kern/subr_xcall.c@1.35 / diff / nxr@1.35
src/sys/kern/sys_sched.c@1.50 / diff / nxr@1.50
:
(more 4 files)
src/sys/kern/kern_event.c@1.147 / diff / nxr@1.147
src/sys/kern/kern_lwp.c@1.252 / diff / nxr@1.252
src/sys/kern/kern_proc.c@1.270 / diff / nxr@1.270
src/sys/kern/kern_sig.c@1.405 / diff / nxr@1.405
src/sys/kern/kern_sleepq.c@1.74 / diff / nxr@1.74
src/sys/kern/kern_softint.c@1.73 / diff / nxr@1.73
src/sys/kern/kern_sysctl.c@1.269 / diff / nxr@1.269
src/sys/kern/kern_turnstile.c@1.46 / diff / nxr@1.46
src/sys/kern/kern_veriexec.c@1.27 / diff / nxr@1.27
src/sys/kern/subr_asan.c@1.28 / diff / nxr@1.28
src/sys/kern/subr_cpufreq.c@1.10 / diff / nxr@1.10
src/sys/kern/subr_kcpuset.c@1.15 / diff / nxr@1.15
src/sys/kern/subr_pcu.c@1.28 / diff / nxr@1.28
src/sys/kern/subr_pool.c@1.288 / diff / nxr@1.288
src/sys/kern/subr_prf.c@1.199 / diff / nxr@1.199
src/sys/kern/subr_time.c@1.36 / diff / nxr@1.36
src/sys/kern/subr_vmem.c@1.109 / diff / nxr@1.109
src/sys/kern/subr_xcall.c@1.35 / diff / nxr@1.35
src/sys/kern/sys_sched.c@1.50 / diff / nxr@1.50
:
(more 4 files)
kern: KASSERT(A && B) -> KASSERT(A); KASSERT(B)
MAIN commitmail json YAML
src/sys/uvm/uvm_amap.c@1.127
/
diff
/
nxr@1.127
src/sys/uvm/uvm_bio.c@1.128 / diff / nxr@1.128
src/sys/uvm/uvm_fault.c@1.232 / diff / nxr@1.232
src/sys/uvm/uvm_km.c@1.165 / diff / nxr@1.165
src/sys/uvm/uvm_page.c@1.252 / diff / nxr@1.252
src/sys/uvm/uvm_physseg.c@1.18 / diff / nxr@1.18
src/sys/uvm/uvm_swap.c@1.208 / diff / nxr@1.208
src/sys/uvm/uvm_vnode.c@1.119 / diff / nxr@1.119
src/sys/uvm/uvm_bio.c@1.128 / diff / nxr@1.128
src/sys/uvm/uvm_fault.c@1.232 / diff / nxr@1.232
src/sys/uvm/uvm_km.c@1.165 / diff / nxr@1.165
src/sys/uvm/uvm_page.c@1.252 / diff / nxr@1.252
src/sys/uvm/uvm_physseg.c@1.18 / diff / nxr@1.18
src/sys/uvm/uvm_swap.c@1.208 / diff / nxr@1.208
src/sys/uvm/uvm_vnode.c@1.119 / diff / nxr@1.119
uvm(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)
MAIN commitmail json YAML
kmem(9): Tweak branch predictions in fast paths.
MAIN commitmail json YAML
pserialize(9): Micro-optimize pserialize_read_exit.
Most of the time we're not cold, so let's convince gcc to make that a
statically predicted-not-taken branch.
Most of the time we're not cold, so let's convince gcc to make that a
statically predicted-not-taken branch.
MAIN commitmail json YAML
i386: Make curlwp and curcpu() flushable.
The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused. Since these instructions
have no (architectural) side effects -- provided %fs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.
The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused. Since these instructions
have no (architectural) side effects -- provided %fs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.
MAIN commitmail json YAML
amd64: Make curlwp and curcpu() flushable.
The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused. Since these instructions
have no (architectural) side effects -- provided %gs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.
The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused. Since these instructions
have no (architectural) side effects -- provided %gs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.
MAIN commitmail json YAML
pserialize(9): Micro-optimize pserialize_not_in_read_section_p.
Load l_ncsw to test whether we have been preempted, rather than
loading and storing l_nopreempt (via function call) to prevent it.
Load l_ncsw to test whether we have been preempted, rather than
loading and storing l_nopreempt (via function call) to prevent it.
MAIN commitmail json YAML
ASSERT_SLEEPABLE(9): Micro-optimize this a little bit.
This convinces gcc to do less -- make a smaller stack frame, compute
fewer conditional moves in favour of predicted-not-taken branches --
in the fast path where we are sleepable as the caller expects.
Wasn't able to convince it to do the ncsw loop with a
predicted-not-taken branch, but let's leave the __predict_false in
there anyway because it's still a good prediction.
This convinces gcc to do less -- make a smaller stack frame, compute
fewer conditional moves in favour of predicted-not-taken branches --
in the fast path where we are sleepable as the caller expects.
Wasn't able to convince it to do the ncsw loop with a
predicted-not-taken branch, but let's leave the __predict_false in
there anyway because it's still a good prediction.
MAIN commitmail json YAML
xhci(4): Defer root intr xfers while polling.
Root intr xfers require taking adaptive locks, which is forbidden
while polling.
This is not great -- any USB transfer completion callbacks might try
to take adaptive locks, not just uhub_intr, and that will always
causes trouble. We get lucky with ukbd_intr because it's not
MP-safe, so it relies only on the kernel lock (a spin lock) anyway.
But this change brings xhci in line with ehci.
PR kern/57326
XXX pullup-8
XXX pullup-9
XXX pullup-10
Root intr xfers require taking adaptive locks, which is forbidden
while polling.
This is not great -- any USB transfer completion callbacks might try
to take adaptive locks, not just uhub_intr, and that will always
causes trouble. We get lucky with ukbd_intr because it's not
MP-safe, so it relies only on the kernel lock (a spin lock) anyway.
But this change brings xhci in line with ehci.
PR kern/57326
XXX pullup-8
XXX pullup-9
XXX pullup-10
MAIN commitmail json YAML
libc atomic: Make previous work a little less accidentally.