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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221208064438.e4e65j5ngfdmowoi@lion.mk-sys.cz>
Date:   Thu, 8 Dec 2022 07:44:38 +0100
From:   Michal Kubecek <mkubecek@...e.cz>
To:     Jesse Brandeburg <jesse.brandeburg@...el.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH ethtool v2 09/13] ethtool: merge uapi changes to
 implement BIT and friends

On Wed, Dec 07, 2022 at 05:11:18PM -0800, Jesse Brandeburg wrote:
> I was looking into some errors reported by the runtime sanitizers and
> found a couple of places where (1 << 31) was being used. This is a shift
> of a bit into the sign-bit of an integer. This is undefined behavior for
> the C-specification, and can be easily fixed with using (1UL << 31)
> instead. A better way to do this is to use the BIT() macro, which
> already has the 1UL in it (see future patch in series).
> 
> Convert and sync with the same changes made upstream to the uapi file,
> to implement ethtool use BIT() and friends.

Please follow the guidelines on updating UAPI header copies in
"Submitting patches" section of

  https://www.kernel.org/pub/software/network/ethtool/devel.html

Fixing fsl_enetc.c within the UAPI update is OK (and definitely better
than trying to avoid it) but please update all UAPI header copies to the
state of the same kernel tree commit which will be indicated in the
commit message.

Michal

> This required an unfortunate bit of extra fussing around declaring "same
> definition" versions of the BIT* macros so that the UAPI file will
> compile both under the kernel and in user-space (here).
> 
> A local declaration of BIT() had to be moved out of fsl_enetc.c when
> the implementation was moved to a header.
> 
> NOTE:
> This change will be followed by a larger conversion patch, but *this*
> commit only has the UAPI file changes and the initial implementation to
> keep the work separate from the application only changes.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ