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 (1h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 05:15:26 UTC Now

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

2023-08-09 09:57:35 UTC MAIN commitmail json YAML

Simplify descriptions of Snow Ridge internal Ethernet devices.

(msaitoh)

2023-08-09 09:36:26 UTC MAIN commitmail json YAML

viadrmums(4): build legacy VIA DRM UMS driver module for amd64.

This driver is not built-in by default, thus loadable module can help (un)lucky
owners of 64-bit capable VIA (Nano/Eden) systems or early AMD/Intel systems
with some VIA chipsets, which include VIA integrated graphics.
I also boldly added product IDs for few later models from VX8xx/VX9xx chipsets
without 3D support (DX9_0) to "expand" the driver support to more systems.
Tested successfully basic functionality on VX800, and partially successfully
on VX900 (on VX900 Xorg failed to initialize due to openchrome related issues,
viadrmums attaches and it is by used the driver).
Didn't test on VX855, I don't have one.

Pull up to netbsd-10 is needed.

(andvar)

2023-08-09 08:38:57 UTC MAIN commitmail json YAML

xvif(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.

(riastradh)

2023-08-09 08:38:47 UTC MAIN commitmail json YAML

xvif(4): Omit needless 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 updates the shared req_prod and
  then issues xen_mb, which is all that we need between the update of
  shared req_prod and hypervisor_notify_via_evtchn.

  (Between updating the shared req_prod and issuing
  hypervisor_notify_via_evtchn, only xen_wmb is needed.  But after
  writing to the shared req_prod, RING_PUSH_REQUESTS_AND_CHECK_NOTIFY
  must also read from the shared rsp_event, which requires the
  store-before-load ordering that only xen_mb provides.)

(riastradh)

2023-08-09 08:38:37 UTC MAIN commitmail json YAML

xvif(4): Simplify while loop in xennetback_evthandler.

No functional change intended.

(riastradh)

2023-08-09 08:38:27 UTC MAIN commitmail json YAML

xvif(4): Omit needless membars in xennetback_evthandler.

This should improve throughput without any impact on correctness.

(riastradh)

2023-08-09 08:38:16 UTC MAIN commitmail json YAML

xvif(4): Move expensive xen_mb out of xennetback_evthandler loop.

Use the cheaper RING_HAS_UNCONFIRMED_REQUESTS for most of the loop.

This should improve throughput without any impact on correctness.

(riastradh)

2023-08-09 08:38:05 UTC MAIN commitmail json YAML

xvif(4): Omit local variable aliasing xneti->xni_txring.req_cons.

No functional change intended.

(riastradh)

2023-08-09 08:37:55 UTC MAIN commitmail json YAML

xvif(4): Add missing xen_rmb in xennetback_evthandler.

(riastradh)

2023-08-09 08:37:44 UTC MAIN commitmail json YAML

xvif(4): Comment on memory barriers in xennetback_evthandler.

Note which ones appear unnecessary and which ones appear too strong,
but don't change them.

No functional change intended.

(riastradh)

2023-08-09 08:24:18 UTC MAIN commitmail json YAML

workqueue(9): Factor out wq->wq_flags & WQ_FPU in workqueue_worker.

No functional change intended.  Makes it clearer that s is
initialized when used.

(riastradh)

2023-08-09 08:24:08 UTC MAIN commitmail json YAML

workqueue(9): Sort includes.

No functional change intended.

(riastradh)

2023-08-09 08:23:45 UTC MAIN commitmail json YAML

workqueue(9): Avoid unnecessary mutex_exit/enter cycle each loop.

(riastradh)

2023-08-09 08:23:35 UTC MAIN commitmail json YAML

workqueue(9): Stop violating queue(3) internals.

(riastradh)

2023-08-09 08:23:25 UTC MAIN commitmail json YAML

workqueue(9): Sprinkle dtrace probes for workqueue_wait edge cases.

Let's make it easy to find out whether these are hit.

(riastradh)

2023-08-09 08:23:13 UTC MAIN commitmail json YAML

workqueue(9): Avoid touching running work items in workqueue_wait.

As soon as the workqueue function has called, it is forbidden to
touch the struct work passed to it -- the function might free or
reuse the data structure it is embedded in.

So workqueue_wait is forbidden to search the queue for the batch of
running work items.  Instead, use a generation number which is odd
while the thread is processing a batch of work and even when not.

There's still a small optimization available with the struct work
pointer to wait for: if we find the work item in one of the per-CPU
_pending_ queues, then after we wait for a batch of work to complete
on that CPU, we don't need to wait for work on any other CPUs.

PR kern/57574

XXX pullup-10
XXX pullup-9
XXX pullup-8

(riastradh)

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

2023-08-09 08:22:53 UTC MAIN commitmail json YAML

workqueue(9) tests: Destroy struct work immediately on entry.

(riastradh)

2023-08-09 08:22:43 UTC MAIN commitmail json YAML

workqueue(9) tests: Nix trailing whitespace.

(riastradh)

2023-08-09 08:22:33 UTC MAIN commitmail json YAML

tests/rump/rumpkern: Use PROGDPLIBS, not explicit -L/-l.

This way we relink the t_* test programs whenever changes under
tests/rump/kernspace change libkernspace.a.

(riastradh)

2023-08-09 07:37:24 UTC MAIN commitmail json YAML

sqlite3/lib/Makefile: -Wno-error=restrict is a gccism.

Let's try to get at least one working clang autobuild this summer,
shall we?

(riastradh)

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

libc/resolv/res_debug.c: Minor whitespace fixes.

(riastradh)

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

2023-08-09 03:14:53 UTC MAIN commitmail json YAML

Add some Intel Xeon D-2100 devices. Fix description of Intel 0x37d0.

(msaitoh)

2023-08-08 20:15:11 UTC MAIN commitmail json YAML

lint: in -a mode, do not warn about integer conversions from 'int'

Since tree.c 1.552 from 2023-07-08, lint warned about integer
conversions from 'int' or 'unsigned int' to smaller integer types.  This
only affected 32-bit platforms where size_t is 'unsigned int' rather
than 'unsigned long', as on these platforms, the integer ranks of 'int'
and 'long' are the same, see INT_RANK in inittyp.c.

Discovered by lib/libkvm, which fails on i386 when lint generates any
warnings.

(rillig)

2023-08-08 19:57:23 UTC MAIN commitmail json YAML

tests/lint: test integer conversions on ilp32 int platforms

(rillig)

2023-08-08 17:31:13 UTC MAIN commitmail json YAML

Avoid adding another member to the softc and use sc_flags instead.

NFCI.

(nat)

2023-08-08 16:32:39 UTC MAIN commitmail json YAML

Add a flag for output only devices and attachments.

It is necessary to skip the test for the device as output only attached
devices lack the ability for the device to be probed - such as the 1602 lcd
module.

(nat)

2023-08-08 16:29:00 UTC MAIN commitmail json YAML

2023-08-08 16:10:42 UTC MAIN commitmail json YAML

The analysis documented in PR misc/56990 is correct.
Fix by not returning when encountering a ruleset rule.

The code up to now would stop at any group rule.

ruleset rules are marked as group rule and a dynamic rule.

processing is only finished when a result is present AND
we are looking at a plain group rule.

(kardel)

2023-08-08 14:38:44 UTC MAIN commitmail json YAML

2023-08-08 14:34:21 UTC MAIN commitmail json YAML

2023-08-08 11:53:47 UTC MAIN commitmail json YAML

traceroute/Makefile: Nix trailing whitespace.

(riastradh)

2023-08-08 11:50:22 UTC MAIN commitmail json YAML

gcc/README.warnings: Nix trailing whitespace.

(riastradh)

2023-08-08 10:36:17 UTC MAIN commitmail json YAML

t_cdb: No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.

(riastradh)

2023-08-08 10:36:04 UTC MAIN commitmail json YAML

libnpf(3): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.

(riastradh)

2023-08-08 10:35:48 UTC MAIN commitmail json YAML

npftest(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.

(riastradh)

2023-08-08 10:35:38 UTC MAIN commitmail json YAML

dev_mkdb(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.

(riastradh)

2023-08-08 10:35:21 UTC MAIN commitmail json YAML

services_mkdb(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.

(riastradh)

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

cdbw(3): Make cdbw_output descr parameter type less confusing.

This is a string of _up to_ 16 bytes, used with strncpy(..., 16).
Specifying `const char descr[16]', while formally equivalent to
`const char *descr' in standard C, now provokes the ire of gcc when
the caller does not provide a buffer of at least 16 bytes.

(riastradh)

2023-08-08 06:59:41 UTC MAIN commitmail json YAML

nix the NetBSD specific GEM_BUG_ON().

avoids GCC 12 warnings, and matches upstream closer.

(mrg)

2023-08-08 06:58:20 UTC MAIN commitmail json YAML

comment a function that has a clear overbounds read but it isn't used.

found by GCC 12.

(mrg)

2023-08-08 06:57:20 UTC MAIN commitmail json YAML

ensure all data passed to copyout() has been initialised.

found by GCC 12.

(mrg)

2023-08-08 06:42:16 UTC MAIN commitmail json YAML

update sparc asan issue with details.

(mrg)

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

use standard strncpy() idiom to completely zero a buffer, including
explicitly nul the final char.

found by GCC 12.

(mrg)

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

avoid uninitialised variable accesses.

if __kernel_rem_pio2() or __kernel_rem_pio2f() are called with "nx" less
than 2, the local variable fq[0] may be accessed uninitialised.

__kernel_rem_pio2() has direct calls with nx = 1, and __kernel_rem_pio2f()
is called with a value starting at 3, but may be decreased to less than 2,
implied by this code , if not actually avoided by the tx[] setup above:
nx = 3;
while(tx[nx-1]==zero) nx--;    /* skip zero term */
n  =  __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);

found by GCC 12.

(mrg)

2023-08-08 06:27:33 UTC MAIN commitmail json YAML

introduce new GCC 12 warning disables and use them in a few places

this introduces 4 new warning disable flags:

  CC_WNO_MISSING_TEMPLATE_KEYWORD
  CC_WNO_REGISTER
  CC_WNO_STRINGOP_OVERREAD
  CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.

(mrg)

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

lists: Fix build with MKGCCCMDS=no && MKDEBUGLIB=yes

(rin)

2023-08-08 05:20:14 UTC MAIN commitmail json YAML

fix array vs pointer function declaration.

also, in some callers, and make sure to provide all the accessed
backing for a string array.

found by GCC 12.

(mrg)

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

put amd64 back to GDB 11.  it doesn't build for me, or others.

the first problem is that this rule:

GDBvn.texi: ${DIST}/gdb/version.in
echo "@set GDBVN $$(${TOOL_CAT} ${.ALLSRC})" > ${.TARGET}

conflicts with the "GDBvn.texi" in the source tree and fail to write
this file with r/o source trees.

the second problem is that gdbserver fails to link because it compiles
the wrong file to create target.o.  this seems like a very bad make or
bsd.*.mk bug -- "SRCS= .. target.cc ...", and yet, make manages to
compile the file "target.c" to create target.o, and then the required
symbols the rest of gdbserver needs are missing.

the third problem is that when you make it build the right target.cc,
it wants bfd.h, and gmp.h, and even after solving those issues, i'm
still getting a fourth issue linking gdbserver and thus reverting.

(mrg)

2023-08-08 02:09:43 UTC MAIN commitmail json YAML

libm: Add fma(3) and friends to m68k

(rin)

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

remove always-true part of condition.

found by GCC 12.

(mrg)

2023-08-07 23:29:58 UTC MAIN commitmail json YAML

avoid uninitialised variable.

found by GCC 12.

(mrg)

2023-08-07 23:29:23 UTC MAIN commitmail json YAML

fix mis-matched function prototype and definitions.

found by GCC 12.

(mrg)

2023-08-07 23:28:58 UTC MAIN commitmail json YAML

2023-08-07 23:27:07 UTC MAIN commitmail json YAML

fix potentially uninitialised data being used.

found by GCC 12.

(mrg)

2023-08-07 23:26:40 UTC MAIN commitmail json YAML

fix always true conditional by removing the address-of operator.

found by GCC 12.

(mrg)

2023-08-07 22:30:39 UTC MAIN commitmail json YAML

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

rpcgen: don't pass length of source to string copy operation

Altough the prior code can't fail, GCC complains about the practice.

(tnn)

2023-08-07 20:35:21 UTC MAIN commitmail json YAML

makemakedb: don't return uninitialized token length if stemming fails

(tnn)

2023-08-07 20:21:08 UTC MAIN commitmail json YAML

services_mkdb: pad argument to cdbw_output(3) to match it's prototype

(tnn)

2023-08-07 19:11:25 UTC MAIN commitmail json YAML

tail: adjust misleading indentation in macro. NFC.

(tnn)

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

style(5): Advise against new struct typedefs and explain why.

Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/07/11/msg028950.html

Positive feedback to general concept, negative feedback to specifics
and phrasing of the first iteration but no objections to latest
iteration after several weeks at:
https://mail-index.netbsd.org/tech-kern/2023/07/16/msg028994.html

(riastradh)

2023-08-07 16:52:53 UTC MAIN commitmail json YAML

Prevent us from using the phony_iconv_open(). Our iconv_open does not take
"wchar_t" as an argument, so define __STDC_ISO_10646__

(christos)

2023-08-07 16:51:40 UTC MAIN commitmail json YAML

2023-08-07 16:51:24 UTC MAIN commitmail json YAML

2023-08-07 16:35:06 UTC MAIN commitmail json YAML

radeon: Suspend ioctls while device is suspended.

XXX pullup-10

(riastradh)

2023-08-07 16:34:57 UTC MAIN commitmail json YAML

nouveau: Suspend ioctls while device is suspended.

XXX pullup-10

(riastradh)

2023-08-07 16:34:47 UTC MAIN commitmail json YAML

amdgpu: Suspend ioctls while device is suspended.

XXX pullup-10

(riastradh)

2023-08-07 16:14:32 UTC MAIN commitmail json YAML

distrib/sets/lists: Fix libtsan entries.

- No obsolete .so.N or .so.N.M entries.
- libtsan.so for gcc.
- libtsan.so.1* for gcc=10.
- libtsan.so.2* for gcc=12.
- No libtsan.so.1* on aarch64, libtsan on aarch64 is new in gcc12.

(riastradh)

2023-08-07 14:30:48 UTC MAIN commitmail json YAML

2023-08-07 13:31:54 UTC MAIN commitmail json YAML

netbt(4): Initialize bt_lock earlier.

Use a driver-class module modcmd init function, instead of a socket
domain init function; the socket-domain ones don't run until after
configure, but we need this to be initialized before configure so
that Bluetooth HCI drivers like ubt(4) can use it.

This is suboptimal but it's the least intrusive way I've thought of
to get this working, even if it's a little grody to make netbt a
`driver-class' (builtin) module.  Note that this doesn't mean netbt
becomes dynamically loadable or unloadable; we're just using a module
for initialization ordering.

PR kern/56988

XXX pullup-10

(riastradh)

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

sys/lwp.h: Slightly more paranoia re curlwp in PR port-evbarm/57564.

(riastradh)

2023-08-07 09:41:56 UTC MAIN commitmail json YAML

sys/lwp.h: KASSERT -> KASSERTMSG

Might help diagnose PR port-evbarm/57564.

(riastradh)

2023-08-07 09:27:14 UTC MAIN commitmail json YAML

Update /proc/cpuinfo.

- Move "ssbd" to an unused Linux mapping.
- Update unused Linux mappings.

(msaitoh)

2023-08-07 08:54:40 UTC MAIN commitmail json YAML

libm: Add dummy remainderl and remquol.

These are pretty bad -- these aren't transcendental functions; not
rocket science to make them correctly rounded -- but let's just make
sure they're available in libm for netbsd-10.

XXX pullup-10

(riastradh)

2023-08-07 06:27:38 UTC MAIN commitmail json YAML

rnd(4): Document `entropy: best effort' in random(4).

(riastradh)

2023-08-07 06:24:35 UTC MAIN commitmail json YAML

ichsmb(4),ismt(4): Add Snow Ridge support.

(msaitoh)

2023-08-07 06:23:40 UTC MAIN commitmail json YAML

Fix detection of availability of MSI/MSI-X on some systems.

Try to find all functions on bus 0, device 0 to find a PCI host bridge.
Some CPU's host bridge is at 0:0.4. Tested by Intel Snow Ridge.

(msaitoh)

2023-08-07 01:14:19 UTC MAIN commitmail json YAML

sys/crypto: aarch64: Catch up with builtin rename for GCC12

Kernel self tests successfully pass for aarch64{,eb}.

Same binary generated by GCC10 and GCC12 for:
---
#include <sys/types.h>
#include "arm_neon.h"

uint32x4_t my_vshrq_n_u32(uint32x4_t v, uint8_t bits)
{
return vshrq_n_u32(v, bits);
}

uint8x16_t my_vshrq_n_u8(uint8x16_t v, uint8_t bits)
{
return vshrq_n_u8(v, bits);
}
---

(rin)

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

2023-08-07 00:58:35 UTC MAIN commitmail json YAML

sys/crypto/{aes,chacha}/arch/arm/arm_neon.h: Sync (whitespace fix)

No binary changes.

(rin)

2023-08-07 00:54:54 UTC MAIN commitmail json YAML

t_asan_global_buffer_overflow: Avoid ODR Violation for pic variants

Common symbol triggers ODR (One Definition Rule) Violation correctly,
instead of Global Buffer Overflow.

XXX
Add test for odr_violation.

(rin)

2023-08-07 00:47:29 UTC MAIN commitmail json YAML

lists/m68k: Obsolete gcc-9 headers

(rin)

2023-08-07 00:45:47 UTC MAIN commitmail json YAML

lists/aarch64: Obsolete gcc-9 headers

(rin)

2023-08-07 00:44:25 UTC MAIN commitmail json YAML

openssh: channel_new(): Appease GCC12 -Wmaybe-uninitialized for some archs

IIUC, ``found'' is always initialized. Seems like GCC bug.

(rin)

2023-08-07 00:35:50 UTC MAIN commitmail json YAML

README.gcc12: Updated aarch64, arm, i386, m68k, powerpc, and sh3

aarch64{,eb}:
- Everything (without x11 yet) works just fine, except for libtsan
  (not a regression, this is newly introduced to aarch64 for GCC12).

earmv5{,eb}:
- As far as I can see, everything (nox11) seems OK.
- Full ATF is on-going.

earmv[67]hf{,eb}:
- Everything (nox11) works just fine.

i386:
- lib*san requires 64-bit atomic ops. If they are built with -march=i586,
  all tests in ATF pass. Alternatively, we can probably use 32-bit atomic
  variables instead, with some restrictions (now examining).
- New kernel freeze observed during full ATF run.

m68k:
- Another -fstack-protector breakage.
- Full ATF is on-going for amiga.

powerpc:
- Kernel is just working for all subarchs: oea, booke, ibm4xx (405 and
  strictly-alignment 403).

sh3el:
- Kernel is broken [20]. Seems like regressions for function inlining;
  see also [8] for userland. But, -fno-inline does not work unfortunately...

(rin)

2023-08-06 20:44:49 UTC MAIN commitmail json YAML

switch gdb to 13.20 for x86_64

(christos)

2023-08-06 20:39:07 UTC MAIN commitmail json YAML

2023-08-06 20:33:39 UTC MAIN commitmail json YAML

2023-08-06 20:32:41 UTC MAIN commitmail json YAML

2023-08-06 20:28:26 UTC MAIN commitmail json YAML

2023-08-06 20:27:15 UTC MAIN commitmail json YAML

2023-08-06 20:26:26 UTC MAIN commitmail json YAML

Don't try to switch to thread on signals generated by the shell.

(christos)

2023-08-06 20:25:30 UTC MAIN commitmail json YAML

2023-08-06 20:24:54 UTC MAIN commitmail json YAML

- simplify by using PROGDPLIBS
- need --Whole-archive for libgdb to attach modula2, otherwise the file
  does not end up in the list of dependencies from .a archive.

(christos)

2023-08-06 19:44:50 UTC MAIN commitmail json YAML

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

tests/lint: document how much of C99 lint already implements

(rillig)

2023-08-06 17:50:20 UTC MAIN commitmail json YAML

xcall(9): Rename condvars to be less confusing.

The `cv' suffix is not helpful and `xclocv' looks like some kind of
clock at first glance.  Just say `xclow' and `xchigh'.

(riastradh)

2023-08-06 16:07:53 UTC MAIN commitmail json YAML

xen/x86: Get the right intrframe pointer in ddb ipi.

This was broken with the transition from evtchn_set_handler to
intr_establish_xname in 2017, remained broken with the transition
from intr_establish_xname to xen_intr_establish_xname in 2018, and
still remained broken when xen_intr_establish_xname was changed back
to evtchn_set_handler in 2020.

The mechanism is grody -- instead of a secret second argument to the
interrupt handler, the intrframe pointer should be replaced by a
struct cpu_info member that is saved and restored by the interrupt
handler calling logic.  But we should make sure the replacement
actually works first -- which is not trivial in part because the
users are hidden behind sketchy function pointer casts.

With any luck, this will make `mach cpu N' work in ddb on Xen.

XXX pullup-10
XXX pullup-9 (by patch)

(riastradh)

2023-08-05 23:52:43 UTC MAIN commitmail json YAML

note sparc & sparc64 seem to work fine except for sanitizers.

(mrg)

2023-08-05 20:24:10 UTC MAIN commitmail json YAML

2023-08-05 20:23:41 UTC MAIN commitmail json YAML

fix duplicate definition.

(andvar)

2023-08-05 20:09:14 UTC MAIN commitmail json YAML

2023-08-05 20:08:04 UTC MAIN commitmail json YAML

Add device ids of the VX800 chipset and s3 chrome 500 series GPU.
Descriptions mainly aligned with VX800/820 Series System Programming Manual.

(andvar)

2023-08-05 14:38:43 UTC MAIN commitmail json YAML

2023-08-05 13:29:57 UTC MAIN commitmail json YAML

tests/crypto/opencrypto: test_asymfeat requires privileges.

(riastradh)

2023-08-05 13:25:26 UTC MAIN commitmail json YAML

tests/net/inpcb: Tests require root.

(riastradh)

2023-08-05 13:22:49 UTC MAIN commitmail json YAML

tests/net/net/t_bind: IP_BINDANY and IPV6_BINDANY require root.

(riastradh)

2023-08-05 13:13:37 UTC MAIN commitmail json YAML

tests/lib/librumphijack: Avoid trying to run rpcbind as non-root.

Can probably make this work through rumphijack, but there's no sense
in even trying the test if we can't, so let's reduce the unprivileged
false alarms.

(riastradh)

2023-08-05 13:05:14 UTC MAIN commitmail json YAML

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

t_nullmnt: Need privileges for mount.

(unless vfs.generic.usermount=1 but let's keep it simple)

(riastradh)

2023-08-05 12:11:05 UTC MAIN commitmail json YAML

tests/include/t_paths: Test all paths, nonfatally.

This way a single failure doesn't suppress failure reports for all
the other paths to test.

Omit some needless blank lines while here.

(riastradh)

2023-08-05 11:59:09 UTC MAIN commitmail json YAML

tests/include/t_paths: /dev/ksyms requires root.

(riastradh)

2023-08-05 11:51:48 UTC MAIN commitmail json YAML

Revert "rump: Set mp_online = true and start threads _after_ cold = 0."

This breaks some tests, e.g. dev/scsipi/t_cd:noisyeject, which relies
on config_finalize to wait for driver threads.  Trouble is, the
actual setting of cold=0 happens near the call to config_finalize in
RUMP__FACTION_DEV.  Need to think harder about this.

(riastradh)

2023-08-05 11:39:18 UTC MAIN commitmail json YAML

cprng_fast(9): Drop and retake percpu reference across cprng_strong.

cprng_strong may sleep on an adaptive lock (via entropy_extract),
which invalidates percpu(9) references.

Discovered by stumbling upon this panic in a test run:

panic: kernel diagnostic assertion "(cprng == percpu_getref(cprng_fast_percpu)) && (percpu_putref(cprng_fast_percpu), true)" failed: file "/home/riastradh/netbsd/current/src/sys/rump/librump/rumpkern/../../../crypto/cprng_fast/cprng_fast.c", line 117

XXX pullup-10

(riastradh)

2023-08-05 11:21:24 UTC MAIN commitmail json YAML

cprng(9): Drop and retake percpu reference across entropy_extract.

entropy_extract may sleep on an adaptive lock, which invalidates
percpu(9) references.

Add a note in the comment over entropy_extract about this.

Discovered by stumbling upon this panic during a test run:

[  1.0200050] panic: kernel diagnostic assertion "(cprng == percpu_getref(cprng_fast_percpu)) && (percpu_putref(cprng_fast_percpu), true)" failed: file "/home/riastradh/netbsd/current/src/sys/rump/librump/rumpkern/../../../crypto/cprng_fast/cprng_fast.c", line 117

XXX pullup-10

(riastradh)

2023-08-05 10:13:39 UTC MAIN commitmail json YAML

lint: implement __builtin_offsetof for the simplest cases

Cases not covered:
1. C99 allows designators in the offsetof macro.
2. For packed types, the offset is likely to be incorrect.

(rillig)

2023-08-05 10:00:59 UTC MAIN commitmail json YAML

tests/lint: fix test for packed structs on 32-bit platforms

(rillig)

2023-08-05 09:44:18 UTC MAIN commitmail json YAML

tests/lint: test C99 printf conversion specifiers in lint2

(rillig)

2023-08-05 09:25:39 UTC MAIN commitmail json YAML

s/acccept/accept/ in comment.

(andvar)

2023-08-05 08:55:48 UTC MAIN commitmail json YAML

base/md.amd64, base/md.sparc64: Mark openssl compat directories.

Should fix MKCOMPAT=no build.

PR port-amd64/57567

(riastradh)

2023-08-05 08:15:41 UTC MAIN commitmail json YAML

comp/mi: /usr/include/g++/bit is gcc-only, not for clang (or pcc)

(riastradh)

2023-08-05 08:05:58 UTC MAIN commitmail json YAML

rump: Set mp_online = true and start threads _after_ cold = 0.

Otherwise we may have threads running while cold, which is a
contradiction in terms.

Deferring mp_online = true is necessary because things like xcall(9)
use rely on it to decide whether to wait for threads on other CPUs.

(riastradh)

2023-08-05 08:05:16 UTC MAIN commitmail json YAML

memfd(2): Run all tests; don't stop after the first failure.

(riastradh)

2023-08-05 03:13:57 UTC MAIN commitmail json YAML

revert debug data for libtsan to previous version, too.

XXX Perhaps this should be done by obsoleting the 2.0 file?  For now
XXX this will require manual cleaning of the no-longer-used 2.0 file.

(pgoyette)

2023-08-04 20:56:08 UTC MAIN commitmail json YAML

t_ubsan, t_ubsanxx: Remove gcc=10, gcc=12 conditionals.

These are built unconditionally.  Should help fix the clang build.

(riastradh)

2023-08-04 19:55:08 UTC netbsd-10 commitmail json YAML

2023-08-04 19:53:43 UTC netbsd-10 commitmail json YAML

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

sys/arch/xen/xen/xennetback_xenbus.c: revision 1.113
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.114
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.115

Revert "xennetback(4): Omit needless membars in xennetback_connect."
PR kern/57560

Revert "xennetback(4): Fix membars in xennetback_rx_copy_process."
PR kern/57560

Revert "xennetback(4): Fix xennetback_evthandler loop."
PR kern/57560

(martin)

2023-08-04 19:51:59 UTC netbsd-9 commitmail json YAML

2023-08-04 19:51:03 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #1709):

sys/dev/usb/umodeswitch.c: revision 1.6

Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.

(martin)

2023-08-04 19:48:57 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #311):

sys/dev/usb/umodeswitch.c: revision 1.6

Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.

(martin)

2023-08-04 19:25:06 UTC MAIN commitmail json YAML

2023-08-04 19:17:27 UTC MAIN commitmail json YAML

2023-08-04 19:17:00 UTC MAIN commitmail json YAML

Add Intel I226 devices.

(msaitoh)

2023-08-04 19:11:39 UTC MAIN commitmail json YAML

Fix some descriptions of Intel Snow Ridge.

(msaitoh)

2023-08-04 18:41:01 UTC MAIN commitmail json YAML

Revert "xennetback(4): Fix xennetback_evthandler loop."

PR kern/57560

(riastradh)

2023-08-04 18:40:49 UTC MAIN commitmail json YAML

Revert "xennetback(4): Fix membars in xennetback_rx_copy_process."

PR kern/57560

(riastradh)

2023-08-04 18:40:36 UTC MAIN commitmail json YAML

Revert "xennetback(4): Omit needless membars in xennetback_connect."

PR kern/57560

(riastradh)

2023-08-04 17:17:06 UTC MAIN commitmail json YAML

gcc/usr.bin: Sprinkle -fno-jump-tables more for m68k and friends

Now, gcc builds for m68k native.

(rin)

2023-08-04 16:02:01 UTC MAIN commitmail json YAML

entropy(9): Disable !cold assertion in rump for now.

Evidently rump starts threads before it sets cold = 0, and deferring
the call to rump_thread_allow(NULL) in rump.c rump_init_callback
until after setting cold = 0 doesn't work either -- rump kernels just
hang.  To be investigated -- for now, let's just stop breaking
thousands of tests.

(riastradh)

2023-08-04 15:42:09 UTC MAIN commitmail json YAML

+RAT  register allocation table

(jschauma)

2023-08-04 15:31:40 UTC MAIN commitmail json YAML

tyops:
* redicection -> redirection
* escaoed -> escaped

Noted by J. Lewis Muir on netbsd-docs@

(jschauma)

2023-08-04 15:11:22 UTC netbsd-9 commitmail json YAML

2023-08-04 15:06:50 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jakllsch in ticket #1705):

sys/dev/ic/rtl81x9var.h: revision 1.58
sys/dev/ic/rtl81x9reg.h: revision 1.54
sys/dev/ic/rtl8169.c: revision 1.167
sys/dev/ic/rtl8169.c: revision 1.168

re(4): misc chip revision support changes
* remove impossible-to-match chip revision cases
* bring support for modern chips in line with FreeBSD and OpenBSD
  * adds support for RTL8168GU

Addresses PR kern/56312.

- Print chip revision. From OpenBSD.
- Rename RTK_HWREV_8168_SPIN[123] to RTK_HWREV_8168'B'_SPIN[123].
  Same as other *BSDs.
- Rename RTK_HWREV_8168G_SPIN4 to RTK_HWREV_8411B. Same as other *BSDs.
- Add definition of RTK_HWREV_8169_8110SCE.

(martin)

2023-08-04 15:03:43 UTC netbsd-10 commitmail json YAML

2023-08-04 15:02:46 UTC netbsd-8 commitmail json YAML

2023-08-04 15:00:28 UTC netbsd-8 commitmail json YAML

Apply patch, requested by ozaki-r in ticket #1885:

sys/net/bpf.c (apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)

(martin)

2023-08-04 14:57:52 UTC netbsd-9 commitmail json YAML

Apply patch, requested by ozaki-r in ticket #1708:

sys/net/bpf.c (apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)

(martin)

2023-08-04 14:54:40 UTC MAIN commitmail json YAML

README.gcc12: Updated m68000 and m68k

- Kernel works just fine for sun2. Once-observed error was due to
  misc/57562.
- Kernel and bootloader work just fine for amiga.
- Userland needs COPTS.strsuftoll.c+=-fno-stack-protector.
- For amiga, no regression for tests/lib/libc/{sys,gen}.

(rin)

2023-08-04 14:38:09 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #1884):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

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

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

(martin)

2023-08-04 14:29:44 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #1707):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

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

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

(martin)

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

Pull up following revision(s) (requested by ozaki-r in ticket #310):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

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

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

(martin)

2023-08-04 14:24:16 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #1883):

sys/netinet6/in6_src.c: revision 1.92

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.

(martin)

2023-08-04 14:23:02 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #1706):

sys/netinet6/in6_src.c: revision 1.92

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.

(martin)

2023-08-04 14:21:48 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #309):

sys/netinet6/in6_src.c: revision 1.92

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.

(martin)

2023-08-04 14:12:49 UTC netbsd-9 commitmail json YAML

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

xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c: revision 1.4 (patch)

mesa: Remove massive kludge that worked around PR toolchain/50277.

Now that the underlying bug in ld.elf_so is fixed, the workaround is
causing harm.

(martin)

2023-08-04 14:09:25 UTC netbsd-10 commitmail json YAML

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

xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c: revision 1.4
xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c: revision 1.2

mesa: Remove massive kludge that worked around PR toolchain/50277.

Now that the underlying bug in ld.elf_so is fixed, the workaround is
causing harm.

(martin)

2023-08-04 14:04:44 UTC MAIN commitmail json YAML

sc(4) at vme(4): Fix panic due to false ENOMEM for DMA buffer

Similar fix to "sc(4) at mbmem(4)" one; make sure flags are correctly
initialized.

sun3 is not affected.

(rin)

2023-08-04 13:58:11 UTC netbsd-8 commitmail json YAML

Apply patch, requested by riastradh in ticket #1882 (issue solved differently
in -current):

sys/kern/init_main.c (apply patch)

PR kern/55906: create the aiodone workqueue before running mountroothooks.

(martin)

2023-08-04 13:34:58 UTC netbsd-9 commitmail json YAML

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

sys/fs/ptyfs/ptyfs_vnops.c: revision 1.61

PR/55821: tar can not extract base.tgz anymore (./dev/pts and mounted ptyfs)

Allow chown/chmod at the root of ptyfs.

(martin)

2023-08-04 13:30:57 UTC netbsd-10 commitmail json YAML

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

sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c: revision 1.16

i915: Fail gracefully, don't panic, with unsupported ggtt views.

Workaround for part of PR kern/56648.

(martin)

2023-08-04 13:28:40 UTC netbsd-8 commitmail json YAML

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

usr.sbin/ldpd/socketops.c: revision 1.36
usr.sbin/ldpd/fsm.c: revision 1.16
usr.sbin/ldpd/ldp_peer.c: revision 1.19

ldpd(8): Fix address of misaligned packed members.

PR kern/56895

(martin)

2023-08-04 13:26:17 UTC netbsd-9 commitmail json YAML

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

usr.sbin/ldpd/socketops.c: revision 1.36
usr.sbin/ldpd/fsm.c: revision 1.16
usr.sbin/ldpd/ldp_peer.c: revision 1.19

ldpd(8): Fix address of misaligned packed members.

PR kern/56895

(martin)

2023-08-04 13:25:18 UTC MAIN commitmail json YAML

Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.

(manu)

2023-08-04 13:17:38 UTC netbsd-10 commitmail json YAML

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

libexec/ld.elf_so/arch/powerpc/Makefile.inc: revision 1.17
libexec/ld.elf_so/arch/powerpc/ld.so.script: file removal

ld.elf_so powerpc: remove bogus ldscript

This ldscript is not needed and actually makes things worse by putting
everything in one LOAD section, which then needs to have rwx permission.

Remove it so that we get two LOAD sections with better permissions.
Fixes PR 57323.

(martin)

2023-08-04 13:15:25 UTC netbsd-8 commitmail json YAML

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

sys/uvm/uvm_map.c: revision 1.403 (patch)

mmap(2): Avoid arithmetic overflow in search for free space.

PR kern/56900

(martin)

2023-08-04 13:12:00 UTC netbsd-8 commitmail json YAML

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

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD

(martin)

2023-08-04 13:10:35 UTC netbsd-9 commitmail json YAML

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

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD

(martin)

2023-08-04 13:09:17 UTC netbsd-10 commitmail json YAML

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

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD

(martin)

2023-08-04 13:06:59 UTC netbsd-8 commitmail json YAML

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

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-04 13:04:04 UTC netbsd-9 commitmail json YAML

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

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-04 12:55:48 UTC netbsd-9 commitmail json YAML

Pull up following revision(s), all via patch,
(requested by riastradh in ticket #1699):

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

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.

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-04 12:49:15 UTC MAIN commitmail json YAML

2023-08-04 12:48:00 UTC MAIN commitmail json YAML

Add Intel Snow Ridge devices.

(msaitoh)

2023-08-04 12:24:36 UTC MAIN commitmail json YAML

Revert "softint(9): Sprinkle KASSERT(!cold)."

Temporary workaround for PR kern/57563 -- to be fixed properly after
analysis.

(riastradh)

2023-08-04 11:18:18 UTC MAIN commitmail json YAML

sun2/sc(4): Fix panic due to wrong ENOMEM for DMA buffer

Use kmem_zalloc(9) for sc->sc_dma_handles[] to zero-initialize flags.

XXX
Will soon apply to sun3.

(rin)

2023-08-04 09:06:33 UTC MAIN commitmail json YAML

avoid comparing arrays directly, compare the address of their first element.

found by GCC 12.

(mrg)

2023-08-04 08:58:43 UTC MAIN commitmail json YAML

make this build on m68k (fails on m68000.)

(mrg)

2023-08-04 08:54:00 UTC MAIN commitmail json YAML

more updates for sets and GCC 12

- renable sanitizer, add new shlib versions, enable tsan for arm64,
  including moving some stuff into the per-cpu/arch dir from 'mi'.
- fix mips64, 68k, and ia64
- mark many any-gcc-version things just as "gcc" and remove dups
- mark many gcc=9 only things as obsolete
- mark many gcc=10 only things as obsolete with gcc=12 (more could
  be done here.)

(mrg)

2023-08-04 08:39:44 UTC MAIN commitmail json YAML

amiga/acafh(4): Appease GCC 12.3.0 -Wmisleading-indentation

No binary changes. Alternatively, pmap_update(9) can be placed in
this loop, but it should make nothing other than small overhead.

(rin)

2023-08-04 07:40:30 UTC MAIN commitmail json YAML

softint(9): Sprinkle KASSERT(!cold).

Softints are forbidden to run while cold.  So let's make sure nobody
even tries it -- if they do, they might be delayed indefinitely,
which is going to be much harder to diagnose.

(riastradh)

2023-08-04 07:40:05 UTC MAIN commitmail json YAML

2023-08-04 07:38:53 UTC MAIN commitmail json YAML

entropy(9): Simplify stages.  Split interrupt vs non-interrupt paths.

- Nix the entropy stage (cold, warm, hot).  Just use the usual kernel
  `cold' (cold: single-core, single-thread; interrupts may happen),
  and don't make any three-way distinction about whether interrupts
  or threads or other CPUs can be running.

  Instead, while cold, use splhigh/splx or forbid paths to come from
  interrupt context, and while warm, use mutex or the per-CPU hard
  and soft interrupt paths for low latency.  This comes at a small
  cost to some interrupt latency, since we may stir the pool in
  interrupt context -- but only for a very short window early at boot
  between configure and configure2, so it's hard to imagine it
  matters much.

- Allow rnd_add_uint32 to run in hard interrupt context or with spin
  locks held, but defer processing to softint and drop samples on the
  floor if buffer is full.  This is mainly used for cheaply tossing
  samples from drivers for non-HWRNG devices into the entropy pool,
  so it is often used from interrupt context and/or under spin locks.

- New rnd_add_data_intr provides the interrupt-like data entry path
  for arbitrary buffers and driver-specified entropy estimates: defer
  processing to softint and drop samples on the floor if buffer is
  full.

- Document that rnd_add_data is forbidden under spin locks outside
  interrupt context (will crash in LOCKDEBUG), and inadvisable in
  interrupt context (but technically permitted just in case there are
  compatibility issues for now); later we can forbid it altogether in
  interrupt context or under spin locks.

- Audit all uses of rnd_add_data to use rnd_add_data_intr where it
  might be used in interrupt context or under a spin lock.

This fixes a regression from last year when the global entropy lock
was changed from IPL_VM (spin) to IPL_SOFTSERIAL (adaptive).  Thought
I'd caught all the problems from that, but another one bit three
different people this week, presumably because of recent changes that
led to more non-HWRNG drivers entering the entropy consolidation
path from rnd_add_uint32.

In my attempt to preserve the rnd(9) API for the (now long-since
abandoned) prospect of pullup to netbsd-9 in my rewrite of the
entropy subsystem in 2020, I didn't introduce a separate entry point
for entering entropy from interrupt context or equivalent, i.e., spin
locks held, and instead made rnd_add_data rely on cpu_intr_p() to
decide whether to process the whole sample under a lock or only take
as much as there's buffer space for before scheduling a softint.  In
retrospect, that was a mistake (though perhaps not as much of a
mistake as other entropy API decisions...), a mistake which is
finally getting rectified now by rnd_add_data_intr.

XXX pullup-10

(riastradh)

2023-08-04 07:21:57 UTC MAIN commitmail json YAML

x86/multiboot2: Fix short read for 64-bit ELF headers

XXX document this
At the moment, this cannot affect NetBSD/amd64, as we have not
supported multiboot for kernel side.

Found by GCC12.

(rin)

2023-08-04 03:59:00 UTC MAIN commitmail json YAML

acronyms.comp: add ONCE

(gutteridge)

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

bioctl(8): bio_show_volumes(): Do not return pointer to stack.

Found by GCC 12.

(rin)

2023-08-04 03:39:22 UTC MAIN commitmail json YAML

README.gcc12: alpha works just fine (incl. boot loaders)

Clean up outdated/duplicate notes also.

(rin)

2023-08-04 03:31:13 UTC MAIN commitmail json YAML

t_siginfo:sigfpe_int: Adjust for GCC12

Do not use constant 1 as numerator to raise integer division by zero.
GCC >= 12 optimizes (1 / i) into (abs(i) == 1 ? i : 0), even for -O0.

(rin)

2023-08-03 22:11:41 UTC MAIN commitmail json YAML

wsemul_vt100_subr: fix comment - CPR is not DSR

DSRs (device status report) are 'n', but cursor position report is 'R'

(uwe)

2023-08-03 20:45:50 UTC MAIN commitmail json YAML

2023-08-03 18:48:42 UTC MAIN commitmail json YAML

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

lists: Belatedly catch up with lib*san bump for GCC 12.

(rin)

2023-08-03 14:56:37 UTC MAIN commitmail json YAML

2023-08-03 14:55:54 UTC MAIN commitmail json YAML

bsd.own.mk: Revert CC_WNO_USE_AFTER_FREE

This is an undefined behavior in general. Implementation details of
pointer are not defined in C standards; it is not necessarily address
of memory objects.

Pointed out by uwe@. Thanks!!

(rin)

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

base/shl.mi: Fix previous for GCC10...

(rin)

2023-08-03 13:36:09 UTC MAIN commitmail json YAML

2023-08-03 13:33:27 UTC MAIN commitmail json YAML

bsd.own.mk: Introduce CC_WNO_USE_AFTER_FREE for GCC12

-Wuse-after-free for GCC 12 is premature. It fires on a common idiom:

newbuf = realloc(buf, size);
p = newbuf + (p - buf);

Let shut this up for GCC 12 (with hoping it gets improved for 13!).

(rin)

2023-08-03 13:13:05 UTC MAIN commitmail json YAML