about summary refs log tree commit diff
path: root/elf/tst-ifunc-fault-bindnow.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-11-01 09:56:07 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-11-07 10:27:20 -0300
commit6afce56c197ee83520994a2c94a82c2ca2bce9fa (patch)
tree973adf10b4992c1440fc3c4352165f599747474b /elf/tst-ifunc-fault-bindnow.c
parented318beab986c6f6ccf2507d4753dfea6a7b1f8d (diff)
downloadglibc-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 'elf/tst-ifunc-fault-bindnow.c')
0 files changed, 0 insertions, 0 deletions