From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 0/3] Convenience function for allocating (alternate signal) stacks
Date: Thu, 20 May 2021 14:11:50 +0200 [thread overview]
Message-ID: <cover.1621511874.git.fweimer@redhat.com> (raw)
This complements the _SC_MINSIGSTKSZ changes by wrapping the stack
allocation with its size computation in a helper function. Guard pages
are also allocated.
If this is acceptable, I'll figure out a way to integrate this with
threads, so that applications can request an alternate signal stack on
thread creation that is automatically deallocated once the thread exits.
Thanks,
Florian
Florian Weimer (3):
elf: Initialize GLRO (dl_minsigstacksize) after static dlopen
Hurd: Define ARCH_MIN_GUARD_SIZE in internal <pthread.h>
Misc: Add <sys/cstack.h> and the cstack_* family of functions
NEWS | 4 +
elf/rtld_static_init.c | 2 +
include/sys/cstack.h | 39 ++++++
manual/memory.texi | 99 ++++++++++++++
manual/signal.texi | 3 +
misc/Makefile | 8 +-
misc/Versions | 5 +
misc/cstack_allocate.c | 125 ++++++++++++++++++
misc/cstack_free.c | 30 +++++
misc/cstack_get.c | 27 ++++
misc/sys/cstack.h | 53 ++++++++
misc/tst-cstack.c | 118 +++++++++++++++++
sysdeps/htl/include/pthread.h | 3 +
sysdeps/mach/hurd/i386/libc.abilist | 3 +
sysdeps/unix/sysv/linux/aarch64/libc.abilist | 3 +
sysdeps/unix/sysv/linux/alpha/libc.abilist | 3 +
sysdeps/unix/sysv/linux/arc/libc.abilist | 3 +
sysdeps/unix/sysv/linux/arm/be/libc.abilist | 3 +
sysdeps/unix/sysv/linux/arm/le/libc.abilist | 3 +
sysdeps/unix/sysv/linux/csky/libc.abilist | 3 +
sysdeps/unix/sysv/linux/hppa/libc.abilist | 3 +
sysdeps/unix/sysv/linux/i386/libc.abilist | 3 +
sysdeps/unix/sysv/linux/ia64/libc.abilist | 3 +
.../sysv/linux/m68k/coldfire/libc.abilist | 3 +
.../unix/sysv/linux/m68k/m680x0/libc.abilist | 3 +
.../sysv/linux/microblaze/be/libc.abilist | 3 +
.../sysv/linux/microblaze/le/libc.abilist | 3 +
.../sysv/linux/mips/mips32/fpu/libc.abilist | 3 +
.../sysv/linux/mips/mips32/nofpu/libc.abilist | 3 +
.../sysv/linux/mips/mips64/n32/libc.abilist | 3 +
.../sysv/linux/mips/mips64/n64/libc.abilist | 3 +
sysdeps/unix/sysv/linux/nios2/libc.abilist | 3 +
.../linux/powerpc/powerpc32/fpu/libc.abilist | 3 +
.../powerpc/powerpc32/nofpu/libc.abilist | 3 +
.../linux/powerpc/powerpc64/be/libc.abilist | 3 +
.../linux/powerpc/powerpc64/le/libc.abilist | 3 +
.../unix/sysv/linux/riscv/rv32/libc.abilist | 3 +
.../unix/sysv/linux/riscv/rv64/libc.abilist | 3 +
.../unix/sysv/linux/s390/s390-32/libc.abilist | 3 +
.../unix/sysv/linux/s390/s390-64/libc.abilist | 3 +
sysdeps/unix/sysv/linux/sh/be/libc.abilist | 3 +
sysdeps/unix/sysv/linux/sh/le/libc.abilist | 3 +
.../sysv/linux/sparc/sparc32/libc.abilist | 3 +
.../sysv/linux/sparc/sparc64/libc.abilist | 3 +
.../unix/sysv/linux/x86_64/64/libc.abilist | 3 +
.../unix/sysv/linux/x86_64/x32/libc.abilist | 3 +
46 files changed, 612 insertions(+), 3 deletions(-)
create mode 100644 include/sys/cstack.h
create mode 100644 misc/cstack_allocate.c
create mode 100644 misc/cstack_free.c
create mode 100644 misc/cstack_get.c
create mode 100644 misc/sys/cstack.h
create mode 100644 misc/tst-cstack.c
--
2.31.1
next reply other threads:[~2021-05-20 12:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 12:11 Florian Weimer [this message]
2021-05-20 12:13 ` [PATCH 1/3] elf: Initialize GLRO (dl_minsigstacksize) after static dlopen Florian Weimer
2021-05-20 14:40 ` H.J. Lu
2021-05-20 12:13 ` [PATCH 2/3] Hurd: Define ARCH_MIN_GUARD_SIZE in internal <pthread.h> Florian Weimer
2021-05-20 14:41 ` H.J. Lu
2021-05-20 12:13 ` [PATCH 3/3] Misc: Add <sys/cstack.h> and the cstack_* family of functions Florian Weimer
2021-05-20 12:21 ` Florian Weimer
2021-05-20 12:50 ` Andreas Schwab
2021-05-20 13:14 ` Florian Weimer
2021-05-24 15:42 [PATCH 0/3] Convenience function for allocating (alternate signal) stacks Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1621511874.git.fweimer@redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).