From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2260CC02192 for ; Wed, 5 Feb 2025 21:28:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B1136B0082; Wed, 5 Feb 2025 16:28:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7614E6B0088; Wed, 5 Feb 2025 16:28:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6291B6B009D; Wed, 5 Feb 2025 16:28:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 443896B0082 for ; Wed, 5 Feb 2025 16:28:40 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C2370140BAC for ; Wed, 5 Feb 2025 21:28:39 +0000 (UTC) X-FDA: 83087180358.04.C91C4C5 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 0D330140004 for ; Wed, 5 Feb 2025 21:28:37 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Gzr7ovXh; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of kees@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kees@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738790918; a=rsa-sha256; cv=none; b=WcF/+yMrWEL+KzYEXfRaCorbYdWNfUi7bSUydZ3Kn1W9H/XdtdTDfWrDA9LmGVTecT7kGB 8sib+zXgKagFsq8OmXwenh0Lxz75kOaY2oI7rDDr0r8taRb7MymbvEYJwYpv8a6jse4oU+ z0H3GLHV2/aA6+Qo6Xrhfx/rkL7o2vk= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Gzr7ovXh; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of kees@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kees@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738790918; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=P+Oj2Vw0SyYsHQmA3skGKQ+LMrMh5yELSXLiUTgQ20Y=; b=U+8GHYRH0xL7zQAJRaVHRzANW4rQ+NGcUxGizHTKzPBA949SkO5m19l4ENAx7Q68bjMFgR L0yIqmsDl6W8LooNas9jp/qVLTVtHsY5BSzzu0ucYHUNKmHqQQpjqJfSKTdKDtHOHwP0f4 SFqx+rOq1PhOVeAHgUdh0ItwhhkUXfc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 41D055C576E; Wed, 5 Feb 2025 21:27:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA8B6C4CED1; Wed, 5 Feb 2025 21:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738790916; bh=7cTiWKja8ahpB4cG7xBn/0D3VBJyS3IVnXM+ObDED60=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gzr7ovXhUYUByQb2QlVylFjDoipQApTHo9KjwVI/thJyLkYaAGqufTnV79TA6yBVi kK8kwiNV2rSJFf2e+iYVvi3yf9h1m2CQt8ovUSRuS5vMEtIEkTr814VlCbQqn/JUNX zIxM8n/ohq6moz+2S3MJz36IUl1W+wyK5R/NcoAM/qRnd9xlvU6akvdAxoyjcNwBSi UO+GHb0QWH47yanJ8ORSg+CaACYC/Em4pHP5XNmzMo1cXolqJULApqRDfBDh0xZY0t FWVBvRRZNFhZoDrfg9MZgZLuqwb/YrUIkJd+QQDx71OjbjmGQ2kK/BCY/uUY9DS2/Q s2GRJZ/ba9heg== Date: Wed, 5 Feb 2025 13:28:36 -0800 From: Kees Cook To: Kent Overstreet Cc: Suren Baghdasaryan , akpm@linux-foundation.org, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel test robot Subject: Re: [PATCH 1/1] alloc_tag: work around clang-14 issue with __builtin_object_size() Message-ID: <202502051327.AE8C0706@keescook> References: <20250201200503.2532357-1-surenb@google.com> <202502051056.B910C691C@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 0D330140004 X-Stat-Signature: bsjecayq53zf7g9c5obhehb3bdawmid8 X-Rspam-User: X-HE-Tag: 1738790917-723756 X-HE-Meta: U2FsdGVkX19qr5JJMU7CLz52nZMVNOAIe+ru+4AeZkwPq6eAZKKb/i5vclLX91AfeIJMXnxfWCMGKwxVl+2O7Wa+Qxk13NAL1xwAc3xQW12Hk9OGex9pTssVnQxgKznCe44lVZ3FOQBTVehF4Xx6Z6nnI0SRCTqAXndMYyFN5Gv26wXepWIpkHOIGdSrB1cGeLq8JxwqXsUBKh8AmEfsUNH/ypatoLFXVujWNWUZtFI4gi+g72idd8U/wFzIrqAdS1cc2VztvtLa/3O9G5FMtzb519yTboTo8BS87yddyMNAYgMzoJSu9J6xm/7dCLOT3CUI6A0P1i5ih9HeRgke8CU4s0Tqksl+oE8ex7mONrhBbI90BqHVwGho0kNyenFCN67DIBNmRqZr6mnUuSLdtloMC4dog9ExWAx9AqlI3kFUnUe1olgxsRcQVP0WcUGdY8sRfYG3DjKT1X5vlc7LiTs4HSAckBRfqFCQyD7jMryfK3wvBF8KNTNwz2yA445ZtO46VoEeKX8AGvjqzLv4PFp8QuiNNmpA8mEEBMJUg6s9EKo7uGFLE9CjyQZz3jzuOtezJ/E+w13dkG/3ZdxP2j/Ke/DEidqjgpR4CViKLhPJ59eaQtb+eGHs4Tiqcgy9sXdXShYHGXneVgh/lG64J8B5I1KRrr+OWzuyCVwO92k5Gt+NOpc6uruorbHjzHJpHT8vMeRf9ePjq1OsNQVatPAl5Dy2dx84pfSDnlSmw/N9BKK4XY+HTOE9CR3LfgPnw8Ku9LC3cczVCCb7HcygejnaYZaEqq25Hql9rl0dZpvOMG/qV5grCviiMGH6zI2pYCk9ERxnEj5QhmnFuEWwQBFi//lNGToH5Ghb8c5seKlIkEx1RHpNsSJuFsVHYtJRJgl+u0DoGcFZ7cwFTAXCV9Q2Q+Zu1aVH6f5zzScFujOI2P08S+Y9Ok402b6mDg3jqEPR/vGQUcBVjLfPdaV jzm2KutF hm4n9/ahc9/WWxAoruvJdGN3PVooxlXTyzD0HVSFPd9vzcooqKTmGNr9uLk9JSXoCwJU/N2hO4iDE5gS1XPPHDiXvWFzX+0L0a0JbwyrU1HzVRlWSVDTGu+9Z6iNmP/dRVRQx+Kv0R3sNQQKJO/+1GbTihJWS+4nTSlk8/7cEb+ACQbUWlMf6VRRQmj9d/x6mr2KkeldbjhZCsQ1+xtMeYYIuVWRUC0snPRO2LJ5T3qxkfO+KA/si9sAIAotIMGb45x/AF4/yvSs2gEeaLaTSpLMG1NXqGDVXKHZyQ3wJOozaHqg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000208, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Feb 05, 2025 at 03:16:12PM -0500, Kent Overstreet wrote: > ARRAY_SIZE() is sizeof() underneath, just used creatively to guarantee > that the input is an array - although that property is probably what we > want here, since strtomem_pad() really only makes sense on static or > flex-arrays, no? Exactly. strtomem*/memtostr* are very picky about the destination being compile-time sized, so sizeof() under the hood seems correct. I'm making my way through testing a patch now... -- Kees Cook