public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Bruno Haible <bruno@clisp.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 3/3] Misc: Add <sys/cstack.h> and the cstack_* family of functions
Date: Tue, 25 May 2021 09:42:57 +0200	[thread overview]
Message-ID: <87pmxf1cou.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <2323426.9O4c1bNasL@omega> (Bruno Haible's message of "Mon, 24 May 2021 17:28:23 +0200")

* Bruno Haible:

>>  * The ability to have a guard page at the stack bottom.
>
> Your documentation explains why this is useful:
>
>   This guard region can sometimes catch stack-based buffer
>   overflows and turn them into a segmentation fault.
>
> It would be useful to have this feature on the thread stacks, in the
> first place. That is, add some pthread_attr_setbottomguard() function
> to <pthread.h> that allows the application to enable this for the
> thread stacks.

This feature is already enabled by default.  See
pthread_attr_setguardsize.

What we do not have is a way to set an alternate signal stack upon
thread creation that is also automatically deallocated once the thread
exits.  I planned to propose this as an additional interface afterwards.

Thanks,
Florian


  reply	other threads:[~2021-05-25  7:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 14:58 Bruno Haible
2021-05-24 15:28 ` Bruno Haible
2021-05-25  7:42   ` Florian Weimer [this message]
2021-05-24 19:11 ` Adhemerval Zanella
2021-05-24 23:41   ` Paul Eggert
2021-05-25  7:40     ` Florian Weimer
2021-05-25 12:17       ` Adhemerval Zanella
2021-05-25 12:23         ` Florian Weimer
2021-05-25 12:25           ` Adhemerval Zanella
2021-05-25 12:29     ` Adhemerval Zanella
2021-05-25  8:41 ` Florian Weimer
  -- strict thread matches above, loose matches on Subject: below --
2021-05-20 12:11 [PATCH 0/3] Convenience function for allocating (alternate signal) stacks Florian Weimer
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

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=87pmxf1cou.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=bruno@clisp.org \
    --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).