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: 580709 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DA66C433EF for ; Thu, 9 Jun 2022 22:17:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233876AbiFIWRl (ORCPT ); Thu, 9 Jun 2022 18:17:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345261AbiFIWRk (ORCPT ); Thu, 9 Jun 2022 18:17:40 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8C59C9ED5 for ; Thu, 9 Jun 2022 15:17:39 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id k73-20020a25244c000000b0065ca88b381aso21339714ybk.2 for ; Thu, 09 Jun 2022 15:17:39 -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=1YdG6Mw41c05WptcRyXziLJcdNN1Lg9GDINorNB1aeXEnOpRoPT5TArSEVzu92N8Ip 5A4nBc5lxPBh/w+cbCSbGP6YqK5eF+uaKxDHATKkuk5oKT5mu3pCN6P7vNVokGBUoLzF Ev6xR/uA7bxJeuyeQgTRGPNfD0lW9TiFb6xlp++ZTkyFDDX6c9X9rBiOGVVlSn5f4hOU ebgbQiJnQF8YWMu4XAI77rYQkd+VUwYrKb16Gwh0VTKzPv6+RFHopz47inmfVwy/sxAi vf8jaPbfCRoa6fw4/cHQtbim36THD9nBfZ4vWR/yP75CeDGnh0V2RxuDdh1NaiOM+/UT k3Kg== X-Gm-Message-State: AOAM531aSUyYUaq/u1EKQKrSD2Gu2ZGNcPuE0EtSuquVL7m+MA1hDD6R TwmoOMH071pP4q/eOTiQlIOSkhqc 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 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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); From patchwork Thu Jun 9 22:16:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580382 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 208BECCA47E for ; Thu, 9 Jun 2022 22:18:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345575AbiFIWSH (ORCPT ); Thu, 9 Jun 2022 18:18:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345568AbiFIWSE (ORCPT ); Thu, 9 Jun 2022 18:18:04 -0400 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C316BFCE for ; Thu, 9 Jun 2022 15:18:02 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id i19-20020aa79093000000b0050d44b83506so12974351pfa.22 for ; Thu, 09 Jun 2022 15:18:02 -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=SFFjvyZvefpU9NrWWzQ0TAmvQ8SzfCLTau1AjR7El54=; b=Kr2RYZFWYOeNjzG0DXVZ1PIX9XZMzBF03Z569egSujYX+SETM8BM22isVSs7ZYg0je vtmIi51QjRTMj1fwLrkgjqNVlwKBP1pP5HLG5JFnMd4QeQYx2K01nU1Ejrc/H0elX0dB xVMAEAznym96CzfG/aOkwGNw3H9g+blFPI7HqqKYy6VdsppoXnWpV0WmljI7FHufbK83 ON+xFi3394AkXlTQEdIEaihpVBJQ8PGsd812EFScZ5x0FGwt1QmokUw/eccZEX97Itvg V6YGaLMc68zBNDG7tvYESM8uNaTijhm4Fewwwm5H2YtyjsN07CoVm9f4qHoqAerZAXZJ XTVA== 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=SFFjvyZvefpU9NrWWzQ0TAmvQ8SzfCLTau1AjR7El54=; b=BpuCoRyZclBIQknUGxICe7x0moD8mjApGCpGsINr35R1B/7uxJf29krDWebUFT7Ypt +73oGFcXptiygl0taTmi5ofPZhKxgsEDqW66cIs+1DSwsmKiRvme0aW3+Gsx0c1gHvJn sCRfn6Ops63VMhptGf6NdeLotq7cZhOvVJ0m1vwZhVHyuMDCYcmGTbYe4CudQmDAUZ2z TPu+0N+3cuLud3k4wvW80uuydDq/QK6Y5G8XtRCpVl2goBTAoYUj1tJfoPYWm65fZ55T zNGAj7TCazLQLvH81tGwyJpdGhxr8OLz1u7l3N14yt9cZagYxDeiwKR0d+1l2jfOW6g3 j8xA== X-Gm-Message-State: AOAM530ZGDdSjghjJj94WyYvXut9u9wdthS8VUnz5zn9DjIzQyGJ61nz WVqPWjN02Rer95O/l4MMmHgq1dzV X-Google-Smtp-Source: ABdhPJweUcyR1bJf/XiwDrAaJ+hZ/VGm1qzwS+oRhWzjXi1BAcLnFDZIdAsYxk3A8uUCFP+evw6wWgyl2Q== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a63:35ce:0:b0:3fd:fb5a:a1c3 with SMTP id c197-20020a6335ce000000b003fdfb5aa1c3mr15000208pga.85.1654813082090; Thu, 09 Jun 2022 15:18:02 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:21 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-3-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 02/12] x86/CPU/AMD: 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 , 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: arch/x86/kernel/cpu/mce/amd.c:1119:67: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] err = kobject_init_and_add(&b->kobj, &threshold_ktype, tb->kobj, get_name(cpu, bank, b)); ^~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/mce/amd.c:1151:47: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); ^~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/cpu/mce/amd.c:1157:42: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); ^~~~~~~~~~~~~~ arch/x86/kernel/cpu/mce/amd.c:1187:43: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] err = kobject_add(b->kobj, &dev->kobj, name); ^~~~ "%s", 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/amd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index 1c87501e0fa3..d19bf0eb0abe 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -1116,7 +1116,8 @@ static int allocate_threshold_blocks(unsigned int cpu, struct threshold_bank *tb else tb->blocks = b; - err = kobject_init_and_add(&b->kobj, &threshold_ktype, tb->kobj, get_name(cpu, bank, b)); + err = kobject_init_and_add(&b->kobj, &threshold_ktype, tb->kobj, "%s", + get_name(cpu, bank, b)); if (err) goto out_free; recurse: @@ -1148,13 +1149,13 @@ static int __threshold_add_blocks(struct threshold_bank *b) struct threshold_block *tmp = NULL; int err = 0; - err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); + err = kobject_add(&b->blocks->kobj, b->kobj, "%s", b->blocks->kobj.name); if (err) return err; list_for_each_entry_safe(pos, tmp, head, miscj) { - err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); + err = kobject_add(&pos->kobj, b->kobj, "%s", pos->kobj.name); if (err) { list_for_each_entry_safe_reverse(pos, tmp, head, miscj) kobject_del(&pos->kobj); @@ -1184,7 +1185,7 @@ static int threshold_create_bank(struct threshold_bank **bp, unsigned int cpu, if (nb && nb->bank4) { /* yes, use it */ b = nb->bank4; - err = kobject_add(b->kobj, &dev->kobj, name); + err = kobject_add(b->kobj, &dev->kobj, "%s", name); if (err) goto out; From patchwork Thu Jun 9 22:16:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580708 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDFC3C433EF for ; Thu, 9 Jun 2022 22:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345625AbiFIWS3 (ORCPT ); Thu, 9 Jun 2022 18:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345614AbiFIWS2 (ORCPT ); Thu, 9 Jun 2022 18:18:28 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 523133D1C3 for ; Thu, 9 Jun 2022 15:18:26 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id d125-20020a636883000000b003db5e24db27so12341713pgc.13 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=qVhjE0UoDrNG5TUMteHBlFgOriIEPDx2cnLI4MLdpIWKYfIB2BKFor28kzTrMPde7+ IqLoMxH+YEK7z2iLU5IQMAX5ju5S51Hpnaky5qcSkS5WKQRG0I8aQO+tcfRcHaGAr5md f07YHYYQbYqRVU6uQJMk3WhOhHStzR5hbK79912bzrS8Sl2fQJEzdbaLxq6FprQF0SUO z925oIkGEFPxQCWH+LarwJJn9v95yBLj8ICgWNUHdgkdsmawalRb3yTnxAs8N0CDpXDK Kor6vwniHyciB+HsBgWqnp6yzMUBgFWSoACp9gPlBdx8S8NsuRTvq72Ej9cf+LuXVPp9 bu4A== X-Gm-Message-State: AOAM533SvqxCgB/3qY5jnhyg5NWTaoXjc+4HYB7+J6HcmNvMDxL+xsbM d7mM7EbLoKlzHaf5E3HNToxfyjgx X-Google-Smtp-Source: ABdhPJwaaQIFrsaGRD2eHE0bL/iy5r4Z+mF9XLusw0L85/0I2ggYu7uuJziQ3x377wlgzuNlbfNxKB4Iyw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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; From patchwork Thu Jun 9 22:16:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580381 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39CC9CCA47E for ; Thu, 9 Jun 2022 22:18:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345616AbiFIWSy (ORCPT ); Thu, 9 Jun 2022 18:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345604AbiFIWSy (ORCPT ); Thu, 9 Jun 2022 18:18:54 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F9D47ACA for ; Thu, 9 Jun 2022 15:18:48 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id u22-20020a170902a61600b0016363cdfe84so13409257plq.10 for ; Thu, 09 Jun 2022 15:18:48 -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=HlrKEzC+OauxSUT5xZtPYeK0f3N3z3B8pf9PvEyK7vc=; b=qNUPK/S5iHdXgPK57Bkixsq++QOQQMHfyV6r2MtPs7v9I3SUg8azHVdlWi+Vmpdk0V e9swXJWEpf/dXShWMQkD9tdieecIjQpQiuIyNIyGp6c4DhP+OHtn6lVN3Jb0aUWnt0zX 6WRDoSX5skQyQJy1DXGgbB1frbSREBbKFeP8ovCXNP1nwpzQihNeuZDVsxzVVQEW/FTO oasKzV38q06qXK4hlfrcDIvuu6az9YMh+LOMOYwAEM/GaKPtPsyF6cfogObTYmCvxbsF HDhlFK8BOzg5MG7pql3z3B69jG4uxkigcwMhH0FMhZG9+AiHWiMvxTL/b/XFzI/yrt60 XE4w== 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=HlrKEzC+OauxSUT5xZtPYeK0f3N3z3B8pf9PvEyK7vc=; b=yCCg3f114XP406m+PyUrAFO54c91EKxZFfB8tdx+UDbCuVmAkze8HoEt0yAt6v7tIy fvda/qREs7JG3WagbC6HWyKYbCz6zN/gq8aMjftZhkXkhbOLs+KOV8etrhwDg2AkB7wQ Wneg47Hd/MIRKbng2EvK5RziZIeYwVgbFdXvEYPeUsAAx43/YN+BBgPEqdY/PC9/Ppm1 0+7JgZAtE2rrVd8RlMeGYER8iR+Ita/XlmCWriUAUyhxs/y8Ufefx4bU72V2NYSWbAU+ /u1tZ2d7tR8OcZYSP+2ALDbwXCdrE/BeJXOa/FBfxWT5F31idvJPTl/DXmc3ILbShYBP RhAg== X-Gm-Message-State: AOAM531AM6YTYv0uPoOHTuiM4M0xU8NPz/rpyvMDbBbsypjMuKe016J4 VlVFwqH/Mi9CYgxbDF6m/hddSx5B X-Google-Smtp-Source: ABdhPJxktSZZjGsZMg+ncs7oCo7UsGcqz2MItXnZVpN7aAWxKCb/sSBN71lrVJLJ6nxui+334t4TDARu1w== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a63:5924:0:b0:3fb:a75e:9e8a with SMTP id n36-20020a635924000000b003fba75e9e8amr36694755pgb.394.1654813127925; Thu, 09 Jun 2022 15:18:47 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:23 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-5-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 04/12] blk-cgroup: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: mm/backing-dev.c:880:57: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, bdi->dev_name); ^~~~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index ff60bd7d74e0..7b7786dceff3 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -877,7 +877,7 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args) return 0; vsnprintf(bdi->dev_name, sizeof(bdi->dev_name), fmt, args); - dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, bdi->dev_name); + dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, "%s", bdi->dev_name); if (IS_ERR(dev)) return PTR_ERR(dev); From patchwork Thu Jun 9 22:16:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580707 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FBCACCA47E for ; Thu, 9 Jun 2022 22:19:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345659AbiFIWTb (ORCPT ); Thu, 9 Jun 2022 18:19:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345694AbiFIWTT (ORCPT ); Thu, 9 Jun 2022 18:19:19 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3886846B05 for ; Thu, 9 Jun 2022 15:19:11 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id h13-20020a170902f70d00b0015f4cc5d19aso13431130plo.18 for ; Thu, 09 Jun 2022 15:19:11 -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=fWdTUxWRVXkKLWYheGOI11e0mL2XAHFKbZxg8ksMoZM=; b=ezNDouTkewW/awvW/cRvKC6jHhcMBl4eQkJi6sdP+X2J6iJMkd00jA2jaRJhpFY7aw yxivdcEq++4iV1GgB2ziv1ayV3oP8FWg/GB0Zo4bN9LSRrIbKMWW4pYYedFNqaZbtBdq LI7orAiKEXNDUMTMRTz+eYmtPr0ihFSVRZhCMEgns7LQjXXffU9ysRs8Jm7/xp/mkHV8 hqJ/WTn4IigfYhYdyyonY3s//N3eKAKkW8RZYgrVC9YsY682gIJn1c0bZa76vTplgKaA 3OGnJiqbOGhiGk4PrcLnGinCbRAB3xGsfKwPwyZscTB2mgetoP8/LmB/5HB6hMrHCgU0 s7qw== 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=fWdTUxWRVXkKLWYheGOI11e0mL2XAHFKbZxg8ksMoZM=; b=qa3j1wh/h1OW7MI0grZ0O2ADBIlZ1EWB2k6VWRoTSAZ2IUIXUeQu2JL26HJEIVTxXX md2IzB5VS5gw0ibeXm2P4DJT6yssXn+HDXgX0DBxElVXS1+kOat9CPS1L+zrf4dnpw5e SSSyP8vwuIC+k49B/05ggoGSSiva7lfUEmpCxRrv0xUVs9tMvXBUxJ/JQEbLaLksDbV1 hKBDCG5N7EEO6mavl5wtuhcY54kmO7HdC1gG1oltcsg8+gYNOi+3jIrTuRbzNfBCXtf3 wC9X0yU0UExO6lV4uDscYbPaMDKLXu5OG12hNTOWA0cVgWvSXTHqEZam/4tXq+7K+5pI rBMw== X-Gm-Message-State: AOAM531yXsjUMH4UsRX5QBDsoTY7C3kuhOmhZVAiiEah4kTRloIQvYdB aZp5O4F+euxY29aEPDNxcXicBWZW X-Google-Smtp-Source: ABdhPJymRh8XdI6qUr+0U3jn9BPA1WS3MroiwqAq54XxkobNI9HSYvmGC6qhWN+ZtdS8zin/gyNAdfGHUw== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a63:c5:0:b0:3fe:26a0:7abe with SMTP id 188-20020a6300c5000000b003fe26a07abemr10973746pga.152.1654813150612; Thu, 09 Jun 2022 15:19:10 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:24 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-6-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 05/12] fs: quota: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: fs/quota/dquot.c:206:22: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] request_module(module_names[qm].qm_mod_name)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- fs/quota/dquot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index a74aef99bd3d..3b613de3b371 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -203,7 +203,7 @@ static struct quota_format_type *find_quota_format(int id) module_names[qm].qm_fmt_id != id; qm++) ; if (!module_names[qm].qm_fmt_id || - request_module(module_names[qm].qm_mod_name)) + request_module("%s", module_names[qm].qm_mod_name)) return NULL; spin_lock(&dq_list_lock); From patchwork Thu Jun 9 22:16:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580380 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB1E6C43334 for ; Thu, 9 Jun 2022 22:19:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345673AbiFIWTu (ORCPT ); Thu, 9 Jun 2022 18:19:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345675AbiFIWTt (ORCPT ); Thu, 9 Jun 2022 18:19:49 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B95444BB86 for ; Thu, 9 Jun 2022 15:19:33 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id h13-20020a170902f70d00b0015f4cc5d19aso13431130plo.18 for ; Thu, 09 Jun 2022 15:19:33 -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=VtmBCpNp1KP0Wih0wNtSn6S6eDN4r8qEfTH0S3sfDvI=; b=k5UJiPwakkG5FRIZZ5lAwSHv1cl5CV0HckKotKPvFRLB2rm04skCRUAH92Ocj74nI8 VRgM32h5RM5BUgSugbEFBV15QskHdJF/UARg45aXgMXIqpE44JaqgZSOgpAQZ1jpikDb GULMqiClDzX4kfuE9w7o93QGAbqsh6kUT85oC3PEd1vaEzeRnphtmpPAmbhnAhgk6lx0 LnkSW18ZNlDn2dA0I8HZDUuV5QwUSYnjU7SGR9fWBj1oQGC+opt0AKeg9qvISijvMYMC exN/sa9O/SGU7ijyDd9mK0GdtUUcbGfySNVXrOfDrxnggsEQ+nfu/2kYPptx+0sLFFrT DcWg== 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=VtmBCpNp1KP0Wih0wNtSn6S6eDN4r8qEfTH0S3sfDvI=; b=vwFWSoFrQ59VUEB8Rm3fgw9dKw8Zi/alUwfWj/Thb3cthKvinjhXMGlgOnXzWraWhf j0bL+MJSwYBwLgNEKcjVvvX9LGJxTICdSvdMm7rGSF+aQQvmT7jAer5Ql1I0caTdm4iC uDCtAREL/nOnyenbXEnAvPCNXoOEihz58qx2aaeSCBwoncQ8287Nth3aF47UVl0AgzaX mDWeivW8/N1XFEpwsdi1iwafySp/10aL+7ZfrA7T7xIIPylotJUfmYfFMUJ3up9dVL6c C/jYmTppEjkQeT8dt3tTmUYIHIZ547V4Q6Di2NwEiXryNnHAoPS0lycgV879Cb3ZS5Zw wcRA== X-Gm-Message-State: AOAM533jwHelqUtWJeJCg4bTY4Rc71jLNJZmAU0DkwI8TEci+Ywmz3r1 DCpzvu1s3V/4AGhHKWjSBgFEqwm+ X-Google-Smtp-Source: ABdhPJyLvkWkgsl5N6fEs4uPVrRWt8N7EGGq7Ji9SRjDngCAZu0NMTQ8venaNAjb270E/IyAc5Cnz/CcgQ== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a63:4722:0:b0:3fb:94a7:9986 with SMTP id u34-20020a634722000000b003fb94a79986mr36618043pga.531.1654813173379; Thu, 09 Jun 2022 15:19:33 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:25 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-7-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 06/12] PNP: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: drivers/pnp/interface.c:273:22: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] pnp_printf(buffer, pnp_resource_type_name(res)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- drivers/pnp/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index 44efcdb87e6f..553221a0c89a 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c @@ -270,7 +270,7 @@ static ssize_t resources_show(struct device *dmdev, list_for_each_entry(pnp_res, &dev->resources, list) { res = &pnp_res->res; - pnp_printf(buffer, pnp_resource_type_name(res)); + pnp_printf(buffer, "%s", pnp_resource_type_name(res)); if (res->flags & IORESOURCE_DISABLED) { pnp_printf(buffer, " disabled\n"); From patchwork Thu Jun 9 22:16:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580706 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6961DCCA47F for ; Thu, 9 Jun 2022 22:20:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345732AbiFIWUT (ORCPT ); Thu, 9 Jun 2022 18:20:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345734AbiFIWUP (ORCPT ); Thu, 9 Jun 2022 18:20:15 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89D52A3C26 for ; Thu, 9 Jun 2022 15:19:56 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id q8-20020a632a08000000b00402de053ef9so46507pgq.3 for ; Thu, 09 Jun 2022 15:19:56 -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=qfaKip6DwFGW+guGsE2/HUgOUCf7B/ryBL2HyFI8yyY=; b=rmDrQmu6i0rMhVWryy+1sSregBQbx8EzAhxguI/zyywENeaveJeync1WHxdDli/I7V XVFwNwX1LL/Eb2t1qJzoo+LZL4V651eslhmMESIosQ4CzFZqJ/XMZIcgfWh+ijuJ9S4U DE9dfzo5xGMJQHKyVBlVHIJPFhw5ayon8gNdeY1wYxrm/5naZOHI7yvxx4lN8IU/5Vsd Jrf74AJMKR+h5WOopQkEY05HkO30nH18xX4D85TjTMQIbL0iAHDhYHUPur2amaBP1CL6 RS8eMppIKQevbuQilaLP804yNxwZ9Wuv+YrNiMwDfjRjNIKBMBVfcgDhrLJV95/xQEbr 74gA== 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=qfaKip6DwFGW+guGsE2/HUgOUCf7B/ryBL2HyFI8yyY=; b=rHvsSo4ZQoV0t0uWFt2MwTpQbkeu9d4HQ8vVGKoCqiFGX1vEy35bvBlARe6vhfaxOU hIbTTlhvT9epa+zzM+GwAU/tp5kU8JOzcpmODLIo+v0uAOZZE8PqHUjpVMBeNgXnKuax Mqde3YaMSzQyoo+K9Dgc0WVyDUdxGvWJhkYDljVdE2sM2Xfq7ckIyq4aHDTulxK9z6Nn jcMIggjZuaRmsV0cBf//ni8hETnIIOR4LGCHx8Tv8MsEc63lTyggadFEPFL/mMuCu9P6 oOtZJaQDFp0X9ClNfBfrdHxz+yOQYyYwBcAoB8hbHmAaXMy8M4PMl9EGHvQ9W5QmoAGm 5Qrw== X-Gm-Message-State: AOAM533niO8L0TpZyg0JPChWlf3TP1l01mZ4xbTFXbrvVBkMvNZCNg70 xwdOWFp8H9zjAHpXKG6ckEI3nNnL X-Google-Smtp-Source: ABdhPJzfxk5qZb5y/5tpnB1EFv7CAi9wKZuC1KM7/pyahvYM5X1dHlQAhdkQ2HW7pda2hCN2ocO+yxStMQ== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a62:1687:0:b0:50d:3364:46d4 with SMTP id 129-20020a621687000000b0050d336446d4mr42409947pfw.74.1654813195848; Thu, 09 Jun 2022 15:19:55 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:26 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-8-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 07/12] driver/char: 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 , 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: drivers/char/mem.c:775:16: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] NULL, devlist[minor].name); ^~~~~~~~~~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- drivers/char/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 84ca98ed1dad..32d821ba9e4d 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -772,7 +772,7 @@ static int __init chr_dev_init(void) continue; device_create(mem_class, NULL, MKDEV(MEM_MAJOR, minor), - NULL, devlist[minor].name); + NULL, "%s", devlist[minor].name); } return tty_init(); From patchwork Thu Jun 9 22:16:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580379 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9FCDCCA473 for ; Thu, 9 Jun 2022 22:20:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345712AbiFIWUs (ORCPT ); Thu, 9 Jun 2022 18:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345787AbiFIWUV (ORCPT ); Thu, 9 Jun 2022 18:20:21 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B30464CD5F for ; Thu, 9 Jun 2022 15:20:18 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id j8-20020a17090a3e0800b001e3425c05c4so286405pjc.0 for ; Thu, 09 Jun 2022 15:20:18 -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=dB/VRnBqrla/uo3hQxagOMwn8rw3rKKNrg8KvvIMmrs=; b=NA8rGIzS2Lo/FSyJFJSopJzo3vj2qG+W/JBu2Td+wh8lNm3aGHNFbCPALJTDiKY3VZ BXYoT+Ww8rgiNjDcWDo8JWEIvIa789ch4uJ/akkx61GHrCbS4UYTLU+WBzXi0U6zqFg6 WETSd0zF9UD0yrUhECgMgO4+3B7vaNDE5q4OxsAILit4vZz26MEF5lP7eGpObNUfQYZP qWyriCnElNMS5dBnlp4ECfJw4cwUWsda0JPVGIsCkMRh996FjTM9tl6X5Bjcl49Ex3bX 056kN/4A+KMGFsvjat6Zhxnibo6NVJe0KQfbbqHffKzcdpAaOGAQ/5H1gcLRSIgsdnQd eZOg== 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=dB/VRnBqrla/uo3hQxagOMwn8rw3rKKNrg8KvvIMmrs=; b=4hjMqT57HmttjMIvbbVdn3ZcCZ+N+BeUPsrMhtnEHOGPC/Xvv4MInzC7YMZyP2SFZK cu90elwc/G63gQB9Kc3yBsxIJcdz4rkdWfCXR7s3RLZAeq/JYBtos0k1qYQWb70IfNhP 6oiZBbUW9keT/ok5i1epYGlrSkhNQ/UYB2G9XZkRANsTBOo92Dh1I1wglLaPBfMY5+Ym AUaHWINxvjrFmt+Pm6BB6j7vixQa+iwUIf6Jb9KIkEqeXBuCkO7Ug+MRXkY2/sX+qdFj VjZ9Xnxcd5B66+A0j+MbKDnPemAf+ulQOTsSMWiVLNuGCV+Kz7C6sV7dVChjw43of6EE UD3A== X-Gm-Message-State: AOAM531IRWX2Ipg/hM1QnB3UlxiKNVEzu7tEQi83vtoxuVJ6M7zIi8C0 8sielP1MIIxwwaKNLCtP8pGKtWCX X-Google-Smtp-Source: ABdhPJye2mFQrzIepKAqLUDnC7IYTgWuIi+7I2qa8DRzQUgLX+2gR0oj+bp3uxnl8nOmUO9s5APs/msqoQ== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a62:e919:0:b0:51e:7b6e:5a3b with SMTP id j25-20020a62e919000000b0051e7b6e5a3bmr1529888pfh.78.1654813218119; Thu, 09 Jun 2022 15:20:18 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:27 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-9-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 08/12] cdrom: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: drivers/cdrom/cdrom.c:3454:48: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] ret = scnprintf(info + *pos, max_size - *pos, header); ^~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- drivers/cdrom/cdrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 416f723a2dbb..52b40120c76e 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -3451,7 +3451,7 @@ static int cdrom_print_info(const char *header, int val, char *info, struct cdrom_device_info *cdi; int ret; - ret = scnprintf(info + *pos, max_size - *pos, header); + ret = scnprintf(info + *pos, max_size - *pos, "%s", header); if (!ret) return 1; From patchwork Thu Jun 9 22:16:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580705 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0559C433EF for ; Thu, 9 Jun 2022 22:21:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241107AbiFIWVA (ORCPT ); Thu, 9 Jun 2022 18:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345731AbiFIWUq (ORCPT ); Thu, 9 Jun 2022 18:20:46 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D99BAEE31 for ; Thu, 9 Jun 2022 15:20:41 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id q2-20020a170902dac200b00168b3978426so709117plx.17 for ; Thu, 09 Jun 2022 15:20:41 -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=25alQ5NbvDA/tAT/crdGxszOxkEet+uV+RiKp6teCtQ=; b=oZfJo/SXd3Qwc4Nv44GXKhWDAFTO95PgXKfM9e9BiPA93gnZilAa51s/ZcMgeZyQDX bdQWpsU2Iq0YRK8nhoojrl6Ovztg/h1fX8YAfPzB2dwLHljaWKbdC8Mk4yXY/4KToKYJ ovK2hyHWLN7o69TaNinVFAZmPIf4qo8PHxZBtzNCHZvyhMz5aDyGPm8IzfmTRY3xhkY5 HV52VK6dmyAZeje85nLNYwU1K6dOCF/suK14Mfn4D1Y16vY/jjL7/9lAyFEiDPQ1QSGP J6zMvdrdFc5DFPuif5nPyA2QWjOTwZ7NUnTVPFwq/IivldY6hoaIhzn4fUtrg8kNe7N/ zK6Q== 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=25alQ5NbvDA/tAT/crdGxszOxkEet+uV+RiKp6teCtQ=; b=EN02GUFZuLytXlYuCT5F5pNItSo9vcnNnxtM86DwMAjSZXkjLPyoJnDkofwLtQGGAE tgWk26akVACMtFFG807TVuoguJE08kl1m2epNERvWo3tqGs9EQHTKoHZHtrlguvA+gdx 4NcDXyLc9ddjvwHPriLCUzfEEtxHwbi6xp2qGgPZqBjKemED9do+i6R+548vca6VZgoa /PXwS4A086EalETFSWpYQVEis103R+eIKNoTRl1UKFo62tomsPhdKC/bmNj/5Fdo1Qhu tMkjGJO2/PJv1YRGmrpSeyOa/FxaMZ4+8fUAKET/SIi8shfKtos5RQW/s2+9aPcbuToo bP4g== X-Gm-Message-State: AOAM531dZsxe3rabUqzUeI6o6EfPW5criTDgZnILWALJNdgna+VwvDC5 14CwqdK0LDvzTlH7OwYblrq6JhTg X-Google-Smtp-Source: ABdhPJw9W1H1jWw/58e5xPpEUFA37qKciU2RFZ0YGfr9UAt18WH9PywE6TBxCqfkRuUXpq4m2jNc2xi7ug== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a17:902:cf06:b0:161:53b6:474d with SMTP id i6-20020a170902cf0600b0016153b6474dmr41957402plg.63.1654813240658; Thu, 09 Jun 2022 15:20:40 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:28 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-10-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 09/12] ALSA: seq: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: sound/core/seq/seq_clientmgr.c:2414:22: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] snd_iprintf(buffer, msg); ^~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- sound/core/seq/seq_clientmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 2e9d695d336c..2340f3e14eeb 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -2411,7 +2411,7 @@ static void snd_seq_info_dump_subscribers(struct snd_info_buffer *buffer, up_read(&group->list_mutex); return; } - snd_iprintf(buffer, msg); + snd_iprintf(buffer, "%s", msg); list_for_each(p, &group->list_head) { if (is_src) s = list_entry(p, struct snd_seq_subscribers, src_list); From patchwork Thu Jun 9 22:16:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580378 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CAAECCA47F for ; Thu, 9 Jun 2022 22:21:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345406AbiFIWVT (ORCPT ); Thu, 9 Jun 2022 18:21:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345687AbiFIWVG (ORCPT ); Thu, 9 Jun 2022 18:21:06 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D66424E3BB for ; Thu, 9 Jun 2022 15:21:03 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id e5-20020a255005000000b0065cb3669fe9so21343189ybb.0 for ; Thu, 09 Jun 2022 15:21:03 -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=v4Xn62a8gwv09PX197f2KX5K6c68JUg+Unaoh5Rs3zU=; b=rIM31hja6TacLFy83ekGaYY6NocbE3+qp06k1AYSWqT3YCOM3vKnexoLoVRg3/QFrC NK6lDPMraatUaGV4ysDVq7Ma73A8ej30mShvcnMynXPj4q1s4HwLXHsyE5NReacxVqEF SN/r5DNjRMP1h9Yx1PS5+t5PqoRBJ1DmF1KeRqex3FpyMoNRbYlXt2tQwLA6Cftv+3aS xU6s22QmO1Pl1Kwrbe6vsMz+d3Z4FRfHNfEK9twj222QTX3BVZNBOKgun1MV8xBDAQQA +IscNJZzBGaDfdE3Gg++zvAyvxAsnUQ0EJis1knVDwKv7m2aWEOPArINp5NiPyNi+Z2n h4Ig== 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=v4Xn62a8gwv09PX197f2KX5K6c68JUg+Unaoh5Rs3zU=; b=1Z/h0IMBqQQItJuLua5X34y2fLs0XOW+juicC3vc3R46grTX9/ZwIqRG4BCNQu0xdP YnAUr/oZgbxxTM/4Q8YnJmc2WDFEvSBwAQ2hBO7QQNRnLrHTZ0S3qMxINPswWfUnkuam 690k7raBSW7ZrrccfvHtYdjkNmzo9FuUMOK2WXcsMirNSnWEgNldWuOqfoqCJSqRtkj1 80SFKn9nQJ8xbHMGXLLuQqukP59hgZVueVFIw7DLKDV4Ijg5QGEb2YuWsKr1VXzAsgiK CPdhseeuDmgb/5QhHTkJ43UgxIDxP4HnsUtinbHM6xErJVSi2x0yESmflHWiBeilDi71 y3OQ== X-Gm-Message-State: AOAM532XaKP0x1zTR5lA+q1sZucfLC1Az/50VlxjnHl4QynRpm2C9Idf UEZBd5R8V1rme0u5QpPkG4r1h39b X-Google-Smtp-Source: ABdhPJwSDxouzP8D6734EA8fpYrXSwixl1FJKKaGzKk8Ee6TEpQt79esVExDoO3PJGM+WWqOyJq6+ArWEg== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a25:76d5:0:b0:663:ad77:8d48 with SMTP id r204-20020a2576d5000000b00663ad778d48mr18678005ybc.633.1654813262959; Thu, 09 Jun 2022 15:21:02 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:29 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-11-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 10/12] ALSA: seq: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: sound/core/sound.c:79:17: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] request_module(str); ^~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- sound/core/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/sound.c b/sound/core/sound.c index df5571d98629..7866f29621bf 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -76,7 +76,7 @@ static void snd_request_other(int minor) case SNDRV_MINOR_TIMER: str = "snd-timer"; break; default: return; } - request_module(str); + request_module("%s", str); } #endif /* modular kernel */ From patchwork Thu Jun 9 22:16:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580704 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 815A5C433EF for ; Thu, 9 Jun 2022 22:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345674AbiFIWVb (ORCPT ); Thu, 9 Jun 2022 18:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345498AbiFIWV3 (ORCPT ); Thu, 9 Jun 2022 18:21:29 -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 D7A3253C49 for ; Thu, 9 Jun 2022 15:21:27 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id h13-20020a170902f70d00b0015f4cc5d19aso13433605plo.18 for ; Thu, 09 Jun 2022 15:21:27 -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=+JW2n6LLjgkLeZpu0VrK7uVIniA8Omo9w9YQRrZ1ImQ=; b=i42901GYNhaxsHQ0DOGoOky9iCPlDaMMKrye+1S6wrdYfiDoHAZcC7HTQX/ufq8JDc FtLJH8ibG+4hcwJncrABH5MINqNlaiBQcg6AiUjnTwqlf664IuYPp0tvgNpDNS6s/GjQ Wjh2TOa/isNuXc04yhOdZrj9wIAtXkGMKkDBH370v2doh3glFP/6lvE9gZpbXECpN/zv UStKebGupQmmTtj2yMjnHwJiwJi/peKu25pYf9NTE11Ch6upWSa6FAa3CkIKEN5+Emo5 3UDTgqdqaohZKI3Gp3XYmJjjv1YwnDPf8AUi3y1kFAWlFzS3PLERdXTH2sKpk0ltR6ij /vAw== 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=+JW2n6LLjgkLeZpu0VrK7uVIniA8Omo9w9YQRrZ1ImQ=; b=pQ2V8kINDVIm3bwklc16OtMczdC87RIqVNU1sqsuIJO3IQbXBrA6bhWLfU0JE8rIOK I8NGpBdkNhv37HQyPffyPzq84Zjscb9msSxF1jogUMKeYU/R+HAONaw4JmUaJ/HnkiP8 fiazt8f9KJbCZy6Qzc8sNJjwfHTwJf0RAJ0g3JOubsLsmQEBgcWOtQw8CqToxBmUEPcE iFeSNa/piwleOor6KWC0gTUnr9LDGqa3FjBtC0OBqZ+i+OzUzzmVBrDqWw1ZrwQtHV+N Pe/QxIOeKlzhFylowVg0+BzFNPGn2WtVApWM5G/A31fCjQMCjRXaMRdXr+BlWOeYFKV7 askg== X-Gm-Message-State: AOAM531MzWCRuBCMzC5fAhHjNeWidhKzxDJ/IegzKsIYim0Frwr8GAik c1UgSWe+YduSrhOu0I9Bk+wN2M9N X-Google-Smtp-Source: ABdhPJxwIiVK0GwVN12g3ZMNH56OyPQzBgCjPEweYrbMYHqEsJdgXTONzisCGHUJLebHzTiLq5Vb6Q5FXg== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a63:409:0:b0:3fd:77f0:9a75 with SMTP id 9-20020a630409000000b003fd77f09a75mr25262295pge.149.1654813287223; Thu, 09 Jun 2022 15:21:27 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:30 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-12-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 11/12] ALSA: control: 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 , 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: sound/core/control.c:2062:24: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] return request_module(module_name); ^~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- sound/core/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/control.c b/sound/core/control.c index a25c0d64d104..a1778137147d 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -2059,7 +2059,7 @@ int snd_ctl_request_layer(const char *module_name) up_read(&snd_ctl_layer_rwsem); if (lops) return 0; - return request_module(module_name); + return request_module("%s", module_name); } EXPORT_SYMBOL_GPL(snd_ctl_request_layer); From patchwork Thu Jun 9 22:16:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580377 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E0AACCA473 for ; Thu, 9 Jun 2022 22:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345669AbiFIWV5 (ORCPT ); Thu, 9 Jun 2022 18:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345692AbiFIWV4 (ORCPT ); Thu, 9 Jun 2022 18:21:56 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E46D51592 for ; Thu, 9 Jun 2022 15:21:50 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-30cb80ee75cso213701197b3.15 for ; Thu, 09 Jun 2022 15:21:50 -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=yboyFArx2lHvBt01l8NpldAEI3xLVVvkRY3YCO31PQs=; b=E9tSuZ6hKkd5R9UrAClvzMvLuSapw21MRvFh9K5m/Q4W/Ne6NP2WMWfSPzasz8wKZX Mng11d6Obxtbq83lWoSaFsdBiVCu3gb6X9dNoHMi3E7qOKWwZUm9cJAU6WOY5s+S4WcD k0KWGk2jmTkZOAqD94Ix96O/6kgOmQ/r+QpHomefwKvJ5cV0MNofmxceF2lXxoFWF6gg j5Cs7IkuMhKv2Pf+5++JwO5hcoMx6SP3if8FmA4NjIla9U/uK2//v1BfU0Tfe7AV8KrT Ey/sE8DleSJieRPHEDBL1hPn4naIWW02H/aWpnYArbukY4zZLmv4GV2t/e5g12dM+Qzj ZcQg== 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=yboyFArx2lHvBt01l8NpldAEI3xLVVvkRY3YCO31PQs=; b=DvYtjJ+1nMAV+mdwKB3cXjEUT1QktUuiF+Tkn4PNxVdUNqFkpPuBoiHV9g7HFdhL05 CDC+qgLGB7BfcyHke8fac/fa2AWsLKMUx9+t9svUnpRDosWKKhgUdIaNYe0IabYEHtEc s9jiVcvWP/38x/xtRbUMNEgi/XFpHrphy/x8FFt8X8Kka6b76pjNCPOAS9BA6PzlKAOa mBg7lpAXqAJR/kHiSXhqpfGfEaG/Z5Vj+I75lXJNIbbz5+aAL8O4cjOyzgK8dbwVA0EX xdo5ySz5YS+pqnxWLsEGDRrcGd3XDnRE0SKM2Cychd+FM9ias4X10z6dHY1xYmigD8vF ZVCQ== X-Gm-Message-State: AOAM533KpD4SZPggCAPWqf9AV/HEjltYjPSiSLnhHfWnhjWS9x2mV99b 6CPNSr3mnf0/tZI5pySRbUVvk5aW X-Google-Smtp-Source: ABdhPJzx/fiV7355Fpicwsezz0b2tB8XbCEkcbb8KPwyuPviI/0AOw7BwG+AXnNZJgmFqRPAiS2WX3p4fQ== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a81:c248:0:b0:313:3c2c:89cd with SMTP id t8-20020a81c248000000b003133c2c89cdmr17003210ywg.175.1654813309307; Thu, 09 Jun 2022 15:21:49 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:31 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-13-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 12/12] netfilter: conntrack: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: net/netfilter/nf_conntrack_helper.c:168:18: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] request_module(mod_name); ^~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- net/netfilter/nf_conntrack_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index c12a87ebc3ee..1e0424d37abc 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c @@ -165,7 +165,7 @@ nf_nat_helper_try_module_get(const char *name, u16 l3num, u8 protonum) if (!nat) { snprintf(mod_name, sizeof(mod_name), "%s", h->nat_mod_name); rcu_read_unlock(); - request_module(mod_name); + request_module("%s", mod_name); rcu_read_lock(); nat = nf_conntrack_nat_helper_find(mod_name);