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
| ||
|
Date: Wed, 1 Nov 2017 14:16:33 +0000 From: Mark Rutland <mark.rutland@....com> To: gengdongjiu <gengdongjiu@...wei.com> Cc: Robin Murphy <robin.murphy@....com>, catalin.marinas@....com, will.deacon@....com, marc.zyngier@....com, christoffer.dall@...aro.org, james.morse@....com, ard.biesheuvel@...aro.org, cov@...eaurora.org, Dave.Martin@....com, suzuki.poulose@....com, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, kvmarm@...ts.cs.columbia.edu Subject: Re: [PATCH v1 1/3] arm64: add a macro for SError synchronization On Wed, Nov 01, 2017 at 08:54:44PM +0800, gengdongjiu wrote: > On 2017/11/1 19:24, Robin Murphy wrote: > >> + esb > >> +alternative_else_nop_endif > >> +1: > >> + .endm > > Having a branch in here is pretty horrible, and furthermore using label > > number 1 has a pretty high chance of subtly breaking code where this > > macro is inserted. > > > > Can we not somehow nest or combine the alternative conditions here? > > I found it will report error if combine the alternative conditions here. > > For example: > > + .macro error_synchronize > +alternative_if ARM64_HAS_IESB > +alternative_if ARM64_HAS_RAS_EXTN > + esb > +alternative_else_nop_endif > +alternative_else_nop_endif > + .endm > > And even using b.eq/cbz instruction in the alternative instruction in arch/arm64/kernel/entry.S, > it will report Error. Alternatives cannot be nested. You need to define a cap like: ARM64_HAS_RAS_NOT_IESB ... which is set when ARM64_HAS_RAS_EXTN && !ARM64_HAS_IESB. Then you can do: alternative_if ARM64_HAS_RAS_NOT_IESB esb alternative_else_nop_endif See ARM64_ALT_PAN_NOT_UAO for an example. That said, as Robin points out we may not even need the alternative. Thanks, Mark.
Powered by blists - more mailing lists