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: <dfd0b9bf9180413788b04984fd007b07@AcuMS.aculab.com>
Date:   Tue, 7 May 2019 10:47:57 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Jeff Kirsher' <jeffrey.t.kirsher@...el.com>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     Jesse Brandeburg <jesse.brandeburg@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "nhorman@...hat.com" <nhorman@...hat.com>,
        "sassmann@...hat.com" <sassmann@...hat.com>,
        Anirudh Venkataramanan <anirudh.venkataramanan@...el.com>,
        Andrew Bowers <andrewx.bowers@...el.com>
Subject: RE: [net-next 13/15] ice: Use bitfields where possible

From: Jeff Kirsher
> Sent: 05 May 2019 00:49
> The driver was converted to not use bool, but it was
> neglected that the bools should have been converted to bit fields
> as bit fields in software structures are ok, as long as they
> use the correct kinds of unsigned types. This avoids
> wasting lots of storage space to store single bit values.
> 
> One of the change hunks moves a variable lport out of
> a group of "combinable" bit fields because all bits of
> the u8 lport are valid and the variable can be packed in the
> struct in struct holes.

How many copies of this structure are there?
You may find that the code size increases more than the date size reduction.
Also, unless the data size goes below a malloc threshold is saves
no memory at all.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ