From: Kees Cook <keescook@chromium.org>
To: Xiu Jianfeng <xiujianfeng@huawei.com>
Cc: mark.rutland@arm.com, linux-kernel@vger.kernel.org,
paulus@samba.org, npiggin@gmail.com, tglx@linutronix.de,
linuxppc-dev@lists.ozlabs.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH -next v3 2/2] powerpc: add support for syscall stack randomization
Date: Wed, 27 Jul 2022 13:32:09 -0700 [thread overview]
Message-ID: <202207271331.B227002C@keescook> (raw)
In-Reply-To: <20220701082435.126596-3-xiujianfeng@huawei.com>
On Fri, Jul 01, 2022 at 04:24:35PM +0800, Xiu Jianfeng wrote:
> Add support for adding a random offset to the stack while handling
> syscalls. This patch uses mftb() instead of get_random_int() for better
> performance.
>
> In order to avoid unconditional stack canaries on syscall entry (due to
> the use of alloca()), also disable stack protector to avoid triggering
> needless checks and slowing down the entry path. As there is no general
> way to control stack protector coverage with a function attribute, this
> must be disabled at the compilation unit level.
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
--
Kees Cook
next prev parent reply other threads:[~2022-07-27 20:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 8:24 [PATCH -next v3 0/2] powerpc: add support for syscall stack randomization Xiu Jianfeng
2022-07-01 8:24 ` [PATCH -next v3 1/2] powerpc: Move system_call_exception() to syscall.c Xiu Jianfeng
2022-07-01 8:24 ` [PATCH -next v3 2/2] powerpc: add support for syscall stack randomization Xiu Jianfeng
2022-07-27 20:32 ` Kees Cook [this message]
2022-07-29 13:03 ` [PATCH -next v3 0/2] " Michael Ellerman
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=202207271331.B227002C@keescook \
--to=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.com \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=xiujianfeng@huawei.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 NNTP newsgroup(s).