unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
To: Carlos O'Donell <carlos@redhat.com>, Florian Weimer <fweimer@redhat.com>
Cc: nd <nd@arm.com>, Zack Weinberg <zackw@panix.com>,
	Christian Brauner <christian@brauner.io>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Fwd: What can a signal handler do with SIGSTKSZ?
Date: Mon, 14 Jan 2019 16:34:50 +0000	[thread overview]
Message-ID: <398ecd16-dccb-525d-9eaa-5446279c1a1a@arm.com> (raw)
In-Reply-To: <0a995c61-62d6-7b09-8b5d-1d77b33a242d@redhat.com>

On 14/01/2019 16:22, Carlos O'Donell wrote:
> On 1/14/19 11:18 AM, Florian Weimer wrote:
>> * Szabolcs Nagy:
>>
>>> i think proposing sysconf(_SC_{MIN}SIGSTKSZ) for posix is the
>>> right solution with the kernel providing an upper bound of the
>>> stack frame in AT_MINSIGSTKSZ (as it already does on aarch64).
>>
>> It's still a bit nasty for process migration, but at least it should for
>> VM migration.  I think that would be a reasonable compromise.
>>
>> Of course, we'd still need a way to determine how much we should add on
>> top of AT_MINSIGSTKSZ for the application developer's benefit. 8-)
> 
> The value of SIGSTKSZ seems to be a "culturally relevant detail" that will
> probably be impossible to pin down to a real value.
> 
> If *I* were a developer I might expect as Zach pointed out, that I can call
> every function on the list of callable AS-safe functions, at least once,
> without recursion, and expect them to operate correctly.
> 
> A test case for this would therefore be a main, that register a handler
> that exercises *all* functions in the AS-safe list, and then looks for
> stack corruption at each execution.
> 
> The test could also be used to set the value to some accepted value for
> all machines.
> 
> Can we do this in practice?

e.g. exec functions that need to copy their
arguments to an on stack argv array may fail
depending on how many args are passed.


  parent reply	other threads:[~2019-01-14 16:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 17:44 What can a signal handler do with SIGSTKSZ? Carlos O'Donell
2019-01-11 19:02 ` Szabolcs Nagy
2019-01-11 19:11   ` Carlos O'Donell
2019-01-11 20:23     ` Szabolcs Nagy
     [not found] ` <CAKCAbMiCaBst_ofjKkH3Ck1CoOV86wPKv3QSkC89XW_zu=1BLA@mail.gmail.com>
2019-01-11 19:34   ` Fwd: " Zack Weinberg
2019-01-11 20:00     ` Florian Weimer
2019-01-11 20:06       ` Christian Brauner
2019-01-11 20:14         ` Florian Weimer
2019-01-11 20:26           ` Christian Brauner
2019-01-14 16:15             ` Florian Weimer
2019-01-11 20:09       ` Zack Weinberg
2019-01-11 20:29         ` Florian Weimer
2019-01-11 23:59           ` Zack Weinberg
2019-01-14 11:18             ` Szabolcs Nagy
2019-01-14 11:29               ` Adhemerval Zanella
2019-01-14 16:34                 ` Zack Weinberg
2019-01-14 20:29                   ` Carlos O'Donell
2019-01-14 16:18               ` Florian Weimer
2019-01-14 16:22                 ` Carlos O'Donell
2019-01-14 16:31                   ` Florian Weimer
2019-01-14 16:34                   ` Szabolcs Nagy [this message]
2019-01-14 18:19                   ` Joseph Myers
2019-01-14 20:30                     ` Carlos O'Donell
2019-01-16 22:51             ` Christian Brauner
2019-01-11 19:40 ` 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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=398ecd16-dccb-525d-9eaa-5446279c1a1a@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=carlos@redhat.com \
    --cc=christian@brauner.io \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    --cc=zackw@panix.com \
    /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).