All of lore.kernel.org
 help / color / mirror / Atom feed
From: fweimer@redhat.com (Florian Weimer)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/5] arm64: Signal context expansion
Date: Fri, 9 Sep 2016 19:01:12 +0200	[thread overview]
Message-ID: <d7fa9069-f952-0642-9668-2fea640cdb20@redhat.com> (raw)
In-Reply-To: <20160909152047.GA3958@e103592.cambridge.arm.com>

On 09/09/2016 05:21 PM, Dave Martin wrote:

>> Do you add this extra information only if the stack is sufficiently large?
>>
>> x86_64 adds the new information even for small stacks set up with
>> sigaltstack, leading to memory corruption on bleeding-edge hardware:
>>
>>   <https://bugzilla.kernel.org/show_bug.cgi?id=153531>
>
> Hmmm, not yet.  We already check that the whole frame is writable user
> memory, but this isn't sufficient to avoid user corruption in the case
> of alternate signal stacks.  I'll fix this -- thanks for flagging it.
>
> If the stack isn't large enough, we'll still have to SEGV the task
> though.

You could skip copying the data and not install a pointer to it in the 
existing signal context.

> We can (and should) bump up the SIG{,MIN}STKSZ constants when adding
> the SVE support proper to the kernel,

That's a userspace ABI change (libraries use these constants to size 
struct members), and not a good idea.  You might get away with at this 
stage, but you can't do this every time you add some new process state 
you want to add to signal handlers.

> I wonder whether we should make the signal stack size runtime
> discoverable through sysconf() instead...

That might be a good idea, yes.

Florian

  reply	other threads:[~2016-09-09 17:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 14:15 [RFC PATCH 0/5] arm64: Signal context expansion Dave Martin
2016-09-09 14:15 ` [RFC PATCH 1/5] arm64: signal: Refactor sigcontext parsing in rt_sigreturn Dave Martin
2016-09-09 14:15 ` [RFC PATCH 2/5] arm64: signal: factor frame layout and population into separate passes Dave Martin
2016-09-09 14:15 ` [RFC PATCH 3/5] arm64: signal: factor out signal frame record allocation Dave Martin
2016-09-09 14:15 ` [RFC PATCH 4/5] arm64: signal: Allocate extra sigcontext space as needed Dave Martin
2016-09-09 14:15 ` [RFC PATCH 5/5] arm64: signal: Parse extra_context during sigreturn Dave Martin
2016-09-09 14:39 ` [RFC PATCH 0/5] arm64: Signal context expansion Florian Weimer
2016-09-09 15:21   ` Dave Martin
2016-09-09 17:01     ` Florian Weimer [this message]
2016-09-12 11:17       ` Dave Martin
2016-09-12 12:49         ` Florian Weimer
2016-09-12 15:21           ` Dave Martin
2016-09-12 15:01         ` Szabolcs Nagy
2016-09-12 15:30           ` Dave Martin
2016-09-12 16:44             ` Szabolcs Nagy
2016-09-12 17:24               ` Dave Martin
2016-09-13  9:28             ` Florian Weimer
2016-09-13 15:52               ` Dave Martin
2016-09-13 16:02                 ` Florian Weimer
2016-09-15 16:45                   ` Dave Martin
2016-09-16 12:10                     ` Florian Weimer
2016-09-16 17:39                       ` Dave Martin

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=d7fa9069-f952-0642-9668-2fea640cdb20@redhat.com \
    --to=fweimer@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.