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:   Wed, 10 Apr 2019 10:00:14 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Vlad Buslov <vladbu@...lanox.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "jhs@...atatu.com" <jhs@...atatu.com>,
        "xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "john.hurley@...ronome.com" <john.hurley@...ronome.com>
Subject: Re: [PATCH net-next] net: sched: flower: insert filter to ht before
 offloading it to hw

On Wed, 10 Apr 2019 16:26:38 +0000, Vlad Buslov wrote:
> >> Actually, I intended to modify fl_reoffload() to ignore filters with
> >> 'deleted' flag set when adding, but I guess reusing 'reoffload_count' to
> >> retry fl_hw_destroy_filter() would also work.  
> >
> > Yeah, I don't see how you can ignore deleted safely.  Perhaps lack of
> > coffee :)  
> 
> Well, drivers are supposed to account for double deletion or deletion of
> filters that were not successfully offloaded to them. If filter is not
> marked as skip_sw, its creation will succeed even if hw callbacks have
> failed, but __fl_delete() still calls fl_hw_destroy_filter() on such
> filters. The main thing is that we must guarantee that code doesn't
> delete a new filter with same key. However, in case of flower classifier
> 'cookie' is pointer to filter, and filter is freed only when last
> reference to it is released, so code is safe in this regard.
> 
> So I guess there is nothing wrong with reoffload calling cb()
> on all classifier filters (including marked as 'deleted'), if delete
> code doesn't miss any of the callbacks afterwards.

Yup.  Plus multiple/spurious deletes are already a fact of life, since
we don't keep track of which callback accepted the filter and which
didn't.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ