* Re: [PATCH v2] riscv: cif: reduce shadow stack size limit from 4GB to 2GB [not found] <20260428024105.645162-1-zong.li@sifive.com> @ 2026-05-14 1:20 ` Paul Walmsley 2026-05-14 3:22 ` Zong Li 0 siblings, 1 reply; 2+ messages in thread From: Paul Walmsley @ 2026-05-14 1:20 UTC (permalink / raw) To: Zong Li Cc: pjw, palmer, aou, alex, debug, linux-riscv, linux-kernel, david.laight.linux 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] riscv: cif: reduce shadow stack size limit from 4GB to 2GB 2026-05-14 1:20 ` [PATCH v2] riscv: cif: reduce shadow stack size limit from 4GB to 2GB Paul Walmsley @ 2026-05-14 3:22 ` Zong Li 0 siblings, 0 replies; 2+ messages in thread From: Zong Li @ 2026-05-14 3:22 UTC (permalink / raw) To: Paul Walmsley Cc: palmer, aou, alex, debug, linux-riscv, linux-kernel, david.laight.linux On Thu, May 14, 2026 at 9:20 AM Paul Walmsley <pjw@kernel.org> wrote: > > 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? > Ok. I will send the next version to include that. Thanks for pointing it out. > > thanks > > - Paul ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-14 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260428024105.645162-1-zong.li@sifive.com>
2026-05-14 1:20 ` [PATCH v2] riscv: cif: reduce shadow stack size limit from 4GB to 2GB Paul Walmsley
2026-05-14 3:22 ` Zong Li
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox