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]
Date:   Fri, 18 Nov 2022 11:35:52 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Umang Jain <umang.jain@...asonboard.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kieran Bingham <kieran.bingham@...asonboard.com>,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>,
        Dave Stevenson <dave.stevenson@...pberrypi.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Ray Jui <rjui@...adcom.com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-rpi-kernel@...ts.infradead.org, linux-staging@...ts.linux.dev
Subject: Re: [PATCH 1/3] Revert "staging: mmal-vchiq: Avoid use of bool in
 structures"

On Fri, Nov 18, 2022 at 01:12:32AM +0100, Andrew Lunn wrote:
> 
> Does :1 really initialise the variable?

Obviously not.

> In "u32 enabled:1" it means
> this is a 1 bit wide bit field. It seems odd that bool is somehow
> special and :1 means something else.

If you have a bunch of consecutive bool a:1; bool b:1; then GCC will
squeeze them into the same byte.  But if you have bool a; bool b; then
they each take a byte with GCC.  I have specified GCC because the size
of bool types are a bit vague in the C standard.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ