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-next>] [day] [month] [year] [list]
Message-Id: <20190617130014.1713870-1-arnd@arndb.de>
Date:   Mon, 17 Jun 2019 14:59:42 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Luis Chamberlain <mcgrof@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>, Matteo Croce <mcroce@...hat.com>,
        Kees Cook <keescook@...omium.org>,
        Aaron Tomlin <atomlin@...hat.com>,
        Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] proc/sysctl: make firmware loader table conditional

We get a link error in the firmware loader fallback table,
which now refers to the global sysctl_vals variable:

drivers/base/firmware_loader/fallback_table.o:(.data+0x2c): undefined reference to `sysctl_vals'
drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals'
drivers/base/firmware_loader/fallback_table.o:(.data+0x50): undefined reference to `sysctl_vals'
drivers/base/firmware_loader/fallback_table.o:(.data+0x54): undefined reference to `sysctl_vals'

Add an #ifdef that only builds that table when it is being
used.

Fixes: c81c506545f4 ("proc/sysctl: add shared variables for range check")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/base/firmware_loader/fallback_table.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
index 58d4a1263480..ba9d30b28edc 100644
--- a/drivers/base/firmware_loader/fallback_table.c
+++ b/drivers/base/firmware_loader/fallback_table.c
@@ -23,6 +23,7 @@ struct firmware_fallback_config fw_fallback_config = {
 };
 EXPORT_SYMBOL_GPL(fw_fallback_config);
 
+#ifdef CONFIG_SYSCTL
 struct ctl_table firmware_config_table[] = {
 	{
 		.procname	= "force_sysfs_fallback",
@@ -45,3 +46,4 @@ struct ctl_table firmware_config_table[] = {
 	{ }
 };
 EXPORT_SYMBOL_GPL(firmware_config_table);
+#endif
-- 
2.20.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ