From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 670003905E3; Tue, 23 Jun 2026 17:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782237014; cv=none; b=PQM9XWNSgHRrEWm+O8CHJXrcH+Wx+QrcFq2Nev/nvufkB0zupU3/g3OPait86YgNFLIIkOFuSfUB+mqvGgXfvEZ+3yJhDYSvp7GW8tCaxyxrAl4jQsXpTn/eI+nyJ/gt53W4wKW+3fHQX1tiV6OzLNHE9vLMCWUQzGxtnMz4fR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782237014; c=relaxed/simple; bh=+JdrjsYKUQPP+AJ1Ipz4wdn3hc3rh4DAOl755B86FG0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=WPBAYxwa7E0Q1AvLmsT2ESteit/swzLq7+qKO+wIbJuQX7B6CvqVDyZyK9124bve8rY++GbwFrkur9dUrLmyVZX3wgD4mkgnM/nKv7o5CiOE1rydvOm1rELlP0lxMaOHzwCwsKjFzObWIP0BcbDY5jnMsh8N1PEABAWzooX9Tww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=permerror header.from=sipsolutions.net; spf=none smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=FLrvvp6S; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=permerror header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="FLrvvp6S" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+JdrjsYKUQPP+AJ1Ipz4wdn3hc3rh4DAOl755B86FG0=; t=1782237012; x=1783446612; b=FLrvvp6SGxzv9oZgUN5pNguzw7NlXUIMbA807ijlz9aOwkT JRjRfCmV6tg+1oT2KQYKe6CxUxhkqK9rSJYVMi4eRunD0pfyDQdAe9ppJlpQEefuSVv7icAWDexK0 fUK3EKLh5++kqZ+AWNJ2n5YMIz3fAqJduUMS2KgP2rk86lKOOrtfDfOBTU3RNdyyXqVyZgc5V7Xws 3djroDjk02KsmAllBffkV67FNmdUsRJpOxg5ceAEY9Az6E/w4DuWi/wHoOl9aKlXCvn8wxI7B4BN7 MNVOXDgygP/i5elV0GkHbve/5CXqkgLKstIzrfmVc1ttojzUhaz+Db2GWHqH2aiA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256) (Exim 4.98.2) (envelope-from ) id 1wc5G6-0000000Eiey-2W2y; Tue, 23 Jun 2026 19:50:02 +0200 Message-ID: <3511ab1ebd943677ba6a62c4e807db7dd762717b.camel@sipsolutions.net> Subject: Re: [PATCH v1 1/2] overflow: Allow to sum a few arguments at once From: Johannes Berg To: David Laight , Andy Shevchenko Cc: Kees Cook , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, "Gustavo A. R. Silva" Date: Tue, 23 Jun 2026 19:50:01 +0200 In-Reply-To: <20260623163203.195416b4@pumpkin> (sfid-20260623_173213_713027_EF574A6E) References: <20260617112250.2791461-1-andriy.shevchenko@linux.intel.com> <20260617112250.2791461-2-andriy.shevchenko@linux.intel.com> <202606182046.AE5F6A241@keescook> <202606192025.CF68F2E@keescook> <54974e4298efd26a52c9c0e9ada88d57e8695a09.camel@sipsolutions.net> <20260623163203.195416b4@pumpkin> (sfid-20260623_173213_713027_EF574A6E) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Tue, 2026-06-23 at 16:32 +0100, David Laight wrote: >=20 > Both those seem to contain multiple expansions of is_constexpr(). > I'd be surprised if __builtin_constant_p() wasn't good enough. >=20 > 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 corre= ct 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 th= e above. That's, frankly, ridiculous. johannes