NetBSD-Bugs archive

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

Re: kern/58801: magic symlinks do not work for COMPAT_NETBSD32



The following reply was made to PR kern/58801; it has been noted by GNATS.

From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/58801: magic symlinks do not work for COMPAT_NETBSD32
Date: Fri, 1 Nov 2024 07:51:02 -0000 (UTC)

 martin%NetBSD.org@localhost writes:
 
 >Magic symlinks (sysctl vfs.generic.magiclinks=1) do not work properly with
 >COMPAT_NETBSD32 binaries. The tests for @machine and @machine_arch fail.
 >This is not trivialy fixable as it is pretty much unclear what string the
 >emulation should use for that replacement, expecially in cases where
 >we have lots of userland variation like evbarm.
 
 That is not a problem for magic links. They should always reflect
 the values you get from sysctl.
 
 Native:
 
 # sysctl hw.machine
 hw.machine = evbarm
 # sysctl hw.machine_arch
 hw.machine_arch = aarch64
 
 armv7hf 32bit chroot:
 
 # sysctl hw.machine
 hw.machine = evbarm
 # sysctl hw.machine_arch
 hw.machine_arch = earmv7hf
 
 armv6hf 32bit chroot:
 
 # sysctl hw.machine
 hw.machine = evbarm
 # sysctl hw.machine_arch
 hw.machine_arch = earmv6hf
 
 
 Magic sylinks in netbsd32 emulation still evaluate to the native values,
 and that shouldn't be a problem to fix.
 
 # sysctl hw.machine
 hw.machine = evbarm
 # sysctl hw.machine_arch
 hw.machine_arch = earmv6hf
 # cat evbarm
 evbarm
 # cat earmv6hf
 earmv6hf
 # cat aarch64
 aarch64
 # ln -s @machine mymachine
 # ln -s @machine_arch myarch
 # cat mymachine
 evbarm
 # cat myarch
 aarch64
 


Home | Main Index | Thread Index | Old Index