mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: I Hsin Cheng <richard120310@gmail.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again
Date: Fri, 6 Jun 2025 10:20:56 -0400	[thread overview]
Message-ID: <aEL5SIIMxmnrzbDA@yury> (raw)
In-Reply-To: <20250606-uapi-genmask-v1-1-e05cdc2e14c5@linutronix.de>

On Fri, Jun 06, 2025 at 10:23:57AM +0200, Thomas Weißschuh wrote:
> Commit 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"")
> did not take in account that the usage of BITS_PER_LONG in __GENMASK() was
> changed to __BITS_PER_LONG for UAPI-safety in
> commit 3c7a8e190bc5 ("uapi: introduce uapi-friendly macros for GENMASK").
> BITS_PER_LONG can not be used in UAPI headers as it derives from the kernel
> configuration and not from the current compiler invocation.
> When building compat userspace code or a compat vDSO its value will be
> incorrect.
> 
> Switch back to __BITS_PER_LONG.
> 
> Fixes: 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"")
> Cc: stable@vger.kernel.org
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Thanks Thomas. I applied it in bitmap-for-next. Is that issue critical
enough for you to send a pull request in -rc2?

Thanks,
Yury

  reply	other threads:[~2025-06-06 14:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06  8:23 Thomas Weißschuh
2025-06-06 14:20 ` Yury Norov [this message]
2025-06-06 14:32   ` Thomas Weißschuh
2025-06-09  7:47     ` I Hsin Cheng
2025-06-10  7:19       ` Thomas Weißschuh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aEL5SIIMxmnrzbDA@yury \
    --to=yury.norov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard120310@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®