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: <20160905064441.GD3532@ulmo.ba.sec>
Date:   Mon, 5 Sep 2016 00:44:41 -0600
From:   Thierry Reding <thierry.reding@...il.com>
To:     Brian Norris <briannorris@...omium.org>
CC:     <linux-kernel@...r.kernel.org>,
        Brian Norris <computersforpeace@...il.com>,
        <linux-pwm@...r.kernel.org>,
        "Javier Martinez Canillas" <javier@....samsung.com>,
        Enric Balletbo <enric.balletbo@...labora.co.uk>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Gwendal Grignou <gwendal@...omium.org>,
        Guenter Roeck <linux@...ck-us.net>
Subject: Re: [PATCH] pwm: cros_ec: add __packed to prevent padding

On Tue, Jul 26, 2016 at 11:22:13AM -0700, Brian Norris wrote:
> While the particular usage in question is likely safe (struct
> cros_ec_command is 32-bit aligned, followed by <=32-bit fields), it's
> been suggested this is not a great pattern to follow for the general
> case -- for example, if we follow a 'struct cros_ec_command' (which is
> 32-bit- but not 64-bit-aligned) with a struct that starts with a 64-bit
> type (e.g., u64), the compiler may add padding.
> 
> Let's add __packed, to inform the compiler of our true intention -- to
> have no padding between these struct elements -- and to future proof for
> any refactorings that might occur.
> 
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> ---
> Hi Thierry,
> 
> I don't know of any bugs directly resolved by this patch, so take it for
> v4.8/v4.9 at your discretion.
> 
>  drivers/pwm/pwm-cros-ec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ