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:   Fri, 7 Oct 2022 09:08:42 +0300
From:   Nikita Shubin <nikita.shubin@...uefel.me>
To:     Atish Patra <atishp@...osinc.com>
Cc:     linux@...ro.com, Nikita Shubin <n.shubin@...ro.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Anup Patel <anup@...infault.org>,
        Heiko Stuebner <heiko@...ech.de>, Guo Ren <guoren@...nel.org>,
        Tsukasa OI <research_trasio@....a4lg.com>,
        Jisheng Zhang <jszhang@...nel.org>,
        Sunil V L <sunilvl@...tanamicro.com>,
        Yury Norov <yury.norov@...il.com>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv: fix multi-letter extension compare

Hello Atish,

My bad, i somehow decided that 'sscofpmf' should
be 'zsscofpmf' in device tree, but it's 'Sscofpmf' actually.

Sorry for noise please ignore this patch.

On Thu,  6 Oct 2022 10:02:56 +0300
Nikita Shubin <nikita.shubin@...uefel.me> wrote:

> From: Nikita Shubin <n.shubin@...ro.com>
> 
> Increment ext pointer to match letters after 'z' character, so it
> points to actual extension name.
> 
> Fixes: 4905ec2fb7e6 ("RISC-V: Add sscofpmf extension support")
> Signed-off-by: Nikita Shubin <n.shubin@...ro.com>
> ---
> Hello Atish,
> 
> Sorry to blame you, but i double checked this and i don't see a way 
> how extensions from device tree could be successfully matched with 
> encoded ones without incrementing the ext pointer or prepending 
> the encoded extensions with 'z' letter.
> 
> I have no idea how this could slip through review - am i missing
> something ? ---
>  arch/riscv/kernel/cpufeature.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/riscv/kernel/cpufeature.c
> b/arch/riscv/kernel/cpufeature.c index 3b5583db9d80..031546052dc0
> 100644 --- a/arch/riscv/kernel/cpufeature.c
> +++ b/arch/riscv/kernel/cpufeature.c
> @@ -199,6 +199,7 @@ void __init riscv_fill_hwcap(void)
>  				this_hwcap |= isa2hwcap[(unsigned
> char)(*ext)]; set_bit(*ext - 'a', this_isa);
>  			} else {
> +				ext++;
>  				SET_ISA_EXT_MAP("sscofpmf",
> RISCV_ISA_EXT_SSCOFPMF); SET_ISA_EXT_MAP("svpbmt",
> RISCV_ISA_EXT_SVPBMT); SET_ISA_EXT_MAP("zicbom",
> RISCV_ISA_EXT_ZICBOM);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ