NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/60437: magic symlinks don't work in compat32
>Number: 60437
>Category: kern
>Synopsis: magic symlinks don't work in compat32
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 10 15:00:00 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 11, 10, 9, ...
>Organization:
The Magic Symlink, starring Peter Sellers and Ringo Starr
>Environment:
>Description:
Magic symlink patterns @machine_arch and @machine are done
relative to the host kernel, not the userland execution
environment, so /usr/tests/kernel/t_magic_symlinks cases
`machine' and `machine_arch' fail.
>How-To-Repeat:
1. enter an i386 chroot on an amd64 system (or similar compat
environment)
2. cd /usr/tests/kernel && atf-run t_magic_symlinks
Alternatively:
# sysctl -w vfs.generic.magiclinks=1
vfs.generic.magiclinks: 0 -> 1
# mkdir x86_64 i386 amd64
# touch x86_64/x86_64 i386/i386 amd64/amd64
# ln -s @machine_arch machine_arch
# ln -s @machine machine
# uname -p
i386
# uname -m
i386
# ls machine_arch
x86_64
# ls machine
amd64
>Fix:
Seems like the symlink resolution should match uname -p and
uname -m.
Home |
Main Index |
Thread Index |
Old Index