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  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]
Date:   Mon, 9 Mar 2020 15:38:17 -0700
From:   Jakub Kicinski <>
To:     Edward Cree <>
Cc:     Jiri Pirko <>, <>,
        <>, <>, <>,
        <>, <>,
        <>, <>,
        <>, <>,
        <>, <>,
        <>, <>,
Subject: Re: [patch net-next v4 01/10] flow_offload: Introduce offload of HW
 stats type

On Mon, 9 Mar 2020 22:27:59 +0000 Edward Cree wrote:
> > Driver author can understandably try to simply handle all the values 
> > in a switch statement and be unpleasantly surprised.  
> In my experience, unenumerated enum values of this kind are fully
>  idiomatic C; and a driver author looking at the header file to see
>  what enumeration constants are defined will necessarily see all the
>  calls to BIT() and the bitwise-or construction of _ANY.
> I'm not sure I believe a naïve switch() implementation is an
>  "understandable" error.

Could be my slight exposure to HDLs that makes me strongly averse to
encoding state outside of a enumeration into a value of that type :)

> How about if we also rename the field "hw_stats_types", or squeeze
>  the word "mask" in there somewhere?

That'd make things slightly better.

Powered by blists - more mailing lists