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:   Tue, 19 Feb 2019 10:15:30 +0000
From:   Vlad Buslov <vladbu@...lanox.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
CC:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next 12/12] net: sched: flower: set unlocked flag for
 flower proto ops


On Mon 18 Feb 2019 at 19:27, Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Wed, Feb 13, 2019 at 11:47 PM Vlad Buslov <vladbu@...lanox.com> wrote:
>>
>> Set TCF_PROTO_OPS_DOIT_UNLOCKED for flower classifier to indicate that its
>> ops callbacks don't require caller to hold rtnl lock.
>
> So, if this means RTNL is gone for all cls_flower changes, why
> do I still see rtnl_lock() in cls_flower.c after all your patches in
> this set?

It doesn't say that rtnl lock is gone, what it says is that caller
doesn't have to obtain rtnl lock before calling flower ops callbacks.

>
> For instance:
>
>  366 static void fl_destroy_filter_work(struct work_struct *work)
>  367 {
>  368         struct cls_fl_filter *f = container_of(to_rcu_work(work),
>  369                                         struct cls_fl_filter, rwork);
>  370
>  371         rtnl_lock();
>  372         __fl_destroy_filter(f);
>  373         rtnl_unlock();
>  374 }

This shouldn't be needed. Thanks for spotting it.

>
> and...
>
>  382         if (!rtnl_held)
>  383                 rtnl_lock();
>
> ...
>
> 1436                 if (!rtnl_held)
> 1437                         rtnl_lock();

Drivers assume rtnl lock, so flower obtains it before calling offloads
API.

>
>
> Please explain in your changelog, otherwise it is very confusing.

Sorry for not making this stuff clear. I will expand cover letter with
more details.

>
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ