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: <20190325195605.GA21965@kroah.com>
Date:   Tue, 26 Mar 2019 04:56:05 +0900
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/4] CPER: Remove unnecessary use of user-space types

On Mon, Mar 25, 2019 at 01:26:08PM -0500, Bjorn Helgaas wrote:
> On Mon, Mar 25, 2019 at 01:14:25PM -0500, helgaas@...nel.org wrote:
> > From: Bjorn Helgaas <bhelgaas@...gle.com>
> > 
> > "__u32" and similar types are intended for things exported to user-space,
> > including structs used in ioctls; see include/uapi/asm-generic/int-l64.h.
> > 
> > They are not needed for the CPER struct definitions, which not exported to
> > user-space and not used in ioctls.  Replace them with the typical "u32" and
> > similar types.  No functional change intended.
> > 
> > The reason for changing this is to remove the question of "why do we use
> > __u32 here instead of u32?"  We should use __u32 when there's a reason for
> > it; otherwise, we should prefer u32 for consistency.
> > 
> > Reference: Documentation/process/coding-style.rst
> > Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
> > CC: Masahiro Yamada <yamada.masahiro@...ionext.com>
> > CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > CC: Andrew Morton <akpm@...ux-foundation.org>
> 
> I cc'd you folks because you were part of this conversation:
> 
>   https://lore.kernel.org/lkml/1526350925-14922-3-git-send-email-yamada.masahiro@socionext.com/T/#u
> 
> I *think* the conclusion there was that this sort of change makes
> sense, but I want to make sure.  If it does make sense, I'm surprised
> at how much stuff in include/linux/ still uses __u32 when it doesn't
> appear to need it.

People just cut/paste and don't think about it.  We used to have a bunch
of known structures that didn't use __u32 and friends as people didn't
realize it, so it doesn't surprise me that the other way is also the
case :(

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ