71f2>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<450c38ef>] 0x
change tcf_police_init() to avoid leaking 'new' in case TCA_POLICE_RESULT
contains TC_ACT_GOTO_CHAIN extended action.
Fixes: c08f5ed5d625 ("net/sched: act_police: disallow 'goto chain' on fallback
000
Fixes: f2cbd4852820 ("net/sched: act_police: fix race condition on state
variables")
Reported-by: Cong Wang
Signed-off-by: Davide Caratti
---
net/sched/act_police.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index e
On Tue, 2018-11-20 at 20:13 -0800, Cong Wang wrote:
> On Tue, Nov 20, 2018 at 3:30 PM Eric Dumazet wrote:
> > On Tue, Nov 20, 2018 at 3:28 PM David Miller wrote:
> > > Applied.
> >
> > We need a fix to make lockdep happy, as reported by Cong.
> >
> > Cong, do you want to handle this ?
> >
>
f tcf_lock
- improve cache-line usage
Fixes: 2d550dbad83c ("net/sched: act_police: don't use spinlock in the data
path")
Reported-and-suggested-by: Eric Dumazet
Signed-off-by: Davide Caratti
---
net/sched/act_police.c | 35 +--
1 file changed, 21 inserti
On Thu, 2018-11-15 at 05:53 -0800, Eric Dumazet wrote:
>
> On 11/15/2018 03:43 AM, Davide Caratti wrote:
> > On Wed, 2018-11-14 at 22:46 -0800, Eric Dumazet wrote:
> > > On 09/13/2018 10:29 AM, Davide Caratti wrote:
> > > > use RCU instead of spinlocks,
On Wed, 2018-11-14 at 22:46 -0800, Eric Dumazet wrote:
>
> On 09/13/2018 10:29 AM, Davide Caratti wrote:
> > use RCU instead of spinlocks, to protect concurrent read/write on
> > act_police configuration. This reduces the effects of contention in the
> > data path,
tcf_idr_check_alloc() can return a negative value, on allocation failures
(-ENOMEM) or IDR exhaustion (-ENOSPC): don't leak keys_ex in these cases.
Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action")
Signed-off-by: Davide Caratti
---
net/sched/act_pedit.c | 3 +
Signed-off-by: Davide Caratti
---
net/8021q/vlan.c | 1 +
net/8021q/vlan.h | 12
net/8021q/vlan_dev.c | 2 ++
3 files changed, 15 insertions(+)
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 5e9950453955..1b7a375c6616 100644
--- a/net/8021q/vlan.c
+++ b/net/80
Signed-off-by: Davide Caratti
---
net/8021q/vlan.c | 1 +
net/8021q/vlan.h | 12
net/8021q/vlan_dev.c | 2 ++
3 files changed, 15 insertions(+)
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 5e9950453955..1b7a375c6616 100644
--- a/net/8021q/vlan.c
+++ b/net/80
hello Cong and Jamal,
On Fri, 2018-10-19 at 13:40 -0700, Cong Wang wrote:
> On Thu, Oct 18, 2018 at 8:30 AM Davide Caratti wrote:
> > The alternative is, we systematically forbid usage of 'goto chain' in
> > tcfg_paction, so that:
> >
> > # tc f a dev v0 egress mat
in the following command:
# tc action add action random
'goto chain x' is allowed only for c1: setting it for c2 makes the kernel
crash with NULL pointer dereference, since TC core doesn't initialize the
chain handle.
Signed-off-by: Davide Caratti
---
net/sched/act_gact.c | 5 +
1
add test to verify if act_police forbids 'goto chain' control actions for
'exceed' traffic.
Signed-off-by: Davide Caratti
---
.../tc-testing/tc-tests/actions/police.json | 24 +++
1 file changed, 24 insertions(+)
diff --git a/tools/testing/selftests/tc-testing/tc-tests
in the following command:
# tc action add action police rate burst conform-exceed /
'goto chain x' is allowed only for c1: setting it for c2 makes the kernel
crash with NULL pointer dereference, since TC core doesn't initialize the
chain handle.
Signed-off-by: Davide Caratti
---
net/sched
add test to verify if act_gact forbids 'goto chain' control actions on
'random' traffic in gact.json.
Signed-off-by: Davide Caratti
---
.../tc-testing/tc-tests/actions/gact.json | 24 +++
1 file changed, 24 insertions(+)
diff --git a/tools/testing/selftests/tc-testing/tc
rs try to set 'goto chain x' in the fallback
action. Patch 3/4 and 4/4 add TDC selftest coverage to this new behavior.
Davide Caratti (4):
net/sched: act_gact: disallow 'goto chain' on fallback control action
net/sched: act_police: disallow 'goto chain' on fallback control
action
tc-tests
hello Jamal,
On Thu, 2018-10-18 at 08:52 -0400, Jamal Hadi Salim wrote:
> Rejection is a good solution[1].
> Would be helpful to set an ext_ack to something like
> "only one goto chain is supported currently"
ok, that's material for a v3, if you / Cong / others are ok with the other
hunks.
On
- reject 'goto action' if it is specified twice in the same gact rule
Fixes: db50514f9a9c ("net: sched: add termination action to allow goto chain")
Signed-off-by: Davide Caratti
---
include/net/tc_act/tc_gact.h | 11 +--
net/sched/act_gact.c | 19 ++-
2 files change
On Wed, 2018-10-17 at 22:35 -0700, Cong Wang wrote:
> > (well, after some more thinking I looked again at that patch and yes, it
> > lacked the most important thing:)
>
> Hmm, as I said, I am not sure if the logic is correct, if we have two
> different
> goto actions, we must have two pointers.
On Mon, 2018-10-15 at 11:31 -0700, Cong Wang wrote:
> On Sat, Oct 13, 2018 at 8:23 AM Davide Caratti wrote:
> >
> > On Fri, 2018-10-12 at 13:57 -0700, Cong Wang wrote:
> > > Why not just validate the fallback action in each action init()?
> > > For example, check
On Sun, 2018-10-14 at 09:46 -0400, Jamal Hadi Salim wrote:
> On 2018-10-13 11:23 a.m., Davide Caratti wrote:
> >
> > A (legal?) trick is to let tcf_action store the fallback action when it
> > contains a 'goto chain' command, I just posted a proposal for gact. If you
On Fri, 2018-10-12 at 13:57 -0700, Cong Wang wrote:
> Why not just validate the fallback action in each action init()?
> For example, checking tcfg_paction in tcf_gact_init().
>
> I don't see the need of making it generic.
hello Cong, once again thanks for looking at this.
what you say is
goto_chain handle per action: ensure that gact never contains
more than one 'goto chain' in a rule. If the fallback control action is a
'goto chain', copy it to tcf_action to ensure that goto_chain is properly
initialized.
Fixes: db50514f9a9c ("net: sched: add termination action to allow goto ch
goto_chain' handle per action: extend act_api to disallow 'goto
chain' specified more than once in a rule. If the fallback control action
is legally configured, use it to properly initialize the chain.
Fixes: db50514f9a9c ("net: sched: add termination action to allow goto chain")
Signed-off-
1e39 ("net: sched: introduce multichain support for filters")
Signed-off-by: Davide Caratti
---
net/sched/cls_api.c | 13 -
net/sched/sch_api.c | 8
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 0a75cb
on, thanks
to David Ahern
Fixes: 5bc1701881e39 ("net: sched: introduce multichain support for filters")
Signed-off-by: Davide Caratti
---
include/net/sch_generic.h | 2 ++
net/sched/cls_api.c | 11 ++-
net/sched/sch_api.c | 1 +
3 files changed, 9 insert
On Tue, 2018-10-09 at 08:46 -0600, David Ahern wrote:
> On 10/9/18 7:10 AM, Davide Caratti wrote:
> > Similarly to what has been done in 8b4c3cdd9dd8 ("net: sched: Add policy
> > validation for tc attributes"), add validation for TCA_CHAIN and TCA_KIND
> > netl
rs")
Signed-off-by: Davide Caratti
---
net/sched/cls_api.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 0a75cb2e5e7b..fb1afc0e130d 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -37,6 +37,11
use a TDC plugin, instead of building eBPF programs in the 'setup' stage.
'-B' argument can be used to build eBPF programs in $EBPFDIR directory,
in the 'pre-suite' stage. Binaries are then cleaned in 'post-suite' stage.
Signed-off-by: Davide Caratti
---
tools/testing/selftests/tc-testing
Lucas and Roman reported TDC errors while testing act_bpf with TDC:
- patch 1/2 fixes the reported problem (include of wrong headers).
- patch 2/2 allows building eBPF test programs for TDC using a plugin.
Davide Caratti (2):
tc-testing: fix build of eBPF programs
tc-testing: use a plugin
rely on uAPI headers in the current kernel tree, rather than requiring the
correct version installed on the test system. While at it, group all
sections in a single binary and test the 'section' parameter.
Reported-by: Lucas Bates
Signed-off-by: Davide Caratti
---
.../testing/selftests/tc
On Wed, 2018-10-03 at 18:29 +0300, Vlad Buslov wrote:
> Recently flower classifier was updated to expose count of devices that
> filter is offloaded to. Add support to print this counter as 'in_hw_count'.
>
> Signed-off-by: Vlad Buslov
> Acked-by: Jiri Pirko
> ---
> tc/f_flower.c | 10
n port. So, it's safe to avoid flipping the above feature on
addition/deletion of VXLAN tunnels.
Fixes: 630f4b70567f ("be2net: Export tunnel offloads only when a VxLAN tunnel
is created")
Signed-off-by: Davide Caratti
---
drivers/net/ethernet/emulex/benet/be_main.c | 5 +
1 file
bnxt offload code currently supports only 'push' and 'pop' operation: let
.ndo_setup_tc() return -EOPNOTSUPP if VLAN 'modify' action is configured.
Fixes: 2ae7408fedfe ("bnxt_en: bnxt: add TC flower filter offload support")
Signed-off-by: Davide Caratti
---
drivers/net/ethernet/bro
wrong
value of 'cpustats'. Setting it to true proved to fix the reported crash.
Reported-by: Matteo Croce
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Fixes: 5c5670fae430 ("net/sched: Introduce sample tc action")
Tested-by: Matteo Croce
Sig
use per-CPU counters, instead of sharing a single set of stats with all
cores. This removes the need of using spinlock when statistics are read
or updated.
Signed-off-by: Davide Caratti
---
net/sched/act_police.c | 46 --
1 file changed, 22 insertions
use RCU instead of spinlocks, to protect concurrent read/write on
act_police configuration. This reduces the effects of contention in the
data path, in case multiple readers are present.
Signed-off-by: Davide Caratti
---
net/sched/act_police.c | 156 -
1
one
test results (avg. pps/thread):
$c | before patch | after patch | improvement
+--+--+-
1 | 3518448 | 3591240 | irrelevant
2 | 3070065 | 3383393 | 10%
4 | 1540969 | 3238385 | 110%
Davide Caratti (
or when the kernel fails to
allocate 'params_new'. Ensure that tunnel_key_init() releases the tunnel
metadata also in the above conditions.
Addresses-Coverity-ID: 1373974 ("Resource leak")
Fixes: d0f6dd8a914f4 ("net/sched: Introduce act_tunnel_key")
Fixes: 0ed5269f9e41f ("
g offset relative to the
conventional network headers")
Signed-off-by: Davide Caratti
---
net/sched/act_pedit.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 107034070019..ad99a99f11f6 100644
--- a/net/sched/act_p
$c | before patch | after patch | improvement
+--+--+
1 | 3917464 ± 3% | 4000458 ± 3% | irrelevant
2 | 3455367 ± 4% | 3953076 ± 1% |+14%
4 | 2496594 ± 2% | 3801123 ± 3% |+52%
v2: rebased on latest net-next
Davide Caratti (2):
use RCU instead of spin_{,un}lock_bh, to protect concurrent read/write on
act_skbedit configuration. This reduces the effects of contention in the
data path, in case multiple readers are present.
Signed-off-by: Davide Caratti
---
include/net/tc_act/tc_skbedit.h | 37 ---
net/sched
use per-CPU counters, instead of sharing a single set of stats with all
cores: this removes the need of spinlocks when stats are read/updated.
Signed-off-by: Davide Caratti
---
net/sched/act_skbedit.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/sched
nel panic - not syncing: Fatal exception in interrupt ]---
Fixes: 9c5f69bbd75a ("net/sched: act_csum: don't use spinlock in the fast path")
Signed-off-by: Davide Caratti
---
include/net/tc_act/tc_csum.h | 1 -
net/sched/act_csum.c | 6 +++---
2 files changed, 3 insertions(+),
ion range:
0x8000-0xbfff)
---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
Fixes: d0f6dd8a914f ("net/sched: Introduce act_tunnel_key")
Signed-off-by: Davide Caratti
---
include/net/tc_act/tc_tunnel_key.h | 1 -
net/sched/act_tunnel_key.
on the other TC actions (it's present even on actions where the
spinlock is still used), storing the control action in the common area
should be acceptable for tunnel_key and csum as well.
[1] https://www.spinics.net/lists/netdev/msg472047.html
Davide Caratti (2):
net/sched: act_csum: fix NULL dereference
use RCU instead of spin_{,un}lock_bh, to protect concurrent read/write on
act_skbedit configuration. This reduces the effects of contention in the
data path, in case multiple readers are present.
Signed-off-by: Davide Caratti
---
include/net/tc_act/tc_skbedit.h | 37 ---
net/sched
use per-CPU counters, instead of sharing a single set of stats with all
cores: this removes the need of spinlocks when stats are read/updated.
Signed-off-by: Davide Caratti
---
net/sched/act_skbedit.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/sched
$c | before patch | after patch | improvement
+--+--+
1 | 3917464 ± 3% | 4000458 ± 3% | irrelevant
2 | 3455367 ± 4% | 3953076 ± 1% |+14%
4 | 2496594 ± 2% | 3801123 ± 3% |+52%
Davide Caratti (2):
net/sched: skbedit: use p
oto no_route;
> }
>
> - if (res->type == RTN_BROADCAST)
> + if (res->type == RTN_BROADCAST) {
> + if (IN_DEV_BFORWARD(in_dev))
> + goto make_route;
> goto brd_input;
> + }
>
> if (res->type == RTN_LOCAL) {
> err = fib_validate_source(skb, saddr, daddr, tos,
> @@ -2014,6 +2017,7 @@ static int ip_route_input_slow(struct sk_buff *skb,
> __be32 daddr, __be32 saddr,
> if (res->type != RTN_UNICAST)
> goto martian_destination;
>
> +make_route:
> err = ip_mkroute_input(skb, res, in_dev, daddr, saddr, tos, flkeys);
> out: return err;
>
Acked-by: Davide Caratti
hello Lucas,
On Wed, 2018-06-27 at 14:50 -0400, Lucas Bates wrote:
> On Tue, Jun 26, 2018 at 10:51 AM, Davide Caratti wrote:
> > On Tue, 2018-06-26 at 09:17 -0400, Keara Leibovitz wrote:
> > > Create unittests for the tc tunnel_key action.
> > >
> > >
xt
>- added Reviewed-by tags
> - use u8* instead of char* as per Davide Caratti suggestion
>
> Roman Mashak (6):
> net sched actions: fix coding style in pedit action
> net sched actions: fix coding style in pedit headers
> net sched actions: fix sparse warning
>
On Tue, 2018-06-26 at 09:17 -0400, Keara Leibovitz wrote:
> Create unittests for the tc tunnel_key action.
>
>
> Signed-off-by: Keara Leibovitz
> ---
> .../tc-testing/tc-tests/actions/tunnel_key.json| 676
> +
> 1 file changed, 676 insertions(+)
> create mode 100644
On Thu, 2018-06-21 at 15:50 +, Fu, Qiaobin wrote:
> The new action inheritdsfield copies the field DS of
> IPv4 and IPv6 packets into skb->priority. This enables
> later classification of packets based on the DS field.
>
> v5:
> *Update the drop counter for TC_ACT_SH
On Wed, 2018-06-20 at 12:47 -0400, Michel Machado wrote:
> On 06/20/2018 12:08 PM, Davide Caratti wrote:
> > On Tue, 2018-06-12 at 15:42 +, Fu, Qiaobin wrote:
> > > The new action inheritdsfield copies the field DS of
> > > IPv4 and IPv6 packets into skb->prio
On Tue, 2018-06-12 at 15:42 +, Fu, Qiaobin wrote:
> The new action inheritdsfield copies the field DS of
> IPv4 and IPv6 packets into skb->priority. This enables
> later classification of packets based on the DS field.
>
> v4:
> *Not allow setting flags other than the expected ones.
>
>
On Tue, 2018-06-19 at 12:56 -0400, Roman Mashak wrote:
> Fix coding style issues in tc pedit action detected by the
> checkpatch script.
>
> Signed-off-by: Roman Mashak
...
> ---
> @@ -316,16 +318,15 @@ static int tcf_pedit(struct sk_buff *skb, const struct
> tc_action *a,
>
,
to ensure it is not overwritten in the error path of tcf_ife_init().
Fixes: ef6980b6becb ("introduce IFE action")
Signed-off-by: Davide Caratti
---
net/sched/act_ife.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/sched/act_ife.c b/net/sched/act_i
00066c100
Fixes: 4e8c86155010 ("net sched: net sched: ife action fix late binding")
Fixes: ef6980b6becb ("introduce IFE action")
Signed-off-by: Davide Caratti
---
net/sched/act_ife.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/sched/act_ife.
fix failures in the 'teardown' stage of test b7b8, probably a leftover of
commit 7c5995b33d6e ("tc-testing: fixed copy-pasting error in ife tests")
Fixes: a56e6bcd34b55 ("tc-testing: updated ife test cases")
Signed-off-by: Davide Caratti
---
tools/testing/selftests/tc-test
On Fri, 2018-06-08 at 09:53 +0200, Dmitry Vyukov wrote:
> On Tue, Feb 27, 2018 at 1:23 PM, Davide Caratti wrote:
> > On Fri, 2018-02-23 at 07:59 -0800, syzbot wrote:
> > > Hello,
> > >
> > > syzbot hit the following crash on upstream commit
> > >
tlink policy.")
Signed-off-by: Davide Caratti
---
net/sched/act_simple.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 9618b4a83cee..98c4afe7c15b 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/ac
On Fri, 2018-06-08 at 10:07 +0800, Hangbin Liu wrote:
> On Thu, Jun 07, 2018 at 03:46:43PM +0200, Davide Caratti wrote:
> > use nla_strlcpy() to avoid copying data beyond the length of TCA_DEFDATA
>
> s/TCA_DEFDATA/TCA_DEF_DATA/, incase someone search the commit history but
&
use nla_strlcpy() to avoid copying data beyond the length of TCA_DEFDATA
netlink attribute, in case it is less than SIMP_MAX_DATA and it does not
end with '\0' character.
Fixes: 0eff683f737b ("net/sched: potential data corruption")
Signed-off-by: Davide Caratti
---
net/sched/act_sim
-- -m 10K
the measured throughput in Mbit/s improved from 2395 ± 1% to 2720 ± 1%.
[1] https://www.spinics.net/lists/netdev/msg486007.html
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
drivers/net/vrf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net
On Wed, 2018-05-16 at 13:36 -0400, Roman Mashak wrote:
> Vlad Buslov writes:
>
> > On Wed 16 May 2018 at 14:38, Roman Mashak wrote:
> > > On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov wrote:
> > > > > > > > I'm trying to run tdc, but
ing")
CC: Roman Mashak <m...@mojatatu.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_vlan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 853604685965..1fb39e1f9d07 100644
--- a/net/sched/act_v
, causing false positive
in case the BPF JIT is enabled
Fixes: 440ea4ae1828 ("tc-testing: add selftests for 'bpf' action")
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json | 11 ---
1 file changed, 8 insertions
ipvlan/ipvlan_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Davide Caratti <dcara...@redhat.com>
> diff --git a/drivers/net/ipvlan/ipvlan_main.c
> b/drivers/net/ipvlan/ipvlan_main.c
> index 450eec2..ddb1590 100644
> --- a/drivers/net
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
.../testing/selftests/net/forwarding/tc_flower.sh | 70 ++
1 file changed, 70 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/tc_flower.sh
b/tools/testing/selftests/net/forwarding/tc_flower.sh
")
Reported-by: Lucas Bates <luc...@mojatatu.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_bpf.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index 9092531d45d8..18089c0
On Thu, 2018-04-05 at 11:23 -0400, Lucas Bates wrote:
> Hi Davide,
>
> Our overnight tc test runs of net-next revealed a kernel bug on one of
> the BPF tests you submitted, d959. The add action completes
> successfully, but the bug occurs on the verify when tdc does a get of
> the action that
On Mon, 2018-04-02 at 09:40 -0400, Vladislav Yasevich wrote:
> Since we now have support for software CRC32c offload, turn it on
> for macvlan and macvtap devices so that guests can take advantage
> of offload SCTP checksums to the host or host hardware.
>
> Signed-off-by: Vladislav Yasevich
__be16 [usertype] push_vid
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_vlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 4595391c2129..41a66effeb5f 100644
--- a/net/sched/act_vlan.c
+++ b/net
tcf_idr_cleanup() is no more used, so remove it.
Suggested-by: Cong Wang <xiyou.wangc...@gmail.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
include/net/act_api.h | 1 -
net/sched/act_api.c | 8
2 files changed, 9 deletions(-)
diff --git a/include/net
-by: Davide Caratti <dcara...@redhat.com>
---
.../selftests/tc-testing/tc-tests/actions/bpf.json | 289 +
1 file changed, 289 insertions(+)
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
diff --git a/tools/testing/selftests/tc-testing/tc
#
# rmmod act_vlan
rmmod: ERROR: Module act_vlan is in use
Fixes: 4c5b9d9642c8 ("act_vlan: VLAN action rewrite to use RCU lock/unlock and
update")
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
Sig
u.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_pedit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 349beaffb29e..fef08835f26d 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pe
r_release()
in place of tcf_idr_cleanup(). Since tcf_ipt_release() can now be called
when tcfi_t is NULL, we also need to protect calls to ipt_destroy_target()
to avoid NULL pointer dereference.
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Ack
@mojatatu.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_police.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 95d3c9097b25..faebf82b99f1 100644
--- a/net/sched/act_police.c
+++ b/
dules to use IDR")
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index b3f2c15affa7..9d2cabf1dc7e
t_xxx modules to use IDR")
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_skbmod.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index d09565d6433
...@gmail.com>
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 425eac11f6da..b1f3806
This series fixes situations where a temporary failure to install a TC
action results in the permanent impossibility to reuse the configured
value of 'index'.
Thanks to Cong Wang for the initial review.
v2: fix build error in act_ipt.c, reported by kbuild test robot
Davide Caratti (7):
net
: Add cBPF action with duplicate index
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
.../selftests/tc-testing/tc-tests/actions/bpf.json | 215 +
1 file changed, 215 insertions(+)
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
diff
#
# rmmod act_vlan
# rmmod: ERROR: Module act_vlan is in use
Fixes: 4c5b9d9642c8 ("act_vlan: VLAN action rewrite to use RCU lock/unlock and
update")
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Signed-off-by: Davide Caratti <dcara...@red
r_release()
in place of tcf_idr_cleanup(). Since tcf_ipt_release() can now be called
when tcfi_t is NULL, we also need to protect calls to ipt_destroy_target()
to avoid NULL pointer dereference.
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Signed-off-by
This series fixes situations where a temporary failure to install a TC
action results in the permanent impossibility to reuse the configured
'index'.
Thanks to Cong Wang for the initial review.
Davide Caratti (7):
net/sched: fix idr leak on the error path of tcf_bpf_init()
net/sched: fix idr
drop index 100
RTNETLINK answers: No space left on device
...
Fix this in the error path of tcf_act_police_init(), calling
tcf_idr_release() in place of tcf_idr_cleanup().
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Signed-off-by: Davide Cara
on device
We have an error talking to the kernel
...
Fix this in the error path of tcf_act_pedit_init(), calling
tcf_idr_release() in place of tcf_idr_cleanup().
Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR")
Signed-off-by: Davide Caratti <dcara.
...@gmail.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 425eac11f6da..b1f38063ada0 100644
--- a/net/sched/act_simple.c
+++ b/
dules to use IDR")
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index b3f2c15affa7..9d2cabf1dc7e 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act
t_xxx modules to use IDR")
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_skbmod.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index d09565d6433e..7b0700f52b50 100644
--- a/net/sched/act_skbmod.c
leanup(), ensuring that kfree_rcu(p, ...) is called
only when p is not NULL.
Fixes: 86da71b57383 ("net_sched: Introduce skbmod action")
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_skbmod.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ne
_rcu(p, ...) is called
only when p is not NULL.
Fixes: 4c5b9d9642c8 ("act_vlan: VLAN action rewrite to use RCU lock/unlock and
update")
Acked-by: Jiri Pirko <j...@mellanox.com>
Acked-by: Manish Kurup <manish.ku...@verizon.com>
Signed-off-by: Davide Caratti <dcara...@redhat.com
'param' is not NULL before
dereferencing it.
Fixes: d0f6dd8a914f ("net/sched: Introduce act_tunnel_key")
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_tunnel_key.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/sched/act_tu
with several TC actions it's possible to see NULL pointer dereference,
when the .init() function calls tcf_idr_alloc(), fails at some point and
then calls tcf_idr_release(): this series fixes all them introducing
non-NULL tests in the .cleanup() function.
Davide Caratti (5):
net/sched: fix NULL
0
CR2: 001c
Fix it in tcf_sample_cleanup(), ensuring that calls to psample_group_put(p)
are done only when p is not NULL.
Fixes: cadb9c9fdbc6 ("net/sched: act_sample: Fix error path in init")
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_sa
ee_rcu(param, ...) is
called only when param is not NULL.
Fixes: 9c5f69bbd75a ("net/sched: act_csum: don't use spinlock in the fast path")
Signed-off-by: Davide Caratti <dcara...@redhat.com>
---
net/sched/act_csum.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On Thu, 2018-03-15 at 15:29 +0100, Davide Caratti wrote:
> On Thu, 2018-03-15 at 15:21 +0100, Jiri Pirko wrote:
> ...
>
> > Acked-by: Jiri Pirko <j...@mellanox.com>
>
> thank you for reviewing!
>
> apparently, also act_tunnel_key seem and act_csum have
On Thu, 2018-03-15 at 15:21 +0100, Jiri Pirko wrote:
...
> Acked-by: Jiri Pirko
thank you for reviewing!
apparently, also act_tunnel_key seem and act_csum have a similar problem.
I will check and eventually do a followup series this afternoon.
thank you,
regards
--
davide
1 - 100 of 217 matches
Mail list logo