mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: David Laight <david.laight.linux@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kees Cook <kees@kernel.org>,
	linux-hardening@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-wireless@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: Re: [PATCH v1 1/2] overflow: Allow to sum a few arguments at once
Date: Tue, 23 Jun 2026 19:50:01 +0200	[thread overview]
Message-ID: <3511ab1ebd943677ba6a62c4e807db7dd762717b.camel@sipsolutions.net> (raw)
In-Reply-To: <20260623163203.195416b4@pumpkin> (sfid-20260623_173213_713027_EF574A6E)

On Tue, 2026-06-23 at 16:32 +0100, David Laight wrote:
> 
> Both those seem to contain multiple expansions of is_constexpr().
> I'd be surprised if __builtin_constant_p() wasn't good enough.
> 
> I also wonder what kind of mess the object code looks like.

You should definitely wonder less out loud and only comment when you
have actual hard facts...

> I'd also worry whether the saturating maths in any way performs the correct check.
> I suspect the (non-saturated) value gets used for a kmalloc(),
> but that has much smaller valid (and sane) limits than can come out of the above.

That's, frankly, ridiculous.

johannes

  reply	other threads:[~2026-06-23 17:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 11:12 [rfc, PATCH v1 0/2] overflow: Convert size_add() to take variadic arguments Andy Shevchenko
2026-06-17 11:12 ` [PATCH v1 1/2] overflow: Allow to sum a few arguments at once Andy Shevchenko
2026-06-17 12:56   ` Johannes Berg
2026-06-17 21:30     ` David Laight
2026-06-18  6:39       ` Andy Shevchenko
2026-06-18 18:53         ` Johannes Berg
2026-06-18 21:36           ` David Laight
2026-06-19  3:47   ` Kees Cook
2026-06-19  6:45     ` Andy Shevchenko
2026-06-20  3:27       ` Kees Cook
2026-06-20  6:56         ` Andy Shevchenko
2026-06-22 11:16           ` Johannes Berg
2026-06-23 14:09             ` Andy Shevchenko
2026-06-23 15:32               ` David Laight
2026-06-23 17:50                 ` Johannes Berg [this message]
2026-06-23 20:03               ` Andy Shevchenko
2026-06-17 11:12 ` [PATCH v1 2/2] wifi: nl80211: Call size_add() only once Andy Shevchenko

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=3511ab1ebd943677ba6a62c4e807db7dd762717b.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.laight.linux@gmail.com \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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®