From: Sven Schnelle <svens@linux.ibm.com>
To: Kees Cook <keescook@chromium.org>
Cc: Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] s390/entry: add support for syscall stack randomization
Date: Mon, 03 May 2021 08:36:33 +0200 [thread overview]
Message-ID: <yt9deeeojpce.fsf@linux.ibm.com> (raw)
In-Reply-To: <202104301007.5D0C6F9386@keescook> (Kees Cook's message of "Fri, 30 Apr 2021 10:10:35 -0700")
Hi Kees,
Kees Cook <keescook@chromium.org> writes:
> On Thu, Apr 29, 2021 at 11:14:51AM +0200, Sven Schnelle wrote:
>> enough and has much less performance penalty compared to using
>> get_random_int(). The patch also adds randomization in pgm_check_handler()
>> as the sigreturn/rt_sigreturn system calls might be called from there.
>
> Ah, interesting. Is this path to syscalls unique to s390? (As in, should
> x86 and arm64 gain coverage over a path that got missed?)
Yes, it's unique to s390. So there should be no need to do anything
similar on other architectures.
>> +static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
>> + unsigned long ti_work)
>> +{
>> + choose_random_kstack_offset(get_tod_clock_fast() & 0xff);
>
> What's the stack alignment on s390? Or, better question, what's the
> expected number of entropy bits?
The stack alignement on s390 is 8 bytes, so this should give us 5 bits
of entropy.
next prev parent reply other threads:[~2021-05-03 6:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 9:14 [PATCH] s390/entry: add support for syscall stack randomization Sven Schnelle
2021-04-30 15:42 ` Heiko Carstens
2021-04-30 17:10 ` Kees Cook
2021-05-03 6:36 ` Sven Schnelle [this message]
2021-05-03 9:13 ` Sven Schnelle
2021-05-03 18:31 ` Kees Cook
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=yt9deeeojpce.fsf@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=keescook@chromium.org \
--cc=linux-s390@vger.kernel.org \
--cc=tglx@linutronix.de \
/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