From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 7BEEB2BD11 for ; Wed, 24 Jun 2026 12:28:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782304105; cv=none; b=OO40lrgmLjmhFb9030jLYYLchnpSrFaTofxCPdAyQr1K7ojSPp5Lf51TQdmFXtmlx3gx8zW6HEV3xip7og2PYw6j8kxsIvibnEum10UIOQSzi2O+my8CP5caQfsGtA7oO/DY0DtgMe4a3Kz1RdI00giaNEJlFq0WLaJ4hj8WlpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782304105; c=relaxed/simple; bh=HV7ZFu4yf88sKUiyI8sguCKmOgViMnyqSM2w5t7/Sk0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QscglgsM8CO4AuyKpARvJR4zkEcDSTVlxRDU84ILFauLCvxc06qHXdRSmCErWi5fzN7DYUU1BSTrjLaYmg3Zs0wb7dkQHZEDoWK/c2hCRl3PGpRQBuj14cx+jtiInFA85mk3Eb66Yl1CkD/iUKqgWT6rnBmYpT7CRg8Sqd7venE= 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=SaGJ/Htf; arc=none smtp.client-ip=209.85.128.45 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="SaGJ/Htf" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4926046fbc5so9430975e9.0 for ; Wed, 24 Jun 2026 05:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782304103; x=1782908903; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=f/CrBAF2B9o8/C3553q9Ds+gCZQC8CnhWw5adANt3ZU=; b=SaGJ/Htf7raeixGiJ0MdwpdDupL2VqK6Flt7R2z3PBCuQOUZFBhLBsQ2sDqU60gqn0 YWJlAiCUoAtqH9K9+/VSi8GHxmLM+Lh6f11uuBbhFTIFKMltAE5T0TcVAo4k3E3eJk+T Cc5OBjXN7kXYa6xsGbYiS4KGf8EGLFSlSaMxeD1JFcUZWUV+X2Wa9O84yY9bw+BNSzDX 0dIMG8SJdqycGrgN5XdzsuW/D2LykYsJ5WWMqHXxlR4DyMvbsBRnqN9wv0V2x2hTzHXm GVHq05MNsz7RKvz8pmEmskU2DCz8sSJhQodcWlDR2uRPAuawsRzzfyja5snfBkyq3bf3 MFEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782304103; x=1782908903; h=content-transfer-encoding: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; bh=f/CrBAF2B9o8/C3553q9Ds+gCZQC8CnhWw5adANt3ZU=; b=UwukNXi43OB8+PFgoCvH15l/YMYGwsV52mnwqT7xX5amwAtuvJqjAradKByOuLGPtX sgtvcRdy1XB/Q2MYSsz20HzXFVDnAbO2lRPwhYLjmHPuy+PwRQkGRMUl5jQioQRxzCk/ B/TWKl5YZ7q5QAqE9r4KRYVAHJT1pmoYnkyogCiMa5ihjsQLrs+3w1nwmiH98udmPwNZ Ob/DEsLvfbs4DMRFLTKJf00IWfajdJFukoB5tEbuSW3XWgAZVlSUXoBKtIefi1D0rETB PdtG/+BKbOZfwyKxP+AQlYK72Qzo4HJfXq4RMOG7n4c/go1jjLpoybXEO5jC7Aomxpwh hIkA== X-Forwarded-Encrypted: i=1; AFNElJ8+kU5n23syABGhspr37qhg+BSnumJv7RS56g286YFWtUYpecDXRZutoosRZugf/KqQSOrMVyKAmYXF2MQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwdJbcRsKB5UVesd1dm6rtblGfeiATwKIjRsuVjTirPUBGmd2Vy ZLzqOvS+71FhcPk+aU3XIR/KusMu/Cy242YK57c4kVIXSx+lx7LBxePJ X-Gm-Gg: AfdE7cn+iAVc5oWi389YPmlJSKCavojgXzeS5Fzl5Tn9FovgkKCriHcMmpOmzm9GXDZ 5ogbQTOEi2TyjYEgKp5OdCIoLSzwZtJtakUiyRcO+26gwrJjzpGyzkdEPgb+7WhgxrgMA5LVF1i srIAzeUscYAftXZXYIcrpfpv1J1bzYwsiH+Au0L/LePO4i6sdOAGmnkpuUUaLXmzaPFiSTwQxGi 2XdLQRb9QY2tc6oBzDlbipim3txlfb9izvUc1gCRBssiY/rEpMDZfROZAOblPl+hPPSCwQAORXE E+RVQ1FGbog9YWI+ZOn/L9nLlw4BtIUjDgjB23KIKMYWKxZ6yvFPruae/UkMMD4zXFqnWAAJ/V5 o4vlOX4ptbK3eEhpsoElniTIh1M3zdYRphLNQKgGclXKuZZDTMQdN2p0eOvnc+G0ocXjqck/EPY gGYVCRBEaXJ6CCsD/IYHRlBJhJNoCum0fprP/b6iLrilsvG8lTOC/5o/uPQXeu4rtlBAl55LUR+ RFCE1X1 X-Received: by 2002:a05:600c:8284:b0:492:4889:3d18 with SMTP id 5b1f17b1804b1-492632aaceamr3700105e9.9.1782304102594; Wed, 24 Jun 2026 05:28:22 -0700 (PDT) Received: from [10.128.11.131] (195-23-151-163.net.novis.pt. [195.23.151.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-492609154cdsm46443965e9.1.2026.06.24.05.28.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2026 05:28:22 -0700 (PDT) Sender: Julian Braha Message-ID: <7e416a8a-d7f0-4dc6-b279-f7848b89df31@gmail.com> Date: Wed, 24 Jun 2026 13:28:21 +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 v4] kconfig: add kconfig-sym-check static checker To: Sergey Senozhatsky , Andrew Jones Cc: andriy.shevchenko@linux.intel.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, nathan@kernel.org, nsc@kernel.org, rdunlap@infradead.org, tfiga@chromium.org References: Content-Language: en-US From: Julian Braha In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/24/26 04:34, Sergey Senozhatsky wrote: > OK, maybe they are not similar, as Julian pointed out. Makes > we wonder is there any benefit in moving this functionality > into kconfig (which is the tool that deals with Kconfig files). Agreed, it would be ideal if the check could be part of the kconfig interpeter. However... Linux does a funky thing with its architecture handling in kconfig: it looks up the architecture from a makefile variable and uses that to resolve a kconfig file import in 'arch/Kconfig'. This means e.g. when evaluating the kconfig on an x86 machine, all of the config options in the RISC-V kconfig are never reached, thus never parsed, and never added to the symbol table. As far as the interpeter is aware, any reference to, say, RISCV_SBI is a dead reference on x86. Yet, options throughout the kernel can reference arch-specific options. Try searching in menuconfig for the RISCV-only option HVC_RISCV_SBI on x86, and you'll successfully find it, because it's defined in 'drivers/' (not downstream of arch/Kconfig). Then try searching for its dependency, RISCV_SBI. Apparently it doesn't exist? In my opinion, this should also be considered a bug in the frontend... All this is to say, until architectures are restructured in kconfig, alarming on unknown options would output 99% noise. - Julian Braha