From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 172BA366561 for ; Thu, 23 Apr 2026 15:48:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776959282; cv=none; b=NwImSJg4crgqlwqGr3Qa+xieHt8NrudTjB9gsh4LlcVTO3G1EqfLVgGxOdvPQ8KRwFMWJlBPfSChHjAaPSZY+NaVeVu+9mvjeDVNYq5WjNbeS1n0EVJMDs2mfF1eifyNpmwimET9m246AOlfYKsN0QOGdjvpesApRlP+3tPPCXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776959282; c=relaxed/simple; bh=ECI0uGjvmxRj8TF07sePAdZp4XmKXCqwxGL6xQATO0c=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=F7885s2VaGrc7MJsTbbX5s/wiZRIa+2lK3xCne0Wc+0IbKWNFQWgvFyX+X7NFE+8iCwcL6jDzFoUMDA+ljKh6tMtnSCFiTt5tKbGXkpBlCEGP18l+qZDgqOplqRlVUbNaooekv4c3fCZ3K2gtgO35aFDJJocXYr42vF9PgkEfSE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=J3KEIWsx; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="J3KEIWsx" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-82f6610a6c8so3560184b3a.2 for ; Thu, 23 Apr 2026 08:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1776959280; x=1777564080; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=2KbqObZuQ2eC3fWnIOvK1uV8rvoGIJyUKE7eYSy8Ik0=; b=J3KEIWsx1+UCRCLv8yYhSUWARLUYDKN4so9gebWxfoHdbhiA4WUQz/sqa1mF8UO/MA NB7iWStFbJqnaVDGknaqnN4bh2EXweQElpUZTGFNG/jYhG/KzK3Z9O/CKMXyqz8Vuedi tOZ/ffRQOdz1ZFJlmppY7YPm/l5vbzdRF44i1VmHyKAyS87GdYGW0RmtpMTjXi8koYFT eo5qAt31a/LtIWhbqhvbMaqKq6fTOCH/0ou3sZiJmQfWe+wcuwN6MjJdVFtQfdzaBbXu U8Mv8tRST/gyrLB3cXryfmRGRp+UNkb7yUCEE9LHP7ssTZeTa6taaCP1AeHPQzMdxsbT Yacg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776959280; x=1777564080; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2KbqObZuQ2eC3fWnIOvK1uV8rvoGIJyUKE7eYSy8Ik0=; b=Ay6x7rhxOTcXFgWrMawZZiROaat2vkhsSddFJYywmZBrgt8XMOvglp2npmRRzEEatS 2VUb24bDnjXn7JAzUDWCTxsSFEKm3ojVVARey9HK4+dPkEGj8pPtzuE+ObQEQ9dweX7k pivi1JqgPyL/5dC7RdDR8/edEXabl7rL/PKRyV1bC91RZ824MUSG4zhiFcypdRte5v6J G5acz5Rl5V8G1SHM588ouOVefEEDVlCLbUvbo/agsB5vq9irl4SvwMh3dNoGTPr/RQOZ AQcVwdy7n5aDpKwnokUnmomuR9PlkIR5ERejWeeM43GXBsX7G5y47/DCpfbG6f53XYQk 28/Q== X-Forwarded-Encrypted: i=1; AFNElJ9h2MYlRoycGnKtajd/Fcp3zslt4GjPyziZOC94gqBJW5ScOAKD611tsXAmzuaceKY77Q1ExsvbVt6H4NU=@vger.kernel.org X-Gm-Message-State: AOJu0YyCuUpP4vzrXM6GjeoMBV5MIES3sS6cX12oYrkT2mhlpPXLWHKi sR3MIso1VvQaSe405AHSp4rzXHdtThPr86AKuVZUTI0eAb/KWq7+SCStNWIT16peNa0d3R9A6FL Flx17ew== X-Received: from pfhx15.prod.google.com ([2002:a05:6a00:188f:b0:82f:3c29:a283]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:94dc:b0:82c:24d5:63e6 with SMTP id d2e1a72fcca58-82f8c831e32mr29100063b3a.15.1776959280284; Thu, 23 Apr 2026 08:48:00 -0700 (PDT) Date: Thu, 23 Apr 2026 08:47:58 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260423145419.459988-1-seanjc@google.com> <20260423145419.459988-2-seanjc@google.com> Message-ID: Subject: Re: [PATCH v2 1/2] x86/bug: Add printf() validation to HAVE_ARCH_BUG_FORMAT_ARGS WARNs From: Sean Christopherson To: Dave Hansen Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org, Yan Zhao , Peter Zijlstra Content-Type: text/plain; charset="us-ascii" On Thu, Apr 23, 2026, Dave Hansen wrote: > On 4/23/26 07:54, Sean Christopherson wrote: > > Lack of validation is especially problematic for code that is 64-bit-only, > > as blatant goofs can easily go unnoticed, as they (somewhat ironically) > > will only be noticed by CONFIG_BUG=n builds. > > This took me a minute to piece together. > > CONFIG_BUG=n builds use the asm-generic/bug.h implementations which have: > > no_printk(format); > > and do their own printk validation. Right? Ya. > Also, what do you mean about 64-bit-only code? 32-bit x86 doesn't support HAVE_ARCH_BUG_FORMAT_ARGS, and so it too uses generic implementations that provide printk validation. I.e. the blind spot is code that is strictly x86-64, because code that builds on other architectures and on 32-bit x86 will be detected by those other builds, and unlike CONFIG_BUG=n, people and bots regularly test those configurations. > I'm also debating if we should stick these in x86/urgent and get them to > Linus sooner rather than later so folks aren't bitten by this for a > whole development cycle.