Commit Graph

305797 Commits

Author SHA1 Message Date
martin 39f3caee78 Add new test program 2024-04-23 07:33:24 +00:00
maya 8a12906d64 Switch to mesa 21
Works well enough for me on various GPUs, let's try it out. Can be easily
reverted if anyone encounters major issues.
2024-04-23 03:25:39 +00:00
andvar 1f05e87cf6 Surround full mp_cpu_start() method with NLAPIC > 0 guard.
Initialization is based on x86_ipi* functions, which are implemented only
when lapic flag is enabled.
2024-04-22 23:07:47 +00:00
andvar fabab64239 Add (defined(MPBIOS) || NACPICA > 0) check around mp_pci_childdetached().
Fixes the build without MPBIOS or ACPI. Modified patch from Paolo Pisati in
current-users@.

While here:
Remove obsolete <arch/x86/pci/msipic.h> include with its guard.
Add comments for multiple endifs for better readability.
2024-04-22 22:47:00 +00:00
andvar ac38f996f2 Add opt_pci.h include to fix NO_PCI_MSI_MSIX build.
(Path from Paolo Pisati in current_users@)

While here:
Simplify mp_cpu_start() ifdefs. MULTIPROCESSOR and HYPERV code falls under
NLAPIC > 0, thus just combine all blocks under this guard.
Rearrange opt_acpi.h include alphabetically.
2024-04-22 22:29:28 +00:00
jdolecek abcb0737b1 it's nanosleep(2), not nanosleep(3) 2024-04-22 21:25:29 +00:00
jdolecek 2bbb505264 allow usleep(3) with useconds >= 1000000
update manpage to mention this interface is obsolete, remove
EINVAL from the ERRORS and mention EINTR instead.

PR lib/58184 by Taylor R Campbell
2024-04-22 21:02:18 +00:00
nia f7dfb79875 Move MIPS N64 compat out of {base,debug}32 into {base,debug}64
martin requested separation by ABI and it doesn't make much sense
to have 64-bit binaries in a set called 32.
2024-04-22 14:41:24 +00:00
pho 76248f073a Add a test for kern/58149
aarch64: Cannot return from a signal handler if SP was misaligned when the signal arrived
2024-04-22 07:24:22 +00:00
maya 5077947004 mesa21: link against libxcb-sync for missing symbols
Not super obvious in practice, but it does show if you run GL programs
with LD_BIND_NOW.
2024-04-22 03:38:49 +00:00
rillig 9799297d00 make: trim down code for parsing the :gmtime and :localtime modifiers
The :gmtime and :localtime modifiers are not used often and thus are not
time-critical. Exchange the custom code that parses an integer from a
substring for an additional memory allocation.

Thanks sjg@ for suggesting to avoid the custom parsing code.
2024-04-21 21:59:48 +00:00
rillig d122acbd72 libntf: make MKREPRO timestamp compatible with NetBSD 10
In NetBSD 10, make(1) cannot handle :gmtime arguments that are
expressions, resulting in the error message "Unknown modifier '1'".
2024-04-21 17:19:52 +00:00
riastradh 63b08c9be7 apei(4), acpihed(4): Enable in x86 GENERIC.
Let's just see how this works out in practice.  Might need to reduce
the overhead of each GHES on machines with thousands of them, but
we'll see.

PR kern/58046
2024-04-21 14:11:12 +00:00
rillig 7541e76b18 make: fix out-of-bounds read when evaluating :gmtime and :localtime
The function TryParseTime takes a pointer to a string, but the LazyBuf
returns a Substring, which is not guaranteed to be null-terminated or
delimited.  In TryParseTime, calling strtoul on the Substring read past
the end of the substring.

Noticed in the NetBSD build in libntp, where the :gmtime modifier is
used in two places with the same timestamp value, of which the first was
evaluated correctly and the second wasn't.

The bug was introduced in var.c 1.1050 from 2023-05-09, when the
argument of the :gmtime and :localtime modifiers was allowed to be an
expression instead of an integer constant.
2024-04-21 08:56:49 +00:00
riastradh 003bb55d1d drm: Allow DRM_IOCTL_GET_UNIQUE on render nodes.
On NetBSD, libdrm uses this to discover what kind of bus the device
is on, without which it refuses to expose the render node at all,
rendering it useless.  With this change, libdrm is able to use render
nodes on NetBSD.

Since this is just reading out information about the bus type and
bus/dev/func numbers, I don't think it's problematic to expose to
render nodes.

This requires tweaking the access path to the master.

PR kern/58180
2024-04-21 03:02:51 +00:00
riastradh 759aa94308 drm(4): Fix st_rdev in stat.
dminor->index already has the 64*type adjustment, as allocated in
drm_minor_alloc.

PR kern/58180
2024-04-21 03:02:39 +00:00
maya 102a662e07 Mesa 21: Add some intel files so we don't have missing symbols
seen as error messages when running "glxgears" on intel.

This also avoids graphical corruption (changed areas of terminal
emulator take a few seconds to gradually update) when the modesetting
driver is explicitly chosen.
2024-04-21 00:23:23 +00:00
skrll fe6348de33 Remove some magic numbers by using genassym.cf 2024-04-20 14:09:40 +00:00
rillig 0800ba3e52 UPDATING: remove not-so-recent entries 2024-04-20 14:06:47 +00:00
rillig f56f0d26c4 {usr.,}{s,}bin: replace LINT_SUPPORTED with the standard NOLINT
While here, re-enable lint in those cases where lint was skipped due to
a bug in interpreting abstract types, which was fixed in cgram.y 1.469
from 2023-08-02.
2024-04-20 13:24:48 +00:00
rillig 39cc76d687 build.sh: fix typos in usage message 2024-04-20 12:25:46 +00:00
rillig 873c42efc3 make: provide more context information for parse/evaluate errors 2024-04-20 10:18:55 +00:00
rillig 7202b80324 libntp: clean up MKREPRO_TIMESTAMP handling
NetBSD's make has built-in support for formatting timestamps, so use
that instead of relying on an external tool.  The month name is still
always in the C locale, and possible errors are reported in the affected
line, due to the ':=' assignment operator.

Without the ':=' assignment operator, the intermediate variable would
not be necessary, but in that case, make's error handling is broken and
unspecific.
2024-04-20 08:03:08 +00:00
isaki 1dc7b48cb9 Fix typo in comment. 2024-04-20 05:38:40 +00:00
andvar 6b3c6f1ba6 s/Resorce/Resource/ in comment and log message. 2024-04-19 21:24:00 +00:00
rillig 6e59c25695 tests/lint: show how to trigger message 207 2024-04-19 20:59:18 +00:00
jakllsch 466d1a15ac fix copy/paste-o 2024-04-19 16:04:28 +00:00
jakllsch 7386dcbbb8 Increase MKREPRO robustness
- Use C locale to ensure month abbreviations are as expected
 - bail out if MKREPRO_TIMESTAMP is not defined
 - bail out if resulting __DATE__/__TIME__ replacement strings are empty
2024-04-19 14:58:18 +00:00
jakllsch 05916288da The substitute __DATE__ should be %b %e %Y per a C18 draft
Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.
2024-04-19 13:34:15 +00:00
christos b844656e78 PR/58170: Yoshitaka Tokugawa: Remove blocking statement when the requestor
asks for for an address that is in the cache and that access is prevented
by a cache acl because the querier has no way to know that this access is
denied, so it is not an abuse.
2024-04-19 12:35:28 +00:00
ozaki-r a8ea6d9dcd frag6: fix calculation of fragment length
Because of the miscalculation, 32 bytes fragmented IPv6 packets
have been wrongly dropped.

See https://mail-index.netbsd.org/tech-net/2024/04/14/msg008741.html
for more details.

Patch from Yasuyuki KOZAKAI (with minor tweaks)
2024-04-19 05:04:06 +00:00
riastradh f09779b4fc ip6_output: Initialize plen for ip6_hopopts_input.
This funny little block in ip6_process_hopopts assumes it is
initialized as and behaves differently depending on whether it's zero
or not:

https://nxr.netbsd.org/xref/src/sys/netinet6/ip6_input.c?r=1.227#976

In the other call site, it is initialized to ip6->ip6_plen:

https://nxr.netbsd.org/xref/src/sys/netinet6/ip6_input.c?r=1.227#561

Reported-by: syzbot+587e3b707bdfe533283f@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?extid=587e3b707bdfe533283f
2024-04-19 00:55:35 +00:00
riastradh b7772f668d dounmount: Avoid &((struct vnode_impl *)NULL)->vi_vnode.
Member access of a null pointer is undefined, even if the result
should also be null because vi_vnode is at the start of vnode_impl.

Reported-by: syzbot+a4b2d13c0d6d4dac2d07@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?extid=a4b2d13c0d6d4dac2d07
2024-04-19 00:45:41 +00:00
riastradh a346ed41ae radeon_acpi.c: ifdef out unused function on NetBSD.
Should fix syzkaller build.
2024-04-18 23:33:15 +00:00
jakllsch 1784c46724 Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__ 2024-04-18 19:23:53 +00:00
jakllsch 2c9c248e72 Install xsetwallpaper(1) manual page
Should fix PR 58172.
2024-04-18 19:17:14 +00:00
mlelstv 043f83d920 Renamed border/boundary variables to better describe their use.
Fix edge default values, factor out percentage calculation for more consistent
values. Use device_printf/DPRINTF to show errors instead of aprint variants.
Print raw input for debugging.

Correct capability parsing. Old devices were probed with nonexistent
commands and then used undefined boundary values that made them unusuable.

Fixes PR 57874.
2024-04-18 17:35:53 +00:00
skrll c41df0aeb5 Fix types in pmap_page_clear_attributes so that the top bits of
the u_long mdpg_attrs aren't dropped giving atomic_cas_ulong no
chance of completing if any of the top bits is set.

Update pmap_page_set_attributes for consistency.

An ATF test run completed for me with this fix.

port-riscv/58006: ATF tests no longer complete on riscv-riscv64
2024-04-18 12:16:23 +00:00
andvar 9626b6b63f s/resoure/resource/ in comments. 2024-04-18 10:32:03 +00:00
macallan de3a34d3b3 allow mapping of blitter registers 2024-04-18 04:52:43 +00:00
riastradh 4b9c628dc5 tap(4): Just use mutex_enter.
PR kern/58167
2024-04-17 18:52:54 +00:00
riastradh cf439d6998 tap(4): Use DETACH_FORCE with config_detach.
It doesn't make a difference here, because tap_detach never fails,
but let's make it more obvious at the call site that failure is
forbidden here.

No functional change intended.

PR kern/58166
2024-04-17 18:52:39 +00:00
riastradh 22440558de tap(4): Prune dead branches around tap_dev_destroyer.
No functional change intended.

PR kern/58166
2024-04-17 18:52:25 +00:00
riastradh a1472611d7 tap(4): Prune dead branches around tap_dev_close.
No functional change intended.

PR kern/58166
2024-04-17 18:32:13 +00:00
riastradh 212c9b3b52 modules/examples/fopsmapper: KNF, sprinkle comments
Missing: MP-safety; this is a kind of broken example.
2024-04-17 18:10:27 +00:00
riastradh 01905a679e sys/conf.h: Need sys/types.h for dev_t, devmajor_t. 2024-04-17 18:01:29 +00:00
christos 97246cf21d more plugin set fixes 2024-04-17 13:23:32 +00:00
andvar 9833779ad2 Regen. 2024-04-17 11:43:59 +00:00
andvar 62176de36c Add VIA VX900 HDMI. 2024-04-17 11:42:47 +00:00
macallan 7e941987be turn LEDs off when shutting down 2024-04-17 07:47:48 +00:00