lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 20 Jan 2021 16:52:59 +0530
From:   Maninder Singh <maninder1.s@...sung.com>
To:     Will Deacon <will@...nel.org>, Mark Rutland <mark.rutland@....com>
CC:     "catalin.marinas@....com" <catalin.marinas@....com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "vincenzo.frascino@....com" <vincenzo.frascino@....com>,
        "samitolvanen@...gle.com" <samitolvanen@...gle.com>,
        "ardb@...nel.org" <ardb@...nel.org>,
        "maz@...nel.org" <maz@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Vaneet Narang <v.narang@...sung.com>,
        AMIT SAHRAWAT <a.sahrawat@...sung.com>
Subject: RE: [PATCH 1/1] arm64/entry.S: check for stack overflow in el1 case
 only

Hi Mark, Will

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@...sung.com>
>> > Signed-off-by: Vaneet Narang <v.narang@...sung.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.
>

We have not measured performance with any tool because as you said its not measurable,
but we think if we can remove some instructions then it will be better,
thats why suggested this change.
And in el0 there is no chance of overflow of sp so that 5 instructions can be avoided.

We tried this on our setup because we were changing some design for VMAP_STACK in our kernel
for some more enhancement, so that code was little much and we avoided that part
in our local kernel for el0.

Thanks,
Maninder Singh
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ