NetBSD Problem Report #58346
From www@netbsd.org Sun Jun 16 05:10:16 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2C08F1A9238
for <gnats-bugs@gnats.NetBSD.org>; Sun, 16 Jun 2024 05:10:16 +0000 (UTC)
Message-Id: <20240616051014.A0C6A1A923A@mollari.NetBSD.org>
Date: Sun, 16 Jun 2024 05:10:14 +0000 (UTC)
From: rokuyama.rk@gmail.com
Reply-To: rokuyama.rk@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Some MD routines missing for compat_16 and compat_13 modules
X-Send-Pr-Version: www-1.0
>Number: 58346
>Category: kern
>Synopsis: Some MD routines missing for compat_16 and compat_13 modules
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pgoyette
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 16 05:15:00 +0000 2024
>Closed-Date: Sat Jun 22 12:02:30 +0000 2024
>Last-Modified: Sat Jun 22 12:02:30 +0000 2024
>Originator: Rin Okuyama
>Release: 10.99.10 (as well as 10.0 and 9.x)
>Organization:
Internet Initiative Japan Inc.
>Environment:
NetBSD g5.local 10.99.10 NetBSD 10.99.10 (G5) #21: Tue Jun 11 22:27:42 JST 2024 rin@sakaizumii.local:/home/rin/src/sys/arch/macppc/compile/G5 macppc powerpc
>Description:
Some MD source files are not hooked for compat{,_netbsd32}_1[36].
As a result, compat_16 module cannot load on, e.g., powerpc:
# uname -p
powerpc
# modload compat_16
kobj_checksyms, 1013: [compat_16]: linker error: symbol `sendsig_sigcontext' not found
kobj_checksyms, 1013: [compat_16]: linker error: symbol `esigcode' not found
kobj_checksyms, 1013: [compat_16]: linker error: symbol `compat_16_sys___sigreturn14' not found
kobj_checksyms, 1013: [compat_16]: linker error: symbol `sigcode' not found
modload: compat_16: Exec format error
>How-To-Repeat:
Described above.
>Fix:
See:
https://github.com/IIJ-NetBSD/netbsd-src/compare/master...rokuyama:netbsd-src:module/compat_machdep
or you can get just patch:
https://github.com/IIJ-NetBSD/netbsd-src/compare/master...rokuyama:netbsd-src:module/compat_machdep.patch
With this patch,
- sys/modules/Makefile.compat is introduced.
- compat_1[36]_machdep.c and netbsd32_machdep_1[36].c are automatically
hooked into the modules if present.
- Other MD codes are explicitly handled.
- Import AFLAGS from kernel to compile assembler codes.
Note that x86 ucode support for compat_60 is still handled differently
as before, even after applying this patch.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Sun, 16 Jun 2024 08:05:34 +0000
Responsible-Changed-Why:
Take - it's mine
State-Changed-From-To: open->feedback
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Sun, 16 Jun 2024 21:56:41 +0000
State-Changed-Why:
Fix committed - thanks!
From: Rin Okuyama <rokuyama.rk@gmail.com>
To: gnats-bugs@netbsd.org, pgoyette@netbsd.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org
Cc:
Subject: Re: kern/58346 (Some MD routines missing for compat_16 and compat_13
modules)
Date: Mon, 17 Jun 2024 18:16:45 +0900
On 2024/06/17 6:56, pgoyette@NetBSD.org wrote:
> Synopsis: Some MD routines missing for compat_16 and compat_13 modules
>
> State-Changed-From-To: open->feedback
> State-Changed-By: pgoyette@NetBSD.org
> State-Changed-When: Sun, 16 Jun 2024 21:56:41 +0000
> State-Changed-Why:
> Fix committed - thanks!
Thank you for quick response! compat_13_machdep.c is missing in
Makefile. Please add line
COMPAT_MACHDEP_SRCS= compat_13_machdep.c
to sys/modules/compat_13/Makefile.
c.f.:
https://github.com/IIJ-NetBSD/netbsd-src/compare/master...rokuyama:netbsd-src:module/compat_machdep#diff-49d6f73a61fb15b7960041d99f4c7329178abe0aa53f448fa1f43e0318fd83b1R15
Thanks,
rin
State-Changed-From-To: feedback->pending-pullups
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Mon, 17 Jun 2024 10:36:19 +0000
State-Changed-Why:
pullup-10 #724
From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58346 CVS commit: src/sys/arch/powerpc/powerpc
Date: Wed, 19 Jun 2024 15:19:22 +0000
Module Name: src
Committed By: rin
Date: Wed Jun 19 15:19:22 UTC 2024
Modified Files:
src/sys/arch/powerpc/powerpc: compat_13_machdep.c compat_16_machdep.c
Log Message:
powerpc64: Provide dummy stubs for compat1[36]
as done for amd64. We haven't had working userland for powerpc64,
and therefore compatible to 1.[36] is only useful for netbsd32.
Fix build failure for evbppc64 for PR kern/58346 (my bug!).
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/powerpc/compat_13_machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/powerpc/compat_16_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58346 CVS commit: src/sys/arch/sun2/sun2
Date: Wed, 19 Jun 2024 15:21:59 +0000
Module Name: src
Committed By: rin
Date: Wed Jun 19 15:21:59 UTC 2024
Modified Files:
src/sys/arch/sun2/sun2: genassym.cf
Log Message:
sun2/genassym.cf: Skip KERNBASE for _MODULE
as it is not a compile-time constant; see sun2/vmparam.h.
It should not be, and is not actually, used for modules.
PR kern/58346
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sun2/sun2/genassym.cf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58346 CVS commit: src/sys/arch/sun2/sun2
Date: Wed, 19 Jun 2024 15:24:37 +0000
Module Name: src
Committed By: rin
Date: Wed Jun 19 15:24:37 UTC 2024
Modified Files:
src/sys/arch/sun2/sun2: enable.h
Log Message:
sun2/enable.h: Fix -Wold-style-definition for WARNS=5 build as modules
Finally fix sun2 build for PR kern/58346
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sun2/sun2/enable.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58346 CVS commit: [netbsd-10] src
Date: Sat, 22 Jun 2024 11:11:54 +0000
Module Name: src
Committed By: martin
Date: Sat Jun 22 11:11:53 UTC 2024
Modified Files:
src/share/mk [netbsd-10]: bsd.kmodule.mk
src/sys/arch/aarch64/aarch64 [netbsd-10]: netbsd32_machdep_13.c
netbsd32_machdep_16.c
src/sys/arch/mips/mips [netbsd-10]: netbsd32_machdep_13.c
netbsd32_machdep_16.c
src/sys/arch/powerpc/powerpc [netbsd-10]: compat_13_machdep.c
compat_16_machdep.c
src/sys/arch/sun2/sun2 [netbsd-10]: enable.h genassym.cf
src/sys/modules/compat_13 [netbsd-10]: Makefile
src/sys/modules/compat_16 [netbsd-10]: Makefile
src/sys/modules/compat_netbsd32_13 [netbsd-10]: Makefile
src/sys/modules/compat_netbsd32_16 [netbsd-10]: Makefile
Added Files:
src/sys/modules [netbsd-10]: Makefile.compat
Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #724):
sys/modules/compat_netbsd32_16/Makefile: revision 1.5
sys/arch/powerpc/powerpc/compat_16_machdep.c: revision 1.25
sys/arch/powerpc/powerpc/compat_16_machdep.c: revision 1.26
sys/modules/compat_16/Makefile: revision 1.3
sys/modules/compat_netbsd32_13/Makefile: revision 1.5
sys/modules/compat_16/Makefile: revision 1.4
sys/arch/sun2/sun2/genassym.cf: revision 1.17
sys/arch/sun2/sun2/enable.h: revision 1.5
sys/modules/compat_13/Makefile: revision 1.3
sys/modules/compat_13/Makefile: revision 1.4
sys/modules/compat_13/Makefile: revision 1.5
sys/arch/mips/mips/netbsd32_machdep_16.c: revision 1.8
sys/modules/Makefile.compat: revision 1.1
sys/arch/mips/mips/netbsd32_machdep_13.c: revision 1.4
share/mk/bsd.kmodule.mk: revision 1.86
sys/arch/aarch64/aarch64/netbsd32_machdep_16.c: revision 1.4
sys/arch/powerpc/powerpc/compat_13_machdep.c: revision 1.23
sys/arch/aarch64/aarch64/netbsd32_machdep_13.c: revision 1.4
Import AFLAGS to allow processing of assembler files in modules.
Prerequisite for kern/583346.
Introduce sys/modules/Makefile.compat and hook some compat_1[36]
machdep code into the modules. kern/58346
Ooops missed a source file!
Proteect #include of kernel options files with #ifdef _KERNEL_OPT
XXX Add to existing 10.0 and 9.0 tickets for kern/583346
Include required headers
Add required include for compat_16 machdep code
fix the m68k compat_13 build.
include Makefile.assym to generate assym.h.
use -I. and -x assembler-with-cpp to actually use cpp and find assym.h.
also apply m68k assym.h fix here as well as compat_13.
powerpc64: Provide dummy stubs for compat1[36]
as done for amd64. We haven't had working userland for powerpc64,
and therefore compatible to 1.[36] is only useful for netbsd32.
Fix build failure for evbppc64 for PR kern/58346 (my bug!).
sun2/genassym.cf: Skip KERNBASE for _MODULE
as it is not a compile-time constant; see sun2/vmparam.h.
It should not be, and is not actually, used for modules.
PR kern/58346
sun2/enable.h: Fix -Wold-style-definition for WARNS=5 build as modules
Finally fix sun2 build for PR kern/58346
To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.81.2.1 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.3 -r1.3.4.1 \
src/sys/arch/aarch64/aarch64/netbsd32_machdep_13.c \
src/sys/arch/aarch64/aarch64/netbsd32_machdep_16.c
cvs rdiff -u -r1.3 -r1.3.26.1 src/sys/arch/mips/mips/netbsd32_machdep_13.c
cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/arch/mips/mips/netbsd32_machdep_16.c
cvs rdiff -u -r1.22 -r1.22.4.1 \
src/sys/arch/powerpc/powerpc/compat_13_machdep.c
cvs rdiff -u -r1.23 -r1.23.4.1 \
src/sys/arch/powerpc/powerpc/compat_16_machdep.c
cvs rdiff -u -r1.4 -r1.4.118.1 src/sys/arch/sun2/sun2/enable.h
cvs rdiff -u -r1.14 -r1.14.24.1 src/sys/arch/sun2/sun2/genassym.cf
cvs rdiff -u -r0 -r1.1.2.2 src/sys/modules/Makefile.compat
cvs rdiff -u -r1.2 -r1.2.32.1 src/sys/modules/compat_13/Makefile
cvs rdiff -u -r1.2 -r1.2.32.1 src/sys/modules/compat_16/Makefile
cvs rdiff -u -r1.4 -r1.4.26.1 src/sys/modules/compat_netbsd32_13/Makefile
cvs rdiff -u -r1.4 -r1.4.26.1 src/sys/modules/compat_netbsd32_16/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Sat, 22 Jun 2024 12:02:30 +0000
State-Changed-Why:
Pull-up 10-724 committed.
Note this is not worth back-porting to 9.0 or earlier.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.