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]
Message-ID: <20200507192334.GJ89269@dtor-ws>
Date:   Thu, 7 May 2020 12:23:34 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Pavel Machek <pavel@....cz>
Cc:     Lubomir Rintel <lkundrak@...sk>, Rob Herring <robh+dt@...nel.org>,
        linux-input@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Input: add driver for power button on Dell Wyse 3020

On Thu, May 07, 2020 at 07:46:44PM +0200, Pavel Machek wrote:
> Hi!
> 
> > +struct ec_input_response {
> > +	u8 reserved;
> > +	u8 msg_counter:2;
> > +	u8 count:2;
> > +	u8 type:4;
> > +	u8 data[3];
> > +} __packed;
> 

> Bitfields, and relying on them being in the right place for
> communication with hardware.
> 
> We don't usually do that, and there may be reasons why we don't. I'm
> pretty sure it breaks on big endian... and Im not sure if there's
> something else.

Usually it is endianness first and foremost, but this hardware is not
going to be used anywhere else...

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ