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:   Thu, 2 Feb 2023 22:02:25 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Dan Carpenter' <error27@...il.com>
CC:     'Guru Mehar Rachaputi' <gurumeharrachaputi@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] staging: pi433: modify bit_rate from u16 to u32

From: Dan Carpenter
> Sent: 01 February 2023 13:23
> 
> On Wed, Feb 01, 2023 at 12:34:50PM +0000, David Laight wrote:
> > In reality having a uapi structure with embedded padding should
> > be banned.
> > But that would need a compiler attribute to enforce it.
> 
> It would be simple enough to grep the names of all the UAPI struct and
> use pahole to make a list of the existing structs which have holes.
> Then re-run the script every week and complain when new holey struct
> types are added.
> 
> You could do a similar thing with Smatch looking at copy_to/from_user()
> struct types.

Would it be possible to add aa attribute and check to sparse?

Might persuade people to use it instead of 'packed' for structures
that map defined byte layouts and so mustn't be holey - but are
never actually misaligned in memory.

	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