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: <75dbd476-2e0b-f4e6-4cb0-fff6f659ac8e@huawei.com>
Date:   Thu, 19 Nov 2020 20:29:26 +0800
From:   Yunsheng Lin <linyunsheng@...wei.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>,
        <linmiaohe@...wei.com>, <martin.varghese@...ia.com>,
        <pabeni@...hat.com>, <pshelar@....org>, <fw@...len.de>,
        <gnault@...hat.com>, <steffen.klassert@...unet.com>,
        <kyk.segfault@...il.com>, <viro@...iv.linux.org.uk>,
        <vladimir.oltean@....com>, <edumazet@...gle.com>,
        <saeed@...nel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>
Subject: Re: [PATCH net-next] net: add in_softirq() debug checking in
 napi_consume_skb()

On 2020/11/19 19:41, Peter Zijlstra wrote:
> On Thu, Nov 19, 2020 at 05:19:44PM +0800, Yunsheng Lin wrote:
>> On 2020/11/19 0:26, Jakub Kicinski wrote:
>>> On Wed, 18 Nov 2020 16:57:57 +0100 Peter Zijlstra wrote:
>>>> On Wed, Nov 18, 2020 at 07:43:48AM -0800, Jakub Kicinski wrote:
>>>>
>>>>> TBH the last sentence I wrote isn't clear even to me at this point ;D
>>>>>
>>>>> Maybe using just the macros from preempt.h - like this?
>>>>>
>>>>> #define lockdep_assert_in_softirq()                                    \
>>>>> do {                                                                   \
>>>>>        WARN_ON_ONCE(__lockdep_enabled                  &&              \
>>>>>                     (!in_softirq() || in_irq() || in_nmi())	\
>>>>> } while (0)
>>
>> One thing I am not so sure about is the different irq context indicator
>> in preempt.h and lockdep.h, for example lockdep_assert_in_irq() uses
>> this_cpu_read(hardirq_context) in lockdep.h, and in_irq() uses
>> current_thread_info()->preempt_count in preempt.h, if they are the same
>> thing?
> 
> Very close, for more regular code they should be the same.

Thanks for clarifying.
So I assmue the lockdep_assert_in_softirq() interface we want to add
is regular code, right?

> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ