From patchwork Thu Jun 9 22:16:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 12876499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12F31C43334 for ; Fri, 10 Jun 2022 06:39:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4FA801F43; Fri, 10 Jun 2022 08:38:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4FA801F43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654843170; bh=E2xsu3xBe57plVvxtEQOAT37pQoIXchR0Y5CWeytKzQ=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=evWQ/PRAgXInDp+ZBHVnUgSpfBfQ+1Ai/0V95KgVQce4R9DTgwqPNe2IEvZqlf+yU dIeT+xLYWthEGyK5SG5e0x5iOeoLjcqzBBE6iLkgQM+dzht0HOhxmR2K+JQAAMnIok wiRdSLZXi9yjgjZg/6mjHusAl7fyRrfgjiuQiM3o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CC517F8052D; Fri, 10 Jun 2022 08:37:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7FECCF801F5; Fri, 10 Jun 2022 00:17:44 +0200 (CEST) Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E47DEF800E9 for ; Fri, 10 Jun 2022 00:17:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E47DEF800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RBpkYSjE" Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-30cb80ee75cso213625727b3.15 for ; Thu, 09 Jun 2022 15:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=3yOhmb5LLQ31qT6YeyEoaX0jjcoMdHElvVNlhTaaJU0=; b=RBpkYSjEyD64s1FKNQbtXE7AfdgJKfYmd5PMKe66FHnMYYo7vB0Ncyw1KRR50CoJoo aoycDWjxbUREKPl/jCi5J+ZmN745Yr3i1ib/+VcJJf8M0JMLiwl79xnz8rJSR7GD/eD1 lW/QxkZdjk6n9mbnb49kc1QuGbm9WiR5bRhdOxYxvavs/N1vvPSKHy30utzBB/gyWoTU CgiL6ug+u8f1QpKo/0EMJTNBBIk/eilNKeOEcwDZBOTEwWg6fyCqMv4cdogePUE+xetI whOzeQ9ub81nWd36wnDnSka41WjIxLP4QO+2B8XH0LL13vJc0ad+W0zJV+BD/RIy1FOR 5kSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=3yOhmb5LLQ31qT6YeyEoaX0jjcoMdHElvVNlhTaaJU0=; b=eE5Hz8vJCXU9Wlzgl3Cdvv5r0Apl887fO+Gd7GErgQNgV1IFLYREymmpFR2wlXVzu4 +ZMiFxQjWiKFegoprybrLfecrirDfEsMHsHMYLLUE+TYuSH2rKkZZ5aGo0Hq+yvloHAL 6MKj9j5VYoz8UHa/hF+uWiekS4RWHK+ygLZ28k7oa/MBhkIz0XEVhG9EYF7gWMe9Aalj TLOfOL+QnKpkA69eK+W2trjatnHV/NoPUpDxBE4ql5lodkmNa0zYD6WMBVSJAGNyoWoo fxmnVQsQZ8j9S25d1IpAXm5atDITb3lHaba7V0UnaW9uEFKwaUkqwOZ0h7v9PvzXdJ8J Tclw== X-Gm-Message-State: AOAM5304kIeTrOXqt2NFOF9l2lN6Y/8v+9lDGepLRzBkE1RM5cR9s+I4 BOyYPhxTGqB5rOf/e+hsXiaalR1R X-Google-Smtp-Source: ABdhPJzTMnxRPuV6ZGJzvW5l0mMjxHOaj61kW/6XxvKjUl64lqYEHjJSEX/Dfo2Nrwl6bkVAjyNEv78Ldw== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a25:fe0d:0:b0:64d:915f:e73e with SMTP id k13-20020a25fe0d000000b0064d915fe73emr42473933ybe.447.1654813059372; Thu, 09 Jun 2022 15:17:39 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:20 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-2-morbo@google.com> Mime-Version: 1.0 References: <20220609221702.347522-1-morbo@google.com> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [PATCH 01/12] x86/mce: use correct format characters From: Bill Wendling To: isanbard@gmail.com X-Mailman-Approved-At: Fri, 10 Jun 2022 08:37:37 +0200 Cc: alsa-devel@alsa-project.org, x86@kernel.org, Nick Desaulniers , Dave Hansen , Phillip Potter , linux-mm@kvack.org, Eric Dumazet , netdev@vger.kernel.org, "H. Peter Anvin" , Daniel Kiper , "Rafael J. Wysocki" , Jozsef Kadlecsik , linux-acpi@vger.kernel.org, Ingo Molnar , Tom Rix , Jakub Kicinski , Paolo Abeni , Pablo Neira Ayuso , llvm@lists.linux.dev, coreteam@netfilter.org, Arnd Bergmann , Ross Philipson , Nathan Chancellor , Borislav Petkov , Thomas Gleixner , linux-edac@vger.kernel.org, Tony Luck , Greg Kroah-Hartman , Florian Westphal , Takashi Iwai , linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, Jan Kara , Andrew Morton , "David S. Miller" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 ++-- 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);