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: <7c86c4470811270428r76702954se8f6e005481a6a35@mail.gmail.com>
Date:	Thu, 27 Nov 2008 13:28:28 +0100
From:	"stephane eranian" <eranian@...glemail.com>
To:	"Andi Kleen" <andi@...stfloor.org>
Cc:	"Thomas Gleixner" <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	mingo@...e.hu, x86@...nel.org, sfr@...b.auug.org.au
Subject: Re: [patch 05/24] perfmon: X86 generic code (x86)

On Thu, Nov 27, 2008 at 1:32 PM, Andi Kleen <andi@...stfloor.org> wrote:
> On Thu, Nov 27, 2008 at 12:35:54PM +0100, stephane eranian wrote:
>> On Thu, Nov 27, 2008 at 12:31 PM, Andi Kleen <andi@...stfloor.org> wrote:
>> >> The only reason why I have to deal with NMI is not so much to allow
>> >> for profiling irq-off regions but because I have to share the PMU with
>> >> the NMI watchdog. Otherwise I'd have to fail  or disable the NMI watchdog
>> >> on the fly.
>> >
>> > The NMI watchdog is now off by default so failing with it enabled
>> > is fine.
>>
>> Yes, but most likely it is on in distro kernels.
>
> Really? Why?
>
To make sure they can get a crash dump off of production systems.

> Old distros of course do it but only because they run old
> kernels.
>
>> You have to handle the case where the NMI fires while you are holding
>> a perfmon lock. What you have in the patch (and the the fully-featured version)
>> is that we get the NMI and we stop the PMU WITHOUT grabbing any perfmon
>> lock, and the we repost the interrupt with the regular vector. We also make sure
>> we grab the RIP at NMI. That is the one we want to see reported in the sampling
>> buffer.
>>
>> I am still wondering how Oprofile handles the case where multiple processes or
>> threads access the same file descriptor.
>
> It uses per CPU buffers (so no races on the writer) and readers can
> of course use a lock to coordinate between themselves.
>
What if a threads reprograms the counters while another is reading them?
How is the buffer reset?
--
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