[PATCH 1/1] arm64/entry.S: check for stack overflow in el1 case only

Will Deacon will at kernel.org
Wed Jan 20 06:08:03 EST 2021


On Thu, Jan 07, 2021 at 11:29:03AM +0000, Mark Rutland wrote:
> On Fri, Dec 11, 2020 at 02:45:31PM +0530, Maninder Singh wrote:
> > current code checks for sp bit flip in all exceptions,
> > but only el1 exceptions requires this. el0 can not enter
> > into stack overflow case directly.
> > 
> > it will improve performance for el0 exceptions and interrupts.
> > 
> > Signed-off-by: Maninder Singh <maninder1.s at samsung.com>
> > Signed-off-by: Vaneet Narang <v.narang at samsung.com>
> 
> I did consider doing this at the time Ard and I wrote the overflow
> detection, but there was no measureable impact on the workloads that I
> tested, and it seemed worthwhile to have this as a sanity check in case
> the SP was somehow corrupted (and to avoid any surprizing differences
> between the EL0 and EL1 entry paths).
> 
> When you say "it will improve performance for el0 exceptions and
> interrupts", do you have a workload where this has a measureable impact,
> or was this found by inspection? Unless this is causing a real issue,
> I'd prefer to leave it as-is for now.

Maninder -- please could you follow up on Mark's question?

Will



More information about the linux-arm-kernel mailing list