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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091230131518.GD2956@ghostprotocols.net>
Date:	Wed, 30 Dec 2009 11:15:18 -0200
From:	Arnaldo Carvalho de Melo <acme@...radead.org>
To:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	fche LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] x86: record relocation offset

Em Wed, Dec 30, 2009 at 11:16:57AM +0800, Xiao Guangrong escreveu:
> Record relocation offset, perf tools will use it
> to adjust kernel symbol address
> Signed-off-by: Xiao Guangrong <xiaoguangrong@...fujitsu.com>

>  arch/x86/boot/compressed/head_32.S |    2 ++
>  arch/x86/boot/compressed/head_64.S |    3 +++
>  arch/x86/include/asm/bootparam.h   |    3 ++-
>  arch/x86/kernel/asm-offsets_32.c   |    1 +
>  arch/x86/kernel/asm-offsets_64.c   |    1 +
>  arch/x86/kernel/cpu/perf_event.c   |    4 ++++
<SNIP>
> --- a/arch/x86/kernel/cpu/perf_event.c
> +++ b/arch/x86/kernel/cpu/perf_event.c
> @@ -26,8 +26,10 @@
>  #include <asm/nmi.h>
> +#include <asm/setup.h>
>  
>  static u64 perf_event_mask __read_mostly;
> +static s32 relocate_offset;
>  
> @@ -2173,6 +2175,8 @@ void __init init_hw_perf_events(void)
>  	pr_info("Performance Events: ");
>  
> +	relocate_offset = boot_params.relocate_offset;
>  	switch (boot_cpu_data.x86_vendor) {
>  	case X86_VENDOR_INTEL:

I'm no expert on the intricacies of boot_params, but all the other hunks
seems sensible, but can't we provide a non-perf specific way of getting
the relocate_offset? I guess other tools would also love to have it.

What about systemtap, don't they solve this in some other way? Frank?

- Arnaldo
--
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