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: <485772dc-ffeb-ab42-66ee-5c5c61d60cba@marvell.com>
Date:   Tue, 28 Apr 2020 11:58:41 +0300
From:   Igor Russkikh <irusskikh@...vell.com>
To:     David Miller <davem@...emloft.net>
CC:     <kuba@...nel.org>, <netdev@...r.kernel.org>,
        Mark Starovoytov <mstarovoitov@...vell.com>,
        Dmitry Bogdanov <dbogdanov@...vell.com>
Subject: Re: [EXT] Re: [PATCH net-next 08/17] net: atlantic: A2
 driver-firmware interface

Hi David,

>> I also see a lot of code through the kernel using pack(1) for the exact
> same
>> reason - declare hw sensitive structures and eliminate any unexpected
> holes.
> 
> Your resistence to this feedback is becomming irritating.

Please don't take this as a resistance, thats a first time we pushing hw
aligned bit structures in driver.

Trying to understand the best practices here and the history behind the
pack(1) backsides.

> Just because something is used elsewhere doesn't mean you are open to
> do the same, there is a lot of code where issues like this have not
> been caught through reivew and the code still ended up in the tree.
> 
> Using packed arbitrarily is being lazy and will result in suboptimal
> code generation on several platforms.
> 
> Fixed sized types have well defined padding on _all_ cpus and targets,
> so if you use them properly and pad up your structures, there is
> absolutely _nothing_ to worry about.
> 
> When I was very active writing hardware drivers with many HW defined
> structures and whatnot, I never once considered packed.  It never even
> crossed my mind, because I simply defined the data structure properly
> with well defined fixed sized types and padded them out as necessary.
> 
> So please stop pushing back on this feedback and get rid of the packed
> attribute.

Surely, already doing a rework.

Jakub, thanks for your feedback as well.

Regards,
  Igor

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ