summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com>2021-03-04 18:22:38 +0200
committerCommit Bot <commit-bot@chromium.org>2021-03-09 07:01:09 +0000
commita7ea3afab29f4376039a4ff6f6f7d3432754053f (patch)
tree2f905144775a32577c2af8461f5c9a86ba5a3f88
parente745a8cbf449c377bac196ad31b20b77c2c520b7 (diff)
downloadadhd-a7ea3afab29f4376039a4ff6f6f7d3432754053f.tar.gz
tree-wide: seccomp: allow new 64bit time syscall variants
Starting with 2.32, as part of the fixes for Year 2038 bug [1], glibc will call the 64bit variants of the time syscalls. This is done even on 32bit systems which do not support the new syscalls (for eg. due to running an old kernel) where an -ENOSYS is expected before defaulting back to the normal 32bit variants. There are many y2038 commits in glibc, but for reference, the one which started the ball is the following ~2.5 years ago: d51f99ce80 ("Y2038: Add 64-bit time for all architectures") This change is a bulk edit using the following commands: grep -rl 'clock_getres: 1' | grep -E 'x86.policy|arm.policy' \ | xargs sed -i '/^clock_getres: 1/a clock_getres_time64: 1' grep -rl 'clock_gettime: 1' | grep -E 'x86.policy|arm.policy' \ | xargs sed -i '/^clock_gettime: 1/a clock_gettime64: 1' grep -rl 'clock_nanosleep: 1' | grep -E 'x86.policy|arm.policy' \ | xargs sed -i '/^clock_nanosleep: 1/a clock_nanosleep_time64: 1' [1] https://en.wikipedia.org/wiki/Year_2038_problem BUG=chromium:1171287 TEST=Local builds and booting on kevin/64/eve/minnie. Change-Id: I61e014037525b599dc0e906554b3735bbb8547ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2736376 Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
-rw-r--r--seccomp/cras-seccomp-arm.policy5
1 files changed, 5 insertions, 0 deletions
diff --git a/seccomp/cras-seccomp-arm.policy b/seccomp/cras-seccomp-arm.policy
index 26b14639..cbaa622b 100644
--- a/seccomp/cras-seccomp-arm.policy
+++ b/seccomp/cras-seccomp-arm.policy
@@ -3,9 +3,11 @@
# found in the LICENSE file.
clock_gettime: 1
+clock_gettime64: 1
poll: 1
read: 1
ppoll: 1
+ppoll_time64: 1
write: 1
writev: 1
recv: 1
@@ -41,6 +43,7 @@ rt_sigprocmask: 1
ftruncate: 1
fallocate: 1
futex: 1
+futex_time64: 1
execve: 1
set_robust_list: 1
socket: arg0 == AF_UNIX || arg0 == AF_BLUETOOTH || arg0 == AF_NETLINK
@@ -65,6 +68,7 @@ getsockname: 1
getdents: 1
nanosleep: 1
clock_nanosleep: 1
+clock_nanosleep_time64: 1
epoll_ctl: 1
sched_setscheduler: 1
restart_syscall: 1
@@ -73,6 +77,7 @@ getresuid32: 1
exit: 1
prctl: arg0 == PR_SET_NAME
clock_getres: 1
+clock_getres_time64: 1
epoll_create1: 1
fchmod: 1
setpriority: 1