by forwarding the reference to libsys syscall symbol, for the libc.so case.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
It does make me wonder about all of the freebsd11_* bits in the same file that we use for pre-ino64 stuff, but my main concern is just fixing initgroups(3) for stable/15... we can always haggle on any other details later, if we need to.
freebsd11_ ino are different: they call ino64 versions and then translate results into the structures with pre-ino64 layout. In other words, they never called compat syscalls directly or indirectly.
Thanks for tackling this quickly.
From D52641:
Exporting freebsd14_setgroups@FBSDprivate_1.0 in libsys works, but only if I also hack up libsys/Makefile.sys to filter freebsd14_setgroups* out of MIASM to avoid creating conflicting weak refs in the libc build.
I've tried a lot of combinations since then, and frankly I still don't understand exactly why sometimes things work and sometimes not.
It seems that just exporting freebsd14_setgroups@FBSDprivate_1.0 from libsys is not enough because for some reason the freebsd14_setgroups symbol from libc somehow differs. Believe it or not, exporting freebsd14_setgroups in FBSDprivate_1.0 in lib/libc/sys/Symbol.map actually makes it work! This seems non-sensical, as the export from libsys is supposed to be merged into the final version file for libc.
I might have found a better way than what is done here.
No, some are similar. We have a bunch of direct calls to freebsd11_*() system calls, see, e.g, lib/libc/gen/fts-compat.c with calls to freebsd11_lstat, freebsd11_fstat and freebsd11_statfs. These are most probably all broken for the same reason as my first version of calling freebsd14_setgroups() from libc was.
Please see D52685 as a porposal to simplifying the change here and fixing other compatibility system calls.