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] [thread-next>] [day] [month] [year] [list]
Message-Id: <1457294345-4588-3-git-send-email-nicstange@gmail.com>
Date:	Sun,  6 Mar 2016 20:59:05 +0100
From:	Nicolai Stange <nicstange@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, Nicolai Stange <nicstange@...il.com>
Subject: [PATCH 2/2] debugfs: inline dummy implementations of debugfs_use_file_start()/_finish()

In commit 921d5cbeb37c ("debugfs: prevent access to removed files'
                         private data")
the functions debugfs_use_file_start() and debugfs_use_file_finish() have
been exported from the debugfs core.

Unfortunately, the inline keyword has been missed at their noop
implementations provided for the CONFIG_DEBUG_FS=n case.

Due to this lapse, the kbuild test robot moans on a powerpc defconfig
build:

  In file included from arch/powerpc/kernel/irq.c:54:0:
    include/linux/debugfs.h:185:12: error: 'debugfs_use_file_start'
      defined but not used [-Werror=unused-function]
      static int debugfs_use_file_start(const struct dentry *dentry,
                                        int *srcu_idx)

    include/linux/debugfs.h:191:13: error: 'debugfs_use_file_finish'
      defined but not used [-Werror=unused-function]
      static void debugfs_use_file_finish(int srcu_idx)

Add the inline keyword to the CONFIG_DEBUG_FS=n noop implementations of
debugfs_use_file_start() and debugfs_use_file_finish().

Signed-off-by: Nicolai Stange <nicstange@...il.com>
---
 include/linux/debugfs.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index e7d2a99..1438e23 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -205,13 +205,15 @@ static inline void debugfs_remove(struct dentry *dentry)
 static inline void debugfs_remove_recursive(struct dentry *dentry)
 { }
 
-static int debugfs_use_file_start(const struct dentry *dentry, int *srcu_idx)
+static inline int debugfs_use_file_start(const struct dentry *dentry,
+					int *srcu_idx)
 	__acquires(&debugfs_srcu)
 {
 	return 0;
 }
 
-static void debugfs_use_file_finish(int srcu_idx) __releases(&debugfs_srcu)
+static inline void debugfs_use_file_finish(int srcu_idx)
+	__releases(&debugfs_srcu)
 { }
 
 #define DEFINE_DEBUGFS_ATTRIBUTE(__fops, __get, __set, __fmt)	\
-- 
2.7.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ