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:   Sat, 29 Feb 2020 12:17:05 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Alex Elder <elder@...aro.org>
Cc:     Al Viro <viro@...iv.linux.org.uk>,
        Johannes Berg <johannes@...solutions.net>,
        Arnd Bergmann <arnd@...db.de>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bitfield.h: add FIELD_MAX() and field_max()

On Sat, 29 Feb 2020 07:10:45 -0600 Alex Elder wrote:
> I should have actually checked my code before I sent this.  Yes
> I am using the macro as I described, to see if something fits.
> But I'm also using it this way:
> 
> 	foo = u32_get_bits(register, FOO_COUNT_FMASK);
> 	if (foo == field_max(FOO_COUNT_MASK))
> 		;	/* This has special meaning */
> 
> And another way:
> 
> 	size_limit = field_max(FOO_COUNT_MASK) * sizeof(struct foo);
> 
> So field_max() is really what I need here. 

Makes sense, in that case:

Acked-by: Jakub Kicinski <kuba@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ