]> www.infradead.org Git - users/jedix/linux-maple.git/commit
um: fix execve stub execution on old host OSs
authorBenjamin Berg <benjamin.berg@intel.com>
Mon, 13 Jan 2025 09:41:07 +0000 (10:41 +0100)
committerRichard Weinberger <richard@nod.at>
Wed, 12 Feb 2025 22:40:45 +0000 (23:40 +0100)
commitf82a9e7b9fa922bb9cccb00aae684a27b79e6df7
tree333f0d07cf0ee807ebd924ddedd87e7ab6b114a3
parent3c2fc7434d90338cf4c1b37bc95994208d23bfc6
um: fix execve stub execution on old host OSs

The stub execution uses the somewhat new close_range and execveat
syscalls. Of these two, the execveat call is essential, but the
close_range call is more about stub process hygiene rather than safety
(and its result is ignored).

Replace both calls with a raw syscall as older machines might not have a
recent enough kernel for close_range (with CLOSE_RANGE_CLOEXEC) or a
libc that does not yet expose both of the syscalls.

Fixes: 32e8eaf263d9 ("um: use execveat to create userspace MMs")
Reported-by: Glenn Washburn <development@efficientek.com>
Closes: https://lore.kernel.org/20250108022404.05e0de1e@crass-HP-ZBook-15-G2
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250113094107.674738-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/skas/process.c