From: Paul Walmsley <pjw@kernel.org>
To: Zong Li <zong.li@sifive.com>
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, debug@rivosinc.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
david.laight.linux@gmail.com
Subject: Re: [PATCH v2] riscv: cif: reduce shadow stack size limit from 4GB to 2GB
Date: Wed, 13 May 2026 19:20:21 -0600 (MDT) [thread overview]
Message-ID: <a5073e94-d360-e8d5-2b49-5167ab4f542d@kernel.org> (raw)
In-Reply-To: <20260428024105.645162-1-zong.li@sifive.com>
Hi,
On Mon, 27 Apr 2026, Zong Li wrote:
> Follow the ARM64 GCS (Guarded Control Stack) implementation approach
> by reducing the shadow stack size allocation from min(RLIMIT_STACK, 4GB)
> to min(RLIMIT_STACK/2, 2GB). see commit '506496bcbb42 "arm64/gcs: Ensure
> that new threads have a GCS")'
Sashiko caught that this patch doesn't exactly follow the ARM
implementation, in that it doesn't include the max(PAGE_SIZE, size)
constraint, which covers the case where someone sets RLIMIT_STACK to
something absurdly small ( < PAGE_SIZE ). Care to fix that and post a new
version?
thanks
- Paul
next parent reply other threads:[~2026-05-14 1:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260428024105.645162-1-zong.li@sifive.com>
2026-05-14 1:20 ` Paul Walmsley [this message]
2026-05-14 3:22 ` [PATCH v2] riscv: cif: reduce shadow stack size limit from 4GB to 2GB Zong Li
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=a5073e94-d360-e8d5-2b49-5167ab4f542d@kernel.org \
--to=pjw@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=david.laight.linux@gmail.com \
--cc=debug@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=zong.li@sifive.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