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: Thu, 20 Jun 2024 14:56:05 +0800
From: Andy Chiu <andy.chiu@...ive.com>
To: Zhongqiu Han <quic_zhonhan@...cinc.com>
Cc: paul.walmsley@...ive.com, palmer@...belt.com, aou@...s.berkeley.edu, 
	conor.dooley@...rochip.com, ancientmodern4@...il.com, 
	ben.dooks@...ethink.co.uk, bjorn@...osinc.com, quic_bjorande@...cinc.com, 
	linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv: signal: Remove unlikely() from WARN_ON() condition

On Thu, Jun 20, 2024 at 11:35 AM Zhongqiu Han <quic_zhonhan@...cinc.com> wrote:
>
> "WARN_ON(unlikely(x))" is excessive. WARN_ON() already uses unlikely()
> internally.
>
> Signed-off-by: Zhongqiu Han <quic_zhonhan@...cinc.com>
> Reviewed-by: Bjorn Andersson <quic_bjorande@...cinc.com>

Reviewed-by: Andy Chiu <andy.chiu@...ive.com>

> ---
>  arch/riscv/kernel/signal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c
> index 5a2edd7f027e..dcd282419456 100644
> --- a/arch/riscv/kernel/signal.c
> +++ b/arch/riscv/kernel/signal.c
> @@ -84,7 +84,7 @@ static long save_v_state(struct pt_regs *regs, void __user **sc_vec)
>         datap = state + 1;
>
>         /* datap is designed to be 16 byte aligned for better performance */
> -       WARN_ON(unlikely(!IS_ALIGNED((unsigned long)datap, 16)));
> +       WARN_ON(!IS_ALIGNED((unsigned long)datap, 16));
>
>         get_cpu_vector_context();
>         riscv_v_vstate_save(&current->thread.vstate, regs);
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ