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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1991071.yIU609i1g2@phil>
Date:   Thu, 13 Oct 2022 15:28:57 +0200
From:   Heiko Stuebner <heiko@...ech.de>
To:     Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        linux-riscv@...ts.infradead.org
Cc:     linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Jisheng Zhang <jszhang@...nel.org>,
        Heiko Stübner <heiko@...ech.de>
Subject: Re: [PATCH 4/8] riscv: cpufeature: extend riscv_cpufeature_patch_func to all ISA extensions

Am Freitag, 7. Oktober 2022, 13:54:31 CEST schrieb Heiko Stübner:
> Am Donnerstag, 6. Oktober 2022, 09:08:14 CEST schrieb Jisheng Zhang:
> > make the riscv_cpufeature_patch_func() scan all ISA extensions rather
> > than limited feature macros.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@...nel.org>

[...]

> > @@ -127,7 +124,7 @@ asm volatile(ALTERNATIVE_2(						\
> >  	"add a0, a0, %0\n\t"						\
> >  	"2:\n\t"							\
> >  	"bltu a0, %2, 3b\n\t"						\
> > -	"nop", 0, CPUFEATURE_ZICBOM, CONFIG_RISCV_ISA_ZICBOM,		\
> > +	"nop", 0, RISCV_ISA_EXT_ZICBOM, CONFIG_RISCV_ISA_ZICBOM,	\
> 
> hmm, would it make sense to also at the same time extend the errata_id
> in the alternatives struct to unsigned long?
> 
> Right now it's a unsigned int, and we're already at bit30 with the current extensions.
> 
> Otherwise the idea is pretty neat of allowing easy handling for all extensions
> 
> Reviewed-by: Heiko Stuebner <heiko@...ech.de>

I think I might need to take that back ... with this change each
cpufeature is tightly coupled to real extension ids, but what about
cpufeatures that do not match directly to an extension?

I.e. ZICBOM + fast-unaligned-access [0] (coming from a dt-property)
or only viable with extension 1+2+3?


Heiko


[0] https://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git/commit/?h=riscv-hwprobe&id=9be297f7ed349945cccc85f8df9d90e5ab68c1d9


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ