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] [day] [month] [year] [list]
Date: Thu, 15 Feb 2024 18:50:11 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Russell King <linux@...linux.org.uk>,
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ARM: ptrace: Use bitfield helpers

Sorry for the noise, can't resist...

I am replying only because I wasn't aware of bitfield.h and useful
helpers there.

Thank you ;)

On 02/15, Geert Uytterhoeven wrote:
>
>  #ifndef __ASSEMBLY__
> +#include <linux/bitfield.h>
>  #include <linux/types.h>
>
>  struct pt_regs {
> @@ -35,8 +36,8 @@ struct svc_pt_regs {
>
>  #ifndef CONFIG_CPU_V7M
>  #define isa_mode(regs) \
> -	((((regs)->ARM_cpsr & PSR_J_BIT) >> (__ffs(PSR_J_BIT) - 1)) | \
> -	 (((regs)->ARM_cpsr & PSR_T_BIT) >> (__ffs(PSR_T_BIT))))
> +	(FIELD_GET(PSR_J_BIT, (regs)->ARM_cpsr) << 1 | \
> +	 FIELD_GET(PSR_T_BIT, (regs)->ARM_cpsr))

Reviewed-by: Oleg Nesterov <oleg@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ