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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1bf1f70-8b4f-4e96-908a-907da1748377-agordeev@linux.ibm.com>
Date: Mon, 8 Sep 2025 18:52:11 +0200
From: Alexander Gordeev <agordeev@...ux.ibm.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] s390/nmi: Simplify return statement in
 nmi_registers_valid()

On Mon, Sep 08, 2025 at 05:32:20PM +0200, Thorsten Blum wrote:
...
> @@ -321,9 +321,7 @@ static bool notrace nmi_registers_valid(union mci mci)
>  	cr2.reg = get_lowcore()->cregs_save_area[2];
>  	if (cr2.gse && !mci.gs && !test_cpu_flag(CIF_MCCK_GUEST))
>  		return false;
> -	if (!mci.ms || !mci.pm || !mci.ia)
> -		return false;
> -	return true;
> +	return mci.ms && mci.pm && mci.ia;
>  }
>  NOKPROBE_SYMBOL(nmi_registers_valid);

This change does not make the whole function readability better.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ