NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/58844: compat_netbsd32 modctl does not properly convert argumen structures



>Number:         58844
>Category:       kern
>Synopsis:       compat_netbsd32 modctl does not properly convert argumen structures
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 22 14:10:00 +0000 2024
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.12
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD nelly.aprisoft.de 10.99.12 NetBSD 10.99.12 (NELLY) #79: Fri Nov 22 13:18:24 CET 2024 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/sparc64/compile/NELLY sparc
Architecture: sparc
Machine: sparc
>Description:

Running a 32bit userland on a 64bit kernel under netbsd32 emulation does
not convert the argument structure(s) for modctl. This makes the modstat
output strange:

[~] martin@nelly > file `which modstat`
/sbin/modstat: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked, interpreter /libexec/ld.elf_so, for NetBSD 10.99.9, not stripped
[~] martin@nelly > ll /sbin/modstat
-r-xr-xr-x  1 root  wheel  10316 Sep 26  2023 /sbin/modstat*
[~] martin@nelly > modstat

NAME                     CLASS    SOURCE   FLAG  REFS    SIZE REQUIRES 
aes                      misc     builtin  -        1       - -
aes_ccm                  misc     builtin  -        0       - ace_common
aio                      misc     builtin  -        0       - -
audio                    driver   builtin  -        0       - -
blake2s                  misc     builtin  -        0       - -
blowfish                 misc     builtin  -        1       - -
bpf                      driver   builtin  -        1       - _common
bpf_filter               misc     builtin  -        1       - -
bufq_disksort            bufq     builtin  -        0       - -
bufq_fcfs                bufq     builtin  -        1       - -
camellia                 misc     builtin  -        1       - -
cast128                  misc     builtin  -        1       - -
cd9660                   vfs      builtin  -        0       - -
chacha                   misc     builtin  -        0       - -
clockctl                 driver   builtin  -        0       - -
compat_100               exec     builtin  -        2       - -
compat_110               exec     builtin  -        1       - -
compat_90                exec     builtin  -        1       - bsd32
compat_netbsd32          exec     builtin  -        7       - bsd32
compat_netbsd32_100      exec     builtin  -        1       - mon
compat_netbsd32_110      exec     builtin  -        0       - ace_common
compat_netbsd32_90       exec     builtin  -        0       - netbsd32
compat_netbsd32_coredump misc     builtin  -        0       - t_netbsd32
compat_netbsd32_mqueue   exec     builtin  -        0       - netbsd32
compat_netbsd32_ptrace   exec     builtin  -        1       - npf
compat_netbsd32_raid     exec     builtin  -        0       - 
compat_netbsd32_sysvipc  exec     builtin  -        0       - pat_netbsd32
compat_util              misc     builtin  -        1       - -
cons                     driver   builtin  -        0       - -
coredump                 misc     builtin  -        1       - -
crypto                   driver   builtin  -        0       - d,compat_netbsd32
des                      misc     builtin  -        1       - -
dk_subr                  misc     builtin  -        1       - -
drvctl                   driver   builtin  -        0       - -
exec_aout                exec     builtin  -        0       - -
exec_elf32               exec     builtin  -        1       - -
exec_elf64               exec     builtin  -        0       - -
exec_script              exec     builtin  -        0       - -
extensions               secmodel builtin  -        1       - -
ffs                      vfs      builtin  -        0       - 
i2c_bitbang              misc     builtin  -        0       - -
i2cexec                  misc     builtin  -        0       - -
if_agr                   driver   builtin  -        0       - -
if_gif                   driver   builtin  -        0       - mon
if_gre                   driver   builtin  -        0       - -
if_loop                  driver   builtin  -        0       - -
if_npflog                driver   builtin  -        0       - -
if_ppp                   driver   builtin  -        0       - mmon
if_pppoe                 driver   builtin  -        0       - etbsd32
if_tap                   driver   builtin  -        0       - -
if_tun                   driver   builtin  -        0       - -
if_vlan                  driver   builtin  -        0       - -
ip_ecn                   misc     builtin  -        1       - -
kernfs                   vfs      builtin  -        0       - -
ksem                     misc     builtin  -        1       - -
layerfs                  misc     builtin  -        1       - -
mqueue                   misc     builtin  -        2       - -
nfs                      vfs      builtin  -        0       - -
npf                      misc     builtin  -        4       - ace_common
npf_alg_icmp             misc     builtin  -        0       - ompat_netbsd32
npf_ext_log              misc     builtin  -        0       - ace_common
npf_ext_normalize        misc     builtin  -        0       - ace_common
npf_ext_rndblock         misc     builtin  -        0       - ace_common
null                     vfs      builtin  -        0       - ompat_netbsd32
opencrypto               misc     builtin  -        2       - -
procfs                   vfs      builtin  -        0       - e_common
ptrace                   exec     builtin  -        0       - ptrace_common
ptrace_common            exec     builtin  -        3       - -
ptyfs                    vfs      builtin  -        0       - -
raid                     driver   builtin  -        1       - mon
scsi_subr                exec     builtin  -        0       - -
secmodel_bsd44           secmodel builtin  -        0       - common
securelevel              secmodel builtin  -        1       - -
skipjack                 misc     builtin  -        1       - -
slcompress               misc     builtin  -        1       - -
sppp_subr                misc     builtin  -        1       - -
suser                    secmodel builtin  -        1       - -
swcrypto                 driver   builtin  -        0       - mon
sysv_ipc                 exec     builtin  -        1       - -
tmpfs                    vfs      builtin  -        0       - -
ufs                      misc     builtin  -        1       - mmon
vnd                      driver   builtin  -        0       - -
wapbl                    vfs      builtin  -        2       - -
zlib                     misc     builtin  -        1       - -


>How-To-Repeat:

s/a
Originally observed on 32bit sparc userland on a 64bit sparc64 kernel,
but reproduced with i386 userland on an amd64 machine too.

>Fix:
n/a



Home | Main Index | Thread Index | Old Index