seccomp: move arch_prctl to @default
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 7 Jan 2022 14:23:55 +0000 (15:23 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 7 Jan 2022 16:41:17 +0000 (17:41 +0100)
commitd08f6ff204c8525f7533875128468afb8be60ae0
tree712dbdf09d7d25bcfb0c2673fcb4f5dfacfba2c1
parent7dbfdefca31b2035e7c871f4e866442158429213
seccomp: move arch_prctl to @default

It was reported as used by the linker:

> [It is] called in the setup of ld-linux-x86-64.so.2 from _dl_sysdep_start.
> My local call stack (with LTO):
>
> #0 init_cpu_features.constprop.0 (/usr/lib64/ld-linux-x86-64.so.2)
> #1 _dl_sysdep_start (/usr/lib64/ld-linux-x86-64.so.2)
> #2 _dl_start (/usr/lib64/ld-linux-x86-64.so.2)
> #3 _start (/usr/lib64/ld-linux-x86-64.so.2)
>
> Looking through the source, I think it's this (links for glibc 2.34):
> - First dl_platform_init calls _dl_x86_init_cpu_features, a wrapper for init_cpu_features.
> - Then init_cpu_features calls get_cet_status.
> - At last, get_cet_status invokes arch_prctl.

Fixes #22033.

(cherry picked from commit 5f02870a74aa3a758115cc9bd6d68f239caf8453)
src/shared/seccomp-util.c