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]
Date:   Mon, 22 May 2017 11:26:51 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Mark Rutland <mark.rutland@....com>
Cc:     "Jin, Yao" <yao.jin@...ux.intel.com>, acme@...nel.org,
        jolsa@...nel.org, mingo@...hat.com,
        alexander.shishkin@...ux.intel.com, Linux-kernel@...r.kernel.org,
        ak@...ux.intel.com, kan.liang@...el.com, yao.jin@...el.com,
        Will Deacon <will.deacon@....com>
Subject: Re: [PATCH] perf/x86/intel: Drop kernel samples even though :u is
 specified

On Mon, May 22, 2017 at 09:45:30AM +0100, Mark Rutland wrote:
> On Mon, May 22, 2017 at 10:12:22AM +0800, Jin, Yao wrote:

> > But the code is being ugly and hard to maintain. And frankly I don't
> > know kernel address space for all arch.
> > 
> > Any idea? Could we just do at x86 side this time?
> 
> Can we not check user_mode(regs) for all architectures?
> 
> !user_mode(regs) implies a kernel sample.

Yes, that should work at that point. We specifically already rely on
user_mode() in the generic code.

On x86 we specifically set regs->cs to match regs->ip (in cases where
this isn't necessarily so) before calling into the generic code to make
this work.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ