tree-wide: seccomp: allow clock_nanosleep syscalls
Starting with 2.32 glibc nanosleep() was refactored to use the
clock_nanosleep syscall so various software will fail unless
the new syscall is allowed. We can't just drop the old nanosleep
syscall because it will break glibc 2.27 which is still used.
See glibc commits:
807edded25 nptl: Refactor thrd_sleep in terms of clock_nanosleep
3537ecb49c Refactor nanosleep in terms of clock_nanosleep
79a547b162 nptl: Move nanosleep implementation to libc
This is a bulk edit done with the following command:
git grep -rl 'nanosleep: 1' | xargs sed -i \
'/^nanosleep: 1/a clock_nanosleep: 1'
BUG=chromium:1171287
TEST=Local builds and booting on kevin/64/eve/minnie.
Change-Id: I7a5839c6ab7005a757721e7b3c3a91f1f83d0f22
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/logitech-updater/+/2735514
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Pablo Ceballos <pceballos@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
diff --git a/seccomp/logitech-updater-seccomp-amd64.policy b/seccomp/logitech-updater-seccomp-amd64.policy
index 0a46a15..81c9173 100644
--- a/seccomp/logitech-updater-seccomp-amd64.policy
+++ b/seccomp/logitech-updater-seccomp-amd64.policy
@@ -43,6 +43,7 @@
mprotect: 1
munmap: 1
nanosleep: 1
+clock_nanosleep: 1
open: 1
openat: 1
prlimit64: arg2 == 0 && arg3 != 0
diff --git a/seccomp/logitech-updater-seccomp-x86_64.policy b/seccomp/logitech-updater-seccomp-x86_64.policy
index 0a46a15..81c9173 100644
--- a/seccomp/logitech-updater-seccomp-x86_64.policy
+++ b/seccomp/logitech-updater-seccomp-x86_64.policy
@@ -43,6 +43,7 @@
mprotect: 1
munmap: 1
nanosleep: 1
+clock_nanosleep: 1
open: 1
openat: 1
prlimit64: arg2 == 0 && arg3 != 0