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]
Date:   Sat, 4 Dec 2021 14:46:47 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Sasha Levin <sashal@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        Richard Cochran <richardcochran@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Claudiu Manoil <claudiu.manoil@....com>,
        "alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH AUTOSEL 5.15 65/68] net: mscc: ocelot: create a function
 that replaces an existing VCAP filter

Hi Sasha,

On Tue, Nov 30, 2021 at 09:47:01AM -0500, Sasha Levin wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> [ Upstream commit 95706be13b9f755d93b5b82bdc782af439f1ec22 ]
> 
> VCAP (Versatile Content Aware Processor) is the TCAM-based engine behind
> tc flower offload on ocelot, among other things. The ingress port mask
> on which VCAP rules match is present as a bit field in the actual key of
> the rule. This means that it is possible for a rule to be shared among
> multiple source ports. When the rule is added one by one on each desired
> port, that the ingress port mask of the key must be edited and rewritten
> to hardware.
> 
> But the API in ocelot_vcap.c does not allow for this. For one thing,
> ocelot_vcap_filter_add() and ocelot_vcap_filter_del() are not symmetric,
> because ocelot_vcap_filter_add() works with a preallocated and
> prepopulated filter and programs it to hardware, and
> ocelot_vcap_filter_del() does both the job of removing the specified
> filter from hardware, as well as kfreeing it. That is to say, the only
> option of editing a filter in place, which is to delete it, modify the
> structure and add it back, does not work because it results in
> use-after-free.
> 
> This patch introduces ocelot_vcap_filter_replace, which trivially
> reprograms a VCAP entry to hardware, at the exact same index at which it
> existed before, without modifying any list or allocating any memory.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> Acked-by: Richard Cochran <richardcochran@...il.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---

It looks like something happened and the essence of this series, aka
this patch:
https://patchwork.kernel.org/project/netdevbpf/patch/20211126172845.3149260-5-vladimir.oltean@nxp.com/
did not or could not be backported.

In this case I am afraid that all the patches below are useless and can
be dropped:

[PATCH AUTOSEL 4.4 8/9] net: ptp: add a definition for the UDP port for IEEE 1588 general messages
[PATCH AUTOSEL 4.9 11/12] net: ptp: add a definition for the UDP port for IEEE 1588 general messages
[PATCH AUTOSEL 4.14 13/14] net: ptp: add a definition for the UDP port for IEEE 1588 general messages
[PATCH AUTOSEL 4.19 16/17] net: ptp: add a definition for the UDP port for IEEE 1588 general messages
[PATCH AUTOSEL 5.4 24/25] net: ptp: add a definition for the UDP port for IEEE 1588 general messages
[PATCH AUTOSEL 5.10 42/43] net: ptp: add a definition for the UDP port for IEEE 1588 general messages
[PATCH AUTOSEL 5.15 66/68] net: ptp: add a definition for the UDP port for IEEE 1588 general messages
[PATCH AUTOSEL 5.15 65/68] net: mscc: ocelot: create a function that replaces an existing VCAP filter

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ