From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f12.google.com (mail-wm2-f12.google.com [74.125.225.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E7AA493D38 for ; Mon, 21 Sep 2026 12:09:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789992552; cv=none; b=W2+4Tmhp1jgTtythl/5WdWSVMSO5jIUJF3DxlGGK8mpsXIgJYm4u8lqIZjpnWK7OKjcZR3jK28CmlhkFjvHsmGwpopfU0y3TDK52WmxtM9a6lB43D9FOVkdoE1+YZK5iZLvb4jkIL7qLDwtbScxz5sr5HA33P7tRvJNZ68KcNqc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789992552; c=relaxed/simple; bh=YBV2qFNBiBDxmwMg4/gYVlQdwkVLa6/Ny/umX+th+a4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SYc16x0jre9V8soqd90SJ4zHnDXN4X1k5BfRyyRPFZ4EV5rZL7Jg8wcgUWKMCvt1A6dB2botT86h1+FrhWyrRFBm2kOeD9uKCqO/SE6dFz3lBZwG7qrr9peR6++AiUOX+1S3T83GZEKqh1ABK6s7cx1HSNNFtx0Wq75iidKF/8o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GYkLfITr; arc=none smtp.client-ip=74.125.225.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GYkLfITr" Received: by mail-wm2-f12.google.com with SMTP id 5b1f17b1804b1-49b912e4ad9so16523615e9.2 for ; Mon, 21 Sep 2026 05:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789992548; x=1790597348; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=P/1AK9R3z2kttD4zy0NklD51ewJDy0/li8YyGBaTfLw=; b=GYkLfITrdAUgP+k2PZQaJ3xuVXjhg1TCqeH9r7FvsSMfhJ0XWdj6L28rJSBTeU1tas Kfa84zyYoSdtGL3zYB9ZrwaYxhu0oMaPPzdhJ//URpBWj9sydFy8CHgaRwMESG9DGX0E pNZEU8XDR7Xjl/ZE9w1zkIoI/VRUXd226DWsc2bAb4zdwCUYN7aMFf125HYRq9B50qH0 D9NVS9I4vsc9kJ37RSS73h+wLU142gChpqqpzbOQwVC61eRwUToiUR+tnG3keiqmuuCc KGW2AgGJ2HcTB9yWqlAd37DeLTzR2QEZ1DZ85icA5Qz0iL+9XEkpw/RKKObEsct9JwbU xlDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789992548; x=1790597348; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=P/1AK9R3z2kttD4zy0NklD51ewJDy0/li8YyGBaTfLw=; b=g9njRFUayPKWiSneWYeMxR6v278TQsvZA4tyfgB3aM/6rzL0hfFdceTJWt8PAGI0Of V3dQt5UOZPIDh8KKv3j07Ze2+852tD/HZ6EM3ABHC2l3mLC/Kxfp38m5mFO9NayGpDE+ Af2cHhBjjKRljP2sTQ3zYfLkLzpZ8q0dCotfN9R+ugnF22yfiWIKWUhyBtoe2Qm+t79I JvNpk0zMIDf6+z/eXbzOGIrCG+Gt5luJ/ueomHwyOOCQUKwfvNR8I6NohqTOnzJ7SoKh yc6WlhJ7uvhwVTCQWYkmt+rG0wpa7G7alMKpyD/EQoWu+tQbGDBzS74sNorh/z17gxQ0 e0Sw== X-Forwarded-Encrypted: i=1; AKwUvBzRJepMWTHXORkgy8XGHsPVbWGzsbX32KMxXvRXn5rIFPEOY2vjjSxUKXr7T87OUFYWn9PvGgO+3UEOsNk=@vger.kernel.org X-Gm-Message-State: AFuF++l4TOoBnTddqUOkejQCrq8pwidhX5QZAnn5UukBAmUYFgJfvKEC b7OA2rWJS1V2fi6hL4847FpB/iFOIWGI+BfVIVcQM2C8nCH3rJQVhY94 X-Gm-Gg: AYBFou0gOyYH5P72d5TQAmOJf559zWdg6tP6iPzulp20u7WXLdDwUhicGrbcJkX/rqM UEY6QjKGgumfAY2wO4Uvd4LvXyoacA64DNH1UFuKKfgibqtL00PDhhxVWG3mqDLWkGJ2XAv1iid IlxAMwu4DjIZArUMXibjcH6UDi21nRqFAVzybRHpR4/LMEoVxTr1VwU+SNqqPkB56i/lRErvkFD Bw6wq4KoSC4gPanL2E6V5MZYM75v6smNC9GbzSsfHNG2WyUNopQ/l3yZ4X4QEdIsMfph9AhMTr0 afAhzbotii31/sT+ys49uNikXULCwChwlCAhXR6e/LY3MdGwT+0hBfAKdQIYvcwkphAvjl21y4Z H0n/a3bUv3nw3gAiLEwYHTFaALoPABTxm5fCndmbAWHtP5KgFbXa1EKxTImXJxDqNIiI3CKnYOK imIQ5BdJQO8k50rU9RF+VbEt1YcQYFMa95X0laja/LS8C9hVoWBLNL4JJYzOGDEaVftPgMV2+5A XR08yQf75iblRa2MWTxx/B3uPTB6dT7hOTjDyU5RsnyodkAFKRLelsFD/QRfpX4XKI7n1/vqtyq pQ== X-Received: by 2002:a05:600c:1c01:b0:49c:fc6e:a3d7 with SMTP id 5b1f17b1804b1-49fc5753eb2mr184542645e9.22.1789992547781; Mon, 21 Sep 2026 05:09:07 -0700 (PDT) Received: from [10.128.10.232] (195-23-151-163.net.novis.pt. [195.23.151.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fcd10273fsm229284935e9.7.2026.09.21.05.09.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2026 05:09:07 -0700 (PDT) Sender: Julian Braha Message-ID: <350cc022-2769-4052-93f4-029ef93fa41c@gmail.com> Date: Mon, 21 Sep 2026 13:09:05 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] kconfig: Replace "cc-option-bit" with "cc-option-str" To: Kees Cook , Nathan Chancellor Cc: Nicolas Schier , Matthew Maurer , Miguel Ojeda , Masahiro Yamada , "Borislav Petkov (AMD)" , Gary Guo , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , linux-kbuild@vger.kernel.org, "Lorenzo Stoakes (ARM)" , Jonathan Corbet , Shuah Khan , Randy Dunlap , Vegard Nossum , Nauman Sabir , Tejun Heo , Nicolas Pitre , Andy Shevchenko , Andrew Jones , Graham Roff , Arnd Bergmann , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-hardening@vger.kernel.org References: <20260919005923.i.879-kees@kernel.org> <20260919005929.4077729-2-kees@kernel.org> Content-Language: en-US From: Julian Braha In-Reply-To: <20260919005929.4077729-2-kees@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 9/19/26 01:59, Kees Cook wrote: > $(cc-option-bit) returns the flag it was given when the compiler accepts > it, and an empty string otherwise. It was originally only used > internally for machine bit flags, but it is generally useful[1]. > > Rename it to $(cc-option-str), which says what it returns rather than > what it was first used for, and extract the probe logic from the existing > $(cc-option) macro to reuse it. Additionally add support for an optional > fallback, much like the Kbuild cc-option macro. This can be used as: > > config CC_OPT_FOO > def_string "$(cc-option-str,-fnew-option,-fold-option)" > > If the fallback is omitted, it is just an empty string. > > Build tested ARCH=x86_64 defconfig with GCC 16.2.0. > > Assisted-by: LLM > Signed-off-by: Kees Cook Tested-by: Julian Braha Reviewed-by: Julian Braha