Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp889519iol; Thu, 9 Jun 2022 16:48:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCSqlAoVCpeM9zDQAjoEVFWn6X77qn1+qtgg4KXcbjDVaenJGltTh8dQiPaUbh1pacpOpA X-Received: by 2002:a05:6402:440d:b0:412:9e8a:5e51 with SMTP id y13-20020a056402440d00b004129e8a5e51mr47692416eda.362.1654818525080; Thu, 09 Jun 2022 16:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654818525; cv=none; d=google.com; s=arc-20160816; b=qBrvHA2TGWTXgyIRKIbuOM+6PfEVMiHMx9CotOPwdMEL/lHqBI7b05ZuWgErRbpIwW zpGuUrMehAHmxUje6/u8OFTNZPWXjpQeL5RwNJRgfgsWmP7HE9bnaSlSlE6zGaEwDSD7 hahXDlAIURtbIJ9E3oIgIm6RtdEY+2+FkRQMc/08VkScHMP2oVbOnnESd5tvELK31wtl C7KcKw3Apm3d8e1sNxJMfKjO0CPX9hPg7WQXypdv6EZSgeeuTgCjwMPzaUVbdZseBORS zwJZ2y8mpnS8/fZeGmokfDu2v5uuUArUn7hKoY3tg7DEzn7rPiYkzD4gZKK++rInFmKq iAtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=s6f6JLtoaOli3gEhHTppp4fmxuJwb8QIU15eBakfOJU=; b=o4cEoTCxns9kJZ6RLAajWxqA7ir8ixqNSVi1BXxAIKFZov3re9L92ACTUUaku6xQOL e1Glzc/wY/6m0R6I2bJvVTrppqfB3WmdZYjCHbrIC3sULURkHZ/ihpbr7a/Wwe2YNngj XEwix6VjLurxz97hQiIbkXoo4Fp2gk21UPzafv0gmHSGtuNwt6GVc3NxE1D2S2flB0q2 DMnUCdYrfwWYVJhKMOBUP73S49tCz4DMJbp0Yxs75vyXCKF7kr0HnODZzTLq6POLZJ2A CYEUuPgxeU791rg54UD7+aP1gaLAETnaB7wrt8m9U/j7lldGUVfJAs+m7NJ08uF0U3Ym 7UeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=i3qj63Wr; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x29-20020a50d61d000000b0042b354fefcesi4988717edi.271.2022.06.09.16.48.18; Thu, 09 Jun 2022 16:48:45 -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=@infradead.org header.s=casper.20170209 header.b=i3qj63Wr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234857AbiFIXQR (ORCPT + 99 others); Thu, 9 Jun 2022 19:16:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235935AbiFIXQO (ORCPT ); Thu, 9 Jun 2022 19:16:14 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0A453BDF74; Thu, 9 Jun 2022 16:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description; bh=s6f6JLtoaOli3gEhHTppp4fmxuJwb8QIU15eBakfOJU=; b=i3qj63WrYUNY43MsN7ARPnlv0w uhTtBf8MplRqkVMB/I9jOTstcPT6ZK+6y7m82ty5GKfMfhF92mGMAti1AG/OXZYAPUeJttdRU6UwF Y5O3WPbkmENJgFLqmh6wbK2eOgNf6Enb7sqWTh7i4qUab45mlSpZ3LVw826gFmWwhHquxIngcAy8S Gm8k4+KVgF6yTPW8u5Ayl956vcUcvRax5+ZOTb0FvlddSrT+XQb2bhvUgG55iQaUkRdpB7qxlpwLW 520dbhk/1P/Z6KN3O1BKt3GiFEJmhyjtSTMfCkQyd2PCnjNlHiclShan1cErMRn8vtPbnPCEOiBYt TO7/TPBA==; Received: from [2601:1c0:6280:3f0::aa0b] by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzRMu-00DvXN-9e; Thu, 09 Jun 2022 23:15:12 +0000 Message-ID: <3a773edf-f850-e83d-828d-19f91a373384@infradead.org> Date: Thu, 9 Jun 2022 16:14:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 01/12] x86/mce: use correct format characters Content-Language: en-US To: Bill Wendling , isanbard@gmail.com Cc: Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "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, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, alsa-devel@alsa-project.org, llvm@lists.linux.dev References: <20220609221702.347522-1-morbo@google.com> <20220609221702.347522-2-morbo@google.com> From: Randy Dunlap In-Reply-To: <20220609221702.347522-2-morbo@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 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? > 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