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: <20200228110146.4e607ca3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Fri, 28 Feb 2020 11:01:46 -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 Fri, 28 Feb 2020 12:37:14 -0600 Alex Elder wrote:
> On 2/28/20 12:33 PM, Jakub Kicinski wrote:
> > On Fri, 28 Feb 2020 12:06:09 -0600 Alex Elder wrote:  
> >> On 2/28/20 12:04 PM, Alex Elder wrote:  
> >>>
> >>>
> >>> I find field_max() to be a good name for what I'm looking for.    
> >>
> >> Sorry I wanted to add this but clicked "send" too fast.
> >>
> >> Yes it's the same as field_mask(), but that name only *implies*
> >> it is the same as the maximum value.  I mean, they're the same,
> >> but the name I'm suggesting conveys its purpose better.  
> > 
> > We got FIELD_FIT tho.. The comparison is part of the macro there, 
> > and it catches negative values if they manage to sneak in.  
> 
> Ahhh!  I was using the lower-case macros and it looks like there
> isn't one (despite seeming to have all(?) of the others).

Ah, damn, I didn't check for the lower case version.

> How would you feel about having field_fit() be a lower-case
> equivalent of FIELD_FIT()?

That'd be great!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ