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] [day] [month] [year] [list]
Message-ID: <4858C8CC.4040407@de.ibm.com>
Date:	Wed, 18 Jun 2008 10:35:24 +0200
From:	Peter Oberparleiter <peter.oberparleiter@...ibm.com>
To:	Mariusz Kozlowski <m.kozlowski@...land.pl>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-mm@...ck.org, balbir@...ux.vnet.ibm.com,
	linux-kernel@...r.kernel.org,
	Peter Oberparleiter <oberparleiter@...glemail.com>
Subject: Re: 2.6.26-rc5-mm1

Mariusz Kozlowski wrote:
> After a few hours and tons of reboots I narrowed it down to
> arch/x86/kernel/Makefile:
> 
> a) works
> 	obj-y                   += tsc_$(BITS).o io_delay.o rtc.o
> 	GCOV_tsc_$(BITS).o      := n
> 	#GCOV_io_delay.o        := n
> 	#GCOV_rtc.o     := n
> 
> b) doesn't work
> 	obj-y                   += tsc_$(BITS).o io_delay.o rtc.o
> 	#GCOV_tsc_$(BITS).o     := n
> 	#GCOV_io_delay.o        := n
> 	#GCOV_rtc.o     := n
> 
> and that points to arch/x86/kernel/tsc_64.c

Excellent work! 

I had a quick look at that file and couldn't identify any obvious reason
(for a non-x84 developer) why it shouldn't work with -fprofile-arcs.
There are some comments in the corresponding Makefile though that
indicate that tsc_64.o is a bit picky with regards to CFLAGS (no -pg,
-fno-stack-protector) so I think it's safe to simply exclude those
files from profiling.

Based on your findings, the following patch should be applied to -mm.
Thanks again for your effort.

--
[PATCH] gcov: fix run-time error on x86_64

From: Peter Oberparleiter <peter.oberparleiter@...ibm.com>

Disable profiling of tsc_$(BITS).o to fix a run-time error when using
CONFIG_GCOV_PROFILE_ALL on x86_64:

bash[498] segfault at ffffffff80868b58 ip ffffffffff600412
          sp 7fffa3d010f0 error 7
init[1] segfault at ffffffff80868b58 ip ffffffffff600412
        sp 7fff9e97f640 error 7
init[1] segfault at ffffffff80868b58 ip ffffffffff600412
        sp 7fff9e97eed0 error 7
Kernel panic - not syncing: Attemted to kill init!
Pid 1, comm: init Not tainted 2.6.26-rc5-mm1 #1

m.kozlowski@...land.pl wrote:
> After a few hours and tons of reboots I narrowed it down to
> arch/x86/kernel/Makefile:
>
> a) works
>	obj-y                   += tsc_$(BITS).o io_delay.o rtc.o
> 	GCOV_tsc_$(BITS).o      := n
> 	#GCOV_io_delay.o        := n
> 	#GCOV_rtc.o     := n
>
> b) doesn't work
> 	obj-y                   += tsc_$(BITS).o io_delay.o rtc.o
> 	#GCOV_tsc_$(BITS).o     := n
> 	#GCOV_io_delay.o        := n
>	#GCOV_rtc.o     := n
>
> and that points to arch/x86/kernel/tsc_64.c

Reported-by: Mariusz Kozlowski <m.kozlowski@...land.pl>
Reported-by: Balbir Singh <balbir@...ux.vnet.ibm.com>
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@...ibm.com>

---
 arch/x86/kernel/Makefile |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6.26-rc5-mm3/arch/x86/kernel/Makefile
===================================================================
--- linux-2.6.26-rc5-mm3.orig/arch/x86/kernel/Makefile
+++ linux-2.6.26-rc5-mm3/arch/x86/kernel/Makefile
@@ -13,6 +13,9 @@ CFLAGS_REMOVE_tsc_32.o = -pg
 CFLAGS_REMOVE_rtc.o = -pg
 endif
 
+GCOV_tsc_32.o := n
+GCOV_tsc_64.o := n
+
 #
 # vsyscalls (which work on the user stack) should have
 # no stack-protector checks:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ