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] [day] [month] [year] [list]
Message-ID: <CAJWu+orfFuNj5MTp3f2buU9UCu6t2G0_MUct5DMdHVkB3JcXYQ@mail.gmail.com>
Date:   Mon, 2 Oct 2017 14:31:02 -0700
From:   Joel Fernandes <joelaf@...gle.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>, kernel-team@...roid.com
Subject: Re: [PATCH v6 2/2] tracing: Add support for preempt and irq
 enable/disable events

Hi Steven,

On Mon, Oct 2, 2017 at 12:37 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Mon, 2 Oct 2017 12:33:30 -0700
> Joel Fernandes <joelaf@...gle.com> wrote:
>
>
>> diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
>> index 5dd1272d1ab2..2a1af0dd9cc4 100644
>> --- a/include/linux/irqflags.h
>> +++ b/include/linux/irqflags.h
>> @@ -93,7 +93,9 @@
>>  #define local_irq_save(flags)                          \
>>         do {                                            \
>>                 raw_local_irq_save(flags);              \
>> -               trace_hardirqs_off();                   \
>> +               if (!raw_irqs_disabled_flags(flags)) {  \
>> +                       trace_hardirqs_off();           \
>> +               }                                       \
>>         } while (0)
>>
>>
>> @@ -101,7 +103,6 @@
>>         do {                                            \
>>                 if (raw_irqs_disabled_flags(flags)) {   \
>>                         raw_local_irq_restore(flags);   \
>> -                       trace_hardirqs_off();           \
>>                 } else {                                \
>>                         trace_hardirqs_on();            \
>>                         raw_local_irq_restore(flags);   \
>
> I rather have the protection in trace_hardirqs_on/off(). Let's keep the
> ugliness from spreading.

I agree, its cleaner. thanks,

- Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ