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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Jul 2012 11:55:35 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>, hpa@...or.com,
	eranian@...gle.com, linux-kernel@...r.kernel.org,
	fweisbec@...il.com, akpm@...ux-foundation.org, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org,
	Robert Richter <robert.richter@....com>
Subject: Re: [tip:perf/core] perf/x86: Fix USER/KERNEL tagging of samples


* Peter Zijlstra <peterz@...radead.org> wrote:

> On Tue, 2012-07-10 at 11:02 +0200, Peter Zijlstra wrote:
> > Ingo, do you want me to do a version where I simply bail on everything
> > if regs->{cs,ss} != {__USER_CS, __USER32_CS} || regs->flags & VM ?
> 
> Here's a variant that does that.. 

>  arch/x86/include/asm/perf_event.h         |   11 +++++--
>  arch/x86/kernel/cpu/perf_event.c          |   46 +++++++++++++++++++++++++-----
>  arch/x86/kernel/cpu/perf_event.h          |   20 +++++++++++++
>  arch/x86/kernel/cpu/perf_event_amd_ibs.c  |    4 +-
>  arch/x86/kernel/cpu/perf_event_intel_ds.c |    7 ++--
>  5 files changed, 74 insertions(+), 14 deletions(-)

this is the full thing:

>  arch/x86/include/asm/perf_event.h         |   11 ++-
>  arch/x86/kernel/cpu/perf_event.c          |   89 ++++++++++++++++++++++++++----
>  arch/x86/kernel/cpu/perf_event.h          |   20 ++++++
>  arch/x86/kernel/cpu/perf_event_amd_ibs.c  |    4 +
>  arch/x86/kernel/cpu/perf_event_intel_ds.c |    7 +-
>  5 files changed, 114 insertions(+), 17 deletions(-)

so that's 40 LOC difference.

Hm, I expected there to be more of a difference, so let me 
change my mind again in view of the evidence: now I tend to
lean Linus's way, we might as well apply those extra 40 lines
now that you've written them :-)

Even if it is not enough to do proper segmented profiling, 
should anyone be interested in such a profiling mode they'll 
have a much easier job making it work, the rest looks mostly a 
user space side job. Your larger patch looks safe enough at the 
boundaries.

Thanks,

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