lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yr+ZTnLb9lJk6fJO@castle>
Date:   Fri, 1 Jul 2022 18:03:10 -0700
From:   Roman Gushchin <roman.gushchin@...ux.dev>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        kernel test robot <lkp@...el.com>
Cc:     virtualization@...ts.linux-foundation.org,
        usbb2k-api-dev@...gnu.org, tipc-discussion@...ts.sourceforge.net,
        target-devel@...r.kernel.org, sound-open-firmware@...a-project.org,
        samba-technical@...ts.samba.org, rds-devel@....oracle.com,
        patches@...nsource.cirrus.com, osmocom-net-gprs@...ts.osmocom.org,
        openipmi-developer@...ts.sourceforge.net, nvdimm@...ts.linux.dev,
        ntb@...ts.linux.dev, netfilter-devel@...r.kernel.org,
        netdev@...r.kernel.org, mjpeg-users@...ts.sourceforge.net,
        megaraidlinux.pdl@...adcom.com, linuxppc-dev@...ts.ozlabs.org,
        linux1394-devel@...ts.sourceforge.net, linux-x25@...r.kernel.org,
        linux-wpan@...r.kernel.org, linux-wireless@...r.kernel.org,
        linux-watchdog@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-unionfs@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-staging@...ts.linux.dev, linux-serial@...r.kernel.org,
        linux-sctp@...r.kernel.org, linux-scsi@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org,
        linux-rockchip@...ts.infradead.org,
        linux-renesas-soc@...r.kernel.org, linux-rdma@...r.kernel.org,
        linux-raid@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-phy@...ts.infradead.org, linux-perf-users@...r.kernel.org,
        linux-pci@...r.kernel.org, linux-parport@...ts.infradead.org,
        linux-parisc@...r.kernel.org, linux-omap@...r.kernel.org,
        linux-nfc@...ts.01.org, linux-mtd@...ts.infradead.org,
        linux-mmc@...r.kernel.org, linux-mm@...ck.org,
        linux-mediatek@...ts.infradead.org, linux-media@...r.kernel.org,
        linux-leds@...r.kernel.org, linux-integrity@...r.kernel.org,
        linux-input@...r.kernel.org, linux-iio@...r.kernel.org,
        linux-ide@...r.kernel.org, linux-hwmon@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-fpga@...r.kernel.org,
        linux-fbdev@...r.kernel.org, linux-ext4@...r.kernel.org,
        linux-efi@...r.kernel.org, linux-cxl@...r.kernel.org,
        linux-crypto@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-cifs@...r.kernel.org, linux-btrfs@...r.kernel.org,
        linux-bluetooth@...r.kernel.org, linux-block@...r.kernel.org,
        linux-bcache@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org, linaro-mm-sig@...ts.linaro.org,
        legousb-devel@...ts.sourceforge.net, kvm@...r.kernel.org,
        keyrings@...r.kernel.org, isdn4linux@...tserv.isdn4linux.de,
        iommu@...ts.linux.dev, iommu@...ts.linux-foundation.org,
        intel-wired-lan@...ts.osuosl.org, dri-devel@...ts.freedesktop.org,
        dm-devel@...hat.com, devicetree@...r.kernel.org,
        dev@...nvswitch.org, dccp@...r.kernel.org, damon@...ts.linux.dev,
        coreteam@...filter.org, cgroups@...r.kernel.org,
        ceph-devel@...r.kernel.org, apparmor@...ts.ubuntu.com,
        amd-gfx@...ts.freedesktop.org, alsa-devel@...a-project.org,
        accessrunner-general@...ts.sourceforge.net
Subject: Re: [linux-next:master] BUILD REGRESSION
 6cc11d2a1759275b856e464265823d94aabd5eaf

esOn Fri, Jul 01, 2022 at 07:49:42AM +0800, kbuild test robot wrote:
> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> branch HEAD: 6cc11d2a1759275b856e464265823d94aabd5eaf  Add linux-next specific files for 20220630
> 
> Error/Warning reports:
> 
> https://lore.kernel.org/linux-mm/202206301859.UodBCrva-lkp@intel.com
> 
> Error/Warning: (recently discovered and may have been fixed)
> 
> arch/powerpc/kernel/interrupt.c:542:55: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> arch/powerpc/kernel/interrupt.c:542:55: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
> drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: no previous prototype for 'pci_read' [-Wmissing-prototypes]
> drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: no previous prototype for 'pci_write' [-Wmissing-prototypes]
> mm/shrinker_debug.c:143:9: warning: function 'shrinker_debugfs_rename' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/shrinker_debug.c:217:9: warning: function 'shrinker_debugfs_rename' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:637:9: warning: function 'prealloc_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:642:9: warning: function 'prealloc_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:697:9: warning: function 'register_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:702:9: warning: function 'register_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

Shrinker-related warnings should be fixed by the following patch.

Thanks!

--

>From c399aff65c7745a209397a531c5b28fd404d83c2 Mon Sep 17 00:00:00 2001
From: Roman Gushchin <roman.gushchin@...ux.dev>
Date: Fri, 1 Jul 2022 17:38:31 -0700
Subject: [PATCH] mm:shrinkers: fix build warnings

Add __printf(a, b) attributes to shrinker functions taking shrinker
name as an argument to avoid compiler warnings like:

mm/shrinker_debug.c:143:9: warning: function 'shrinker_debugfs_rename'
  might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/shrinker_debug.c:217:9: warning: function 'shrinker_debugfs_rename'
  might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:637:9: warning: function 'prealloc_shrinker' might be a
  candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:642:9: warning: function 'prealloc_shrinker' might be a
  candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:697:9: warning: function 'register_shrinker' might be a
  candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:702:9: warning: function 'register_shrinker' might be a
  candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

Signed-off-by: Roman Gushchin <roman.gushchin@...ux.dev>
---
 include/linux/shrinker.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index 64416f3e0a1f..08e6054e061f 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -93,9 +93,11 @@ struct shrinker {
  */
 #define SHRINKER_NONSLAB	(1 << 3)
 
-extern int prealloc_shrinker(struct shrinker *shrinker, const char *fmt, ...);
+extern int __printf(2, 3) prealloc_shrinker(struct shrinker *shrinker,
+					    const char *fmt, ...);
 extern void register_shrinker_prepared(struct shrinker *shrinker);
-extern int register_shrinker(struct shrinker *shrinker, const char *fmt, ...);
+extern int __printf(2, 3) register_shrinker(struct shrinker *shrinker,
+					    const char *fmt, ...);
 extern void unregister_shrinker(struct shrinker *shrinker);
 extern void free_prealloced_shrinker(struct shrinker *shrinker);
 extern void synchronize_shrinkers(void);
@@ -103,8 +105,8 @@ extern void synchronize_shrinkers(void);
 #ifdef CONFIG_SHRINKER_DEBUG
 extern int shrinker_debugfs_add(struct shrinker *shrinker);
 extern void shrinker_debugfs_remove(struct shrinker *shrinker);
-extern int shrinker_debugfs_rename(struct shrinker *shrinker,
-				   const char *fmt, ...);
+extern int __printf(2, 3) shrinker_debugfs_rename(struct shrinker *shrinker,
+						  const char *fmt, ...);
 #else /* CONFIG_SHRINKER_DEBUG */
 static inline int shrinker_debugfs_add(struct shrinker *shrinker)
 {
@@ -113,8 +115,8 @@ static inline int shrinker_debugfs_add(struct shrinker *shrinker)
 static inline void shrinker_debugfs_remove(struct shrinker *shrinker)
 {
 }
-static inline int shrinker_debugfs_rename(struct shrinker *shrinker,
-					  const char *fmt, ...)
+static inline __printf(2, 3)
+int shrinker_debugfs_rename(struct shrinker *shrinker, const char *fmt, ...)
 {
 	return 0;
 }
-- 
2.36.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ