diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-08-08 20:59:26 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-08-08 20:59:26 -0400 |
commit | c2feda4e2ea61f4da73f2f38b2be5e327a7d1a91 (patch) | |
tree | 4cba60bff388fa9e873e93b2ee92ee641826896c /README | |
parent | 933f8e72ebbe3a456acd24eb1c910980e6c6ef91 (diff) | |
download | musl-c2feda4e2ea61f4da73f2f38b2be5e327a7d1a91.tar.gz musl-c2feda4e2ea61f4da73f2f38b2be5e327a7d1a91.tar.bz2 musl-c2feda4e2ea61f4da73f2f38b2be5e327a7d1a91.tar.xz musl-c2feda4e2ea61f4da73f2f38b2be5e327a7d1a91.zip |
prefer new socket syscalls, fallback to SYS_socketcall only if needed
a number of users performing seccomp filtering have requested use of
the new individual syscall numbers for socket syscalls, rather than
the legacy multiplexed socketcall, since the latter has the arguments
all in memory where they can't participate in filter decisions.
previously, some archs used the multiplexed socketcall if it was
historically all that was available, while other archs used the
separate syscalls. the intent was that the latter set only include
archs that have "always" had separate socket syscalls, at least going
back to linux 2.6.0. however, at least powerpc, powerpc64, and sh were
wrongly included in this set, and thus socket operations completely
failed on old kernels for these archs.
with the changes made here, the separate syscalls are always
preferred, but fallback code is compiled for archs that also define
SYS_socketcall. two such archs, mips (plain o32) and microblaze,
define SYS_socketcall despite never having needed it, so it's now
undefined by their versions of syscall_arch.h to prevent inclusion of
useless fallback code.
some archs, where the separate syscalls were only added after the
addition of SYS_accept4, lack SYS_accept. because socket calls are
always made with zeros in the unused argument positions, it suffices
to just use SYS_accept4 to provide a definition of SYS_accept, and
this is done to make happy the macro machinery that concatenates the
socket call name onto __SC_ and SYS_.
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions