NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/59100: compat fixes from Nov 22 2024 break cvsup 1.6ZC static binary
>Number: 59100
>Category: kern
>Synopsis: compat patch from Nov 22 2024 breaks cvsup for monolithic kernel
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 24 19:35:00 +0000 2025
>Originator: Onno van der Linden <o.vd.linden%quicknet.nl@localhost>
>Release: NetBSD 10.99.12
>Organization:
>Environment:
System: NetBSD sheep 10.99.12 NetBSD 10.99.12 (SHEEP) #2: Mon Feb 24 19:59:44 CET 2025 root@sheep:/usr/src/sys/arch/amd64/compile/SHEEP amd64
Architecture: x86_64
Machine: amd64
>Description:
Trying to run cvsup (/usr/pkg/bin/cvsup: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for NetBSD 1.6ZC, stripped)
on my monolithic kernel (everything is compiled in) fails miserably.
ktrace shows
3574 3574 cvsup CALL netbsd32___sigaction_sigtramp(SIGSYS,0xffffe838,0xffffe818,0x80e9a00,2)
3574 3574 cvsup RET netbsd32___sigaction_sigtramp 0
3574 3574 cvsup CALL compat_16_netbsd32___sigreturn14(0)
3574 3574 cvsup RET compat_16_netbsd32___sigreturn14 -1 errno 14 Bad address
followed by netbsd32__sigaction_sigtramp returning -1 with errno 22 (EINVAL) for all the other signals not named SIGSYS.
All this is caused by the Nov 22 2024 commit
"Crude patch to allow building and loading of compat_16 and compat_netbsd32_16 code on aarch64." from Nov 22 2024. because this patch
>How-To-Repeat:
Run the 1.6ZC cvsup binary (with fully configured configuration files of course) on a monolithic x86 kernel.
>Fix:
After some debugging printf's I came up with this patch after which my cvsup test ran flawlessly and imported the new acpica and sbin/efi. No idea if it's correct though .........
--- /usr/src/sys/compat/netbsd32/netbsd32_signal.c.orig 2025-02-24 20:10:38.789270837 +0100
+++ /usr/src/sys/compat/netbsd32/netbsd32_signal.c 2025-02-24 20:12:37.675593950 +0100
@@ -209,7 +209,7 @@
/*
* Module is already loaded and locked in memory
*/
- sigcontext_valid = netbsd32_sendsig_sigcontext_16_hook.hooked;
+ sigcontext_valid = 1;
}
if (!sigcontext_valid) {
return EINVAL;
Home |
Main Index |
Thread Index |
Old Index