Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp846874iol; Thu, 9 Jun 2022 15:43:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzw1t69j4b1T3Kja5ttcSnVYvNsrblJlmo65BSilxsdmSvzNUrmSXh+ubhvS9Ok2wSzutoQ X-Received: by 2002:a05:6a00:2cc:b0:51b:f1d3:e5f with SMTP id b12-20020a056a0002cc00b0051bf1d30e5fmr31625762pft.52.1654814636114; Thu, 09 Jun 2022 15:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654814636; cv=none; d=google.com; s=arc-20160816; b=SRYcb9G8wA0oLYDFqo0KCKHSiVZCs+q/A86/4qFzCyimXhuhThQ6dmrxBx5MkS734m avKlj0jgsAsKjvIr0ksfUw7GLeT28yMVB0en+Pp4pz/vsCzuDhZ5bp9IJRV/7dhfsfUi vQ8ynvd/fpXzFkHhdvElx5pUk5rTyGe0UK8uCHKPnFAxyA/ekztHpnAV9OUr3Ktthepd iXXhj/oKGTSqenT4gbyi3Uccjlsd/bWYuc6HPhi2wnUyaZF8FLkfqrnzEHofuhW0tt9O ifdCdAKipIqJyEq5JNlbjik4oNV4WKE2AUtkPvI3fYuywJLFpLAv8RSj6egpFTCBShBA 1XxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=zQ6igRU/lPsPPjITd4pdT0XeOfhGOx4hu6xL7AAJoM8=; b=dHP9bAiMdWzEmKFJZdDxuww1sZvFBOZ7VNpuHPfeCPGTsqYCr7j+VyU7rX8/u/kjJn 1vusADI5yI8eEezJUobrYDlDiH8FDVKYbQjmy9/ArTgRYLDJ5oG29/GTLLDLTfZg+6dG F+e15ToEWqq3sNt4luNLNYWbh3TZdB54Hx4LsnLuteBLrNfbSXO14UwgMZEYmcGvHNYH k/CKyPFRtsWK8Ape7J65ToOSiTomS4mOxSK1VEOskH6FGD+2Uj5k1lAKqbg34+xbUZoB zlZWIw7CrYXn45t7PAb5H2Nqeopnp/tqUkMjhR85Wqv85RoX/CgdpFHAZEDpCkGWEdBn Qe4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QJYSL92E; 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 d12-20020a170902cecc00b00163f8ddf15asi37055592plg.478.2022.06.09.15.43.43; Thu, 09 Jun 2022 15:43:56 -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=QJYSL92E; 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 S1345615AbiFIWSa (ORCPT + 99 others); Thu, 9 Jun 2022 18:18:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236686AbiFIWS2 (ORCPT ); Thu, 9 Jun 2022 18:18:28 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B6E120C for ; Thu, 9 Jun 2022 15:18:26 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id b15-20020a170902d50f00b00167501814edso9725832plg.8 for ; Thu, 09 Jun 2022 15:18:26 -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=zQ6igRU/lPsPPjITd4pdT0XeOfhGOx4hu6xL7AAJoM8=; b=QJYSL92EGHv0Glqefsz+fZAyuHXsVDJ+MxqtY38p/rJWyzN9tqq38im0/nAHSSrAcw XMQ6nAGoVVakkYRIOxtqwHJW03YmZH40gkW7E/YkdAEWc9hWN2V7ngXOGdkLxNXXFPVz MM6SoDd9zGDwN7h4y2Zv5sUmYXsKm79QEart8XywqgYgGMlR5uKSmr2M8zPPYELNG0fC sjbVW5cOWu2CabVPyhNOvTWLIe4OkL9eosbWQbgqXLmWmjLl4VHTPCfxGjF9R4eBYA8S SWfDBEXFQ0GXfeXiQjFQ4xktd6Mieq2x7asfEjehSXBFdpIoHP2WaOku4Aej/pIaybf5 FCNQ== 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=zQ6igRU/lPsPPjITd4pdT0XeOfhGOx4hu6xL7AAJoM8=; b=lrHIXdmSW9YWkY3h6jlhMu+dULOgpF/jjfTaxmch4dPK3RoH2lNYTFw62cAgeUat3X DGmlugMQ+Ed5m1MuBgC2vuhJhuQNBOHi/bnvoEcoDFP4oyhajfvfELVBsoSjQTZSin5L SOPJZp/DGb93zlC+Omo4kjIZzfcvr2zwSjdoK35mNg0QBxj7g22I69EgsWPNtfePom65 htXdrBb1L1ctMUV/VLbTKNw+x7RA65amv3qFI2eoWzgx8ualgCaZSMSQjyNa3HnrbqSw 5wgEuHvEf0dxzceSYktpAX9fPUobQrBpxOYdfjvJIGSl1cWXGprhpI0077MYnj30e5cQ 8CVg== X-Gm-Message-State: AOAM530d6/+kC7lK2GqYtAHwVQvxq8g1zrYZHZzqdLWoIehJX+Uur4Rj Z8RVIWsfpYcqpKePTDCB9htk4GW1 X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a17:90a:249:b0:1e0:a8a3:3c6c with SMTP id t9-20020a17090a024900b001e0a8a33c6cmr114285pje.0.1654813104885; Thu, 09 Jun 2022 15:18:24 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:22 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-4-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 03/12] x86/e820: use correct format characters From: Bill Wendling To: 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 , Ross Philipson , Daniel Kiper , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_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 From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: arch/x86/kernel/e820.c:877:15: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] early_printk(msg); ^~~ arch/x86/kernel/e820.c:878:8: 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/e820.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index f267205f2d5a..ca4634a0bdb5 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -874,8 +874,8 @@ unsigned long __init e820__end_of_low_ram_pfn(void) static void __init early_panic(char *msg) { - early_printk(msg); - panic(msg); + early_printk("%s", msg); + panic("%s", msg); } static int userdef __initdata; -- 2.36.1.255.ge46751e96f-goog