Skip to content

seccomp: move arch_prctl to @default - #22039

Merged
keszybz merged 1 commit into
systemd:mainfrom
keszybz:seccomp-arch_prctl-default
Jan 7, 2022
Merged

keszybz merged 1 commit into
systemd:mainfrom
keszybz:seccomp-arch_prctl-default

Conversation

@keszybz

@keszybz keszybz commented Jan 7, 2022

Copy link
Copy Markdown
Member

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.

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 systemd#22033.
@bluca bluca added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Jan 7, 2022
@keszybz
keszybz merged commit 5f02870 into systemd:main Jan 7, 2022
@keszybz
keszybz deleted the seccomp-arch_prctl-default branch January 7, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed

Development

Successfully merging this pull request may close these issues.

Suggestion to include arch_prctl by default in SystemCallFilter=

2 participants