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]
Date:   Fri, 28 Jul 2017 16:10:49 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     linux-arm-kernel@...ts.infradead.org
Cc:     Arnd Bergmann <arnd@...db.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Matt Hart <matthew.hart@...aro.org>,
        Stefan Agner <stefan@...er.ch>,
        Chris Brandt <chris.brandt@...esas.com>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Russell King <rmk+kernel@....linux.org.uk>,
        Nicolas Pitre <nico@...aro.org>,
        Russell King <linux@...linux.org.uk>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] [RFC] ARM: move __bug_table into .data for XIP_KERNEL

Matt Hart reports that vf610m4_defconfig kernels grew to 2GB
xipImage size after the __bug_table change.

I tried out a few things and found that moving the bug table
into the .data section avoids this problem. However, the
linker script magic is beyond my capabilities here, so this
is almost certainly not correct.

I've added a few people to Cc that understand this better
than I do, hopefully someone can turn my bogus patch into
a proper one.

Fixes: b5effd3815cc ("debug: Fix __bug_table[] in arch linker scripts")
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Matt Hart <matthew.hart@...aro.org>
Cc: Stefan Agner <stefan@...er.ch>
Cc: Chris Brandt <chris.brandt@...esas.com>
Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Russell King <rmk+kernel@....linux.org.uk>
Cc: Nicolas Pitre <nico@...aro.org>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 arch/arm/kernel/vmlinux-xip.lds.S | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
index a8ceec3e0580..1ebb40ecf411 100644
--- a/arch/arm/kernel/vmlinux-xip.lds.S
+++ b/arch/arm/kernel/vmlinux-xip.lds.S
@@ -241,12 +241,17 @@ SECTIONS
 		DATA_DATA
 		CONSTRUCTORS
 
+#ifdef CONFIG_GENERIC_BUG
+		__bug_table = ALIGN(8);
+		VMLINUX_SYMBOL(__start___bug_table) = .;
+		KEEP(*(__bug_table))
+		VMLINUX_SYMBOL(__stop___bug_table) = .;
+#endif
+
 		_edata = .;
 	}
 	_edata_loc = __data_loc + SIZEOF(.data);
 
-	BUG_TABLE
-
 #ifdef CONFIG_HAVE_TCM
         /*
 	 * We align everything to a page boundary so we can
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ