Re: [PATCH v7 20/39] arm64/gcs: Context switch GCS state for EL0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 13, 2023 at 11:59:45AM -0800, Deepak Gupta wrote:
> On Wed, Nov 22, 2023 at 1:45 AM Mark Brown <broonie@xxxxxxxxxx> wrote:

> > +       if (task->thread.gcs_el0_mode & PR_SHADOW_STACK_ENABLE)
> > +               gcscre0_el1 |= GCSCRE0_EL1_RVCHKEN | GCSCRE0_EL1_PCRSEL;

> If the intent is to disable, is the GCS stack freed or kept around?
> I expect if libc is taking the decision to disable, kernel should free it up.
> Is it freed in some other flow?

Kept around and freed on thread exit.  There is a potential race between
for example disabling in a signal handler and something trying to walk
the stack so we err on the side of caution.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux