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: <CAJWu+orLxBiwXZUVHVJNbEvn-4PhYg5_VRSfjYg8kracavkg0Q@mail.gmail.com>
Date:   Wed, 6 Sep 2017 17:22:46 -0700
From:   Joel Fernandes <joelaf@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>, kernel-team@...roid.com,
        Ingo Molnar <mingo@...hat.com>,
        Byungchul Park <byungchul.park@....com>,
        Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 2/2] tracing: Add support for critical section events

Hi Peter,

On Wed, Sep 6, 2017 at 1:40 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, Sep 05, 2017 at 09:35:11AM -0700, Joel Fernandes wrote:
>> On Mon, Sep 4, 2017 at 11:52 PM, Peter Zijlstra <peterz@...radead.org> wrote:
>> > On Mon, Sep 04, 2017 at 08:26:13PM -0700, Joel Fernandes wrote:
>> >
>> >> Apologies, I meant (without the "off"):
>> >>
>> >> subsystem: atomic_section
>> >> events:
>> >>   irqs_disable
>> >>   irqs_enable
>> >>   preempt_disable
>> >>   preempt_enable
>> >>
>> >> and additionally (similar to what my patch does):
>> >>   preemptirq_enable
>> >>   preemptirq_disable
>> >>
>> >
>> > What do you need the last for?
>>
>> The last 2 events above behave as 'disable' means either preempt or
>> irq got disabled, and 'enable' means *both* preempt and irq are
>> enabled (after either one of them was disabled).
>>
>> This has the advantage of not generating events when we're already in
>> an atomic section when using these events, for example acquiring spin
>> locks in an interrupt handler might increase the preempt count and
>> generate 'preempt_disable' events, but not preemptirq_disable events.
>> This has the effect of reducing the spam in the traces when all we
>> care about is being in an atomic section or not. These events happen a
>> lot so to conserve space in the trace buffer, the user may want to
>> just enable the latter 2 events. Does that sound Ok to you?
>
> Hurm,... how about placing a filter on the other 4, such that we only
> emit the event on 0<->x state transitions? IIRC tracing already has
> filter bits and eBPF bits on that allow something like that.
>
> That avoids having to introduce more tracepoints and gets you the same
> results.

Sure, that sounds fine to me. I dropped the last 2 events from a
repost of the series since we can add that in (combined preempt and
irq) at a later time using similar methods as you're suggesting.

thanks,

-Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ