NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/58225 - netbsd9/amd64 requires COMPAT_16 for 32bit support
The following reply was made to PR kern/58225; it has been noted by GNATS.
From: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/58225 - netbsd9/amd64 requires COMPAT_16 for 32bit support
Date: Tue, 20 Aug 2024 18:10:54 -0700 (PDT)
OK, I think I've got this understood now...
The changes that were made in compat_netbsd32_signal.c rev 1.53 and 1.54
are just plain wrong. These changes cause every netbsd32 image to load
all of the compat code all the way back to _16. This is a "backwards
dependency" where -current depends on older code; a correct ordering
would be having the older code depend on the newer (as can be seen in
all the MODULE(compat_netbsd32_*) modules' required-lists.
IMHO the right thing to do would be to move the relevant code out of
src/sys/compat/netbsd32/netbsd32_compat_16.c and into
src/sys/compat/netbsd32/netbsd32_signal.c That would leave only
the machdep code for sigreturn14. (The module init/fini changes in
rev 1.5 should remain, too.)
As a result, signal code will have everything it needs without using
a reverse-dependency. It also simplifies things by removing the need
to keep track of the *_valid stuff. (It also removes the need to
prevent any unload of the compat_netbsd32_16 module - the stuff using
``p->p_lflag & PL_SIGCOMPAT''.)
A reproducer for the problem should be simple. First you modload
the compat_netbsd32 module. Then run an image that uses the module
(preferably a 32-bit netbsd-9 or earlier). Observe with modstat(8)
that all compat_xx and compat_netbsd32_xx modules have been loaded.
+---------------------+--------------------------+----------------------+
| Paul Goyette (.sig) | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | 1B11 1849 721C 56C8 F63A | paul%whooppee.com@localhost |
| Software Developer | 6E2E 05FD 15CE 9F2D 5102 | pgoyette%netbsd.org@localhost |
| & Network Engineer | | pgoyette99%gmail.com@localhost |
+---------------------+--------------------------+----------------------+
Home |
Main Index |
Thread Index |
Old Index