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: <87bkfsnja3.ffs@tglx>
Date:   Mon, 31 Jul 2023 18:21:56 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>, axboe@...nel.dk
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        mingo@...hat.com, dvhart@...radead.org, dave@...olabs.net,
        andrealmeid@...lia.com, Andrew Morton <akpm@...ux-foundation.org>,
        urezki@...il.com, hch@...radead.org, lstoakes@...il.com,
        Arnd Bergmann <arnd@...db.de>, linux-api@...r.kernel.org,
        linux-mm@...ck.org, linux-arch@...r.kernel.org,
        malteskarupke@....de
Subject: Re: [PATCH v1 03/14] futex: Flag conversion

On Fri, Jul 21 2023 at 12:22, Peter Zijlstra wrote:
> +
> +static inline bool futex_flags_valid(unsigned int flags)
> +{
> +	/* Only 64bit futexes for 64bit code */
> +	if (!IS_ENABLED(CONFIG_64BIT) || in_compat_syscall()) {
> +		if ((flags & FLAGS_SIZE_MASK) == FLAGS_SIZE_64)
> +			return false;
> +	}
> +
> +	/* Only 32bit futexes are implemented -- for now */
> +	if ((flags & FLAGS_SIZE_MASK) != FLAGS_SIZE_32)
> +		return false;
> +
> +	return true;
> +}
> +
> +static inline unsigned int futex_size(unsigned int flags)
> +{
> +	unsigned int size = flags & FLAGS_SIZE_MASK;
> +	return 1 << size; /* {0,1,2,3} -> {1,2,4,8} */

Lacks a new line and the comment is both misplaced and kinda obvious, no?

Other than that, this looks abour right.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ