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, 17 Jun 2016 12:07:28 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Arnd Bergmann <arnd@...db.de>, Kees Cook <keescook@...omium.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] lkdtm: avoid link error on ARM

The lkdtm_rodata file is built so that a function in it gets linked into
the .rodata ELF section. This works fine normally, but on 32-bit ARM
with really large kernels, it prevents the linker from inserting a
veneer for the call to __gnu_mcount_nc in case we are building with
"gcc -pg":

drivers/misc/built-in.o: In function `lkdtm_rodata_do_nothing':
panel.c:(.rodata+0x1480): relocation truncated to fit: R_ARM_CALL against symbol `__gnu_mcount_nc' defined in .text section in arch/arm/kernel/built-in.o

We probably never want the profiling code to be enabled for this file
anyway, so this just removes the option here, and for the sake of
consistency also in the lkdtm core module.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: 9a49a528dcf3 ("lkdtm: add function for testing .rodata section")
---
 drivers/misc/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 7d45ed4a1549..4a25eeaa30f9 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -60,6 +60,8 @@ obj-$(CONFIG_PANEL)             += panel.o
 
 lkdtm-$(CONFIG_LKDTM)		+= lkdtm_core.o
 lkdtm-$(CONFIG_LKDTM)		+= lkdtm_rodata_objcopy.o
+CFLAGS_REMOVE_lkdtm_core.o	+= -pg
+CFLAGS_REMOVE_lkdtm_rodata.o	+= -pg
 
 OBJCOPYFLAGS :=
 OBJCOPYFLAGS_lkdtm_rodata_objcopy.o := \
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ