Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (2h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 05:58:00 UTC Now

2023-08-03 12:30:25 UTC MAIN commitmail json YAML

mark obsolete, don't remove from setlist

(nia)

2023-08-03 12:24:47 UTC MAIN commitmail json YAML

2023-08-03 08:36:38 UTC MAIN commitmail json YAML

audiotest: Appease GCC 12.3.0 -Wmisleading-indentation

It does not matter whether this statement is a part of this if-then
block or not, anyway. No binary changes.

(rin)

2023-08-03 08:35:14 UTC MAIN commitmail json YAML

check if string is nul char, not if array is NULL.

avoids always-true condition.

found by GCC 12.

(mrg)

2023-08-03 08:32:52 UTC MAIN commitmail json YAML

avoid uninitialised accesses

found by GCC 12.

(mrg)

2023-08-03 08:31:06 UTC MAIN commitmail json YAML

check a pointer's value not the address of a pointer.

found by GCC 12.

(mrg)

2023-08-03 08:16:31 UTC MAIN commitmail json YAML

ignore "-Warray-bounds" for various low level platform code that knows
how something is setup but technically is undefined behaviour.  the
most common here is "extern int end;" and then using offsets of "&end"
that are outside the bounds of this 4-byte integer.

these uses are almost certainly all OK in reality.

found by GCC 12.

(mrg)

2023-08-03 08:10:40 UTC MAIN commitmail json YAML

avoid potentially uninitialised variable that likely won't happen.

GCC 12 can't tell that hardware / platform design means it won't happen.

(mrg)

2023-08-03 08:06:11 UTC MAIN commitmail json YAML

avoid double-free.

found by GCC 12.

(mrg)

2023-08-03 08:05:16 UTC netbsd-8 commitmail json YAML

Apply addition patch to fix the build, requested by riastradh
in ticket #1868:

sys/dev/spkr.c (apply patch)

Pacify -Wsign-compare.

(martin)

2023-08-03 08:04:07 UTC MAIN commitmail json YAML

fix uninitialised variable usage.

found by GCC 12.

(mrg)

2023-08-03 08:03:19 UTC MAIN commitmail json YAML

avoid having addresses of local variable exist after a function returns.

found by GCC 12.

(mrg)

2023-08-03 08:00:10 UTC MAIN commitmail json YAML

log a pointer's value before calling free() on it.  avoids technical UB.

found by GCC 12.

(mrg)

2023-08-03 07:59:33 UTC MAIN commitmail json YAML

avoid potential uninitialised variable use.

found by GCC 12.

(mrg)

2023-08-03 07:49:23 UTC MAIN commitmail json YAML

2023-08-03 05:45:36 UTC MAIN commitmail json YAML

in6: don't send any IPv6 packets over a disabled interface

(ozaki-r)

2023-08-03 05:44:22 UTC MAIN commitmail json YAML

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

(ozaki-r)

2023-08-03 04:24:55 UTC MAIN commitmail json YAML

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.

(ozaki-r)

2023-08-03 03:21:56 UTC MAIN commitmail json YAML

t_etfs: Skip large_blk for system with page size > 8192

Work around kernel freeze reported as PR kern/55658 for
powerpc/ibm4xx (16K pages)

(rin)

2023-08-03 03:18:12 UTC MAIN commitmail json YAML

t_getrandom: Fix false positives for short read(2)

This only affects really slooooow machines, 68030 for me :)

(rin)

2023-08-03 03:15:48 UTC MAIN commitmail json YAML

uvm_findspace(): For sh3, convert a KASSERTMSG(9) into printf(9)

XXX
Work around for PR kern/51254 until it gets fixed.

With this change, landisk survives full ATF with DIAGNOSTIC enabled.

(rin)

2023-08-03 03:10:23 UTC MAIN commitmail json YAML

coda_call(): Appease GCC 12.3.0 -Wmisleading-indentation
No binary changes.

(rin)

2023-08-03 03:07:36 UTC MAIN commitmail json YAML

alpha: Add support for bootflags [xX] to enable debug messages.

(rin)

2023-08-03 02:32:16 UTC MAIN commitmail json YAML

acronyms.comp: add MLO, MMC, SPL

It takes a lot of acronyms to boot a kernel!

(gutteridge)

2023-08-03 02:25:09 UTC MAIN commitmail json YAML

wsemul_vt100_subr: fix IL/DL to match specified behavior

Acoording to DEC manuals: "The cursor is reset to the first column.
This sequence is ignored when the cursor is outside the scrolling
region."

(uwe)

2023-08-03 02:04:17 UTC MAIN commitmail json YAML

wsemul_vt100_subr: properly clamp CUU/CUD parameter

If the cursor is outside of the scrolling region the movement should
stop at the screen border.  Reported by David Leadbeater.

(uwe)

2023-08-03 01:36:55 UTC MAIN commitmail json YAML

src/external/gpl3/gcc/README.gcc12@1.4 / diff / nxr@1.4
src/external/gpl3/gcc/dist/gcc/common.opt@1.14 / diff / nxr@1.14
src/external/gpl3/gcc/dist/gcc/config/netbsd.cc@1.2 / diff / nxr@1.2
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h@1.28 / diff / nxr@1.28
src/external/gpl3/gcc/dist/gcc/config/vax/elf.h@1.13 / diff / nxr@1.13
src/external/gpl3/gcc/dist/gcc/config/vax/netbsd-elf.h@1.11 / diff / nxr@1.11
src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h@1.12 / diff / nxr@1.12
src/external/gpl3/gcc/dist/gcc/config/vax/vax.h@1.15 / diff / nxr@1.15
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.cpp@1.4 / diff / nxr@1.4
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h@1.18 / diff / nxr@1.18
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cpp@1.4 / diff / nxr@1.4
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cpp@1.4 / diff / nxr@1.4
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h@1.11 / diff / nxr@1.11
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cpp@1.4 / diff / nxr@1.4
src/external/gpl3/gcc/lib/Makefile@1.23 / diff / nxr@1.23
src/external/gpl3/gcc/lib/Makefile.sanitizer@1.17 / diff / nxr@1.17
      :
(more 9 files)
many fixes for native GCC 12 builds

- default to dwarf4 since out ctf tools fail with dwarf5.  i tried to
  do this via subtarget options as other ports do, but this would
  require adjusting several of the targets non-netbsd code, and ideally
  we'll fix our tools sooner than later, so just hack it here for now.
- catch up config/rs6000/netbsd64.h (mostly delete things)
- remove some more upstream diffs in config/vax, though it does not work
  currently - libc.so link fails due to weird relocations.
- include some headers to ensure types are available
- add missing sanitizer netbsd files to the 'dist' tree
- remove no longer present TIOCRCVFRAME and TIOCXMTFRAME interceptors
- expanding the sanitizer OS/cpu defs to cover more netbsd platforms
- copy across a few minor changes from gcc.old's sanitizer's (eg,
  disabling linux-specific code, adding netbsd specific code.)
- add (untested, but building) tsan support for arm64
- re-enable the sanitzers, at least simple -fsanitize=address builds a
  working application on amd64 now
- fix the source lists (mostly .cc -> .cpp rename here)
- add some missing new defines, -f*, and -W*
- bump sanitizer shlib version
- apply -fno-jump-tables in some more places on m68k
- update the list in README.gcc12 to note many things now work or a few
  things to do not work (although there are many uncommited changes at
  this point across the rest of 'src' and 'xsrc'.)  main points are that
  vax, hppa, ppc, and sh3 don't build yet, but most other things are
  either testing and working or at least building.

(mrg)

2023-08-02 23:03:40 UTC MAIN commitmail json YAML

src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4/backtrace-supported.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4/config.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb/backtrace-supported.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb/config.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/config.h@1.6 / diff / nxr@1.6
src/external/gpl3/gcc/lib/libgcc/arch/earmv4/auto-target.h@1.8 / diff / nxr@1.8
src/external/gpl3/gcc/lib/libgcc/arch/earmv4/defs.mk@1.11 / diff / nxr@1.11
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb/auto-target.h@1.8 / diff / nxr@1.8
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb/defs.mk@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/auto-target.h@1.8 / diff / nxr@1.8
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk@1.13 / diff / nxr@1.13
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4/defs.mk@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb/defs.mk@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libgomp/arch/earmv4/config.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libgomp/arch/earmv4/libgomp_f.h@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/lib/libgomp/arch/earmv4/omp.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb/config.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb/libgomp_f.h@1.9 / diff / nxr@1.9
      :
(more 55 files)
mknative-gcc for GCC 12.3.0 on earmv4*, and powerpc64.

(mrg)

2023-08-02 22:37:02 UTC MAIN commitmail json YAML

wsemul_vt100: fix RI to not scroll outside of scroll region

This is the inverse (scroll down) of the problem reported and fixed
for IND (scroll up) in PR kern/11827 back in 2000.

We only have one call site for this, but still move this bit of code
into a separate wsemul_vt100_prevline function to make it symmetric
with wsemul_vt100_nextline.  While here, make both take vt100base_data.

(uwe)

2023-08-02 21:58:12 UTC MAIN commitmail json YAML

2023-08-02 21:26:12 UTC MAIN commitmail json YAML

lint: do not return bogus types for unnamed function parameters

Since decl.c 1.18 from 2000-07-05, lint has returned bogus type
information in cases where it couldn't interpret complicated
declarators.

In cases like these, rather fail than proceed with wrong data.

(rillig)

2023-08-02 21:11:36 UTC MAIN commitmail json YAML

2023-08-02 18:57:54 UTC MAIN commitmail json YAML

2023-08-02 18:51:25 UTC MAIN commitmail json YAML

2023-08-02 15:57:21 UTC MAIN commitmail json YAML

No need to define cpu_{,set}_tlb_info here - just use the
sys/uvm/pmap/pmap_tlb.h versions.

(skrll)

2023-08-02 14:45:04 UTC MAIN commitmail json YAML

Relax the TLB invalidation from full to by va for writing to kernel text
in db_write_text.

(skrll)

2023-08-02 14:36:40 UTC MAIN commitmail json YAML

2023-08-02 12:12:52 UTC MAIN commitmail json YAML

2023-08-02 10:36:01 UTC netbsd-10 commitmail json YAML

2023-08-02 10:34:25 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #304):

sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c: revision 1.4
sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c: revision 1.5

amdgpu: Mark float-dependent variables volatile.

This way they are computed -- using FP instructions -- before
DC_FP_END, after which point FP instructions will trap or behave
unpredictably.

This is a workaround, not a proper solution -- really, the
DC_FP_START/END calls should happen in a separate compilation unit
built without -mhard-float or whatever, but that's a lot more work to
make happen for now.

PR kern/57059

(martin)

2023-08-02 10:31:46 UTC MAIN commitmail json YAML

2023-08-02 10:30:34 UTC MAIN commitmail json YAML

2023-08-02 10:30:18 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #303):

sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c: revision 1.11

avoid calling drm_sched_fini() for AMDGPU_RING_TYPE_KIQ rings.

drm_sched_init() is not called for these rings, and we'd panic trying
to mutex_destroy() a mutex that wasn't initialised.

this seems like a general bug, not a bug in netbsd port.

(martin)

2023-08-02 10:28:08 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #302):

sys/modules/amdgpu/Makefile: revision 1.6
sys/external/bsd/drm2/amdgpu/files.amdgpu: revision 1.30

amdgpu: Define CONFIG_DRM_AMD_DC to enable display core logic.

Probably resolves a host of issues with amdgpu not detecting
displays!
Noticed by rjs@.

PR kern/57059
PR kern/57325
PR kern/57452

(martin)

2023-08-02 10:25:32 UTC netbsd-8 commitmail json YAML

2023-08-02 10:24:17 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #1877):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.

(martin)

2023-08-02 10:23:26 UTC netbsd-9 commitmail json YAML

2023-08-02 10:22:13 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #1698):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.

(martin)

2023-08-02 10:20:38 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #301):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.

(martin)

2023-08-02 09:18:14 UTC MAIN commitmail json YAML

check for empty ranges in pmap_page_physload() itself

(macallan)

2023-08-02 08:54:42 UTC MAIN commitmail json YAML

avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again

(macallan)

2023-08-02 07:12:04 UTC netbsd-10 commitmail json YAML

Fix member name in patch for  ticket #297 (fix dlopen with static thread-local
storage)

(martin)

2023-08-02 07:11:31 UTC MAIN commitmail json YAML

fileassoc(9): Fast paths to skip global locks when not in use.

PR kern/57552

(riastradh)

2023-08-02 06:24:46 UTC MAIN commitmail json YAML

percpu(9): percpu_create ctor may be called later, not synchronously.

(riastradh)

2023-08-02 05:44:27 UTC MAIN commitmail json YAML

2023-08-01 23:41:55 UTC MAIN commitmail json YAML

t_pollts.c: fix typo in a description string (NFC)

(gutteridge)

2023-08-01 23:33:05 UTC MAIN commitmail json YAML

select.2: note when pselect(2) was added

(gutteridge)

2023-08-01 22:06:23 UTC MAIN commitmail json YAML

Include compat config for NetBSD-10.

(rjs)

2023-08-01 21:30:14 UTC MAIN commitmail json YAML

INSTALL: add a basic comment and missing RCS ID

(This isn't actually in use at present, but make it look like other
examples.)

(gutteridge)

2023-08-01 21:26:28 UTC MAIN commitmail json YAML

2023-08-01 20:52:44 UTC MAIN commitmail json YAML

s/diabling/disabling/ in comment.

(andvar)

2023-08-01 20:50:11 UTC MAIN commitmail json YAML

2023-08-01 20:46:01 UTC MAIN commitmail json YAML

2023-08-01 20:41:48 UTC MAIN commitmail json YAML

s/diabled/disabled/.

(andvar)

2023-08-01 20:39:16 UTC MAIN commitmail json YAML

s/intrerrupt/interrupt/.

(andvar)

2023-08-01 20:11:13 UTC MAIN commitmail json YAML

xen: Fix previous commit, forgot to amend it before committing.

(riastradh)

2023-08-01 20:09:12 UTC MAIN commitmail json YAML

2023-08-01 19:57:38 UTC MAIN commitmail json YAML

lint: clear global variable 'dcs' after use

Having unnecessarily set members is confusing during debugging.

(rillig)

2023-08-01 19:52:16 UTC MAIN commitmail json YAML

2023-08-01 19:36:57 UTC MAIN commitmail json YAML

xen: Report when hardclock jump exceeds timecounter(9) limit.

(riastradh)

2023-08-01 19:36:46 UTC MAIN commitmail json YAML

ihidev(4): Use iic_use_direct_match as intended.

This appears to have been a mistake; there's no obvious explanation
in the commit history for why this is different from all other
iic_use_direct_match users.

Patch from Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>, thanks!

(If it really is intended to ues I2C_MATCH_DIRECT_COMPATIBLE here, we
need a clear explanation of why, written down in a nearby comment.)

(riastradh)

2023-08-01 17:51:25 UTC MAIN commitmail json YAML

2023-08-01 17:36:58 UTC netbsd-9 commitmail json YAML

2023-08-01 17:34:33 UTC netbsd-9 commitmail json YAML

Pull up the following revisions, requested by msaitoh in ticket #1697:

usr.sbin/tprof/tprof.8 1.16,1.22,1.25,1.29 via patch
usr.sbin/tprof/tprof_analyze.c 1.4
usr.sbin/tprof/arch/tprof_x86.c 1.13-1.19
sys/dev/tprof/tprof.c 1.23 via patch
sys/dev/tprof/tprof_x86_amd.c 1.7-1.8 via patch
sys/dev/tprof/tprof_x86_intel.c 1.8 via patch

- Add AMD family 19h (zen3 and zen4) support.
- Add Intel Comet Lake support.
- Add support for Intel Skylake-X and Cascade Lake.
- Print the path that we failed to open on error.
- Use lowercase consistently for hexadecimal numbers.
- KNF

(martin)

2023-08-01 17:31:33 UTC netbsd-8 commitmail json YAML

2023-08-01 17:29:15 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1876):

sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.15

drm/linux_ww_mutex: Fix wait loops.

If cv_wait_sig returns because a signal is delivered, we may
nonetheless have been granted the lock.  It is harmless for us to
ignore this fact in three of the four paths, but in
ww_mutex_state_wait_sig, we may now have ownership of the lock and
MUST NOT return failure because the caller MUST release the lock
before destroying the ww_acquire_ctx.

While here, restructure the other three loops for clarity, so they
match the structure of the fourth and so they have a little less
impenetrable negation.

PR kern/57537

(martin)

2023-08-01 17:26:28 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1696):

sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.15

drm/linux_ww_mutex: Fix wait loops.

If cv_wait_sig returns because a signal is delivered, we may
nonetheless have been granted the lock.  It is harmless for us to
ignore this fact in three of the four paths, but in
ww_mutex_state_wait_sig, we may now have ownership of the lock and
MUST NOT return failure because the caller MUST release the lock
before destroying the ww_acquire_ctx.

While here, restructure the other three loops for clarity, so they
match the structure of the fourth and so they have a little less
impenetrable negation.

PR kern/57537

(martin)

2023-08-01 17:19:57 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1875):

sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.10

drm: Spruce up ww_mutex comments.  Audit return values.

(martin)

2023-08-01 17:16:26 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1695):
sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.10
drm: Spruce up ww_mutex comments.  Audit return values.

(martin)

2023-08-01 17:05:58 UTC netbsd-10 commitmail json YAML

2023-08-01 17:03:54 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #300):

libexec/ld.elf_so/rtld.h: revision 1.145
libexec/ld.elf_so/symbol.c: revision 1.74
libexec/ld.elf_so/rtld.h: revision 1.147
libexec/ld.elf_so/symbol.c: revision 1.75
libexec/ld.elf_so/symbol.c: revision 1.76
tests/libexec/ld.elf_so/t_hash.c: revision 1.1
libexec/ld.elf_so/Makefile: revision 1.145
libexec/ld.elf_so/Makefile: revision 1.146
libexec/ld.elf_so/Makefile: revision 1.147
libexec/ld.elf_so/reloc.c: revision 1.118
distrib/sets/lists/tests/mi: revision 1.1280
libexec/ld.elf_so/rtld.c: revision 1.215
tests/libexec/ld.elf_so/Makefile: revision 1.21
libexec/ld.elf_so/hash.c: revision 1.1
libexec/ld.elf_so/hash.h: revision 1.1
distrib/sets/lists/debug/mi: revision 1.409

The SysV ABI specifies that the symbol hash function should return only 32
bits of hash. Unfortunately due to an implementation bug and the fact that
the return type is unsigned long which is 64 bits in LP64, this can fail
in some cases: "\xff\x0f\x0f\x0f\x0f\x0f\x12". See:
    "https://maskray.me/blog/2023-04-12-elf-hash-function
>From Ed Maste @ FreeBSD:
    https://cgit.freebsd.org/src/commit/?id=29e3a06510823edbb91667d21f530d3ec778116d

Need to write Unit Tests for this.

Oops wrong mask.

ld.elf_so: Split SRCS onto multiple lines.
Makes updates easier.
No functional change intended.

ld.elf_so: Sort SRCS.
No functional change intended.

ld.elf_so: Split hash functions into a separate file.
This way we can test them in isolation.
No functional change intended.

ld.elf_so: Add some known-answer tests for hash functions.

Make sure the testing mechanism detects the traditional overflow bug.

(martin)

2023-08-01 16:58:07 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1874):

sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.16

drm/linux_ww_mutex: Fix ww acquire context ordering.

(martin)

2023-08-01 16:56:55 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1694):

sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.16

drm/linux_ww_mutex: Fix ww acquire context ordering.

(martin)

2023-08-01 16:55:03 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #299):

sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.16

drm/linux_ww_mutex: Fix ww acquire context ordering.

(martin)

2023-08-01 16:53:18 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #298):

sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.15

drm/linux_ww_mutex: Fix wait loops.

If cv_wait_sig returns because a signal is delivered, we may
nonetheless have been granted the lock.  It is harmless for us to
ignore this fact in three of the four paths, but in
ww_mutex_state_wait_sig, we may now have ownership of the lock and
MUST NOT return failure because the caller MUST release the lock
before destroying the ww_acquire_ctx.

While here, restructure the other three loops for clarity, so they
match the structure of the fourth and so they have a little less
impenetrable negation.

PR kern/57537

(martin)

2023-08-01 16:49:54 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #281):

sys/dev/usb/xhci.c: revision 1.177
sys/dev/usb/xhci.c: revision 1.180
sys/dev/usb/xhcivar.h: revision 1.24

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.

xhci(4): Don't panic on suspend if previous suspend/resume failed.
Trying to resume again probably won't make the situation much worse,
but panicking can definitely make it worse.

(martin)

2023-08-01 16:35:00 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #297):

distrib/sets/lists/tests/shl.mi: revision 1.14
distrib/sets/lists/tests/shl.mi: revision 1.15
distrib/sets/lists/tests/shl.mi: revision 1.16
tests/libexec/ld.elf_so/helper_def_static/h_def_static.c: revision 1.1
tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.2
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.75
distrib/sets/lists/tests/mi: revision 1.1265
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.36
libexec/ld.elf_so/rtld.c: revision 1.214
tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.1
distrib/sets/lists/debug/mi: revision 1.400
tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.2
distrib/sets/lists/debug/mi: revision 1.401
distrib/sets/lists/debug/mi: revision 1.402
tests/libexec/ld.elf_so/helper_dso2/Makefile: revision 1.2
distrib/sets/lists/debug/mi: revision 1.403
tests/libexec/ld.elf_so/helper_symver_dso0/Makefile: revision 1.2
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.48
distrib/sets/lists/debug/mi: revision 1.406
tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile: revision 1.2
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.70
libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.18
tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/Makefile: revision 1.13
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.46
libexec/ld.elf_so/rtld.h: revision 1.146
tests/libexec/ld.elf_so/Makefile: revision 1.14
distrib/sets/lists/debug/shl.mi: revision 1.306
tests/libexec/ld.elf_so/Makefile: revision 1.15
tests/libexec/ld.elf_so/helper_abuse_static/Makefile: revision 1.1
distrib/sets/lists/debug/shl.mi: revision 1.307
tests/libexec/ld.elf_so/Makefile: revision 1.16
tests/libexec/ld.elf_so/helper_abuse_static/Makefile: revision 1.2
distrib/sets/lists/debug/shl.mi: revision 1.308
tests/libexec/ld.elf_so/Makefile: revision 1.17
distrib/sets/lists/debug/shl.mi: revision 1.309
tests/libexec/ld.elf_so/Makefile: revision 1.18
tests/libexec/ld.elf_so/Makefile: revision 1.19
libexec/ld.elf_so/tls.c: revision 1.16
libexec/ld.elf_so/tls.c: revision 1.17
libexec/ld.elf_so/tls.c: revision 1.18
libexec/ld.elf_so/tls.c: revision 1.19
tests/libexec/ld.elf_so/helper_onlydef_static/h_onlydef_static.c: revision 1.1
tests/libexec/ld.elf_so/helper_use_static/h_use_static.c: revision 1.1
tests/libexec/ld.elf_so/helper_use_static/h_use_static.c: revision 1.2
tests/libexec/ld.elf_so/helper_def_static/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_def_static/Makefile: revision 1.2
libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.50
distrib/sets/lists/debug/shl.mi: revision 1.310
libexec/ld.elf_so/README.TLS: revision 1.6
distrib/sets/lists/debug/shl.mi: revision 1.311
distrib/sets/lists/debug/shl.mi: revision 1.314
tests/libexec/ld.elf_so/helper_dso3/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_symver_dso1/Makefile: revision 1.4
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.63
tests/libexec/ld.elf_so/helper_def_dynamic/h_def_dynamic.c: revision 1.1
tests/libexec/ld.elf_so/helper_onlydef/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_onlydef/Makefile: revision 1.2
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.10
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.11
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.12
libexec/ld.elf_so/map_object.c: revision 1.66
tests/libexec/ld.elf_so/helper.mk: revision 1.1
libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.57
libexec/ld.elf_so/map_object.c: revision 1.67
tests/libexec/ld.elf_so/helper_onlydef/h_onlydef.c: revision 1.1
tests/libexec/ld.elf_so/helper_symver_dso2/Makefile: revision 1.4
tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.3
tests/libexec/ld.elf_so/helper_use_dynamic/h_use_dynamic.c: revision 1.1
tests/libexec/ld.elf_so/helper_abuse_static/h_abuse_static.c: revision 1.1
libexec/ld.elf_so/arch/riscv/mdreloc.c: revision 1.9
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.1
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.2
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.3
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.4
tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.5
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.6
libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.34
tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.7
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.42
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.8
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.43
libexec/ld.elf_so/arch/or1k/mdreloc.c: revision 1.4
tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.9
tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_abuse_dynamic/h_abuse_dynamic.c: revision 1.1
tests/libexec/ld.elf_so/helper_onlyctor_dynamic/h_onlyctor_dynamic.c: revision 1.1
tests/libexec/ld.elf_so/helper_onlyuse_static/h_onlyuse_static.c: revision 1.1
tests/libexec/ld.elf_so/helper_onlyuse_dynamic/h_onlyuse_dynamic.c: revision 1.1
tests/libexec/ld.elf_so/helper_dso1/Makefile: revision 1.2
distrib/sets/lists/tests/shl.mi: revision 1.12
distrib/sets/lists/tests/shl.mi: revision 1.13
libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.44
(all via patch)

ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.
Now it's actually testing the problem.
ld.elf_so: Nix inadvertently committed private test program.
ld.elf_so: Fix set lists for MKDEBUG=yes builds with t_tls_extern.

ld.elf_so: Sprinkle tls debug messages.

ld.elf_so: Make tls alloc debug messages more detailed and greppable.

ld.elf_so: Test variations on PR toolchain/50277.

ld.elf_so: Test extern dynamic TLS too.

ld.elf_so: Factor out logic in TLS tests to make writing more easier.
No functional change intended.

ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.

ld.elf_so: Shorter test names.
No functional non-cosmetic change intended.

ld.elf_so: Separately test eager and lazy resolution of def tls ptr.
eager: before loading use library
lazy: after loading use library

Add recent ld.elf_so test helpers debug info
ld.elf_so: Add new files to debug/shl.mi.

ld.elf_so: tls_extern dynamic_defabuse_eager must xfail differently.
If a symbol has already been resolved as dynamic TLS, any library
that tries to use it as static TLS cannot be dlopened.

ld.elf_so: Test another edge case of mismatched TLS models.
One library defines a symbol and _doesn't_ use it, so it has no
indication of whether the symbol is for static TLS or dynamic TLS,
and then two other libraries use it in different ways.

ld.elf_so: Test dynamic-then-static abuse via ctor.

ld.elf_so: Fix missing tab in debug/shl.mi in last change.

Fix interactions of initial-exec TLS model and dlopen
(1) If an initial-exec relocation was used for a non-local symbol
(i.e. the definition of the symbol is in a different DSO), the
computation of the static TLS offset used the wrong DSO.
This would effectively mean the wrong address was computed
(PR toolchain/50277, PR pkg/57445).
Fix this by forcing the computation of the correct DSO (the one defining
the symbol).
This code uses __UNCONST to avoid the vast interface changes for this
special case.
(2) If symbols from a DSO loaded via dlopen are used with both
global-dynamic/local-dynamic and initial-exec relocations AND
a initial-exec relocation was resolved first in a thread, a split brain
situation could exist where the dynamic relocations would use one memory
block (separate allocation) and the initial-exec relocations the static
per-thread TLS space.
(3) If the initial-exec relocation in (2) is seen after any thread has
already used a GD/LD allocation, bail out. Since IE relocations are used
only in the GOT, this will prevent the dlopen. This is a bit more
aggressive than necessary, but a full blown reference counting doesn't
seem to be justified.
Avoid using uninitialized variable "symnum" when building with DEBUG
enabled by borrowing the rdbg_symname() macro from arch/x86_64.
ld.elf_so: Sprinkle more debug messages on dlopen and error.
PR pkg/57445
Fix MKDEBUGLIB build by adding these installed files to the debug
set list.
XXX
One could argue that these files are not of any use, so why install
them?  I don't have a good argument either way, and this is (for
now) a simple work-around for PR bin/57455  Please feel free to
commit a different fix to avoid installing these files at all.
Fix markup of libh_ MKDEBUGLIB=yes only files
TLS variant I archs need to fudge the offset by the size of the TCB.
tests/libexec/ld.elf_so: Fix helper library makefiles.
1. Consolidate logic into a single helper.mk to reduce duplication.
2. Set NO* variables, not MK* variables which are reserved for user.
3. Avoid eager X!= in favour of lazy ${X:sh}.
4. Mark _g.a set list entries obsolete.  Never should've been built!
PR misc/57462

(martin)

2023-08-01 16:33:43 UTC MAIN commitmail json YAML

vnode_impl.h: clarify comment, from freenode

(dholland)

2023-08-01 16:21:07 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #296):

lib/libpthread/arch/x86_64/pthread_md.h: revision 1.13
lib/libpthread/pthread_int.h: revision 1.110
lib/libpthread/pthread_int.h: revision 1.111
lib/libpthread/arch/i386/pthread_md.h: revision 1.21
lib/libpthread/arch/arm/pthread_md.h: revision 1.12
lib/libpthread/arch/arm/pthread_md.h: revision 1.13
lib/libpthread/pthread_spin.c: revision 1.11
lib/libpthread/arch/aarch64/pthread_md.h: revision 1.2

libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.

PR port-arm/57437 (pthread__smt_pause/wake issue)

libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:
- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register
- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.

PR port-arm/57437

(martin)

2023-08-01 16:14:59 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #295):

sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c: revision 1.19

amdgpu: Fix mostly harmless merge botch.

Avoids confusing error message that should have been confined to an
error branch.

(martin)

2023-08-01 16:10:59 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #294):

sys/kern/kern_entropy.c: revision 1.60
sys/kern/kern_entropy.c: revision 1.61

entropy(9): On flags change, cancel any scheduled consolidation.

We've been instructed to lose confidence in existing entropy sources,
so let's make sure to re-gather enough entropy before the next
consolidation can happen, in case some of what would be counted in
consolidation is from those entropy sources.

entropy(9): Avoid race between rnd_add_data and ioctl(RNDCTL).

(martin)

2023-08-01 16:08:58 UTC MAIN commitmail json YAML

2023-08-01 16:07:20 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #293):

sys/arch/i386/conf/ALL: revision 1.507
sys/arch/i386/conf/GENERIC: revision 1.1247

i386/ALL: Enable EFI runtime support.
PR kern/57076

i386/GENERIC: Enable EFI runtime support.
PR kern/57076

(martin)

2023-08-01 16:05:12 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #292):

sys/arch/arm/arm/efi_runtime.c: revision 1.11
sys/dev/efi/efi.h: revision 1.3
sys/arch/x86/x86/efi_machdep.c: revision 1.5
sys/arch/x86/x86/efi_machdep.c: revision 1.6
sys/dev/efi.c: revision 1.5
sys/dev/efi.c: revision 1.6
sys/dev/efi.c: revision 1.7
sys/dev/efi.c: revision 1.8
sys/dev/efi.c: revision 1.9
sys/dev/efivar.h: revision 1.2
sys/sys/efiio.h: revision 1.3

efi(4): Parenthesize EFIERR argument out of paranoia.
PR kern/57076

efi(4): Move error macros to efi.h.
PR kern/57076

efi(4): Implement MI parts of EFIIOC_GET_TABLE.
Intended to be compatible with FreeBSD.
Not yet supported on any architectures.
PR kern/57076

efi(4): Implement EFIIOC_GET_TABLE on x86.
PR kern/57076

efi(4): Translate between size_t and unsigned long.
Fixes i386 build.
PR kern/57076

efi(4): Fix logic to handle buffer sizing.

Can't KASSERT(datasize <= databufsize) because the caller is allowed
to pass in a too-small size and get ERR_BUFFER_TOO_SMALL back, with
the actual size returned so it can resize its buffer.  So just clamp
the size to the smaller of what the caller provided and what the
firwmare provided, instead of asserting anything.

PR kern/57076

(martin)

2023-08-01 16:00:57 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #291):

sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_busy.c: revision 1.4

i915: Avoid dereferencing null fence if resv has changed.
PR kern/57402

(martin)

2023-08-01 15:46:26 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #1693):

external/public-domain/xz/lib/Makefile: revision 1.11
external/bsd/libarchive/lib/libarchive/libarchive.pc.in: revision 1.1
distrib/sets/lists/comp/mi: revision 1.2417 (patch)
external/bsd/libarchive/lib/libarchive/Makefile: revision 1.14

Build and install pkgconfig files for liblzma and libarchive

(martin)

2023-08-01 15:40:09 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1873):

sys/dev/acpi/acpica/acpi_func.h: revision 1.7 (patch)

acpi(4): Fix membars in ACPI_ACQUIRE/RELEASE_GLOBAL_LOCK.

(martin)

2023-08-01 15:38:23 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1692):

sys/dev/acpi/acpica/acpi_func.h: revision 1.7 (patch)

acpi(4): Fix membars in ACPI_ACQUIRE/RELEASE_GLOBAL_LOCK.

(martin)

2023-08-01 15:35:38 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #290):

sys/dev/acpi/acpica/acpi_func.h: revision 1.7

acpi(4): Fix membars in ACPI_ACQUIRE/RELEASE_GLOBAL_LOCK.

(martin)

2023-08-01 15:32:23 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1872):

sys/fs/tmpfs/tmpfs_subr.c: revision 1.116
sys/fs/tmpfs/tmpfs_subr.c: revision 1.117

tmpfs: Refuse sizes that overflow round_page.

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.

(martin)

2023-08-01 15:30:40 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1691):

sys/fs/tmpfs/tmpfs_subr.c: revision 1.116
sys/fs/tmpfs/tmpfs_subr.c: revision 1.117

tmpfs: Refuse sizes that overflow round_page.

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.

(martin)

2023-08-01 15:29:24 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #289):

sys/fs/tmpfs/tmpfs_subr.c: revision 1.116
sys/fs/tmpfs/tmpfs_subr.c: revision 1.117

tmpfs: Refuse sizes that overflow round_page.

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.

(martin)

2023-08-01 15:19:02 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1871):

libexec/ld.elf_so/rtld.c: revision 1.213

dlopen(3): Read _rtld_objtail under the lock.

(martin)

2023-08-01 15:17:44 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1690):

libexec/ld.elf_so/rtld.c: revision 1.213

dlopen(3): Read _rtld_objtail under the lock.

(martin)

2023-08-01 15:13:02 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #288):

libexec/ld.elf_so/rtld.c: revision 1.213

dlopen(3): Read _rtld_objtail under the lock.

(martin)

2023-08-01 15:05:06 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #287):

sys/kern/vfs_vnops.c: revision 1.238

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.

(martin)

2023-08-01 15:01:56 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1870):

sys/dev/isapnp/sb_isapnp.c: revision 1.54
sys/dev/ofisa/sb_ofisa.c: revision 1.24

sb(4): Fix missing mutex initialization at isapnp and ofisa.
PR kern/57363

(martin)

2023-08-01 14:59:57 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1689):

sys/dev/isapnp/sb_isapnp.c: revision 1.54
sys/dev/ofisa/sb_ofisa.c: revision 1.24

sb(4): Fix missing mutex initialization at isapnp and ofisa.
PR kern/57363

(martin)

2023-08-01 14:57:27 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #286):

sys/dev/isapnp/sb_isapnp.c: revision 1.54
sys/dev/ofisa/sb_ofisa.c: revision 1.24

sb(4): Fix missing mutex initialization at isapnp and ofisa.
PR kern/57363

(martin)

2023-08-01 14:54:58 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1688):

sys/kern/subr_autoconf.c: revision 1.308

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.

(martin)

2023-08-01 14:53:54 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #285):

sys/kern/subr_autoconf.c: revision 1.308

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.

(martin)

2023-08-01 14:49:06 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #284):

sys/dev/dkwedge/dk.c 1.125-1.158
sys/kern/subr_disk.c 1.135-1.137
sys/sys/disk.h 1.78

dk(4): Explain why dk_rawopens can't overflow and assert it.

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.

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.

dk(4): KNF: return (v) -> return v.
No functional change intended.

dk(4): KNF: Whitespace.
No functional change intended.

dk(4): Omit needless void * cast.
No functional change intended.

dk(4): Fix typo in comment: dkstrategy, not dkstragegy.
No functional change intended.

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?

dk(4): KNF: Sort includes.
No functional change intended.

dk(4): <sys/rwlock.h> for rwlock(9).

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.

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.

dk(4): Don't touch dkwedges or ndkwedges outside dkwedges_lock.

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.

dk(4): Assert dkwedges[unit] is the sc we're about to free.

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.

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.

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.

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.

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.

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.

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

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.

dk(4): dkdump: Simplify.  No functional change intended.

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.

disk(9): Fix missing unlock in error branch in previous change.

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.

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.

dk(4): Fix lock assertion in size increase: parent's, not wedge's.

dk(4): Rename label for consistency.  No functional change intended.

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.

Fixes assertion sc->sc_dk.dk_openmask == 0.
ioctl(DIOCRMWEDGES): Delete only idle wedges.

Don't forcibly delete busy wedges.

Fixes accidental destruction of the busy wedge that the root file
system is mounted on, triggered by syzbot's ioctl(DIOCRMWEDGES).

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.

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.

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.

dk(4): Need pdk->dk_openlock to read pdk->dk_wedges.

(martin)

2023-08-01 14:36:59 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #283):

usr.sbin/crash/arch/powerpc.c: revision 1.1
sys/arch/powerpc/powerpc/db_trace.c: revision 1.61
sys/arch/powerpc/powerpc/db_trace.c: revision 1.62
sys/arch/powerpc/powerpc/db_trace.c: revision 1.63
usr.sbin/crash/crash.c: revision 1.15
sys/arch/powerpc/powerpc/db_disasm.c: revision 1.30
sys/arch/powerpc/powerpc/db_disasm.c: revision 1.31
usr.sbin/crash/arch/generic.c: revision 1.2
usr.sbin/crash/Makefile: revision 1.47
usr.sbin/crash/arch/powerpc64.c: revision 1.1

crash(8): Add powerpc support.

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.

powerpc/ddb: Fix one more load to use db_read_bytes.
Fix some typos in crash(8) comments too.

(martin)

2023-08-01 14:06:37 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #282):

sys/dev/pci/ichsmb.c: revision 1.82
sys/arch/amd64/conf/GENERIC: revision 1.602
sys/arch/x86/pci/tco.c: revision 1.10
sys/arch/x86/pci/tco.h: revision 1.5
sys/arch/x86/pci/ichlpcib.c: revision 1.59
sys/dev/ic/i82801lpcreg.h: revision 1.17
sys/arch/x86/pci/files.pci: revision 1.27
sys/dev/pci/files.pci: revision 1.446

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.)

(martin)

2023-08-01 13:48:15 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1869):

sys/dev/usb/xhci.c: revision 1.176
sys/dev/usb/xhcivar.h: revision 1.23

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

(martin)

2023-08-01 13:46:18 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1687):

sys/dev/usb/xhci.c: revision 1.176
sys/dev/usb/xhcivar.h: revision 1.23

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

(martin)

2023-08-01 13:43:34 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #280):

sys/dev/usb/xhci.c: revision 1.176
sys/dev/usb/xhcivar.h: revision 1.23

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

(martin)

2023-08-01 13:18:21 UTC netbsd-8 commitmail json YAML

Apply patch, requested by riastradh in ticket #1859:

        sys/arch/mips/include/asm.h    (apply patch)

Additional build fix for mips1 (and mips2?)
(patch taken from [pullup-9 #1676])

(martin)

2023-08-01 13:14:39 UTC netbsd-9 commitmail json YAML

Apply patch, requested by riastradh in ticket #1676:

sys/arch/mips/include/asm.h (apply patch)

Additional build fix for mips1 (and mips2?)

(martin)

2023-08-01 13:05:57 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1868):

sys/dev/spkr.c: revision 1.25 (patch)

spkr(4): Avoid some overflow issues.

(martin)

2023-08-01 13:02:55 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1686):

sys/dev/spkr.c: revision 1.25 (patch)

spkr(4): Avoid some overflow issues.

(martin)

2023-08-01 10:35:42 UTC MAIN commitmail json YAML

arm/xscale: Do not lower IPL by splraise(9)

XXX
I have fixed similar bug for xscale/i80321.
There should be more in codes written at that time...

(rin)

2023-08-01 10:25:48 UTC MAIN commitmail json YAML

NSLU2: Remove workaround for now-fixed PR toolchain/57146

(rin)

2023-08-01 08:53:05 UTC MAIN commitmail json YAML

don't assert() that realloc() worked inside a conditional.

found by GCC 12.

(mrg)

2023-08-01 08:47:25 UTC MAIN commitmail json YAML

convert explicit length check before unchecked snprintf() with just a
overflow checked snprintf().  for res_debug.c and res_query.c, convert
from sprintf() to snprintf().

tested scp and rcp fail properly with too-long paths.
tested getaddrinfo fails as expected for too-long domains.
tested dig and ping for similar (res_debug.c/res_query.c).
created a temporary fs with quotas to test edquota with a long EDITOR.
did not test ypserv directly, but it's the same pattern.

avoids GCC 12 snprintf() warnings, and reduces total code size.

(mrg)

2023-08-01 08:17:26 UTC MAIN commitmail json YAML

2023-08-01 07:58:41 UTC MAIN commitmail json YAML

2023-08-01 07:57:18 UTC MAIN commitmail json YAML

cdbw_output()'s 3rd argument must be a 16-byte char array, so pad the
string literals passed to it with enough nuls to make this true.

found by GCC 12.

(mrg)

2023-08-01 07:56:23 UTC MAIN commitmail json YAML

pass the struct size to malloc(), not the pointer size.
found by GCC 12.

(mrg)

2023-08-01 07:55:57 UTC MAIN commitmail json YAML

fix new GCC 12 warning that can't happen by forcing unsigned context for
values that are always positive by this point.

(mrg)

2023-08-01 07:09:38 UTC MAIN commitmail json YAML

update status for various ports

- arm64 mostly works with some uncommited patches
- arm might work, but my testbox seems unstable
- most ports have basically working native-gcc now
- mipsel builds (pmax)

(mrg)

2023-08-01 07:04:17 UTC MAIN commitmail json YAML

2023-08-01 06:52:06 UTC MAIN commitmail json YAML

we skipped GCC 11, so change the test to GCC 12.

(mrg)

2023-08-01 06:46:52 UTC MAIN commitmail json YAML

add gcc 12 subdirs, remove gcc 9.

(mrg)

2023-08-01 06:35:56 UTC MAIN commitmail json YAML

2023-08-01 06:05:14 UTC MAIN commitmail json YAML

2023-08-01 06:04:42 UTC MAIN commitmail json YAML

rename our local .c that is c++ to .cc like upstream has.

(mrg)

2023-08-01 05:57:57 UTC MAIN commitmail json YAML

various updates to build native GCC 12.

- for usr.bin, build libcody and link it into cc1*plus
- move makefile code for auto-build.h and version.h (was gcov-iov.h)
  into makefile fragment to share them.  (XXX probably best to only do
  this in one place, but that's a future step.)
- many updates to handle the .c -> .cc renames
- build some x86 files with -msse2
- bump shlib versions for libgomp and libstdc++v3
- fix MKGCCCMDS=no builds
- updates for new rtl-ssa subdir
- use -std=gnu++11 for various places
- define TARGET_MACHINE and HOST_MACHINE for some places
- avoid a .BEGIN rule that writes to missing obj (ie src) sometimes

cleanups still needed:
- remove a bunch of commented -Wno* that don't seem to be needed anymore
- leave or remove various vax-specific -O0s that should no longer be
  necessary for the vax-gcc port
- some "XXXGCC12" that should be may be fixable or converted to using our
  standard ${CC_...} warnings (but may need to remain, in which case the
  XXXGCC12 marker will be removed.)

with these, and a few other changes around the tree, i've able to build
gcc12 releases for several ports that seem to work (arm64, sparc, amd64,
i386 at least so far, have run, several others have built.)

(mrg)

2023-08-01 04:20:14 UTC MAIN commitmail json YAML

For vmstat -mW, add a total KB consumed column and widen a couple of
other fields.

(simonb)

2023-08-01 03:28:53 UTC MAIN commitmail json YAML

web2: sort -f, dedup. Fix ATF failure for nbperf(1).

(rin)

2023-07-31 23:53:39 UTC MAIN commitmail json YAML

put back compat names, should be removed from the sanitizers

(christos)

2023-07-31 23:52:13 UTC MAIN commitmail json YAML

put back old names (should be removed from the sanitizers)

(christos)

2023-07-31 21:07:50 UTC MAIN commitmail json YAML

s/proceeedings/proceedings/ in comment.

(andvar)

2023-07-31 20:58:57 UTC MAIN commitmail json YAML

2023-07-31 20:52:26 UTC MAIN commitmail json YAML

tests/lint: test symbol lookup in unnamed bit-field member declaration

(rillig)

2023-07-31 20:48:04 UTC MAIN commitmail json YAML

2023-07-31 20:31:58 UTC MAIN commitmail json YAML

lint: fix assertion failure after unnamed bit-field member

Since 2023-07-15.

(rillig)

2023-07-31 18:02:32 UTC netbsd-9 commitmail json YAML

Ammend ticket #1676 for additional modified files

(martin)

2023-07-31 17:59:23 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #264):

        sys/arch/alpha/include/asm.h: revision 1.45 (patch)
        (also applied to locore.s and multiproc.s)

alpha: Add missing barriers in cpu_switchto.
Details in comments.
(accidently missed in original commit for ticket #264)

(martin)

2023-07-31 17:41:18 UTC MAIN commitmail json YAML

2023-07-31 17:38:28 UTC MAIN commitmail json YAML

2023-07-31 17:35:31 UTC MAIN commitmail json YAML

we ended up importing 13.2

(christos)

2023-07-31 17:09:59 UTC MAIN commitmail json YAML

2023-07-31 17:02:10 UTC MAIN commitmail json YAML

2023-07-31 16:55:56 UTC netbsd-10 commitmail json YAML

2023-07-31 16:54:43 UTC netbsd-9 commitmail json YAML

2023-07-31 16:53:36 UTC netbsd-8 commitmail json YAML

2023-07-31 16:39:52 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #279):

sys/dev/spkr.c: revision 1.25

spkr(4): Avoid some overflow issues.

(martin)

2023-07-31 16:37:18 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #278):

sys/netatalk/ddp_output.c: revision 1.22
sys/compat/common/if_43.c: revision 1.27
sys/netatalk/ddp_input.c: revision 1.34
sys/netatalk/at_control.c: revision 1.43

atalk(4): Don't abuse queue(9) internals.

atalk(4): Omit spurious satosat.
The input is already a struct sockaddr_at pointer.

(martin)

2023-07-31 16:29:56 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1867):

sys/kern/uipc_domain.c: revision 1.109

sockaddr_alloc(9): Avoid uninitialized buffer in sockaddr_checklen.

Manifests only under DIAGNOSTIC because the DIAGNOSTIC check itself
uses an uninitialized buffer.

(martin)

2023-07-31 16:21:46 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1685):

sys/kern/uipc_domain.c: revision 1.109

sockaddr_alloc(9): Avoid uninitialized buffer in sockaddr_checklen.

Manifests only under DIAGNOSTIC because the DIAGNOSTIC check itself
uses an uninitialized buffer.

(martin)

2023-07-31 16:20:14 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #277):

sys/kern/uipc_domain.c: revision 1.109

sockaddr_alloc(9): Avoid uninitialized buffer in sockaddr_checklen.

Manifests only under DIAGNOSTIC because the DIAGNOSTIC check itself
uses an uninitialized buffer.

(martin)

2023-07-31 16:16:05 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1866):

sys/netatalk/at_control.c: revision 1.44

atalk(4): Don't let userland control sa_len when adding addresses.
- The struct sockaddr_at object accessed by at_ifinit always comes
  from an ioctl buffer that is adequately sized and fully initialized
  from userland memory.
- The newly created sockaddr_at object is later used with
  sockaddr_copy, which requires sa_len to be correctly initialized.
- sa_len is not generally required to be correctly initialized by
  userland in most entry points (with some exceptions, e.g. gif(4)
  configuration).

I don't know whether existing userland programs initialize sa_len
correctly; if they do, we can verify it matches sizeof(struct
sockaddr_at), but there's no need to copy sa_len then if it is
verified to be that fixed value.

(martin)

2023-07-31 16:14:52 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1684):

sys/netatalk/at_control.c: revision 1.44

atalk(4): Don't let userland control sa_len when adding addresses.
- The struct sockaddr_at object accessed by at_ifinit always comes
  from an ioctl buffer that is adequately sized and fully initialized
  from userland memory.
- The newly created sockaddr_at object is later used with
  sockaddr_copy, which requires sa_len to be correctly initialized.
- sa_len is not generally required to be correctly initialized by
  userland in most entry points (with some exceptions, e.g. gif(4)
  configuration).

I don't know whether existing userland programs initialize sa_len
correctly; if they do, we can verify it matches sizeof(struct
sockaddr_at), but there's no need to copy sa_len then if it is
verified to be that fixed value.

(martin)

2023-07-31 16:13:40 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #276):

sys/netatalk/at_control.c: revision 1.44

atalk(4): Don't let userland control sa_len when adding addresses.
- The struct sockaddr_at object accessed by at_ifinit always comes
  from an ioctl buffer that is adequately sized and fully initialized
  from userland memory.
- The newly created sockaddr_at object is later used with
  sockaddr_copy, which requires sa_len to be correctly initialized.
- sa_len is not generally required to be correctly initialized by
  userland in most entry points (with some exceptions, e.g. gif(4)
  configuration).

I don't know whether existing userland programs initialize sa_len
correctly; if they do, we can verify it matches sizeof(struct
sockaddr_at), but there's no need to copy sa_len then if it is
verified to be that fixed value.

(martin)

2023-07-31 16:10:27 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #275):

common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.24
common/lib/libc/arch/m68k/atomic/Makefile.inc: revision 1.16
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.16
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.15
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.9
common/lib/libc/atomic/atomic_is_lock_free.c: revision 1.1
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.9

libc: Define __atomic_is_lock_free.

Limited to architectures where it is actually needed by gcc for any
calls to stdatomic.h atomic_is_lock_free for now.

We should also add it to other architectures too, along with lockful
atomic r/m/w operations for sizes that can't be handled natively, but
that's a lot more work.  It is also necessary for -fno-inline-atomics
but we're missing a lot of other symbols for that too, to be fixed.

For now, this should enable the OpenSSL build to complete on these
architectures again after I reverted a local change.

(martin)

2023-07-31 16:09:01 UTC MAIN commitmail json YAML

Use proper variables for interface names in examples.

(tsutsui)

2023-07-31 16:02:32 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #274):

lib/libc/sys/mremap.2: revision 1.9

mremap(2): Note MAP_REMAPDUP bug.

(martin)

2023-07-31 15:57:43 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #273):

sys/kern/kern_entropy.c: revision 1.59
sbin/rndctl/rndctl.c: revision 1.41

entropy(9): Allow changing flags on all entropy sources at once.

Entropy sources should all have nonempty names, and this will enable
an operator to, for example, disable all but a specific entropy
source.

rndctl(8): Take omitted name/type as empty device name.

This can now be used to change flags for all sources at once.

(martin)

2023-07-31 15:54:14 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1683):

lib/libc/sys/mremap.2: revision 1.8

mremap(2): Fix example to use MAP_PRIVATE.

It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.

(martin)

2023-07-31 15:52:44 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #272):

lib/libc/sys/mremap.2: revision 1.8

mremap(2): Fix example to use MAP_PRIVATE.

It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.

(martin)

2023-07-31 15:50:36 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1865):

sys/fs/hfs/libhfs.h: revision 1.9
sys/fs/hfs/libhfs.c: revision 1.16
sys/fs/hfs/libhfs.c: revision 1.17

fs/hfs: Avoid buffer overrun in hfslib_reada_node_offsets.

fs/hfs: Avoid undefined pointer arith in hfslib_reada_node_offsets.

(martin)

2023-07-31 15:49:04 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1682):

sys/fs/hfs/libhfs.h: revision 1.9
sys/fs/hfs/libhfs.c: revision 1.16
sys/fs/hfs/libhfs.c: revision 1.17

fs/hfs: Avoid buffer overrun in hfslib_reada_node_offsets.

fs/hfs: Avoid undefined pointer arith in hfslib_reada_node_offsets.

(martin)

2023-07-31 15:47:20 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #271):

sys/fs/hfs/libhfs.h: revision 1.9
sys/fs/hfs/libhfs.c: revision 1.16
sys/fs/hfs/libhfs.c: revision 1.17

fs/hfs: Avoid buffer overrun in hfslib_reada_node_offsets.

fs/hfs: Avoid undefined pointer arith in hfslib_reada_node_offsets.

(martin)

2023-07-31 15:43:33 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #270):

sys/kern/kern_entropy.c: revision 1.58

random(4): Report number of bytes ready to read, not number of bits.

Only affects systems with the diagnostic and testing option
kern.entropy.depletion=1.

(martin)

2023-07-31 15:41:01 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1864):

sys/arch/xen/x86/hypervisor_machdep.c: revision 1.46 (patch)

xen/x86: Need kpreempt_disable/enable around curcpu() access.

This is called with `hardware' interrupts enabled (between sti and
cli), so presumably preemption is possible here.

(martin)

2023-07-31 15:39:24 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1681):

sys/arch/xen/x86/hypervisor_machdep.c: revision 1.46 (patch)

xen/x86: Need kpreempt_disable/enable around curcpu() access.

This is called with `hardware' interrupts enabled (between sti and
cli), so presumably preemption is possible here.

(martin)

2023-07-31 15:36:10 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #269):

sys/arch/xen/x86/hypervisor_machdep.c: revision 1.46

xen/x86: Need kpreempt_disable/enable around curcpu() access.

This is called with `hardware' interrupts enabled (between sti and
cli), so presumably preemption is possible here.

(martin)

2023-07-31 15:31:44 UTC netbsd-8 commitmail json YAML

Apply patch, requested by riastradh in ticket #1863, pulling up
the essential part of

sys/arch/xen/xen/if_xennet_xenbus.c 1.129

xennet(4): Add missing membar.

(martin)

2023-07-31 15:29:23 UTC netbsd-9 commitmail json YAML

Apply patch, requested by riastradh in ticket #1680, pulling up
the essential part of

sys/arch/xen/xen/if_xennet_xenbus.c 1.129

xennet(4): Add missing membar.

(martin)

2023-07-31 15:23:03 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #268):

sys/arch/xen/xenbus/xenbus_comms.c: revision 1.25
sys/arch/xen/xenbus/xenbus_comms.c: revision 1.26
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.110
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.111
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.112
sys/arch/xen/x86/cpu.c: revision 1.144
sys/arch/xen/x86/cpu.c: revision 1.145
sys/arch/xen/include/hypervisor.h: revision 1.56
sys/arch/xen/include/hypervisor.h: revision 1.57
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.102
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.103
sys/arch/xen/include/xenring.h: revision 1.7
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.109
sys/arch/xen/xen/xengnt.c: revision 1.40
sys/arch/xen/xen/xengnt.c: revision 1.41
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.129
sys/arch/xen/xen/xencons.c: revision 1.51
sys/arch/xen/xen/xencons.c: revision 1.52
sys/arch/xen/xen/xencons.c: revision 1.53
sys/arch/xen/xen/xbd_xenbus.c: revision 1.130 (patch)
sys/arch/xen/xen/xbd_xenbus.c: revision 1.131 (patch)

xen: Fix sense of xen_rmb/wmb to make sense.

Use membar_acquire and membar_release, not membar_consumer and
membar_producer, out of paranoia -- that better matches Linux's
rmb/wmb (at least for non-I/O loads and stores).

Proposed on port-xen:
https://mail-index.netbsd.org/port-xen/2022/07/13/msg010248.html

xen/x86/cpu.c: Membar audit.

I see no reason for store-before-load ordering here; as far as I'm
aware, evtchn_upcall_mask is only shared between a (v)CPU and its
(hypervisor) interrupts, not other (v)CPUs.

xennet(4): Membar audit.
- xennet_tx_complete: Other side owns rsp_prod, giving us responses
  to tx commands.  We own rsp_cons, recording which responess we've
  processed already.
  1. Other side initializes responses before advancing rsp_prod, so
    we must observe rsp_prod before trying to examine the responses.
    Hence load from rsp_prod must be followed by xen_rmb.
    (Can this just use atomic_load_acquire?)
  2. As soon as other side observes rsp_event, it may start to
    overwrite now-unused response slots, so we must finish using the
    response before advancing rsp_cons.  Hence we must issue xen_wmb
    before store to rsp_event.
    (Can this just use atomic_store_release?)
    (Should this use RING_FINAL_CHECK_FOR_RESPONSES?)
  3. When loop is done and we set rsp_event, we must ensure the other
    side has had a chance to see that we want more before we check
    whether there is more to consume; otherwise the other side might
    not bother to send us an interrupt.  Hence after setting
    rsp_event, we must issue xen_mb (store-before-load) before
    re-checking rsp_prod.
- xennet_handler (rx): Same deal, except the xen_mb is buried in
  RING_FINAL_CHECK_FOR_RESPONSES.  Unclear why xennet_tx_complete has
  this open-coded while xennet_handler (rx) uses the macro.

xbd(4): Membar audit.
After consuming slots, must issue xen_wmb before notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_RESPONSES.
xbdback(4): Membar audit.

After consuming request slots, must issue xen_wmb notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_REQUESTS.

xencons(4): Membar audit.
- xenconscn_getc: Once we have consumed an input slot, it is clearer
  to issue xen_wmb (release, i.e., load/store-before-store) before
  advancing in_cons so that the update becomes a store-release
  freeing the input slot for the other side to reuse.
- xenconscn_putc: After filling an output slot, must issue xen_wmb
  (release, i.e., load/store-before-store) before advancing out_prod,
  and another one before notifying the other side of the advance.

xencons(4): Reduce unnecessary membars.
- xencons_handler: After advancing in_cons, only need one xen_wmb
  before notifying the hypervisor that we're ready for more.
  (XXX Should this do xen_mb and re-check in_prod at that point, or
  does hypervisor_notify_via_evtchn obviate the need for this?)
- xenvonscn_getc: After reading in_prod, only need one xen_rmb before
  using the slots it is telling us are now ready.

xengnt(4): Membar audit.
This had the sense of membars reversed, presumably because xen_rmb
and xen_wmb had gotten reversed at some point.
xenbus_comms.c: Membar audit.

This had the sense of membars reversed, presumably because xen_rmb
and xen_wmb had gotten reversed at some point.

xennetback(4): Fix xennetback_evthandler loop.
- After observing the other side has produced pending tx requests by
  reading sring->req_prod, must issue xen_rmb before touching them.
  Despite all the effort to use the heavy-weight
  RING_FINAL_CHECK_FOR_REQUESTS on each request in the loop, this
  barrier was missing.
- No need to update req_cons at each iteration in the loop.  It's
  private.  Just update it once at the end.
- After consuming requests, must issue xen_wmb before releasing the
  slots with RING_FINAL_CHECK_FOR_REQUEST for the other side to
  reuse.

xennetback(4): Fix membars in xennetback_rx_copy_process.
- No need for barrier around touching req_cons and rsp_prod_pvt,
  which are private.
- RING_PUSH_RESPONSES_AND_CHECK_NOTIFY already issues xen_wmb, no
  need to add one explicitly.
- After pushing responses, must issue xen_wmb (not xen_rmb) before
  hypervisor_notify_via_evtchn.

xennetback(4): Omit needless membars in xennetback_connect.
xneti is a private data structure to which we have exclusive access
here; ordering the stores doesn't make sense.

xen/hypervisor.h: Nix trailing whitespace.
No functional change intended.

xen/x86/cpu.c: Nix trailing whitespace.
No functional change intended.

xbd(4): Nix trailing whitespace.

xbdback(4): Nix trailing whitespace.
No functional change intended.

xencons(4): Nix trailing whitespace.
No functional change intended.

xengnt(4): Nix trailing whitespace.
No functional change intended.

xenbus_comms.c: Nix trailing whitespace.
No functional change intended.

xennetback(4): Nix trailing whitespace.
No functional change intended.

(martin)

2023-07-31 14:59:25 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1862):

sys/arch/xen/x86/xen_intr.c: revision 1.31 (patch)
sys/arch/xen/include/xen.h (apply patch)

xen_intr.c: Use kpreempt_disable/enable around access to curcpu().

curcpu() is not otherwise guaranteed to be stable at these points.

While here, nix nonsensical membars.  This need only be synchronized
with interrupts on the same CPU.

Proposed on port-xen:
https://mail-index.netbsd.org/port-xen/2022/07/13/msg010250.html

(martin)

2023-07-31 14:56:20 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1679):

sys/arch/xen/x86/xen_intr.c: revision 1.31

xen_intr.c: Use kpreempt_disable/enable around access to curcpu().

curcpu() is not otherwise guaranteed to be stable at these points.

While here, nix nonsensical membars.  This need only be synchronized
with interrupts on the same CPU.

Proposed on port-xen:
https://mail-index.netbsd.org/port-xen/2022/07/13/msg010250.html

(martin)

2023-07-31 14:54:21 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #267):

sys/arch/xen/x86/xen_intr.c: revision 1.31

xen_intr.c: Use kpreempt_disable/enable around access to curcpu().

curcpu() is not otherwise guaranteed to be stable at these points.

While here, nix nonsensical membars.  This need only be synchronized
with interrupts on the same CPU.

Proposed on port-xen:
https://mail-index.netbsd.org/port-xen/2022/07/13/msg010250.html

(martin)

2023-07-31 14:49:37 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1861):

sys/kern/kern_rwlock.c: revision 1.68 (patch)

rwlock(9): Fix membars.

rw_downgrade must be a release operation, and rw_tryupgrade must be
an acquire operation.  membar_producer is not enough -- need to use
membar_release and membar_acquire.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/22/msg028726.html

(martin)

2023-07-31 14:48:07 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1678):

sys/kern/kern_rwlock.c: revision 1.68 (patch)

rwlock(9): Fix membars.

rw_downgrade must be a release operation, and rw_tryupgrade must be
an acquire operation.  membar_producer is not enough -- need to use
membar_release and membar_acquire.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/22/msg028726.html

(martin)

2023-07-31 14:45:59 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #266):

sys/kern/kern_rwlock.c: revision 1.68

rwlock(9): Fix membars.

rw_downgrade must be a release operation, and rw_tryupgrade must be
an acquire operation.  membar_producer is not enough -- need to use
membar_release and membar_acquire.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/22/msg028726.html

(martin)

2023-07-31 14:42:46 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1860):

sys/kern/kern_rwlock.c: revision 1.67
sys/kern/kern_lock.c: revision 1.182
sys/kern/kern_mutex.c: revision 1.102
(all via patch)

Sprinkle __predict_{true,false} for panicstr checks

(martin)

2023-07-31 14:40:04 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1677):

sys/kern/kern_rwlock.c: revision 1.67
sys/kern/kern_lock.c: revision 1.182
sys/kern/kern_mutex.c: revision 1.102

Sprinkle __predict_{true,false} for panicstr checks

(martin)

2023-07-31 14:38:25 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #265):

sys/kern/kern_rwlock.c: revision 1.67
sys/kern/kern_lock.c: revision 1.182
sys/kern/kern_mutex.c: revision 1.102

Sprinkle __predict_{true,false} for panicstr checks

(martin)

2023-07-31 14:26:26 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1859):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
(applied also to sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/cortex_init.S)
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/alpha/include/asm.h: revision 1.45
(applied to sys/arch/alpha/alpha/multiproc.s)
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.

(martin)

2023-07-31 13:56:15 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1859):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
(applied also to sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/cortex_init.S)
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/alpha/include/asm.h: revision 1.45
(applied to sys/arch/alpha/alpha/multiproc.s)
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.

(martin)

2023-07-31 13:44:17 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1676):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.

(martin)

2023-07-31 13:36:32 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #264):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/riscv/riscv/cpu_switch.S: revision 1.3
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

riscv: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.

(martin)

2023-07-31 11:24:33 UTC MAIN commitmail json YAML

ahcisata: ASM106x needs EXTRA_DELAY quirk

(tnn)

2023-07-31 11:20:33 UTC MAIN commitmail json YAML

2023-07-31 11:18:20 UTC MAIN commitmail json YAML

pcidevs: add ASMedia ASM106x

(tnn)

2023-07-31 10:09:44 UTC MAIN commitmail json YAML

some updates:
- most platforms native-gcc works
- some platforms libgcc works
- amd64 kernels work
- i386 kernels build
- add info about libsanitizer re-port (all no.)

(mrg)

2023-07-31 10:07:42 UTC MAIN commitmail json YAML

src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64/backtrace-supported.h@1.6 / diff / nxr@1.6
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64/config.h@1.4 / diff / nxr@1.4
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64eb/backtrace-supported.h@1.4 / diff / nxr@1.4
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64eb/config.h@1.3 / diff / nxr@1.3
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha/backtrace-supported.h@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha/config.h@1.6 / diff / nxr@1.6
src/external/gpl3/gcc/lib/libbacktrace/arch/earm/backtrace-supported.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libbacktrace/arch/earm/config.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb/backtrace-supported.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb/config.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf/backtrace-supported.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf/config.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb/backtrace-supported.h@1.10 / diff / nxr@1.10
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb/config.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6/backtrace-supported.h@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6/config.h@1.6 / diff / nxr@1.6
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb/backtrace-supported.h@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb/config.h@1.6 / diff / nxr@1.6
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf/backtrace-supported.h@1.9 / diff / nxr@1.9
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf/config.h@1.6 / diff / nxr@1.6
      :
(more 758 files)
mknative-gcc for GCC 12.3.0 on arm64*, arm* besides armv4, ppc, alpha,
sh, sparc*, mips*, riscv*, vax, hppa, ia64, and m68*.

earmv4 didn't start properly, and powerpc64 failed to build, but all
the rest seem to be OK now.

(mrg)

2023-07-31 05:36:41 UTC MAIN commitmail json YAML

web2: restore snit, accidentally lost in -r1.49

(dholland)