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>] [day] [month] [year] [list]
Message-Id: <20171103140606.707333-1-arnd@arndb.de>
Date:   Fri,  3 Nov 2017 15:05:46 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andi Kleen <ak@...ux.intel.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] kernel debug: fix building without modules

The new generic_bug_clear_once() function fails to build when
modules are disabled:

lib/bug.c: In function 'generic_bug_clear_once':
lib/bug.c:213:32: error: 'module_bug_list' undeclared (first use in this function); did you mean 'module_sig_ok'?
  list_for_each_entry_rcu(mod, &module_bug_list, bug_list)

This adds another #ifdef around the code that resets the counters
in modules.

Fixes: 371435f78e9e ("kernel debug: support resetting WARN_ONCE for all architectures")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 lib/bug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bug.c b/lib/bug.c
index fa9c901fabf4..c988a3fc3348 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -207,6 +207,7 @@ static void clear_once_table(struct bug_entry *start, struct bug_entry *end)
 
 void generic_bug_clear_once(void)
 {
+#ifdef CONFIG_MODULES
 	struct module *mod;
 
 	rcu_read_lock_sched();
@@ -214,6 +215,7 @@ void generic_bug_clear_once(void)
 		clear_once_table(mod->bug_table,
 				 mod->bug_table + mod->num_bugs);
 	rcu_read_unlock_sched();
+#endif
 
 	clear_once_table(__start___bug_table, __stop___bug_table);
 }
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ