Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp888330iol; Thu, 9 Jun 2022 16:46:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkqsQN2A7HoT4/Os/6RqTr6ks7JHvFFkS5g481+mAYJV/LKdMpN3G7QO1ZwaJURPAn70ln X-Received: by 2002:aa7:c492:0:b0:42d:ed6a:26e5 with SMTP id m18-20020aa7c492000000b0042ded6a26e5mr47379434edq.64.1654818402854; Thu, 09 Jun 2022 16:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654818402; cv=none; d=google.com; s=arc-20160816; b=UUHuYpXNqil5F7Y54D3Ncnq537UUJ8oR5bko86NdLJL2Ggnq/bvYCF7bOA2I9PoJxo SmXROJYhcdNygxhn+eJLlkZJ0EH/f0uFSkBUAe9RFsCsBsTkgSRLdT85X6kAa9z3mVSW ECJ6lw9AjONw3XbfvdaSHWVOFT57THZqdF+0EvPue7BYowg/5n0r4QQIb68cg7Jmj6FU /9lEGxgSHLkBGrdxYUgkeFad5rk2iC5ZURp0voiMCo6CluW8SwTESh9COKcxWyu4BfRF s9nuwoK7T/oNjaYMa78j9iIMabY/6/oGB8q+9afHZhZfmoQ2F5wwDJGqF6+6KtPYE5Eb CgSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=af6354Q+PYtjAeTE1fHxbOWk4spb0xe2rddSt4jQNw0=; b=glkbQmd9MKr3rHUPmcrrtxun18+Ui7+o85P5JFPbyayRgruf0aZ3lOQjUUyUxI+Isx s6Z+RBTdF1FflX8ZKig8zGLffNQzcrx+nUu7is90QYGvnsq6+E7x5Bk/CUEPBR0xsbBP 9/igBxrlWDaTD3BYPbAPY4FHchHZledgtomIgVLodRICDpsWaU4U7WZlaJpCNjY5q+TI 67cmO59+dED8u3B8aH7wLKFgjX7dB4KSGMKUz7gDrPWGeAsbo5+gvkr/9AlIymyDn/K0 4DtfnbSgP2RSJs3EPnCPMwFkZQTz1kW5M14SS8pCuar1NeA/JU3vxcPELnf78+cwtKl+ g2JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="qsw/gp8R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020a170906a10300b006feb5e45804si18375215ejy.229.2022.06.09.16.46.18; Thu, 09 Jun 2022 16:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="qsw/gp8R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242280AbiFIXS5 (ORCPT + 99 others); Thu, 9 Jun 2022 19:18:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346089AbiFIXSr (ORCPT ); Thu, 9 Jun 2022 19:18:47 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9C11224451 for ; Thu, 9 Jun 2022 16:18:45 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id s10so3392522ljh.12 for ; Thu, 09 Jun 2022 16:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=af6354Q+PYtjAeTE1fHxbOWk4spb0xe2rddSt4jQNw0=; b=qsw/gp8RDQr7TxcFAw67QADvplw4M8CuLpbXwYePEvTc9gyloRoNkLA0/65LPS2PHG lwvUx0Vk5tnQau+/eN+yj4vNNvEwrbFYrLKwsm69bjXQ0R4nOllOmIVjbhrvEDyLI/wP oUAGxwYePVYRcuzvMPpwS/H20SN6RBqtDq3M/sIFmsPVSQfFBqjqsQ4YrUJFt60H+vrG /vbIkayBKj2NafmzkfPK5WFIV3Pwo6mzHcJ+8+5Fy+N2x3QXFf68sSVrj/uvcZRdIojW qhr4netPBQEp3dEnvthXme6ipHwfVm1f0OwUWXWzeGYvw+rVPOiGjeTn1JUKCz0o06hy xlcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=af6354Q+PYtjAeTE1fHxbOWk4spb0xe2rddSt4jQNw0=; b=ONIE2nxQ/G5OYwp8sl24ER1Lr4+Jg7nVrPSIBBufIomDXCKJ3kzWWnYhIqRpDQOZmU HF4m1NdBdQEl2f0LO6YxaX4rHRwx0WrXCdJ/vtXTYWnZKbBNRDJPsL558Vbsijlz5pUC M0kjbHxfFLZJ2maMwzSWLgLZVW/6kllueyCVsyntDr+Twyaw6zyK6dHUlMepbTpSu7KB LaBLgR3X5UhvUcz0dNer3XgzOkCACEtfbBdvRzaQe9YZfi1f8yGI5lCjx/1ScJTKEJBa ZVEBzgWUx6DGAkBfX8qBzS4UbTVQ3qbpntmaVxtg4hTJzodwqC6oznsD0VwOwfBbdioW HWxQ== X-Gm-Message-State: AOAM533Qf2aHa+7LCd3sWAV8w54vet0lqFFgBT6jeOD4ahlIs50o7JAz srV5HgJFRT8cutVMzD1Wnf5OuW353zCKsuM6PywE X-Received: by 2002:a2e:bc0e:0:b0:255:9fa0:ed4 with SMTP id b14-20020a2ebc0e000000b002559fa00ed4mr10953078ljf.390.1654816723853; Thu, 09 Jun 2022 16:18:43 -0700 (PDT) MIME-Version: 1.0 References: <20220609221702.347522-1-morbo@google.com> <20220609221702.347522-2-morbo@google.com> <3a773edf-f850-e83d-828d-19f91a373384@infradead.org> In-Reply-To: <3a773edf-f850-e83d-828d-19f91a373384@infradead.org> From: Bill Wendling Date: Thu, 9 Jun 2022 16:18:31 -0700 Message-ID: Subject: Re: [PATCH 01/12] x86/mce: use correct format characters To: Randy Dunlap Cc: Bill Wendling , Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Phillip Potter , Arnd Bergmann , Greg Kroah-Hartman , "Rafael J. Wysocki" , Jan Kara , Andrew Morton , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jaroslav Kysela , Takashi Iwai , Nathan Chancellor , Nick Desaulniers , Tom Rix , Daniel Kiper , Ross Philipson , linux-edac@vger.kernel.org, LKML , ACPI Devel Maling List , linux-mm@kvack.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, Networking , alsa-devel@alsa-project.org, clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 9, 2022 at 4:15 PM Randy Dunlap wrote: > On 6/9/22 15:16, Bill Wendling wrote: > > From: Bill Wendling > > > > When compiling with -Wformat, clang emits the following warnings: > > > > arch/x86/kernel/cpu/mce/core.c:295:9: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] > > panic(msg); > > ^~~ > > > > Use a string literal for the format string. > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/378 > > Signed-off-by: Bill Wendling > > --- > > arch/x86/kernel/cpu/mce/core.c | 2 +- > > scripts/Makefile.extrawarn | 4 ++-- > > Where is the scripts/ change? > I'm sorry about this. The change in that file was a mistake that I reverted, but I forgot to change this part. -bw > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c > > index 2c8ec5c71712..3d411b7c85ad 100644 > > --- a/arch/x86/kernel/cpu/mce/core.c > > +++ b/arch/x86/kernel/cpu/mce/core.c > > @@ -292,7 +292,7 @@ static noinstr void mce_panic(const char *msg, struct mce *final, char *exp) > > if (!fake_panic) { > > if (panic_timeout == 0) > > panic_timeout = mca_cfg.panic_timeout; > > - panic(msg); > > + panic("%s", msg); > > } else > > pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg); > > > > -- > ~Randy