diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-11-01 09:56:07 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-11-07 10:27:20 -0300 |
commit | 6afce56c197ee83520994a2c94a82c2ca2bce9fa (patch) | |
tree | 973adf10b4992c1440fc3c4352165f599747474b /dlfcn/tstatexit.c | |
parent | ed318beab986c6f6ccf2507d4753dfea6a7b1f8d (diff) | |
download | glibc-6afce56c197ee83520994a2c94a82c2ca2bce9fa.tar.gz glibc-6afce56c197ee83520994a2c94a82c2ca2bce9fa.tar.xz glibc-6afce56c197ee83520994a2c94a82c2ca2bce9fa.zip |
nptl: Decorate thread stack on pthread_create
Linux 4.5 removed thread stack annotations due to the complexity of computing them [1], and Linux added PR_SET_VMA_ANON_NAME on 5.17 as a way to name anonymous virtual memory areas. This patch adds decoration on the stack created and used by pthread_create, for glibc crated thread stack the /proc/self/maps will now show: [anon: glibc: pthread stack: <tid>] And for user-provided stacks: [anon: glibc: pthread user stack: <tid>] The guard page is not decorated, and the mapping name is cleared when the thread finishes its execution (so the cached stack does not have any name associated). Checked on x86_64-linux-gnu aarch64 aarch64-linux-gnu. [1] https://github.com/torvalds/linux/commit/65376df582174ffcec9e6471bf5b0dd79ba05e4a Co-authored-by: Ian Rogers <irogers@google.com> Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'dlfcn/tstatexit.c')
0 files changed, 0 insertions, 0 deletions