Re: [Patch net] net: change addr_list_lock back to static key

2020-06-15 Thread Cong Wang
On Sat, Jun 13, 2020 at 9:03 AM Taehee Yoo wrote: > > On Thu, 11 Jun 2020 at 08:21, Cong Wang wrote: > > > > Hi Cong :) > > > On Wed, Jun 10, 2020 at 7:48 AM Taehee Yoo wrote: > > > > > > On Tue, 9 Jun 2020 at 06:53, Cong Wang wrote: > > >

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-14 Thread Cong Wang
Hello, On Sun, Jun 14, 2020 at 5:39 AM Daniël Sonck wrote: > > Hello, > > I found on the archive that this bug I encountered also happened to > others. I too have a very similar stacktrace. The issue I'm > experiencing is: > > Whenever I fully boot my cluster, in some time, the host crashes with

Re: [Crash] unhandled kernel memory read from unreadable memory

2020-06-13 Thread Cong Wang
Hello, On Sat, Jun 13, 2020 at 5:41 AM Peter Geis wrote: > > Good Morning, > > Last night I started experiencing crashes on my home server. > I updated to 5.6.17 from 5.6.15 a few days ago but I'm not sure if > that is related. > The crash occurred four times between last night and this morning.

[Patch net] genetlink: clean up family attributes allocations

2020-06-12 Thread Cong Wang
ix memory leaks in genl_family_rcv_msg_dumpit()") Reported-by: Ido Schimmel Signed-off-by: Cong Wang --- net/netlink/genetlink.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 6c19b91bbb86..55ee68

Re: [PATCH net 2/2] net/sched: act_gate: fix configuration of the periodic timer

2020-06-11 Thread Cong Wang
On Wed, Jun 10, 2020 at 2:43 PM Davide Caratti wrote: > +static void gate_setup_timer(struct tcf_gate *gact, u64 basetime, > +enum tk_offsets tko, s32 clockid, > +bool do_init) > +{ > + bool timer_change = basetime != gact->param.tcfg_b

Re: [Patch net v2] genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

2020-06-10 Thread Cong Wang
On Wed, Jun 10, 2020 at 7:27 AM Ido Schimmel wrote: > > @@ -548,7 +591,7 @@ static int genl_lock_done(struct netlink_callback *cb) > > rc = ops->done(cb); > > genl_unlock(); > > } > > - genl_family_rcv_msg_attrs_free(info->family, info->attrs, true); > > +

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-10 Thread Cong Wang
On Wed, Jun 10, 2020 at 7:48 AM Taehee Yoo wrote: > > On Tue, 9 Jun 2020 at 06:53, Cong Wang wrote: > > > > Hi Cong, > Thank you for this work! > > > The dynamic key update for addr_list_lock still causes troubles, > > for example the following race c

[Patch net] net: change addr_list_lock back to static key

2020-06-08 Thread Cong Wang
ing static keys and subclasses to satisfy lockdep. Thanks to dev->lower_level, we do not have to change back to ->ndo_get_lock_subclass(). And hopefully this reduces some syzbot lockdep noises too. Reported-by: syzbot+f3a0e80c34b3fc28a...@syzkaller.appspotmail.com Cc: Taehee Yoo Cc: Dmitry

Re: [RFC PATCH net-next 0/3] TC: Introduce qevents

2020-06-03 Thread Cong Wang
On Mon, Jun 1, 2020 at 11:05 PM Jiri Pirko wrote: > > Mon, Jun 01, 2020 at 09:50:23PM CEST, xiyou.wangc...@gmail.com wrote: > >On Mon, Jun 1, 2020 at 6:40 AM Jiri Pirko wrote: > >> The first command just says "early drop position should be processed by > >> block 10" > >> > >> The second command

[Patch net v2] genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Cong Wang
: Florian Westphal Cc: Pablo Neira Ayuso Cc: Jiri Pirko Cc: YueHaibing Cc: Shaochun Chen Signed-off-by: Cong Wang --- net/netlink/genetlink.c | 94 + 1 file changed, 58 insertions(+), 36 deletions(-) diff --git a/net/netlink/genetlink.c b/net/netlink/

Re: [Patch net] genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Cong Wang
On Tue, Jun 2, 2020 at 8:30 PM Cong Wang wrote: > if (ops->start) { > - genl_lock(); > + if (!ctx->family->parallel_ops) > + genl_lock(); > rc = ops->start(cb); > - genl_unlock

[Patch net] genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Cong Wang
Ayuso Cc: Jiri Pirko Cc: YueHaibing Cc: Shaochun Chen Signed-off-by: Cong Wang --- net/netlink/genetlink.c | 94 + 1 file changed, 58 insertions(+), 36 deletions(-) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 9f357aa22b94..5abd4fe1

Re: [PATCH] net: genetlink: Fix memleak in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Cong Wang
On Mon, Jun 1, 2020 at 11:47 PM YueHaibing wrote: > @@ -630,6 +625,9 @@ static int genl_family_rcv_msg_dumpit(const struct > genl_family *family, > err = __netlink_dump_start(net->genl_sock, skb, nlh, &c); > } > > + genl_family_rcv_msg_attrs_free(info->family, info->

Re: [RFC PATCH net-next 0/3] TC: Introduce qevents

2020-06-01 Thread Cong Wang
On Sat, May 30, 2020 at 1:55 AM Petr Machata wrote: > > > Cong Wang writes: > > > On Thu, May 28, 2020 at 2:48 AM Petr Machata wrote: > >> So you propose to have further division within the block? To have sort > >> of namespaces within blocks or chains, where

Re: [RFC PATCH net-next 0/3] TC: Introduce qevents

2020-06-01 Thread Cong Wang
On Mon, Jun 1, 2020 at 6:40 AM Jiri Pirko wrote: > The first command just says "early drop position should be processed by > block 10" > > The second command just adds a filter to the block 10. This is exactly why it looks odd to me, because it _reads_ like 'tc qdisc' creates the block to hold tc

Re: [PATCH net-next] net/sched: fix a couple of splats in the error path of tfc_gate_init()

2020-06-01 Thread Cong Wang
On Mon, Jun 1, 2020 at 11:49 AM Davide Caratti wrote: > hello Dave, > > for this patch I will probably need to send a follow-up, because > the TC action overwrite case probably has still some issues [1] [2]. > I can do that targeting the 'net' tree, unless Po or Cong have some > objections. > > Ok

Re: [PATCH net-next] net/sched: fix a couple of splats in the error path of tfc_gate_init()

2020-06-01 Thread Cong Wang
On Mon, Jun 1, 2020 at 11:40 AM David Miller wrote: > > From: Davide Caratti > Date: Fri, 29 May 2020 00:05:32 +0200 > > > trying to configure TC 'act_gate' rules with invalid control actions, the > > following splat can be observed: > > > > general protection fault, probably for non-canonical a

Re: [PATCH net-next v2] net/sched: fix a couple of splats in the error path of tcf_gate_init()

2020-05-29 Thread Cong Wang
On Fri, May 29, 2020 at 11:10 AM Davide Caratti wrote: > > this is caused by hrtimer_cancel(), running before hrtimer_init(). Fix it > ensuring to call hrtimer_cancel() only if clockid is valid, and the timer > has been initialized. After fixing this splat, the same error path causes > another pro

Re: [PATCH] flow_dissector: work around stack frame size warning

2020-05-29 Thread Cong Wang
> I now see 552 bytes of stack usage for fl_classify(), plus 528 bytes > for fl_mask_lookup(). > > Fixes: 58cff782cc55 ("flow_dissector: Parse multiple MPLS Label Stack > Entries") > Signed-off-by: Arnd Bergmann I think this is probably the quickest way to amend this warning, so: Acked-by: Cong Wang Thanks.

Re: [RFC PATCH net-next 0/3] TC: Introduce qevents

2020-05-29 Thread Cong Wang
On Thu, May 28, 2020 at 2:48 AM Petr Machata wrote: > So you propose to have further division within the block? To have sort > of namespaces within blocks or chains, where depending on the context, > only filters in the corresponding namespace are executed? What I suggest is to let filters (or ch

Re: [PATCH net] devinet: fix memleak in inetdev_init()

2020-05-29 Thread Cong Wang
f-by: Yang Yingliang Acked-by: Cong Wang Thanks.

Re: [RFC PATCH net-next 0/3] TC: Introduce qevents

2020-05-27 Thread Cong Wang
On Wed, May 27, 2020 at 2:56 AM Petr Machata wrote: > > > Cong Wang writes: > > > On Tue, May 26, 2020 at 10:11 AM Petr Machata wrote: > >> > >> The Spectrum hardware allows execution of one of several actions as a > >> result of queue management eve

[Patch net-next 0/5] net_sched: reduce the number of qdisc resets

2020-05-26 Thread Cong Wang
work. Please find more details in each patch description. Vaclav Zindulka tested this patchset and his large ruleset with over 13k qdiscs defined got from 22s to 520ms. --- Cong Wang (5): net_sched: use qdisc_reset() in qdisc_destroy() net_sched: add tracepoints for qdisc_reset() and qdisc_de

[Patch net-next 4/5] net_sched: avoid resetting active qdisc for multiple times

2020-05-26 Thread Cong Wang
, so for sch_mq/sch_mqprio, we still reset all of them like before, for the rest, we only reset it once. Reported-by: Václav Zindulka Tested-by: Václav Zindulka Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/sch_generic.c | 37 +++-- 1

[Patch net-next 3/5] net_sched: add a tracepoint for qdisc creation

2020-05-26 Thread Cong Wang
: dev=ens3 kind=pfifo_fast parent=1:200 tc-745 [000] .N.1 111.687483: qdisc_create: dev=ens3 kind=ingress parent=:fff1 Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- include/trace/events/qdisc.h | 23 +++ net/sched/sch_api.c | 3 +++

[Patch net-next 5/5] net_sched: get rid of unnecessary dev_qdisc_reset()

2020-05-26 Thread Cong Wang
nt and stack traces. Reported-by: Václav Zindulka Tested-by: Václav Zindulka Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/sch_generic.c | 16 1 file changed, 16 deletions(-) diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index d13e27

[Patch net-next 2/5] net_sched: add tracepoints for qdisc_reset() and qdisc_destroy()

2020-05-26 Thread Cong Wang
=ens3 kind=fq_codel parent=: handle=8001:0 Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- include/trace/events/qdisc.h | 52 net/sched/sch_generic.c | 4 +++ 2 files changed, 56 insertions(+) diff --git a/include/trace/events

[Patch net-next 1/5] net_sched: use qdisc_reset() in qdisc_destroy()

2020-05-26 Thread Cong Wang
qdisc_destroy() calls ops->reset() and cleans up qdisc->gso_skb and qdisc->skb_bad_txq, these are nearly same with qdisc_reset(), so just call it directly, and cosolidate the code for the next patch. Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/sch_gener

Re: [RFC PATCH net-next 0/3] TC: Introduce qevents

2020-05-26 Thread Cong Wang
On Tue, May 26, 2020 at 10:11 AM Petr Machata wrote: > > The Spectrum hardware allows execution of one of several actions as a > result of queue management events: tail-dropping, early-dropping, marking a > packet, or passing a configured latency threshold or buffer size. Such > packets can be mir

Re: iproute2: tc deletion freezes whole server

2020-05-26 Thread Cong Wang
On Sun, May 24, 2020 at 3:04 AM Václav Zindulka wrote: > > On Tue, May 19, 2020 at 7:57 PM Cong Wang wrote: > > > > On Tue, May 19, 2020 at 1:04 AM Václav Zindulka > > wrote: > > > > > > > > Let me think how to fix this properly, I have some

Re: [PATCH -net-next] net: psample: depends on INET

2020-05-22 Thread Cong Wang
On Fri, May 22, 2020 at 12:48 PM Randy Dunlap wrote: > > On 5/22/20 12:17 PM, Cong Wang wrote: > > On Fri, May 22, 2020 at 12:03 PM Randy Dunlap wrote: > >> > >> From: Randy Dunlap > >> > >> Fix psample build error when CONFIG_INET is not set/ena

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-22 Thread Cong Wang
On Thu, May 21, 2020 at 7:36 AM Vlad Buslov wrote: > > Hi Edward, Cong, > > On Mon 18 May 2020 at 18:37, Edward Cree wrote: > > On 15/05/2020 12:40, Vlad Buslov wrote: > >> In order to > >> significantly improve filter dump rate this patch sets implement new > >> mode of TC filter dump operation

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-22 Thread Cong Wang
On Wed, May 20, 2020 at 12:24 AM Vlad Buslov wrote: > > > On Tue 19 May 2020 at 21:58, Cong Wang wrote: > > On Tue, May 19, 2020 at 2:04 AM Vlad Buslov wrote: > >> I considered that approach initially but decided against it for > >> following reasons: >

Re: [PATCH -net-next] net: psample: depends on INET

2020-05-22 Thread Cong Wang
On Fri, May 22, 2020 at 12:03 PM Randy Dunlap wrote: > > From: Randy Dunlap > > Fix psample build error when CONFIG_INET is not set/enabled. > PSAMPLE should depend on INET instead of NET since > ip_tunnel_info_opts() is only present for CONFIG_INET. > > ../net/psample/psample.c: In function ‘__p

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-19 Thread Cong Wang
On Tue, May 19, 2020 at 2:04 AM Vlad Buslov wrote: > I considered that approach initially but decided against it for > following reasons: > > - Generic data is covered by current terse dump implementation. > Everything else will be act or cls specific which would result long > list of flag val

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-19 Thread Cong Wang
On Tue, May 19, 2020 at 2:10 AM Vlad Buslov wrote: > > > On Mon 18 May 2020 at 21:46, Cong Wang wrote: > > On Sun, May 17, 2020 at 11:44 PM Vlad Buslov wrote: > >> > >> > >> On Sun 17 May 2020 at 22:13, Cong Wang wrote: > >> &

Re: iproute2: tc deletion freezes whole server

2020-05-19 Thread Cong Wang
On Tue, May 19, 2020 at 1:04 AM Václav Zindulka wrote: > > > > Let me think how to fix this properly, I have some ideas and will provide > > you some patch(es) to test soon. > > Sure, I'll wait. I have plenty of time now with the main problem fixed :-) Can you help to test the patches below? http

Re: net: netdev_sync_lower_features()

2020-05-18 Thread Cong Wang
On Mon, May 18, 2020 at 1:32 AM Michał Mirosław wrote: > > Hi! > > I just saw commit dd912306ff008 ("net: fix a potential recursive > NETDEV_FEAT_CHANGE") landing in Linux master. The problem with it (or > rather: with the netdev_sync_lower_features() function) is that > netdev_update_features() i

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-18 Thread Cong Wang
On Mon, May 18, 2020 at 8:38 AM Edward Cree wrote: > > On 15/05/2020 12:40, Vlad Buslov wrote: > > In order to > > significantly improve filter dump rate this patch sets implement new > > mode of TC filter dump operation named "terse dump" mode. In this mode > > only parameters necessary to identi

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-18 Thread Cong Wang
On Sun, May 17, 2020 at 11:44 PM Vlad Buslov wrote: > > > On Sun 17 May 2020 at 22:13, Cong Wang wrote: > > On Fri, May 15, 2020 at 4:40 AM Vlad Buslov wrote: > >> > >> Output rate of current upstream kernel TC filter dump implementation if > >> re

Re: iproute2: tc deletion freezes whole server

2020-05-18 Thread Cong Wang
On Mon, May 18, 2020 at 7:16 AM Václav Zindulka wrote: > > On Sun, May 17, 2020 at 9:35 PM Cong Wang wrote: > > > > On Fri, May 8, 2020 at 6:59 AM Václav Zindulka > > wrote: > > > > > > > > > > > > I tried to emulate yo

Re: [PATCH net 1/1] net sched: fix reporting the first-time use timestamp

2020-05-18 Thread Cong Wang
On Mon, May 18, 2020 at 5:43 AM Jamal Hadi Salim wrote: > > On 2020-05-17 9:10 p.m., Roman Mashak wrote: > > Cong Wang writes: > > > >> On Sun, May 17, 2020 at 5:47 AM Roman Mashak wrote: > >>> > >>> When a new action is installed, firstuse f

Re: BUG: unable to handle kernel paging request in fl_dump_key

2020-05-17 Thread Cong Wang
On Fri, May 15, 2020 at 6:53 AM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:99addbe3 net: broadcom: Select BROADCOM_PHY for BCMGENET > git tree: net > console output: https://syzkaller.appspot.com/x/log.txt?x=173e568c10 > kernel config: https://

Re: iproute2: tc deletion freezes whole server

2020-05-17 Thread Cong Wang
On Fri, May 8, 2020 at 6:59 AM Václav Zindulka wrote: > > On Thu, May 7, 2020 at 8:52 PM Cong Wang wrote: > > > > On Tue, May 5, 2020 at 1:46 AM Václav Zindulka > > wrote: > > > > > > On Mon, May 4, 2020 at 7:46 PM Cong Wang wrote: > > > >

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-17 Thread Cong Wang
On Fri, May 15, 2020 at 4:40 AM Vlad Buslov wrote: > > Output rate of current upstream kernel TC filter dump implementation if > relatively low (~100k rules/sec depending on configuration). This > constraint impacts performance of software switch implementation that > rely on TC for their datapath

Re: [PATCH net 1/1] net sched: fix reporting the first-time use timestamp

2020-05-17 Thread Cong Wang
On Sun, May 17, 2020 at 5:47 AM Roman Mashak wrote: > > When a new action is installed, firstuse field of 'tcf_t' is explicitly set > to 0. Value of zero means "new action, not yet used"; as a packet hits the > action, 'firstuse' is stamped with the current jiffies value. > > tcf_tm_dump() should

Re: [Patch net-next v2 1/2] net: partially revert dynamic lockdep key changes

2020-05-17 Thread Cong Wang
On Sat, May 16, 2020 at 9:53 AM Vladimir Oltean wrote: > Thanks a lot for presenting the options. In general, xmit in DSA is > relatively simple and most of the time stateless. My stacked DSA setup > appears to work just fine with NETIF_F_LLTX, including the updating of > percpu counters. I'm not

[Patch net v3] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-07 Thread Cong Wang
olay Aleksandrov Cc: Josh Poimboeuf Cc: Jann Horn Reviewed-by: Jay Vosburgh Signed-off-by: Cong Wang --- net/core/dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 522288177bbd..6d327b7aa813 100644 --- a/net/core/dev.c +++ b/net/co

Re: iproute2: tc deletion freezes whole server

2020-05-07 Thread Cong Wang
On Tue, May 5, 2020 at 1:46 AM Václav Zindulka wrote: > > On Mon, May 4, 2020 at 7:46 PM Cong Wang wrote: > > > > Sorry for the delay. I lost connection to my dev machine, I am trying > > to setup this on my own laptop. > > Sorry to hear that. I will gladly

Re: [Patch net v2] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-07 Thread Cong Wang
On Wed, May 6, 2020 at 1:31 PM Nikolay Aleksandrov wrote: > The patch looks good, but note that __netdev_update_features() used to return > -1 > before the commit in the Fixes tag above (between 6cb6a27c45ce and > 00ee59271777). > It only restored that behaviour. Good point! But commit fd867d51

Re: [PATCH] netfilter: fix make target xt_TCPMSS.o error.

2020-05-06 Thread Cong Wang
On Tue, May 5, 2020 at 11:52 PM Huang Qijun wrote: > > When compiling netfilter, there will be an error > "No rule to make target 'net/netfilter/xt_TCPMSS.o'", > because the xt_TCPMSS.c in the makefile is uppercase, > and the file name of the source file (xt_tcpmss.c) is lowercase. > Therefore, ch

[Patch net v2] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-06 Thread Cong Wang
Nikolay Aleksandrov Cc: Josh Poimboeuf Cc: Jay Vosburgh Cc: Jann Horn Signed-off-by: Cong Wang --- net/core/dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 522288177bbd..6d327b7aa813 100644 --- a/net/core/dev.c +++ b/net/c

Re: [Patch net] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-06 Thread Cong Wang
On Tue, May 5, 2020 at 10:26 PM Michal Kubecek wrote: > > On Tue, May 05, 2020 at 03:35:27PM -0700, Cong Wang wrote: > > On Tue, May 5, 2020 at 3:27 PM Michal Kubecek wrote: > > > On Tue, May 05, 2020 at 02:58:19PM -0700, Cong Wang wrote: > > > > diff --git

Re: [Patch net] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-06 Thread Cong Wang
On Wed, May 6, 2020 at 11:46 AM Cong Wang wrote: > > On Tue, May 5, 2020 at 3:42 PM Jay Vosburgh > wrote: > > > > Cong Wang wrote: > > > > >syzbot managed to trigger a recursive NETDEV_FEAT_CHANGE event > > >between bonding master and slave.

Re: [Patch net] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-06 Thread Cong Wang
On Tue, May 5, 2020 at 3:42 PM Jay Vosburgh wrote: > > Cong Wang wrote: > > >syzbot managed to trigger a recursive NETDEV_FEAT_CHANGE event > >between bonding master and slave. I managed to find a reproducer > >for this: > > > > ip li set bond0 up > &g

Re: [Patch net] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-05 Thread Cong Wang
On Tue, May 5, 2020 at 3:27 PM Michal Kubecek wrote: > > On Tue, May 05, 2020 at 02:58:19PM -0700, Cong Wang wrote: > > syzbot managed to trigger a recursive NETDEV_FEAT_CHANGE event > > between bonding master and slave. I managed to find a reproducer > > for this: >

[Patch net] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-05 Thread Cong Wang
@syzkaller.appspotmail.com Reported-by: syzbot+c2fb6f9ddcea95ba4...@syzkaller.appspotmail.com Cc: Jarod Wilson Cc: Josh Poimboeuf Cc: Jay Vosburgh Cc: Jann Horn Signed-off-by: Cong Wang --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/cor

Re: [PATCH net-next] net: sched: choke: Remove unused inline function choke_set_classid

2020-05-05 Thread Cong Wang
On Tue, May 5, 2020 at 1:49 AM YueHaibing wrote: > > There's no callers in-tree anymore since commit 5952fde10c35 ("net: > sched: choke: remove dead filter classify code") While you are at this, please also remove classid from struct choke_skb_cb. Thanks.

Re: BUG: stack guard page was hit in unwind_next_frame

2020-05-05 Thread Cong Wang
On Mon, May 4, 2020 at 6:06 PM Cong Wang wrote: > > On Mon, May 4, 2020 at 12:08 PM Josh Poimboeuf wrote: > > > > On Sat, May 02, 2020 at 11:36:11PM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following crash on: > > > >

Re: BUG: stack guard page was hit in unwind_next_frame

2020-05-04 Thread Cong Wang
On Mon, May 4, 2020 at 12:08 PM Josh Poimboeuf wrote: > > On Sat, May 02, 2020 at 11:36:11PM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:8999dc89 net/x25: Fix null-ptr-deref in x25_disconnect > > git tree: net > > console output: https

Re: iproute2: tc deletion freezes whole server

2020-05-04 Thread Cong Wang
On Mon, May 4, 2020 at 10:46 AM Cong Wang wrote: > > Regarding to your test result above, I think I saw some difference > on my side, I have no idea why you didn't see any difference. Please > let me collect the data once I setup the test environment shortly today. I tried to

Re: iproute2: tc deletion freezes whole server

2020-05-04 Thread Cong Wang
On Thu, Apr 30, 2020 at 5:40 AM Václav Zindulka wrote: > > On Wed, Apr 15, 2020 at 5:01 PM Václav Zindulka > wrote: > > > > > The problem is actually more complicated than I thought, although it > > > > > needs more work, below is the first pile of patches I have for you to > > > > > test: > > >

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-04 Thread Cong Wang
On Sun, May 3, 2020 at 5:48 AM Jamal Hadi Salim wrote: > > On 2020-05-03 8:02 a.m., Jamal Hadi Salim wrote: > > On 2020-05-02 10:28 p.m., Cong Wang wrote: > >> On Sat, May 2, 2020 at 2:19 AM Jamal Hadi Salim wrote: > >>> > >>> On

[Patch net-next v2 1/2] net: partially revert dynamic lockdep key changes

2020-05-02 Thread Cong Wang
_lock this is safe because we don't take addr_list_lock on any fast path. Reported-and-tested-by: syzbot+aaa6fa4949cc5d9b7...@syzkaller.appspotmail.com Cc: Dmitry Vyukov Cc: Taehee Yoo Signed-off-by: Cong Wang --- drivers/net/bonding/bond_main.c | 1 + .../net/ethernet/netronome/nfp/n

[Patch net-next v2 2/2] bonding: remove useless stats_lock_key

2020-05-02 Thread Cong Wang
e bond ip link set bond0 master bond1 ip link set bond0 nomaster ip link set bond1 master bond0 Reported-and-tested-by: syzbot+aaa6fa4949cc5d9b7...@syzkaller.appspotmail.com Cc: Dmitry Vyukov Acked-by: Taehee Yoo Signed-off-by: Cong Wang --- drivers/net/bonding/bond_main.c | 3 --- include/net

[Patch net-next v2 0/2] net: reduce dynamic lockdep keys

2020-05-02 Thread Cong Wang
still has to be dynamic. The second patch removes a bonding-specific key by the way. Cong Wang (2): net: partially revert dynamic lockdep key changes bonding: remove useless stats_lock_key --- drivers/net/bonding/bond_main.c | 4 +- .../net/ethernet/netronome/nfp/nfp_net_repr.c

Re: [Patch net-next 1/2] net: partially revert dynamic lockdep key changes

2020-05-02 Thread Cong Wang
On Sat, May 2, 2020 at 12:36 AM Taehee Yoo wrote: > > On Fri, 1 May 2020 at 15:02, Cong Wang wrote: > > > > Hi Cong, > > > On Thu, Apr 30, 2020 at 12:40 AM Taehee Yoo wrote: > > > > +static void vlan_dev_set_lockdep_one(struct net_device *dev, > > &g

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-02 Thread Cong Wang
On Sat, May 2, 2020 at 2:19 AM Jamal Hadi Salim wrote: > > On 2020-05-02 4:48 a.m., Jamal Hadi Salim wrote: > > On 2020-04-30 11:53 p.m., Cong Wang wrote: > > [..] > >> Steps to reproduce this: > >> ip li set dev dummy0 up > >> tc qd add dev d

[Patch net] atm: fix a memory leak of vcc->user_back

2020-05-01 Thread Cong Wang
[<(ptrval)>] do_syscall_64+0x57/0x65 [<(ptrval)>] entry_SYSCALL_64_after_hwframe+0x49/0xb3 Cc: Gengming Liu Signed-off-by: Cong Wang --- net/atm/lec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/atm/lec.c b/net/atm/lec.c index 25fa3a7b72b

[Patch net] atm: fix a UAF in lec_arp_clear_vccs()

2020-05-01 Thread Cong Wang
>ops->owner. Reported-by: Gengming Liu Signed-off-by: Cong Wang --- net/atm/common.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/net/atm/common.c b/net/atm/common.c index 0ce530af534d..8575f5d52087 100644 --- a/net/atm/common.c +++ b/net/atm

Re: [Patch net-next 1/2] net: partially revert dynamic lockdep key changes

2020-04-30 Thread Cong Wang
On Thu, Apr 30, 2020 at 12:40 AM Taehee Yoo wrote: > > +static void vlan_dev_set_lockdep_one(struct net_device *dev, > > +struct netdev_queue *txq, > > +void *_subclass) > > +{ > > + lockdep_set_class_and_subclass(&txq->

Re: Two bugs report

2020-04-30 Thread Cong Wang
On Mon, Apr 27, 2020 at 6:16 AM Gengming Liu wrote: > > We found two security bugs in the linux kernel and here's the > description of the bugs. > > 0.Build a testing environment > a. Set up Ubuntu 19.04 in Vmware workstation. > b. sudo apt install linux-image-5.0.0-21-generic. > c. Change t

[Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-04-30 Thread Cong Wang
: edf6711c9840 ("net: sched: remove classid and q fields from tcf_proto") Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- include/net/sch_generic.h | 1 + net/sched/cls_api.c | 8 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/n

Re: [Patch net] net_sched: fix tcm_parent in tc filter dump

2020-04-30 Thread Cong Wang
On Thu, Apr 30, 2020 at 6:02 PM Cong Wang wrote: > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index 55bd1429678f..80e93c96d2b2 100644 > --- a/net/sched/cls_api.c > +++ b/net/sched/cls_api.c > @@ -2612,12 +2612,10 @@ static int tc_dump_tfilter(struct sk_buff

[Patch net] net_sched: fix tcm_parent in tc filter dump

2020-04-30 Thread Cong Wang
Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/cls_api.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 55bd1429678f..80e93c96d2b2 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @

Re: [Patch net-next 3/3] tcp: decouple TLP timer from RTO timer

2019-10-23 Thread Cong Wang
On Wed, Oct 23, 2019 at 11:14 AM Eric Dumazet wrote: > > In case you misunderstand, the CPU profiling I used is captured > > during 256 parallel TCP_STREAM. > > When I asked you the workload, you gave me TCP_RR output, not TCP_STREAM :/ > > "A single netperf TCP_RR could _also_ confirm the improve

Re: [Patch net-next 3/3] tcp: decouple TLP timer from RTO timer

2019-10-23 Thread Cong Wang
On Tue, Oct 22, 2019 at 7:15 PM Eric Dumazet wrote: > > On Tue, Oct 22, 2019 at 6:10 PM Cong Wang wrote: > > > > On Tue, Oct 22, 2019 at 4:24 PM Eric Dumazet wrote: > > > > > > On Tue, Oct 22, 2019 at 4:11 PM Cong Wang > > > wrote: > > &g

Re: [Patch net-next 3/3] tcp: decouple TLP timer from RTO timer

2019-10-22 Thread Cong Wang
On Tue, Oct 22, 2019 at 4:24 PM Eric Dumazet wrote: > > On Tue, Oct 22, 2019 at 4:11 PM Cong Wang wrote: > > > > Currently RTO, TLP and PROBE0 all share a same timer instance > > in kernel and use icsk->icsk_pending to dispatch the work. > > This causes spinl

[Patch net-next 2/3] tcp: make tcp_send_loss_probe() boolean

2019-10-22 Thread Cong Wang
Let tcp_send_loss_probe() return whether a TLP has been sent or not. This is needed by the folllowing patch. Cc: Eric Dumazet Signed-off-by: Cong Wang --- include/net/tcp.h | 2 +- net/ipv4/tcp_output.c | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/net

[Patch net-next 1/3] tcp: get rid of ICSK_TIME_EARLY_RETRANS

2019-10-22 Thread Cong Wang
After commit bec41a11dd3d ("tcp: remove early retransmit") ICSK_TIME_EARLY_RETRANS is no longer effective, so we can remove its definition too. Cc: Yuchung Cheng Cc: Eric Dumazet Signed-off-by: Cong Wang --- include/net/inet_connection_sock.h | 8 +++- 1 file changed, 3 insert

[Patch net-next 0/3] tcp: decouple TLP timer from RTO timer

2019-10-22 Thread Cong Wang
This patchset contains 3 patches: patch 1 is a cleanup, patch 2 is a small change preparing for patch 3, patch 3 is the one does the actual change. Please find details in each of them. --- Cong Wang (3): tcp: get rid of ICSK_TIME_EARLY_RETRANS tcp: make tcp_send_loss_probe() boolean tcp

[Patch net-next 3/3] tcp: decouple TLP timer from RTO timer

2019-10-22 Thread Cong Wang
csk->icsk_pending to dispatch, in order to minimize the risk of this patch. After this patch, the CPU time spent in tcp_write_xmit() reduced down to 10.92%. Cc: Eric Dumazet Signed-off-by: Cong Wang --- include/net/inet_connection_sock.h | 9 +-- include/net/tcp.h | 1

Re: [PATCH net] net: netem: fix error path for corrupted GSO frames

2019-10-17 Thread Cong Wang
On Thu, Oct 17, 2019 at 11:44 AM Jakub Kicinski wrote: > > On Thu, 17 Oct 2019 11:10:06 -0700, Cong Wang wrote: > > On Wed, Oct 16, 2019 at 4:22 PM Jakub Kicinski wrote: > > > On Wed, 16 Oct 2019 15:42:28 -0700, Cong Wang wrote: > > > > > @@ -612,7 +613,

Re: [PATCH net] net: netem: fix error path for corrupted GSO frames

2019-10-17 Thread Cong Wang
On Wed, Oct 16, 2019 at 4:22 PM Jakub Kicinski wrote: > > On Wed, 16 Oct 2019 15:42:28 -0700, Cong Wang wrote: > > > @@ -612,7 +613,7 @@ static int netem_enqueue(struct sk_buff *skb, struct > > > Qdisc *sch, > > > } > >

Re: [PATCH net] net: netem: fix error path for corrupted GSO frames

2019-10-16 Thread Cong Wang
On Wed, Oct 16, 2019 at 3:23 PM Jakub Kicinski wrote: > > To corrupt a GSO frame we first perform segmentation. We then > proceed using the first segment instead of the full GSO skb and > requeue the rest of the segments as separate packets. > > If there are any issues with processing the first s

Re: [PATCH net-next v2] net: sched: Avoid using yield() in a busy waiting loop

2019-10-16 Thread Cong Wang
On Wed, Oct 16, 2019 at 11:48 AM Sebastian Andrzej Siewior wrote: > > On 2019-10-16 10:28:04 [-0700], Cong Wang wrote: > > > Link: > > > https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-...@pengutronix.de > > > > BTW, this link doesn't work,

Re: [PATCH net-next v2] net: sched: Avoid using yield() in a busy waiting loop

2019-10-16 Thread Cong Wang
On Wed, Oct 16, 2019 at 1:28 AM Sebastian Andrzej Siewior wrote: > > From: Marc Kleine-Budde > > With threaded interrupts enabled, the interrupt thread runs as SCHED_RR > with priority 50. If a user application with a higher priority preempts > the interrupt thread and tries to shutdown the netwo

Re: [PATCH 2/2] netfilter: revert "conntrack: silent a memory leak warning"

2019-10-10 Thread Cong Wang
On Tue, Oct 8, 2019 at 12:10 AM Maciej Żenczykowski wrote: > > Here's my reasoning: > > old = ct->ext; > > //... stuff that doesn't change old. > > alloc = max(newlen, NF_CT_EXT_PREALLOC); <-- will be >= 128, > so not zero > kmemleak_not_leak(old); > new =

Re: [PATCH 1/2] netfilter: fix a memory leak in nf_conntrack_in

2019-10-07 Thread Cong Wang
On Mon, Oct 7, 2019 at 10:35 PM Maciej Żenczykowski wrote: > > From: Maciej Żenczykowski Please, at least a simple copy-n-paste of kmemleak report will help a lot here. A changelog would save your time and mine too. Thanks.

Re: [PATCH 2/2] netfilter: revert "conntrack: silent a memory leak warning"

2019-10-07 Thread Cong Wang
On Mon, Oct 7, 2019 at 10:35 PM Maciej Żenczykowski wrote: > > From: Maciej Żenczykowski > > This reverts commit 114aa35d06d4920c537b72f9fa935de5dd205260. > > By my understanding of kmemleak the reasoning for this patch > is incorrect. If kmemleak couldn't handle rcu we'd have it > reporting lea

[Patch net] net_sched: fix backward compatibility for TCA_KIND

2019-10-07 Thread Cong Wang
("net_sched: add max len check for TCA_KIND") Reported-by: Marcelo Ricardo Leitner Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/cls_api.c | 36 +--- net/sched/sch_api.c | 3 +-- 2 files changed, 34 insertions(+), 5

[Patch net] net_sched: fix backward compatibility for TCA_ACT_KIND

2019-10-07 Thread Cong Wang
add policy validation for action attributes") Reported-by: Marcelo Ricardo Leitner Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/act_api.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/sched/act_api.c b/net/sched/act_api.c ind

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-04 Thread Cong Wang
On Fri, Oct 4, 2019 at 3:54 PM Jakub Kicinski wrote: > > On Thu, 3 Oct 2019 16:45:25 -0300, Marcelo Ricardo Leitner wrote: > > On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > > > Applied, queued for 4.14+, thanks! > > > > Ahm, this breaks some user applications. > > > > I'm getti

Re: [PATCH net v3 0/3] Fix Qdisc destroy issues caused by adding fine-grained locking to filter API

2019-09-24 Thread Cong Wang
) while holding tree lock > net: sched: sch_sfb: don't call qdisc_put() while holding tree lock > For the whole series: Acked-by: Cong Wang Thanks.

Re: [PATCH net v3] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Cong Wang
ful "right now". > ... > Fixes: e0a7683 ("net/sched: cbs: fix port_rate miscalculation") > Signed-off-by: Vinicius Costa Gomes Acked-by: Cong Wang

Re: [PATCH net v2] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Cong Wang
On Mon, Sep 23, 2019 at 5:14 PM Vinicius Costa Gomes wrote: > @@ -417,12 +421,6 @@ static int cbs_init(struct Qdisc *sch, struct nlattr > *opt, > if (err) > return err; > > - if (!q->offload) { > - spin_lock(&cbs_list_lock); > - list_add(&

Re: [PATCH net] net: sched: fix possible crash in tcf_action_destroy()

2019-09-23 Thread Cong Wang
On Mon, Sep 23, 2019 at 8:44 AM Eric Dumazet wrote: > > > > On 9/21/19 7:08 PM, Jakub Kicinski wrote: > > On Wed, 18 Sep 2019 14:37:21 -0700, Cong Wang wrote: > >> On Wed, Sep 18, 2019 at 12:57 PM 'Eric Dumazet' via syzkaller > >> wrote: >

Re: [PATCH net v2 1/3] net: sched: sch_htb: don't call qdisc_put() while holding tree lock

2019-09-20 Thread Cong Wang
On Thu, Sep 19, 2019 at 11:27 PM Vlad Buslov wrote: > > > On Fri 20 Sep 2019 at 04:05, Cong Wang wrote: > > On Thu, Sep 19, 2019 at 1:14 PM Vlad Buslov wrote: > >> Notes: > >> Changes V1 -> V2: > >> > >> - Extend sch

Re: [PATCH net v2 1/3] net: sched: sch_htb: don't call qdisc_put() while holding tree lock

2019-09-19 Thread Cong Wang
On Thu, Sep 19, 2019 at 1:14 PM Vlad Buslov wrote: > Notes: > Changes V1 -> V2: > > - Extend sch API with new qdisc_put_empty() function that has same > implementation as regular qdisc_put() but skips parts that reset qdisc > and free all packet buffers from gso_skb and skb_bad

Re: [PATCH net 0/3] Fix Qdisc destroy issues caused by adding fine-grained locking to filter API

2019-09-19 Thread Cong Wang
On Thu, Sep 19, 2019 at 1:53 AM Vlad Buslov wrote: > > > On Thu 19 Sep 2019 at 01:50, Cong Wang wrote: > > On Wed, Sep 18, 2019 at 12:32 AM Vlad Buslov wrote: > >> > >> TC filter API unlocking introduced several new fine-grained locks. The > >> c

<    2   3   4   5   6   7   8   9   10   11   >