* [PATCH net-next] netdevsim: Fix build error without CONFIG_INET
From: YueHaibing @ 2019-08-19 12:08 UTC (permalink / raw)
To: davem, idosch, jiri, mcroce; +Cc: linux-kernel, netdev, YueHaibing
If CONFIG_INET is not set, building fails:
drivers/net/netdevsim/dev.o: In function `nsim_dev_trap_report_work':
dev.c:(.text+0x67b): undefined reference to `ip_send_check'
Add CONFIG_INET Kconfig dependency to fix this.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: da58f90f11f5 ("netdevsim: Add devlink-trap support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 48e209e..7bb786e 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -505,7 +505,7 @@ source "drivers/net/hyperv/Kconfig"
config NETDEVSIM
tristate "Simulated networking device"
- depends on DEBUG_FS
+ depends on INET && DEBUG_FS
select NET_DEVLINK
help
This driver is a developer testing tool and software model that can
--
2.7.4
^ permalink raw reply related
* BUG: MAX_STACK_TRACE_ENTRIES too low in tipc_topsrv_exit_net
From: syzbot @ 2019-08-19 12:22 UTC (permalink / raw)
To: davem, jon.maloy, linux-kernel, netdev, syzkaller-bugs,
tipc-discussion, ying.xue
Hello,
syzbot found the following crash on:
HEAD commit: 5181b473 net: phy: realtek: add NBase-T PHY auto-detection
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=156b731c600000
kernel config: https://syzkaller.appspot.com/x/.config?x=d4cf1ffb87d590d7
dashboard link: https://syzkaller.appspot.com/bug?extid=5f97459a05652f579f6c
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+5f97459a05652f579f6c@syzkaller.appspotmail.com
BUG: MAX_STACK_TRACE_ENTRIES too low!
turning off the locking correctness validator.
CPU: 0 PID: 2581 Comm: kworker/u4:4 Not tainted 5.3.0-rc3+ #132
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
save_trace kernel/locking/lockdep.c:473 [inline]
save_trace.isra.0.cold+0x14/0x19 kernel/locking/lockdep.c:458
mark_lock+0x3db/0x11e0 kernel/locking/lockdep.c:3583
mark_usage kernel/locking/lockdep.c:3517 [inline]
__lock_acquire+0x538/0x4c30 kernel/locking/lockdep.c:3834
lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4412
flush_workqueue+0x126/0x14b0 kernel/workqueue.c:2774
drain_workqueue+0x1b4/0x470 kernel/workqueue.c:2939
destroy_workqueue+0x21/0x6c0 kernel/workqueue.c:4320
tipc_topsrv_work_stop net/tipc/topsrv.c:636 [inline]
tipc_topsrv_stop net/tipc/topsrv.c:694 [inline]
tipc_topsrv_exit_net+0x3fe/0x5d8 net/tipc/topsrv.c:706
ops_exit_list.isra.0+0xaa/0x150 net/core/net_namespace.c:172
cleanup_net+0x4e2/0xa70 net/core/net_namespace.c:594
process_one_work+0x9af/0x1740 kernel/workqueue.c:2269
worker_thread+0x98/0xe40 kernel/workqueue.c:2415
kthread+0x361/0x430 kernel/kthread.c:255
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
kobject: 'rx-0' (000000000e2c91cd): kobject_cleanup, parent 000000002003fefb
kobject: 'rx-0' (000000000e2c91cd): auto cleanup 'remove' event
kobject: 'rx-0' (000000000e2c91cd): kobject_uevent_env
kobject: 'rx-0' (000000000e2c91cd): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000000e2c91cd): auto cleanup kobject_del
kobject: 'rx-0' (000000000e2c91cd): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000058b6f726): kobject_cleanup, parent 000000002003fefb
kobject: 'tx-0' (0000000058b6f726): auto cleanup 'remove' event
kobject: 'tx-0' (0000000058b6f726): kobject_uevent_env
kobject: 'tx-0' (0000000058b6f726): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (0000000058b6f726): auto cleanup kobject_del
kobject: 'tx-0' (0000000058b6f726): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000002003fefb): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000002003fefb): calling ktype release
kobject: 'queues' (000000002003fefb): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (0000000018a24d65): kobject_uevent_env
kobject: 'ip6gre0' (0000000018a24d65): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000940b22b0): kobject_cleanup, parent 0000000005a1fc3a
kobject: 'rx-0' (00000000940b22b0): auto cleanup 'remove' event
kobject: 'rx-0' (00000000940b22b0): kobject_uevent_env
kobject: 'rx-0' (00000000940b22b0): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000940b22b0): auto cleanup kobject_del
kobject: 'rx-0' (00000000940b22b0): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000278e85e2): kobject_cleanup, parent 0000000005a1fc3a
kobject: 'tx-0' (00000000278e85e2): auto cleanup 'remove' event
kobject: 'tx-0' (00000000278e85e2): kobject_uevent_env
kobject: 'tx-0' (00000000278e85e2): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000278e85e2): auto cleanup kobject_del
kobject: 'tx-0' (00000000278e85e2): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000005a1fc3a): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (0000000005a1fc3a): calling ktype release
kobject: 'queues' (0000000005a1fc3a): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000c78b955b): kobject_uevent_env
kobject: 'ip6gre0' (00000000c78b955b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000000fa7c1d1): kobject_cleanup, parent 00000000d264d5b4
kobject: 'rx-0' (000000000fa7c1d1): auto cleanup 'remove' event
kobject: 'rx-0' (000000000fa7c1d1): kobject_uevent_env
kobject: 'rx-0' (000000000fa7c1d1): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000000fa7c1d1): auto cleanup kobject_del
kobject: 'rx-0' (000000000fa7c1d1): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000000f66c80c): kobject_cleanup, parent 00000000d264d5b4
kobject: 'tx-0' (000000000f66c80c): auto cleanup 'remove' event
kobject: 'tx-0' (000000000f66c80c): kobject_uevent_env
kobject: 'tx-0' (000000000f66c80c): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000000f66c80c): auto cleanup kobject_del
kobject: 'tx-0' (000000000f66c80c): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000d264d5b4): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000d264d5b4): calling ktype release
kobject: 'queues' (00000000d264d5b4): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000ef80dc29): kobject_uevent_env
kobject: 'ip6gre0' (00000000ef80dc29): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000f928d911): kobject_cleanup, parent 000000003c7c9951
kobject: 'rx-0' (00000000f928d911): auto cleanup 'remove' event
kobject: 'rx-0' (00000000f928d911): kobject_uevent_env
kobject: 'rx-0' (00000000f928d911): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000f928d911): auto cleanup kobject_del
kobject: 'rx-0' (00000000f928d911): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000009bf7cc90): kobject_cleanup, parent 000000003c7c9951
kobject: 'tx-0' (000000009bf7cc90): auto cleanup 'remove' event
kobject: 'tx-0' (000000009bf7cc90): kobject_uevent_env
kobject: 'tx-0' (000000009bf7cc90): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000009bf7cc90): auto cleanup kobject_del
kobject: 'tx-0' (000000009bf7cc90): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003c7c9951): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000003c7c9951): calling ktype release
kobject: 'queues' (000000003c7c9951): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000acb4e121): kobject_uevent_env
kobject: 'ip6gre0' (00000000acb4e121): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000045fca4e1): kobject_cleanup, parent 000000001c9d9e42
kobject: 'rx-0' (0000000045fca4e1): auto cleanup 'remove' event
kobject: 'rx-0' (0000000045fca4e1): kobject_uevent_env
kobject: 'rx-0' (0000000045fca4e1): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000045fca4e1): auto cleanup kobject_del
kobject: 'rx-0' (0000000045fca4e1): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000a309e805): kobject_cleanup, parent 000000001c9d9e42
kobject: 'tx-0' (00000000a309e805): auto cleanup 'remove' event
kobject: 'tx-0' (00000000a309e805): kobject_uevent_env
kobject: 'tx-0' (00000000a309e805): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000a309e805): auto cleanup kobject_del
kobject: 'tx-0' (00000000a309e805): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000001c9d9e42): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000001c9d9e42): calling ktype release
kobject: 'queues' (000000001c9d9e42): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (0000000094fbf7bb): kobject_uevent_env
kobject: 'ip6gre0' (0000000094fbf7bb): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000443242e0): kobject_cleanup, parent 000000009f9df3e8
kobject: 'rx-0' (00000000443242e0): auto cleanup 'remove' event
kobject: 'rx-0' (00000000443242e0): kobject_uevent_env
kobject: 'rx-0' (00000000443242e0): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000443242e0): auto cleanup kobject_del
kobject: 'rx-0' (00000000443242e0): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000005588ef99): kobject_cleanup, parent 000000009f9df3e8
kobject: 'tx-0' (000000005588ef99): auto cleanup 'remove' event
kobject: 'tx-0' (000000005588ef99): kobject_uevent_env
kobject: 'tx-0' (000000005588ef99): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000005588ef99): auto cleanup kobject_del
kobject: 'tx-0' (000000005588ef99): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000009f9df3e8): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000009f9df3e8): calling ktype release
kobject: 'queues' (000000009f9df3e8): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (0000000060028093): kobject_uevent_env
kobject: 'ip6gre0' (0000000060028093): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000002c2db56): kobject_cleanup, parent 000000000ee23264
kobject: 'rx-0' (0000000002c2db56): auto cleanup 'remove' event
kobject: 'rx-0' (0000000002c2db56): kobject_uevent_env
kobject: 'rx-0' (0000000002c2db56): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000002c2db56): auto cleanup kobject_del
kobject: 'rx-0' (0000000002c2db56): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000831daf90): kobject_cleanup, parent 000000000ee23264
kobject: 'tx-0' (00000000831daf90): auto cleanup 'remove' event
kobject: 'tx-0' (00000000831daf90): kobject_uevent_env
kobject: 'tx-0' (00000000831daf90): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000831daf90): auto cleanup kobject_del
kobject: 'tx-0' (00000000831daf90): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000000ee23264): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000000ee23264): calling ktype release
kobject: 'queues' (000000000ee23264): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000e217374d): kobject_uevent_env
kobject: 'ip6gre0' (00000000e217374d): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000f8e7f44b): kobject_cleanup, parent 000000003daaa7c9
kobject: 'rx-0' (00000000f8e7f44b): auto cleanup 'remove' event
kobject: 'rx-0' (00000000f8e7f44b): kobject_uevent_env
kobject: 'rx-0' (00000000f8e7f44b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000f8e7f44b): auto cleanup kobject_del
kobject: 'rx-0' (00000000f8e7f44b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000001277c9de): kobject_cleanup, parent 000000003daaa7c9
kobject: 'tx-0' (000000001277c9de): auto cleanup 'remove' event
kobject: 'tx-0' (000000001277c9de): kobject_uevent_env
kobject: 'tx-0' (000000001277c9de): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000001277c9de): auto cleanup kobject_del
kobject: 'tx-0' (000000001277c9de): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003daaa7c9): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000003daaa7c9): calling ktype release
kobject: 'queues' (000000003daaa7c9): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000597e3c0a): kobject_uevent_env
kobject: 'ip6gre0' (00000000597e3c0a): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000eb376580): kobject_cleanup, parent 0000000054d719cb
kobject: 'rx-0' (00000000eb376580): auto cleanup 'remove' event
kobject: 'rx-0' (00000000eb376580): kobject_uevent_env
kobject: 'rx-0' (00000000eb376580): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000eb376580): auto cleanup kobject_del
kobject: 'rx-0' (00000000eb376580): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000040024191): kobject_cleanup, parent 0000000054d719cb
kobject: 'tx-0' (0000000040024191): auto cleanup 'remove' event
kobject: 'tx-0' (0000000040024191): kobject_uevent_env
kobject: 'tx-0' (0000000040024191): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (0000000040024191): auto cleanup kobject_del
kobject: 'tx-0' (0000000040024191): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000054d719cb): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (0000000054d719cb): calling ktype release
kobject: 'queues' (0000000054d719cb): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000995a4c19): kobject_uevent_env
kobject: 'ip6gre0' (00000000995a4c19): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'ip6gre0' (0000000018a24d65): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (0000000018a24d65): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000c78b955b): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (00000000c78b955b): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000ef80dc29): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (00000000ef80dc29): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000acb4e121): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (00000000acb4e121): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (0000000094fbf7bb): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (0000000094fbf7bb): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (0000000060028093): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (0000000060028093): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000e217374d): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (00000000e217374d): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000597e3c0a): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (00000000597e3c0a): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000995a4c19): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6gre0' (00000000995a4c19): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'rx-0' (00000000a530319b): kobject_cleanup, parent 0000000044c197cb
kobject: 'rx-0' (00000000a530319b): auto cleanup 'remove' event
kobject: 'rx-0' (00000000a530319b): kobject_uevent_env
kobject: 'rx-0' (00000000a530319b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000a530319b): auto cleanup kobject_del
kobject: 'rx-0' (00000000a530319b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000036817586): kobject_cleanup, parent 0000000044c197cb
kobject: 'tx-0' (0000000036817586): auto cleanup 'remove' event
kobject: 'tx-0' (0000000036817586): kobject_uevent_env
kobject: 'tx-0' (0000000036817586): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (0000000036817586): auto cleanup kobject_del
kobject: 'tx-0' (0000000036817586): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000044c197cb): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (0000000044c197cb): calling ktype release
kobject: 'queues' (0000000044c197cb): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (000000004d7cdca9): kobject_uevent_env
kobject: 'ip6tnl0' (000000004d7cdca9): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000009ad0ffcd): kobject_cleanup, parent 000000006632a50a
kobject: 'rx-0' (000000009ad0ffcd): auto cleanup 'remove' event
kobject: 'rx-0' (000000009ad0ffcd): kobject_uevent_env
kobject: 'rx-0' (000000009ad0ffcd): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000009ad0ffcd): auto cleanup kobject_del
kobject: 'rx-0' (000000009ad0ffcd): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000cc8f7d89): kobject_cleanup, parent 000000006632a50a
kobject: 'tx-0' (00000000cc8f7d89): auto cleanup 'remove' event
kobject: 'tx-0' (00000000cc8f7d89): kobject_uevent_env
kobject: 'tx-0' (00000000cc8f7d89): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000cc8f7d89): auto cleanup kobject_del
kobject: 'tx-0' (00000000cc8f7d89): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000006632a50a): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000006632a50a): calling ktype release
kobject: 'queues' (000000006632a50a): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000af12a50a): kobject_uevent_env
kobject: 'ip6tnl0' (00000000af12a50a): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000000f3a002b): kobject_cleanup, parent 000000008e667009
kobject: 'rx-0' (000000000f3a002b): auto cleanup 'remove' event
kobject: 'rx-0' (000000000f3a002b): kobject_uevent_env
kobject: 'rx-0' (000000000f3a002b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000000f3a002b): auto cleanup kobject_del
kobject: 'rx-0' (000000000f3a002b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000003dd814d2): kobject_cleanup, parent 000000008e667009
kobject: 'tx-0' (000000003dd814d2): auto cleanup 'remove' event
kobject: 'tx-0' (000000003dd814d2): kobject_uevent_env
kobject: 'tx-0' (000000003dd814d2): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000003dd814d2): auto cleanup kobject_del
kobject: 'tx-0' (000000003dd814d2): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000008e667009): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000008e667009): calling ktype release
kobject: 'queues' (000000008e667009): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000ad24f481): kobject_uevent_env
kobject: 'ip6tnl0' (00000000ad24f481): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000b57b4b94): kobject_cleanup, parent 00000000c8f88c97
kobject: 'rx-0' (00000000b57b4b94): auto cleanup 'remove' event
kobject: 'rx-0' (00000000b57b4b94): kobject_uevent_env
kobject: 'rx-0' (00000000b57b4b94): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000b57b4b94): auto cleanup kobject_del
kobject: 'rx-0' (00000000b57b4b94): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000035a9b1c): kobject_cleanup, parent 00000000c8f88c97
kobject: 'tx-0' (00000000035a9b1c): auto cleanup 'remove' event
kobject: 'tx-0' (00000000035a9b1c): kobject_uevent_env
kobject: 'tx-0' (00000000035a9b1c): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000035a9b1c): auto cleanup kobject_del
kobject: 'tx-0' (00000000035a9b1c): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000c8f88c97): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000c8f88c97): calling ktype release
kobject: 'queues' (00000000c8f88c97): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000e4871037): kobject_uevent_env
kobject: 'ip6tnl0' (00000000e4871037): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000009e5eabee): kobject_cleanup, parent 000000000bef0c44
kobject: 'rx-0' (000000009e5eabee): auto cleanup 'remove' event
kobject: 'rx-0' (000000009e5eabee): kobject_uevent_env
kobject: 'rx-0' (000000009e5eabee): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000009e5eabee): auto cleanup kobject_del
kobject: 'rx-0' (000000009e5eabee): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000917837d7): kobject_cleanup, parent 000000000bef0c44
kobject: 'tx-0' (00000000917837d7): auto cleanup 'remove' event
kobject: 'tx-0' (00000000917837d7): kobject_uevent_env
kobject: 'tx-0' (00000000917837d7): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000917837d7): auto cleanup kobject_del
kobject: 'tx-0' (00000000917837d7): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000000bef0c44): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000000bef0c44): calling ktype release
kobject: 'queues' (000000000bef0c44): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000a48d6ad0): kobject_uevent_env
kobject: 'ip6tnl0' (00000000a48d6ad0): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000099277526): kobject_cleanup, parent 0000000085f382c3
kobject: 'rx-0' (0000000099277526): auto cleanup 'remove' event
kobject: 'rx-0' (0000000099277526): kobject_uevent_env
kobject: 'rx-0' (0000000099277526): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000099277526): auto cleanup kobject_del
kobject: 'rx-0' (0000000099277526): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000e28e65a5): kobject_cleanup, parent 0000000085f382c3
kobject: 'tx-0' (00000000e28e65a5): auto cleanup 'remove' event
kobject: 'tx-0' (00000000e28e65a5): kobject_uevent_env
kobject: 'tx-0' (00000000e28e65a5): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000e28e65a5): auto cleanup kobject_del
kobject: 'tx-0' (00000000e28e65a5): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000085f382c3): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (0000000085f382c3): calling ktype release
kobject: 'queues' (0000000085f382c3): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (000000002480b06a): kobject_uevent_env
kobject: 'ip6tnl0' (000000002480b06a): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000ad1f374e): kobject_cleanup, parent 000000004552107a
kobject: 'rx-0' (00000000ad1f374e): auto cleanup 'remove' event
kobject: 'rx-0' (00000000ad1f374e): kobject_uevent_env
kobject: 'rx-0' (00000000ad1f374e): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000ad1f374e): auto cleanup kobject_del
kobject: 'rx-0' (00000000ad1f374e): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000a52c4930): kobject_cleanup, parent 000000004552107a
kobject: 'tx-0' (00000000a52c4930): auto cleanup 'remove' event
kobject: 'tx-0' (00000000a52c4930): kobject_uevent_env
kobject: 'tx-0' (00000000a52c4930): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000a52c4930): auto cleanup kobject_del
kobject: 'tx-0' (00000000a52c4930): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000004552107a): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000004552107a): calling ktype release
kobject: 'queues' (000000004552107a): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000b5c75a98): kobject_uevent_env
kobject: 'ip6tnl0' (00000000b5c75a98): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000069cf2cec): kobject_cleanup, parent 000000000effb6b7
kobject: 'rx-0' (0000000069cf2cec): auto cleanup 'remove' event
kobject: 'rx-0' (0000000069cf2cec): kobject_uevent_env
kobject: 'rx-0' (0000000069cf2cec): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000069cf2cec): auto cleanup kobject_del
kobject: 'rx-0' (0000000069cf2cec): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000f6dd67a1): kobject_cleanup, parent 000000000effb6b7
kobject: 'tx-0' (00000000f6dd67a1): auto cleanup 'remove' event
kobject: 'tx-0' (00000000f6dd67a1): kobject_uevent_env
kobject: 'tx-0' (00000000f6dd67a1): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000f6dd67a1): auto cleanup kobject_del
kobject: 'tx-0' (00000000f6dd67a1): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000000effb6b7): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000000effb6b7): calling ktype release
kobject: 'queues' (000000000effb6b7): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (0000000017bab338): kobject_uevent_env
kobject: 'ip6tnl0' (0000000017bab338): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000005bed9a62): kobject_cleanup, parent 000000002a90c11d
kobject: 'rx-0' (000000005bed9a62): auto cleanup 'remove' event
kobject: 'rx-0' (000000005bed9a62): kobject_uevent_env
kobject: 'rx-0' (000000005bed9a62): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000005bed9a62): auto cleanup kobject_del
kobject: 'rx-0' (000000005bed9a62): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000148a89bb): kobject_cleanup, parent 000000002a90c11d
kobject: 'tx-0' (00000000148a89bb): auto cleanup 'remove' event
kobject: 'tx-0' (00000000148a89bb): kobject_uevent_env
kobject: 'tx-0' (00000000148a89bb): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000148a89bb): auto cleanup kobject_del
kobject: 'tx-0' (00000000148a89bb): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000002a90c11d): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000002a90c11d): calling ktype release
kobject: 'queues' (000000002a90c11d): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (000000007855542e): kobject_uevent_env
kobject: 'ip6tnl0' (000000007855542e): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'ip6tnl0' (000000004d7cdca9): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (000000004d7cdca9): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000af12a50a): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (00000000af12a50a): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000ad24f481): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (00000000ad24f481): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000e4871037): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (00000000e4871037): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000a48d6ad0): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (00000000a48d6ad0): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (000000002480b06a): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (000000002480b06a): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000b5c75a98): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (00000000b5c75a98): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (0000000017bab338): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (0000000017bab338): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (000000007855542e): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6tnl0' (000000007855542e): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'rx-0' (00000000faff8a75): kobject_cleanup, parent 000000003555e997
kobject: 'rx-0' (00000000faff8a75): auto cleanup 'remove' event
kobject: 'rx-0' (00000000faff8a75): kobject_uevent_env
kobject: 'rx-0' (00000000faff8a75): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000faff8a75): auto cleanup kobject_del
kobject: 'rx-0' (00000000faff8a75): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000003377944b): kobject_cleanup, parent 000000003555e997
kobject: 'tx-0' (000000003377944b): auto cleanup 'remove' event
kobject: 'tx-0' (000000003377944b): kobject_uevent_env
kobject: 'tx-0' (000000003377944b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000003377944b): auto cleanup kobject_del
kobject: 'tx-0' (000000003377944b): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003555e997): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000003555e997): calling ktype release
kobject: 'queues' (000000003555e997): kset_release
kobject: 'queues': free name
kobject: 'sit0' (00000000ba6470e9): kobject_uevent_env
kobject: 'sit0' (00000000ba6470e9): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000003577adaa): kobject_cleanup, parent 00000000c5fbab92
kobject: 'rx-0' (000000003577adaa): auto cleanup 'remove' event
kobject: 'rx-0' (000000003577adaa): kobject_uevent_env
kobject: 'rx-0' (000000003577adaa): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000003577adaa): auto cleanup kobject_del
kobject: 'rx-0' (000000003577adaa): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000f519527f): kobject_cleanup, parent 00000000c5fbab92
kobject: 'tx-0' (00000000f519527f): auto cleanup 'remove' event
kobject: 'tx-0' (00000000f519527f): kobject_uevent_env
kobject: 'tx-0' (00000000f519527f): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000f519527f): auto cleanup kobject_del
kobject: 'tx-0' (00000000f519527f): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000c5fbab92): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000c5fbab92): calling ktype release
kobject: 'queues' (00000000c5fbab92): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000009f74c826): kobject_uevent_env
kobject: 'sit0' (000000009f74c826): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000137dfc9e): kobject_cleanup, parent 00000000e8ee822b
kobject: 'rx-0' (00000000137dfc9e): auto cleanup 'remove' event
kobject: 'rx-0' (00000000137dfc9e): kobject_uevent_env
kobject: 'rx-0' (00000000137dfc9e): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000137dfc9e): auto cleanup kobject_del
kobject: 'rx-0' (00000000137dfc9e): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000cf51e058): kobject_cleanup, parent 00000000e8ee822b
kobject: 'tx-0' (00000000cf51e058): auto cleanup 'remove' event
kobject: 'tx-0' (00000000cf51e058): kobject_uevent_env
kobject: 'tx-0' (00000000cf51e058): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000cf51e058): auto cleanup kobject_del
kobject: 'tx-0' (00000000cf51e058): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000e8ee822b): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000e8ee822b): calling ktype release
kobject: 'queues' (00000000e8ee822b): kset_release
kobject: 'queues': free name
kobject: 'sit0' (0000000065e536c8): kobject_uevent_env
kobject: 'sit0' (0000000065e536c8): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000265aa8c8): kobject_cleanup, parent 000000001c613bad
kobject: 'rx-0' (00000000265aa8c8): auto cleanup 'remove' event
kobject: 'rx-0' (00000000265aa8c8): kobject_uevent_env
kobject: 'rx-0' (00000000265aa8c8): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000265aa8c8): auto cleanup kobject_del
kobject: 'rx-0' (00000000265aa8c8): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000669b1a88): kobject_cleanup, parent 000000001c613bad
kobject: 'tx-0' (00000000669b1a88): auto cleanup 'remove' event
kobject: 'tx-0' (00000000669b1a88): kobject_uevent_env
kobject: 'tx-0' (00000000669b1a88): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000669b1a88): auto cleanup kobject_del
kobject: 'tx-0' (00000000669b1a88): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000001c613bad): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000001c613bad): calling ktype release
kobject: 'queues' (000000001c613bad): kset_release
kobject: 'queues': free name
kobject: 'sit0' (00000000b0b0bf77): kobject_uevent_env
kobject: 'sit0' (00000000b0b0bf77): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000c08b3e35): kobject_cleanup, parent 000000004d964cab
kobject: 'rx-0' (00000000c08b3e35): auto cleanup 'remove' event
kobject: 'rx-0' (00000000c08b3e35): kobject_uevent_env
kobject: 'rx-0' (00000000c08b3e35): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000c08b3e35): auto cleanup kobject_del
kobject: 'rx-0' (00000000c08b3e35): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000006bb20443): kobject_cleanup, parent 000000004d964cab
kobject: 'tx-0' (000000006bb20443): auto cleanup 'remove' event
kobject: 'tx-0' (000000006bb20443): kobject_uevent_env
kobject: 'tx-0' (000000006bb20443): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000006bb20443): auto cleanup kobject_del
kobject: 'tx-0' (000000006bb20443): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000004d964cab): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000004d964cab): calling ktype release
kobject: 'queues' (000000004d964cab): kset_release
kobject: 'queues': free name
kobject: 'sit0' (00000000e3a2a337): kobject_uevent_env
kobject: 'sit0' (00000000e3a2a337): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000fcf6c2df): kobject_cleanup, parent 000000001f378765
kobject: 'rx-0' (00000000fcf6c2df): auto cleanup 'remove' event
kobject: 'rx-0' (00000000fcf6c2df): kobject_uevent_env
kobject: 'rx-0' (00000000fcf6c2df): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000fcf6c2df): auto cleanup kobject_del
kobject: 'rx-0' (00000000fcf6c2df): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000306e361a): kobject_cleanup, parent 000000001f378765
kobject: 'tx-0' (00000000306e361a): auto cleanup 'remove' event
kobject: 'tx-0' (00000000306e361a): kobject_uevent_env
kobject: 'tx-0' (00000000306e361a): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000306e361a): auto cleanup kobject_del
kobject: 'tx-0' (00000000306e361a): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000001f378765): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000001f378765): calling ktype release
kobject: 'queues' (000000001f378765): kset_release
kobject: 'queues': free name
kobject: 'sit0' (0000000058d12d0d): kobject_uevent_env
kobject: 'sit0' (0000000058d12d0d): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000078d95bd): kobject_cleanup, parent 000000003596feb5
kobject: 'rx-0' (00000000078d95bd): auto cleanup 'remove' event
kobject: 'rx-0' (00000000078d95bd): kobject_uevent_env
kobject: 'rx-0' (00000000078d95bd): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000078d95bd): auto cleanup kobject_del
kobject: 'rx-0' (00000000078d95bd): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000037709752): kobject_cleanup, parent 000000003596feb5
kobject: 'tx-0' (0000000037709752): auto cleanup 'remove' event
kobject: 'tx-0' (0000000037709752): kobject_uevent_env
kobject: 'tx-0' (0000000037709752): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (0000000037709752): auto cleanup kobject_del
kobject: 'tx-0' (0000000037709752): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003596feb5): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000003596feb5): calling ktype release
kobject: 'queues' (000000003596feb5): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000008276eda5): kobject_uevent_env
kobject: 'sit0' (000000008276eda5): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000004d3b044b): kobject_cleanup, parent 000000006b53a9a0
kobject: 'rx-0' (000000004d3b044b): auto cleanup 'remove' event
kobject: 'rx-0' (000000004d3b044b): kobject_uevent_env
kobject: 'rx-0' (000000004d3b044b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000004d3b044b): auto cleanup kobject_del
kobject: 'rx-0' (000000004d3b044b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000273da9ae): kobject_cleanup, parent 000000006b53a9a0
kobject: 'tx-0' (00000000273da9ae): auto cleanup 'remove' event
kobject: 'tx-0' (00000000273da9ae): kobject_uevent_env
kobject: 'tx-0' (00000000273da9ae): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000273da9ae): auto cleanup kobject_del
kobject: 'tx-0' (00000000273da9ae): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000006b53a9a0): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000006b53a9a0): calling ktype release
kobject: 'queues' (000000006b53a9a0): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000005ed040cc): kobject_uevent_env
kobject: 'sit0' (000000005ed040cc): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000f150476e): kobject_cleanup, parent 00000000a0cff6dd
kobject: 'rx-0' (00000000f150476e): auto cleanup 'remove' event
kobject: 'rx-0' (00000000f150476e): kobject_uevent_env
kobject: 'rx-0' (00000000f150476e): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000f150476e): auto cleanup kobject_del
kobject: 'rx-0' (00000000f150476e): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000c81ff56b): kobject_cleanup, parent 00000000a0cff6dd
kobject: 'tx-0' (00000000c81ff56b): auto cleanup 'remove' event
kobject: 'tx-0' (00000000c81ff56b): kobject_uevent_env
kobject: 'tx-0' (00000000c81ff56b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000c81ff56b): auto cleanup kobject_del
kobject: 'tx-0' (00000000c81ff56b): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000a0cff6dd): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000a0cff6dd): calling ktype release
kobject: 'queues' (00000000a0cff6dd): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000009ebda3df): kobject_uevent_env
kobject: 'sit0' (000000009ebda3df): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'sit0' (00000000ba6470e9): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (00000000ba6470e9): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000009f74c826): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000009f74c826): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (0000000065e536c8): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (0000000065e536c8): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (00000000b0b0bf77): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (00000000b0b0bf77): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (00000000e3a2a337): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (00000000e3a2a337): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (0000000058d12d0d): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (0000000058d12d0d): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000008276eda5): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000008276eda5): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000005ed040cc): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000005ed040cc): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000009ebda3df): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000009ebda3df): calling ktype release
kobject: 'sit0': free name
kobject: 'rx-0' (00000000011781b4): kobject_cleanup, parent 0000000037662b61
kobject: 'rx-0' (00000000011781b4): auto cleanup 'remove' event
kobject: 'rx-0' (00000000011781b4): kobject_uevent_env
kobject: 'rx-0' (00000000011781b4): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000011781b4): auto cleanup kobject_del
kobject: 'rx-0' (00000000011781b4): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000002bafd647): kobject_cleanup, parent 0000000037662b61
kobject: 'tx-0' (000000002bafd647): auto cleanup 'remove' event
kobject: 'tx-0' (000000002bafd647): kobject_uevent_env
kobject: 'tx-0' (000000002bafd647): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000002bafd647): auto cleanup kobject_del
kobject: 'tx-0' (000000002bafd647): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000037662b61): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (0000000037662b61): calling ktype release
kobject: 'queues' (0000000037662b61): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (000000000e5b1a5c): kobject_uevent_env
kobject: 'ip6_vti0' (000000000e5b1a5c): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000068311350): kobject_cleanup, parent 00000000facffc2f
kobject: 'rx-0' (0000000068311350): auto cleanup 'remove' event
kobject: 'rx-0' (0000000068311350): kobject_uevent_env
kobject: 'rx-0' (0000000068311350): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000068311350): auto cleanup kobject_del
kobject: 'rx-0' (0000000068311350): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000d6e81326): kobject_cleanup, parent 00000000facffc2f
kobject: 'tx-0' (00000000d6e81326): auto cleanup 'remove' event
kobject: 'tx-0' (00000000d6e81326): kobject_uevent_env
kobject: 'tx-0' (00000000d6e81326): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000d6e81326): auto cleanup kobject_del
kobject: 'tx-0' (00000000d6e81326): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000facffc2f): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000facffc2f): calling ktype release
kobject: 'queues' (00000000facffc2f): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (0000000084bcfa3e): kobject_uevent_env
kobject: 'ip6_vti0' (0000000084bcfa3e): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000ce1fbf9a): kobject_cleanup, parent 00000000faad76b9
kobject: 'rx-0' (00000000ce1fbf9a): auto cleanup 'remove' event
kobject: 'rx-0' (00000000ce1fbf9a): kobject_uevent_env
kobject: 'rx-0' (00000000ce1fbf9a): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000ce1fbf9a): auto cleanup kobject_del
kobject: 'rx-0' (00000000ce1fbf9a): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000054a9318d): kobject_cleanup, parent 00000000faad76b9
kobject: 'tx-0' (0000000054a9318d): auto cleanup 'remove' event
kobject: 'tx-0' (0000000054a9318d): kobject_uevent_env
kobject: 'tx-0' (0000000054a9318d): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (0000000054a9318d): auto cleanup kobject_del
kobject: 'tx-0' (0000000054a9318d): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000faad76b9): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000faad76b9): calling ktype release
kobject: 'queues' (00000000faad76b9): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000a17dcb7a): kobject_uevent_env
kobject: 'ip6_vti0' (00000000a17dcb7a): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000e1ec0489): kobject_cleanup, parent 0000000032133323
kobject: 'rx-0' (00000000e1ec0489): auto cleanup 'remove' event
kobject: 'rx-0' (00000000e1ec0489): kobject_uevent_env
kobject: 'rx-0' (00000000e1ec0489): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000e1ec0489): auto cleanup kobject_del
kobject: 'rx-0' (00000000e1ec0489): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000c69707b0): kobject_cleanup, parent 0000000032133323
kobject: 'tx-0' (00000000c69707b0): auto cleanup 'remove' event
kobject: 'tx-0' (00000000c69707b0): kobject_uevent_env
kobject: 'tx-0' (00000000c69707b0): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000c69707b0): auto cleanup kobject_del
kobject: 'tx-0' (00000000c69707b0): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000032133323): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (0000000032133323): calling ktype release
kobject: 'queues' (0000000032133323): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000f1a1ebea): kobject_uevent_env
kobject: 'ip6_vti0' (00000000f1a1ebea): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000310059d9): kobject_cleanup, parent 000000002f7c701e
kobject: 'rx-0' (00000000310059d9): auto cleanup 'remove' event
kobject: 'rx-0' (00000000310059d9): kobject_uevent_env
kobject: 'rx-0' (00000000310059d9): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000310059d9): auto cleanup kobject_del
kobject: 'rx-0' (00000000310059d9): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000463fbeb0): kobject_cleanup, parent 000000002f7c701e
kobject: 'tx-0' (00000000463fbeb0): auto cleanup 'remove' event
kobject: 'tx-0' (00000000463fbeb0): kobject_uevent_env
kobject: 'tx-0' (00000000463fbeb0): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000463fbeb0): auto cleanup kobject_del
kobject: 'tx-0' (00000000463fbeb0): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000002f7c701e): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000002f7c701e): calling ktype release
kobject: 'queues' (000000002f7c701e): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000e99a1c16): kobject_uevent_env
kobject: 'ip6_vti0' (00000000e99a1c16): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000fc3878f1): kobject_cleanup, parent 0000000039005ce6
kobject: 'rx-0' (00000000fc3878f1): auto cleanup 'remove' event
kobject: 'rx-0' (00000000fc3878f1): kobject_uevent_env
kobject: 'rx-0' (00000000fc3878f1): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000fc3878f1): auto cleanup kobject_del
kobject: 'rx-0' (00000000fc3878f1): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000003da8a217): kobject_cleanup, parent 0000000039005ce6
kobject: 'tx-0' (000000003da8a217): auto cleanup 'remove' event
kobject: 'tx-0' (000000003da8a217): kobject_uevent_env
kobject: 'tx-0' (000000003da8a217): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (000000003da8a217): auto cleanup kobject_del
kobject: 'tx-0' (000000003da8a217): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000039005ce6): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (0000000039005ce6): calling ktype release
kobject: 'queues' (0000000039005ce6): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (000000003f213163): kobject_uevent_env
kobject: 'ip6_vti0' (000000003f213163): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000066dc1b5f): kobject_cleanup, parent 00000000e169d802
kobject: 'rx-0' (0000000066dc1b5f): auto cleanup 'remove' event
kobject: 'rx-0' (0000000066dc1b5f): kobject_uevent_env
kobject: 'rx-0' (0000000066dc1b5f): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (0000000066dc1b5f): auto cleanup kobject_del
kobject: 'rx-0' (0000000066dc1b5f): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000b99448c7): kobject_cleanup, parent 00000000e169d802
kobject: 'tx-0' (00000000b99448c7): auto cleanup 'remove' event
kobject: 'tx-0' (00000000b99448c7): kobject_uevent_env
kobject: 'tx-0' (00000000b99448c7): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000b99448c7): auto cleanup kobject_del
kobject: 'tx-0' (00000000b99448c7): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000e169d802): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000e169d802): calling ktype release
kobject: 'queues' (00000000e169d802): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (000000003422603c): kobject_uevent_env
kobject: 'ip6_vti0' (000000003422603c): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000b6464399): kobject_cleanup, parent 00000000785ed365
kobject: 'rx-0' (00000000b6464399): auto cleanup 'remove' event
kobject: 'rx-0' (00000000b6464399): kobject_uevent_env
kobject: 'rx-0' (00000000b6464399): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000b6464399): auto cleanup kobject_del
kobject: 'rx-0' (00000000b6464399): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000c2beb7d2): kobject_cleanup, parent 00000000785ed365
kobject: 'tx-0' (00000000c2beb7d2): auto cleanup 'remove' event
kobject: 'tx-0' (00000000c2beb7d2): kobject_uevent_env
kobject: 'tx-0' (00000000c2beb7d2): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000c2beb7d2): auto cleanup kobject_del
kobject: 'tx-0' (00000000c2beb7d2): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000785ed365): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000785ed365): calling ktype release
kobject: 'queues' (00000000785ed365): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (0000000031ab464d): kobject_uevent_env
kobject: 'ip6_vti0' (0000000031ab464d): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000a7d5a6f7): kobject_cleanup, parent 00000000ed628333
kobject: 'rx-0' (00000000a7d5a6f7): auto cleanup 'remove' event
kobject: 'rx-0' (00000000a7d5a6f7): kobject_uevent_env
kobject: 'rx-0' (00000000a7d5a6f7): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000a7d5a6f7): auto cleanup kobject_del
kobject: 'rx-0' (00000000a7d5a6f7): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000564c497f): kobject_cleanup, parent 00000000ed628333
kobject: 'tx-0' (00000000564c497f): auto cleanup 'remove' event
kobject: 'tx-0' (00000000564c497f): kobject_uevent_env
kobject: 'tx-0' (00000000564c497f): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000564c497f): auto cleanup kobject_del
kobject: 'tx-0' (00000000564c497f): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000ed628333): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (00000000ed628333): calling ktype release
kobject: 'queues' (00000000ed628333): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000fb053a2a): kobject_uevent_env
kobject: 'ip6_vti0' (00000000fb053a2a): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'ip6_vti0' (000000000e5b1a5c): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (000000000e5b1a5c): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (0000000084bcfa3e): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (0000000084bcfa3e): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000a17dcb7a): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (00000000a17dcb7a): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000f1a1ebea): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (00000000f1a1ebea): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000e99a1c16): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (00000000e99a1c16): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (000000003f213163): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (000000003f213163): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (000000003422603c): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (000000003422603c): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (0000000031ab464d): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (0000000031ab464d): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000fb053a2a): kobject_cleanup, parent
000000009c061a32
kobject: 'ip6_vti0' (00000000fb053a2a): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'rx-0' (00000000c827514b): kobject_cleanup, parent 000000004e70d3ea
kobject: 'rx-0' (00000000c827514b): auto cleanup 'remove' event
kobject: 'rx-0' (00000000c827514b): kobject_uevent_env
kobject: 'rx-0' (00000000c827514b): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (00000000c827514b): auto cleanup kobject_del
kobject: 'rx-0' (00000000c827514b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000e9330ec4): kobject_cleanup, parent 000000004e70d3ea
kobject: 'tx-0' (00000000e9330ec4): auto cleanup 'remove' event
kobject: 'tx-0' (00000000e9330ec4): kobject_uevent_env
kobject: 'tx-0' (00000000e9330ec4): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (00000000e9330ec4): auto cleanup kobject_del
kobject: 'tx-0' (00000000e9330ec4): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000004e70d3ea): kobject_cleanup, parent
000000009c061a32
kobject: 'queues' (000000004e70d3ea): calling ktype release
kobject: 'queues' (000000004e70d3ea): kset_release
kobject: 'queues': free name
kobject: 'ip_vti0' (000000004ee7ad23): kobject_uevent_env
kobject: 'ip_vti0' (000000004ee7ad23): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000004dda38d8): kobject_cleanup, parent 00000000025cb3fe
kobject: 'rx-0' (000000004dda38d8): auto cleanup 'remove' event
kobject: 'rx-0' (000000004dda38d8): kobject_uevent_env
kobject: 'rx-0' (000000004dda38d8): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'rx-0' (000000004dda38d8): auto cleanup kobject_del
kobject: 'rx-0' (000000004dda38d8): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000097fba38d): kobject_cleanup, parent 00000000025cb3fe
kobject: 'tx-0' (0000000097fba38d): auto cleanup 'remove' event
kobject: 'tx-0' (0000000097fba38d): kobject_uevent_env
kobject: 'tx-0' (0000000097fba38d): kobject_uevent_env: uevent_suppress
caused the event to drop!
kobject: 'tx-0' (0000000097fba38d): auto cleanup kobject_del
kobject: 'tx-0' (0000000097fba38d): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000025cb3fe): kobject_cleanup, parent
000000009c061a32
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
^ permalink raw reply
* Help needed - Kernel lockup while running ipsec
From: Vakul Garg @ 2019-08-19 12:55 UTC (permalink / raw)
To: netdev@vger.kernel.org
Hi
With kernel 4.14.122, I am getting a kernel softlockup while running single static ipsec tunnel.
The problem reproduces mostly after running 8-10 hours of ipsec encap test (on my dual core arm board).
I found that in function xfrm_policy_lookup_bytype(), the policy in variable 'ret' shows refcnt=0 under problem situation.
This creates an infinite loop in xfrm_policy_lookup_bytype() and hence the lockup.
Can some body please provide me pointers about 'refcnt'?
Is it legitimate for 'refcnt' to become '0'? Under what condition can it become '0'?
Regards
Vakul
^ permalink raw reply
* Re: [PATCH] net/mlx5: Fix a memory leak bug
From: Moshe Shemesh @ 2019-08-19 13:00 UTC (permalink / raw)
To: Wenwen Wang
Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller,
open list:MELLANOX MLX5 core VPI driver,
open list:MELLANOX MLX5 core VPI driver, open list
In-Reply-To: <1565684495-2454-1-git-send-email-wenwen@cs.uga.edu>
Please don't change that.
On command timeout we don't release ent, since the FW event on
completion can occur after timeout, so it is released on the
completion handler mlx5_cmd_comp_handler().
See commit 73dd3a4839c1d ("net/mlx5: Avoid using pending command
interface slots").
On Tue, Aug 13, 2019 at 11:22 AM Wenwen Wang <wenwen@cs.uga.edu> wrote:
>
> In mlx5_cmd_invoke(), 'ent' is allocated through kzalloc() in alloc_cmd().
> After the work is queued, wait_func() is invoked to wait the completion of
> the work. If wait_func() returns -ETIMEDOUT, the following execution will
> be terminated. However, the allocated 'ent' is not deallocated on this
> program path, leading to a memory leak bug.
>
> To fix the above issue, free 'ent' before returning the error.
>
> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> index 8cdd7e6..90cdb9a 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> @@ -1036,7 +1036,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
>
> err = wait_func(dev, ent);
> if (err == -ETIMEDOUT)
> - goto out;
> + goto out_free;
>
> ds = ent->ts2 - ent->ts1;
> op = MLX5_GET(mbox_in, in->first.data, opcode);
> --
> 2.7.4
>
^ permalink raw reply
* Re: [RFC v2] vsock: proposal to support multiple transports at runtime
From: Stefan Hajnoczi @ 2019-08-19 13:09 UTC (permalink / raw)
To: Stefano Garzarella
Cc: netdev, Dexuan Cui, Jorgen Hansen, David S. Miller, Vishnu Dasa,
K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Sasha Levin
In-Reply-To: <20190606100912.f2zuzrkgmdyxckog@steredhat>
[-- Attachment #1: Type: text/plain, Size: 4778 bytes --]
On Thu, Jun 06, 2019 at 12:09:12PM +0200, Stefano Garzarella wrote:
>
> Hi all,
> this is a v2 of a proposal addressing the comments made by Dexuan, Stefan,
> and Jorgen.
>
> v1: https://www.spinics.net/lists/netdev/msg570274.html
>
>
>
> We can define two types of transport that we have to handle at the same time
> (e.g. in a nested VM we would have both types of transport running together):
>
> - 'host->guest' transport, it runs in the host and it is used to communicate
> with the guests of a specific hypervisor (KVM, VMWare or Hyper-V). It also
> runs in the guest who has nested guests, to communicate with them.
>
> [Phase 2]
> We can support multiple 'host->guest' transport running at the same time,
> but on x86 only one hypervisor uses VMX at any given time.
>
> - 'guest->host' transport, it runs in the guest and it is used to communicate
> with the host.
>
>
> The main goal is to find a way to decide what transport use in these cases:
> 1. connect() / sendto()
>
> a. use the 'host->guest' transport, if the destination is the guest
> (dest_cid > VMADDR_CID_HOST).
>
> [Phase 2]
> In order to support multiple 'host->guest' transports running at the same
> time, we should assign CIDs uniquely across all transports. In this way,
> a packet generated by the host side will get directed to the appropriate
> transport based on the CID.
>
> b. use the 'guest->host' transport, if the destination is the host or the
> hypervisor.
> (dest_cid == VMADDR_CID_HOST || dest_cid == VMADDR_CID_HYPERVISOR)
>
>
> 2. listen() / recvfrom()
>
> a. use the 'host->guest' transport, if the socket is bound to
> VMADDR_CID_HOST, or it is bound to VMADDR_CID_ANY and there is no
> 'guest->host' transport.
> We could also define a new VMADDR_CID_LISTEN_FROM_GUEST in order to
> address this case.
>
> [Phase 2]
> We can support network namespaces to create independent AF_VSOCK
> addressing domains:
> - could be used to partition VMs between hypervisors or at a finer
> granularity;
> - could be used to isolate host applications from guest applications
> using the same ports with CID_ANY;
>
> b. use the 'guest->host' transport, if the socket is bound to local CID
> different from the VMADDR_CID_HOST (guest CID get with
> IOCTL_VM_SOCKETS_GET_LOCAL_CID), or it is bound to VMADDR_CID_ANY (to be
> backward compatible).
> Also in this case, we could define a new VMADDR_CID_LISTEN_FROM_HOST.
>
> c. shared port space between transports
> For incoming requests or packets, we should be able to choose which
> transport use, looking at the 'port' requested.
>
> - stream sockets already support shared port space between transports
> (one port can be assigned to only one transport)
>
> [Phase 2]
> - datagram sockets will support it, but for now VMCI transport is the
> default transport for any host side datagram socket (KVM and Hyper-V
> do not yet support datagrams sockets)
>
> We will make the loading of af_vsock.ko independent of the transports to
> allow to:
> - create a AF_VSOCK socket without any loaded transports;
> - listen on a socket (e.g. bound to VMADDR_CID_ANY) without any loaded
> transports;
>
> Hopefully, we could move MODULE_ALIAS_NETPROTO(PF_VSOCK) from the
> vmci_transport.ko to the af_vsock.ko.
> [Jorgen will check if this will impact the existing VMware products]
>
> Notes:
> - For Hyper-V sockets, the host can only be Windows. No changes should
> be required on the Windows host to support the changes on this proposal.
>
> - Communication between guests are not allowed on any transports, so we can
> drop packets sent from a guest to another guest (dest_cid >
> VMADDR_CID_HOST) if the 'host->guest' transport is not available.
>
> - [Phase 2] tag used to identify things that can be done at a later stage,
> but that should be taken into account during this design.
>
> - Namespace support will be developed in [Phase 2] or in a separate project.
>
>
>
> Comments and suggestions are welcome.
> I'll be on PTO for next two weeks, so sorry in advance if I'll answer later.
>
> If we agree on this proposal, when I get back, I'll start working on the code
> to get a first PATCH RFC.
Stefano,
I've reviewed your proposal and it looks good for solving nested
virtualization.
The tricky implementation details will be supporting listen sockets,
especially with VMADDR_CID_ANY so they can be accessed from both
transports.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* [PATCH v3] tun: fix use-after-free when register netdev failed
From: Yang Yingliang @ 2019-08-19 13:31 UTC (permalink / raw)
To: netdev
Cc: jasowang, eric.dumazet, xiyou.wangcong, davem, yangyingliang,
weiyongjun1
I got a UAF repport in tun driver when doing fuzzy test:
[ 466.269490] ==================================================================
[ 466.271792] BUG: KASAN: use-after-free in tun_chr_read_iter+0x2ca/0x2d0
[ 466.271806] Read of size 8 at addr ffff888372139250 by task tun-test/2699
[ 466.271810]
[ 466.271824] CPU: 1 PID: 2699 Comm: tun-test Not tainted 5.3.0-rc1-00001-g5a9433db2614-dirty #427
[ 466.271833] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
[ 466.271838] Call Trace:
[ 466.271858] dump_stack+0xca/0x13e
[ 466.271871] ? tun_chr_read_iter+0x2ca/0x2d0
[ 466.271890] print_address_description+0x79/0x440
[ 466.271906] ? vprintk_func+0x5e/0xf0
[ 466.271920] ? tun_chr_read_iter+0x2ca/0x2d0
[ 466.271935] __kasan_report+0x15c/0x1df
[ 466.271958] ? tun_chr_read_iter+0x2ca/0x2d0
[ 466.271976] kasan_report+0xe/0x20
[ 466.271987] tun_chr_read_iter+0x2ca/0x2d0
[ 466.272013] do_iter_readv_writev+0x4b7/0x740
[ 466.272032] ? default_llseek+0x2d0/0x2d0
[ 466.272072] do_iter_read+0x1c5/0x5e0
[ 466.272110] vfs_readv+0x108/0x180
[ 466.299007] ? compat_rw_copy_check_uvector+0x440/0x440
[ 466.299020] ? fsnotify+0x888/0xd50
[ 466.299040] ? __fsnotify_parent+0xd0/0x350
[ 466.299064] ? fsnotify_first_mark+0x1e0/0x1e0
[ 466.304548] ? vfs_write+0x264/0x510
[ 466.304569] ? ksys_write+0x101/0x210
[ 466.304591] ? do_preadv+0x116/0x1a0
[ 466.304609] do_preadv+0x116/0x1a0
[ 466.309829] do_syscall_64+0xc8/0x600
[ 466.309849] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 466.309861] RIP: 0033:0x4560f9
[ 466.309875] Code: 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
[ 466.309889] RSP: 002b:00007ffffa5166e8 EFLAGS: 00000206 ORIG_RAX: 0000000000000127
[ 466.322992] RAX: ffffffffffffffda RBX: 0000000000400460 RCX: 00000000004560f9
[ 466.322999] RDX: 0000000000000003 RSI: 00000000200008c0 RDI: 0000000000000003
[ 466.323007] RBP: 00007ffffa516700 R08: 0000000000000004 R09: 0000000000000000
[ 466.323014] R10: 0000000000000000 R11: 0000000000000206 R12: 000000000040cb10
[ 466.323021] R13: 0000000000000000 R14: 00000000006d7018 R15: 0000000000000000
[ 466.323057]
[ 466.323064] Allocated by task 2605:
[ 466.335165] save_stack+0x19/0x80
[ 466.336240] __kasan_kmalloc.constprop.8+0xa0/0xd0
[ 466.337755] kmem_cache_alloc+0xe8/0x320
[ 466.339050] getname_flags+0xca/0x560
[ 466.340229] user_path_at_empty+0x2c/0x50
[ 466.341508] vfs_statx+0xe6/0x190
[ 466.342619] __do_sys_newstat+0x81/0x100
[ 466.343908] do_syscall_64+0xc8/0x600
[ 466.345303] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 466.347034]
[ 466.347517] Freed by task 2605:
[ 466.348471] save_stack+0x19/0x80
[ 466.349476] __kasan_slab_free+0x12e/0x180
[ 466.350726] kmem_cache_free+0xc8/0x430
[ 466.351874] putname+0xe2/0x120
[ 466.352921] filename_lookup+0x257/0x3e0
[ 466.354319] vfs_statx+0xe6/0x190
[ 466.355498] __do_sys_newstat+0x81/0x100
[ 466.356889] do_syscall_64+0xc8/0x600
[ 466.358037] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 466.359567]
[ 466.360050] The buggy address belongs to the object at ffff888372139100
[ 466.360050] which belongs to the cache names_cache of size 4096
[ 466.363735] The buggy address is located 336 bytes inside of
[ 466.363735] 4096-byte region [ffff888372139100, ffff88837213a100)
[ 466.367179] The buggy address belongs to the page:
[ 466.368604] page:ffffea000dc84e00 refcount:1 mapcount:0 mapping:ffff8883df1b4f00 index:0x0 compound_mapcount: 0
[ 466.371582] flags: 0x2fffff80010200(slab|head)
[ 466.372910] raw: 002fffff80010200 dead000000000100 dead000000000122 ffff8883df1b4f00
[ 466.375209] raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000
[ 466.377778] page dumped because: kasan: bad access detected
[ 466.379730]
[ 466.380288] Memory state around the buggy address:
[ 466.381844] ffff888372139100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 466.384009] ffff888372139180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 466.386131] >ffff888372139200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 466.388257] ^
[ 466.390234] ffff888372139280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 466.392512] ffff888372139300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 466.394667] ==================================================================
tun_chr_read_iter() accessed the memory which freed by free_netdev()
called by tun_set_iff():
CPUA CPUB
tun_set_iff()
alloc_netdev_mqs()
tun_attach()
tun_chr_read_iter()
tun_get()
register_netdevice() <-- inject error
tun_detach_all()
synchronize_net()
tun_do_read()
tun_ring_recv()
schedule()
free_netdev()
netdev_freemem()
tun_put()
dev_put() <-- UAF
Call netif_set_real_num_t/rx_queues() before register_netdevice().
Call tun_attach() after register_netdevice() to make sure tfile->tun
is not published until the netdevice is registered. So the read/write
thread can not use the tun pointer that may freed by free_netdev().
(The tun and dev pointer are allocated by alloc_netdev_mqs(), they can
be freed by netdev_freemem().)
---
Changes in v3:
- call netif_set_real_num_t/rx_queues() before register_netdevice()
Changes in v2:
- add a param in tun_set_real_num_queues()
- move tun_set_real_num_queues() out of tun_attach()
- call tun_set_real_num_queues() before register_netdevice()
- call tun_attach() after register_netdevice()
---
Fixes: eb0fb363f920 ("tuntap: attach queue 0 before registering netdevice")
Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/tun.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index db16d7a13e00..07d1e945385a 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -2828,14 +2828,19 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
(ifr->ifr_flags & TUN_FEATURES);
INIT_LIST_HEAD(&tun->disabled);
- err = tun_attach(tun, file, false, ifr->ifr_flags & IFF_NAPI,
- ifr->ifr_flags & IFF_NAPI_FRAGS);
- if (err < 0)
- goto err_free_flow;
+
+ netif_set_real_num_tx_queues(tun->dev, 1);
+ netif_set_real_num_rx_queues(tun->dev, 1);
err = register_netdevice(tun->dev);
if (err < 0)
- goto err_detach;
+ /* register_netdevice() already called tun_free_netdev() */
+ goto err_free_dev;
+
+ err = tun_attach(tun, file, false, ifr->ifr_flags & IFF_NAPI,
+ ifr->ifr_flags & IFF_NAPI_FRAGS);
+ if (err < 0)
+ goto err_unregister;
}
netif_carrier_on(tun->dev);
@@ -2851,14 +2856,10 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
strcpy(ifr->ifr_name, tun->dev->name);
return 0;
-err_detach:
- tun_detach_all(dev);
- /* register_netdevice() already called tun_free_netdev() */
- goto err_free_dev;
+err_unregister:
+ unregister_netdevice(dev);
+ return err;
-err_free_flow:
- tun_flow_uninit(tun);
- security_tun_dev_free_security(tun->security);
err_free_stat:
free_percpu(tun->pcpu_stats);
err_free_dev:
--
2.17.1
^ permalink raw reply related
* Re: [PATCH net-next 1/3] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver
From: Andrew Lunn @ 2019-08-19 13:17 UTC (permalink / raw)
To: Hubert Feurstein
Cc: netdev, linux-kernel, Richard Cochran, Florian Fainelli,
Heiner Kallweit, Vladimir Oltean, David S. Miller
In-Reply-To: <20190816163157.25314-2-h.feurstein@gmail.com>
On Fri, Aug 16, 2019 at 06:31:55PM +0200, Hubert Feurstein wrote:
> In order to improve the synchronisation precision of phc2sys (from
> the linuxptp project) for devices like switches which are attached
> to the MDIO bus, it is necessary the get the system timestamps as
> close as possible to the access which causes the PTP timestamp
> register to be snapshotted in the switch hardware. Usually this is
> triggered by an MDIO write access, the snapshotted timestamp is then
> transferred by several MDIO reads.
>
> This patch adds the required infrastructure to solve the problem described
> above.
>
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> ---
> drivers/net/phy/mdio_bus.c | 105 +++++++++++++++++++++++++++++++++++++
> include/linux/mdio.h | 7 +++
> include/linux/phy.h | 25 +++++++++
> 3 files changed, 137 insertions(+)
>
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index bd04fe762056..167a21f267fa 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -34,6 +34,7 @@
> #include <linux/phy.h>
> #include <linux/io.h>
> #include <linux/uaccess.h>
> +#include <linux/ptp_clock_kernel.h>
>
> #define CREATE_TRACE_POINTS
> #include <trace/events/mdio.h>
> @@ -697,6 +698,110 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
> }
> EXPORT_SYMBOL(mdiobus_write);
>
> +/**
> + * __mdiobus_write_sts - Unlocked version of the mdiobus_write_sts function
> + * @bus: the mii_bus struct
> + * @addr: the phy address
> + * @regnum: register number to write
> + * @val: value to write to @regnum
> + * @sts: the ptp system timestamp
> + *
> + * Write a MDIO bus register and request the MDIO bus driver to take the
> + * system timestamps when sts-pointer is valid. When the bus driver doesn't
> + * support this, the timestamps are taken in this function instead.
> + *
> + * In order to improve the synchronisation precision of phc2sys (from
> + * the linuxptp project) for devices like switches which are attached
> + * to the MDIO bus, it is necessary the get the system timestamps as
> + * close as possible to the access which causes the PTP timestamp
> + * register to be snapshotted in the switch hardware. Usually this is
> + * triggered by an MDIO write access, the snapshotted timestamp is then
> + * transferred by several MDIO reads.
> + *
> + * Caller must hold the mdio bus lock.
> + *
> + * NOTE: MUST NOT be called from interrupt context.
> + */
> +int __mdiobus_write_sts(struct mii_bus *bus, int addr, u32 regnum, u16 val,
> + struct ptp_system_timestamp *sts)
> +{
> + int retval;
> +
> + WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
> +
> + if (!bus->ptp_sts_supported)
> + ptp_read_system_prets(sts);
How expensive is ptp_read_system_prets()? My original suggestion was
to unconditionally call it here, and then let the driver overwrite it
if it supports finer grained time stamping. MDIO is slow, so as long
as ptp_read_system_prets() is not too expensive, i prefer KISS.
Andrew
^ permalink raw reply
* Re: [PATCH net-next 1/3] net/tls: use RCU protection on icsk->icsk_ulp_data
From: Davide Caratti @ 2019-08-19 13:23 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Boris Pismenny, John Fastabend, Dave Watson, Aviad Yehezkel,
David S. Miller, netdev
In-Reply-To: <20190815143216.45f6da44@cakuba.netronome.com>
On Thu, 2019-08-15 at 14:32 -0700, Jakub Kicinski wrote:
> On Thu, 15 Aug 2019 18:00:42 +0200, Davide Caratti wrote:
> > From: Jakub Kicinski <jakub.kicinski@netronome.com>
> >
> > We need to make sure context does not get freed while diag
> > code is interrogating it. Free struct tls_context with
> > kfree_rcu().
> >
> > We add the __rcu annotation directly in icsk, and cast it
> > away in the datapath accessor. Presumably all ULPs will
> > do a similar thing.
> >
> > Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
hello Jakub,
> > @@ -251,14 +251,31 @@ static void tls_write_space(struct sock *sk)
> > ctx->sk_write_space(sk);
> > }
> >
> > -void tls_ctx_free(struct tls_context *ctx)
> > +/**
> > + * tls_ctx_free() - free TLS ULP context
> > + * @sk: socket to with @ctx is attached
> > + * @ctx: TLS context structure
> > + *
> > + * Free TLS context. If @sk is %NULL caller guarantees that the socket
> > + * to which @ctx was attached has no outstanding references.
> > + */
> > +void tls_ctx_free(struct sock *sk, struct tls_context *ctx)
> > {
> > + struct inet_connection_sock *icsk;
> > +
> > if (!ctx)
> > return;
> >
> > memzero_explicit(&ctx->crypto_send, sizeof(ctx->crypto_send));
> > memzero_explicit(&ctx->crypto_recv, sizeof(ctx->crypto_recv));
> > - kfree(ctx);
> > +
> > + if (sk) {
> > + icsk = inet_csk(sk);
> > + rcu_assign_pointer(icsk->icsk_ulp_data, NULL);
>
> Now that we kind of want to set the icsk_ulp_data to NULL under the
> callback_lock I think we should let the callers do it.
Ok, I will fix this in series v2.
> >
> > @@ -649,8 +666,8 @@ static void tls_hw_sk_destruct(struct sock *sk)
> >
> > ctx->sk_destruct(sk);
> > /* Free ctx */
> > - tls_ctx_free(ctx);
> > - icsk->icsk_ulp_data = NULL;
> > + tls_ctx_free(sk, ctx);
> > + rcu_assign_pointer(icsk->icsk_ulp_data, NULL);
>
> Let's reorder the assignment before the free.
Ok, I will fix this in series v2.
thanks!
--
davide
^ permalink raw reply
* Re: [PATCH net-next 2/3] net: dsa: mv88e6xxx: extend PTP gettime function to read system clock
From: Andrew Lunn @ 2019-08-19 13:27 UTC (permalink / raw)
To: Hubert Feurstein
Cc: netdev, linux-kernel, Richard Cochran, Vivien Didelot,
Florian Fainelli, Vladimir Oltean, David S. Miller
In-Reply-To: <20190816163157.25314-3-h.feurstein@gmail.com>
> @@ -45,7 +45,8 @@ static int mv88e6xxx_smi_direct_write(struct mv88e6xxx_chip *chip,
> {
> int ret;
>
> - ret = mdiobus_write_nested(chip->bus, dev, reg, data);
> + ret = mdiobus_write_sts_nested(chip->bus, dev, reg, data,
> + chip->ptp_sts);
> if (ret < 0)
> return ret;
>
Please also make a similar change to mv88e6xxx_smi_indirect_write().
The last write in that function should be timestamped.
Vivien, please could you think about these changes with respect to
RMU. We probably want to skip the RMU in this case, so we get slow but
uniform jitter, vs fast and unpredictable jitter from using the RMU.
Thanks
Andrew
^ permalink raw reply
* Re: [PATCH net-next 2/3] tcp: ulp: add functions to dump ulp-specific information
From: Davide Caratti @ 2019-08-19 13:32 UTC (permalink / raw)
To: Jakub Kicinski, Eric Dumazet
Cc: Boris Pismenny, John Fastabend, Dave Watson, Aviad Yehezkel,
David S. Miller, netdev
In-Reply-To: <20190815143810.3a190c81@cakuba.netronome.com>
On Thu, 2019-08-15 at 14:38 -0700, Jakub Kicinski wrote:
> On Thu, 15 Aug 2019 20:46:01 +0200, Eric Dumazet wrote:
hello Eric and Jakub, thanks a lot for looking at this.
> > On 8/15/19 6:00 PM, Davide Caratti wrote:
> >
> > >
> > > + if (net_admin) {
> > > + const struct tcp_ulp_ops *ulp_ops;
> > > +
> > > + rcu_read_lock();
> > > + ulp_ops = icsk->icsk_ulp_ops;
> > > + if (ulp_ops)
> > > + err = tcp_diag_put_ulp(skb, sk, ulp_ops);
> > > + rcu_read_unlock();
> > > + if (err)
> > > + return err;
> > > + }
> > > return 0;
> >
> > Why is rcu_read_lock() and rcu_read_unlock() used at all ?
> >
> > icsk->icsk_ulp_ops does not seem to be rcu protected ?
> >
> > If this was, then an rcu_dereference() would be appropriate.
>
> Indeed it's ulp_data not ulp_ops that are protected.
the goal is to protect execution of 'ss -tni' against concurrent removal
of tls.ko module, similarly to what was done in inet_sk_diag_fill() when
INET_DIAG_CONG is requested [1]. But after reading more carefully, the
assignment of ulp_ops needs to be:
ulp_ops = READ_ONCE(icsk->icsk_ulp_ops);
which I lost in internal reviews, with some additional explanatory
comment. Ok if I correct the above hunk with READ_ONCE() and add a
comment?
> Davide, perhaps we could push the RCU lock into tls_get_info(), after all?
It depends on whether concurrent dump / module removal is an issue for TCP
ULPs, like it was for congestion control schemes [1]. Any advice?
> And tls_context has to use rcu_deference there, as Eric points out,
> plus we should probably NULL-check it.
yes, it makes sense, for patch 3/3, in the assignment of 'ctx'. Instead of
calling tls_get_ctx() in tls_get_info() I will do
ctx = rcu_dereference(inet_csk(sk)->icsk_ulp_data);
and let it return 0 in case of NULL ctx (as it doesn't look like a faulty
situation). Ok?
--
davide
[1] see:
commit 521f1cf1dbb9d5ad858dca5dc75d1b45f64b6589
Author: Eric Dumazet <edumazet@google.com>
Date: Thu Apr 16 18:10:35 2015 -0700
inet_diag: fix access to tcp cc information
^ permalink raw reply
* Re: [PATCH net-next 1/3] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver
From: Vladimir Oltean @ 2019-08-19 13:34 UTC (permalink / raw)
To: Andrew Lunn
Cc: Hubert Feurstein, netdev, lkml, Richard Cochran, Florian Fainelli,
Heiner Kallweit, David S. Miller
In-Reply-To: <20190819131736.GD8981@lunn.ch>
Hi Andrew,
On Mon, 19 Aug 2019 at 16:17, Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Fri, Aug 16, 2019 at 06:31:55PM +0200, Hubert Feurstein wrote:
> > In order to improve the synchronisation precision of phc2sys (from
> > the linuxptp project) for devices like switches which are attached
> > to the MDIO bus, it is necessary the get the system timestamps as
> > close as possible to the access which causes the PTP timestamp
> > register to be snapshotted in the switch hardware. Usually this is
> > triggered by an MDIO write access, the snapshotted timestamp is then
> > transferred by several MDIO reads.
> >
> > This patch adds the required infrastructure to solve the problem described
> > above.
> >
> > Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> > ---
> > drivers/net/phy/mdio_bus.c | 105 +++++++++++++++++++++++++++++++++++++
> > include/linux/mdio.h | 7 +++
> > include/linux/phy.h | 25 +++++++++
> > 3 files changed, 137 insertions(+)
> >
> > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> > index bd04fe762056..167a21f267fa 100644
> > --- a/drivers/net/phy/mdio_bus.c
> > +++ b/drivers/net/phy/mdio_bus.c
> > @@ -34,6 +34,7 @@
> > #include <linux/phy.h>
> > #include <linux/io.h>
> > #include <linux/uaccess.h>
> > +#include <linux/ptp_clock_kernel.h>
> >
> > #define CREATE_TRACE_POINTS
> > #include <trace/events/mdio.h>
> > @@ -697,6 +698,110 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
> > }
> > EXPORT_SYMBOL(mdiobus_write);
> >
> > +/**
> > + * __mdiobus_write_sts - Unlocked version of the mdiobus_write_sts function
> > + * @bus: the mii_bus struct
> > + * @addr: the phy address
> > + * @regnum: register number to write
> > + * @val: value to write to @regnum
> > + * @sts: the ptp system timestamp
> > + *
> > + * Write a MDIO bus register and request the MDIO bus driver to take the
> > + * system timestamps when sts-pointer is valid. When the bus driver doesn't
> > + * support this, the timestamps are taken in this function instead.
> > + *
> > + * In order to improve the synchronisation precision of phc2sys (from
> > + * the linuxptp project) for devices like switches which are attached
> > + * to the MDIO bus, it is necessary the get the system timestamps as
> > + * close as possible to the access which causes the PTP timestamp
> > + * register to be snapshotted in the switch hardware. Usually this is
> > + * triggered by an MDIO write access, the snapshotted timestamp is then
> > + * transferred by several MDIO reads.
> > + *
> > + * Caller must hold the mdio bus lock.
> > + *
> > + * NOTE: MUST NOT be called from interrupt context.
> > + */
> > +int __mdiobus_write_sts(struct mii_bus *bus, int addr, u32 regnum, u16 val,
> > + struct ptp_system_timestamp *sts)
> > +{
> > + int retval;
> > +
> > + WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
> > +
> > + if (!bus->ptp_sts_supported)
> > + ptp_read_system_prets(sts);
>
> How expensive is ptp_read_system_prets()? My original suggestion was
> to unconditionally call it here, and then let the driver overwrite it
> if it supports finer grained time stamping. MDIO is slow, so as long
> as ptp_read_system_prets() is not too expensive, i prefer KISS.
>
> Andrew
While that works for the pre_ts, it doesn't work for the post_ts (the
MDIO bus core will unconditionally overwrite the system timestamp from
the driver).
Unless you're suggesting to keep the pre_ts unconditional and the
post_ts under the "if" condition, which is a bit odd.
According to my tests with a scope (measuring the width between SPI
transfers with and without the ptp_read_system_*ts calls), two calls
to ktime_get_real_ts64 amount to around 750 ns on a 1200 MHz Cortex A7
core, or around 90 clock cycles.
Regards,
-Vladimir
^ permalink raw reply
* Re: [PATCH net-next 1/3] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver
From: Vladimir Oltean @ 2019-08-19 13:37 UTC (permalink / raw)
To: Andrew Lunn
Cc: Hubert Feurstein, netdev, lkml, Richard Cochran, Florian Fainelli,
Heiner Kallweit, David S. Miller
In-Reply-To: <CA+h21hou0v0gPURO3VHe2Ur1-heXnuueN5F92iDLffArB+1d5w@mail.gmail.com>
On Mon, 19 Aug 2019 at 16:34, Vladimir Oltean <olteanv@gmail.com> wrote:
>
> Hi Andrew,
>
> On Mon, 19 Aug 2019 at 16:17, Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Fri, Aug 16, 2019 at 06:31:55PM +0200, Hubert Feurstein wrote:
> > > In order to improve the synchronisation precision of phc2sys (from
> > > the linuxptp project) for devices like switches which are attached
> > > to the MDIO bus, it is necessary the get the system timestamps as
> > > close as possible to the access which causes the PTP timestamp
> > > register to be snapshotted in the switch hardware. Usually this is
> > > triggered by an MDIO write access, the snapshotted timestamp is then
> > > transferred by several MDIO reads.
> > >
> > > This patch adds the required infrastructure to solve the problem described
> > > above.
> > >
> > > Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> > > ---
> > > drivers/net/phy/mdio_bus.c | 105 +++++++++++++++++++++++++++++++++++++
> > > include/linux/mdio.h | 7 +++
> > > include/linux/phy.h | 25 +++++++++
> > > 3 files changed, 137 insertions(+)
> > >
> > > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> > > index bd04fe762056..167a21f267fa 100644
> > > --- a/drivers/net/phy/mdio_bus.c
> > > +++ b/drivers/net/phy/mdio_bus.c
> > > @@ -34,6 +34,7 @@
> > > #include <linux/phy.h>
> > > #include <linux/io.h>
> > > #include <linux/uaccess.h>
> > > +#include <linux/ptp_clock_kernel.h>
> > >
> > > #define CREATE_TRACE_POINTS
> > > #include <trace/events/mdio.h>
> > > @@ -697,6 +698,110 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
> > > }
> > > EXPORT_SYMBOL(mdiobus_write);
> > >
> > > +/**
> > > + * __mdiobus_write_sts - Unlocked version of the mdiobus_write_sts function
> > > + * @bus: the mii_bus struct
> > > + * @addr: the phy address
> > > + * @regnum: register number to write
> > > + * @val: value to write to @regnum
> > > + * @sts: the ptp system timestamp
> > > + *
> > > + * Write a MDIO bus register and request the MDIO bus driver to take the
> > > + * system timestamps when sts-pointer is valid. When the bus driver doesn't
> > > + * support this, the timestamps are taken in this function instead.
> > > + *
> > > + * In order to improve the synchronisation precision of phc2sys (from
> > > + * the linuxptp project) for devices like switches which are attached
> > > + * to the MDIO bus, it is necessary the get the system timestamps as
> > > + * close as possible to the access which causes the PTP timestamp
> > > + * register to be snapshotted in the switch hardware. Usually this is
> > > + * triggered by an MDIO write access, the snapshotted timestamp is then
> > > + * transferred by several MDIO reads.
> > > + *
> > > + * Caller must hold the mdio bus lock.
> > > + *
> > > + * NOTE: MUST NOT be called from interrupt context.
> > > + */
> > > +int __mdiobus_write_sts(struct mii_bus *bus, int addr, u32 regnum, u16 val,
> > > + struct ptp_system_timestamp *sts)
> > > +{
> > > + int retval;
> > > +
> > > + WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
> > > +
> > > + if (!bus->ptp_sts_supported)
> > > + ptp_read_system_prets(sts);
> >
> > How expensive is ptp_read_system_prets()? My original suggestion was
> > to unconditionally call it here, and then let the driver overwrite it
> > if it supports finer grained time stamping. MDIO is slow, so as long
> > as ptp_read_system_prets() is not too expensive, i prefer KISS.
> >
> > Andrew
>
> While that works for the pre_ts, it doesn't work for the post_ts (the
> MDIO bus core will unconditionally overwrite the system timestamp from
> the driver).
> Unless you're suggesting to keep the pre_ts unconditional and the
> post_ts under the "if" condition, which is a bit odd.
> According to my tests with a scope (measuring the width between SPI
> transfers with and without the ptp_read_system_*ts calls), two calls
> to ktime_get_real_ts64 amount to around 750 ns on a 1200 MHz Cortex A7
> core, or around 90 clock cycles.
900 clock cycles, my bad.
>
> Regards,
> -Vladimir
^ permalink raw reply
* Re: [PATCH net-next 4/6] net: dsa: mv88e6xxx: do not change STP state on port disabling
From: Andrew Lunn @ 2019-08-19 13:40 UTC (permalink / raw)
To: Vivien Didelot; +Cc: netdev, marek.behun, davem, f.fainelli
In-Reply-To: <20190818173548.19631-5-vivien.didelot@gmail.com>
On Sun, Aug 18, 2019 at 01:35:46PM -0400, Vivien Didelot wrote:
> When disabling a port, that is not for the driver to decide what to
> do with the STP state. This is already handled by the DSA layer.
Hi Vivien
Putting the port into STP disabled state is how you actually disable
it, for the mv88e6xxx. So this is not really about STP, it is about
powering off the port. Maybe a comment is needed, rather than removing
the code?
Thanks
Andrew
^ permalink raw reply
* [PATCH net-next 0/8] sctp: support per endpoint auth and asconf flags
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
This patchset mostly does 3 things:
1. add per endpint asconf flag and use asconf flag properly
and add SCTP_ASCONF_SUPPORTED sockopt.
2. use auth flag properly and add SCTP_AUTH_SUPPORTED sockopt.
3. remove the 'global feature switch' to discard chunks.
Xin Long (8):
sctp: add asconf_enable in struct sctp_endpoint
sctp: not set peer.asconf_capable in sctp_association_init
sctp: check asoc peer.asconf_capable before processing asconf
sctp: add SCTP_ASCONF_SUPPORTED sockopt
sctp: use ep and asoc auth_enable properly
sctp: add sctp_auth_init and sctp_auth_free
sctp: add SCTP_AUTH_SUPPORTED sockopt
sctp: remove net sctp.x_enable working as a global switch
include/net/sctp/auth.h | 2 +
include/net/sctp/structs.h | 1 +
include/uapi/linux/sctp.h | 2 +
net/sctp/associola.c | 9 --
net/sctp/auth.c | 101 ++++++++++++++++++--
net/sctp/endpointola.c | 64 ++-----------
net/sctp/sm_make_chunk.c | 18 ++--
net/sctp/sm_statefuns.c | 6 +-
net/sctp/sm_statetable.c | 28 +++---
net/sctp/socket.c | 230 ++++++++++++++++++++++++++++++++++++++-------
10 files changed, 325 insertions(+), 136 deletions(-)
--
2.1.0
^ permalink raw reply
* [PATCH net-next 1/8] sctp: add asconf_enable in struct sctp_endpoint
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
This patch is to make addip/asconf flag per endpoint,
and its value is initialized by the per netns flag,
net->sctp.addip_enable.
It also replaces the checks of net->sctp.addip_enable
with ep->asconf_enable in some places.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/net/sctp/structs.h | 1 +
net/sctp/endpointola.c | 3 ++-
net/sctp/sm_make_chunk.c | 18 +++++++++---------
net/sctp/socket.c | 17 +++++++----------
4 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ba5c4f6..daac1ef 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1325,6 +1325,7 @@ struct sctp_endpoint {
__u8 auth_enable:1,
intl_enable:1,
prsctp_enable:1,
+ asconf_enable:1,
reconf_enable:1;
__u8 strreset_enable;
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 69cebb2..38b8d7c 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -52,6 +52,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
if (!ep->digest)
return NULL;
+ ep->asconf_enable = net->sctp.addip_enable;
ep->auth_enable = net->sctp.auth_enable;
if (ep->auth_enable) {
/* Allocate space for HMACS and CHUNKS authentication
@@ -86,7 +87,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
/* If the Add-IP functionality is enabled, we must
* authenticate, ASCONF and ASCONF-ACK chunks
*/
- if (net->sctp.addip_enable) {
+ if (ep->asconf_enable) {
auth_chunks->chunks[0] = SCTP_CID_ASCONF;
auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK;
auth_chunks->param_hdr.length =
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 36bd8a6e..338278f 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -207,7 +207,6 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
const struct sctp_bind_addr *bp,
gfp_t gfp, int vparam_len)
{
- struct net *net = sock_net(asoc->base.sk);
struct sctp_supported_ext_param ext_param;
struct sctp_adaptation_ind_param aiparam;
struct sctp_paramhdr *auth_chunks = NULL;
@@ -255,7 +254,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
* the ASCONF,the ASCONF-ACK, and the AUTH chunks in its INIT and
* INIT-ACK parameters.
*/
- if (net->sctp.addip_enable) {
+ if (asoc->ep->asconf_enable) {
extensions[num_ext] = SCTP_CID_ASCONF;
extensions[num_ext+1] = SCTP_CID_ASCONF_ACK;
num_ext += 2;
@@ -1964,7 +1963,9 @@ static int sctp_process_hn_param(const struct sctp_association *asoc,
return 0;
}
-static int sctp_verify_ext_param(struct net *net, union sctp_params param)
+static int sctp_verify_ext_param(struct net *net,
+ const struct sctp_endpoint *ep,
+ union sctp_params param)
{
__u16 num_ext = ntohs(param.p->length) - sizeof(struct sctp_paramhdr);
int have_asconf = 0;
@@ -1991,7 +1992,7 @@ static int sctp_verify_ext_param(struct net *net, union sctp_params param)
if (net->sctp.addip_noauth)
return 1;
- if (net->sctp.addip_enable && !have_auth && have_asconf)
+ if (ep->asconf_enable && !have_auth && have_asconf)
return 0;
return 1;
@@ -2001,7 +2002,6 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
union sctp_params param)
{
__u16 num_ext = ntohs(param.p->length) - sizeof(struct sctp_paramhdr);
- struct net *net = sock_net(asoc->base.sk);
int i;
for (i = 0; i < num_ext; i++) {
@@ -2023,7 +2023,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
break;
case SCTP_CID_ASCONF:
case SCTP_CID_ASCONF_ACK:
- if (net->sctp.addip_enable)
+ if (asoc->ep->asconf_enable)
asoc->peer.asconf_capable = 1;
break;
case SCTP_CID_I_DATA:
@@ -2145,12 +2145,12 @@ static enum sctp_ierror sctp_verify_param(struct net *net,
break;
case SCTP_PARAM_SUPPORTED_EXT:
- if (!sctp_verify_ext_param(net, param))
+ if (!sctp_verify_ext_param(net, ep, param))
return SCTP_IERROR_ABORT;
break;
case SCTP_PARAM_SET_PRIMARY:
- if (net->sctp.addip_enable)
+ if (ep->asconf_enable)
break;
goto fallthrough;
@@ -2605,7 +2605,7 @@ static int sctp_process_param(struct sctp_association *asoc,
break;
case SCTP_PARAM_SET_PRIMARY:
- if (!net->sctp.addip_enable)
+ if (!ep->asconf_enable)
goto fall_through;
addr_param = param.v + sizeof(struct sctp_addip_param);
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 12503e1..559793f 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -524,7 +524,6 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
struct sockaddr *addrs,
int addrcnt)
{
- struct net *net = sock_net(sk);
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *asoc;
@@ -539,12 +538,12 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
int i;
int retval = 0;
- if (!net->sctp.addip_enable)
- return retval;
-
sp = sctp_sk(sk);
ep = sp->ep;
+ if (!ep->asconf_enable)
+ return retval;
+
pr_debug("%s: sk:%p, addrs:%p, addrcnt:%d\n",
__func__, sk, addrs, addrcnt);
@@ -727,7 +726,6 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
struct sockaddr *addrs,
int addrcnt)
{
- struct net *net = sock_net(sk);
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *asoc;
@@ -743,12 +741,12 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
int stored = 0;
chunk = NULL;
- if (!net->sctp.addip_enable)
- return retval;
-
sp = sctp_sk(sk);
ep = sp->ep;
+ if (!ep->asconf_enable)
+ return retval;
+
pr_debug("%s: sk:%p, addrs:%p, addrcnt:%d\n",
__func__, sk, addrs, addrcnt);
@@ -3330,7 +3328,6 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optval,
unsigned int optlen)
{
- struct net *net = sock_net(sk);
struct sctp_sock *sp;
struct sctp_association *asoc = NULL;
struct sctp_setpeerprim prim;
@@ -3340,7 +3337,7 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva
sp = sctp_sk(sk);
- if (!net->sctp.addip_enable)
+ if (!sp->ep->asconf_enable)
return -EPERM;
if (optlen != sizeof(struct sctp_setpeerprim))
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 2/8] sctp: not set peer.asconf_capable in sctp_association_init
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
asoc->peer.asconf_capable is to be set during handshake, and its
value should be initialized to 0. net->sctp.addip_noauth will be
checked in sctp_process_init when processing INIT_ACK on client
and COOKIE_ECHO on server.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/associola.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 5010cce..d2ffc9a 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -54,7 +54,6 @@ static struct sctp_association *sctp_association_init(
const struct sock *sk,
enum sctp_scope scope, gfp_t gfp)
{
- struct net *net = sock_net(sk);
struct sctp_sock *sp;
struct sctp_paramhdr *p;
int i;
@@ -214,14 +213,6 @@ static struct sctp_association *sctp_association_init(
asoc->peer.sack_needed = 1;
asoc->peer.sack_generation = 1;
- /* Assume that the peer will tell us if he recognizes ASCONF
- * as part of INIT exchange.
- * The sctp_addip_noauth option is there for backward compatibility
- * and will revert old behavior.
- */
- if (net->sctp.addip_noauth)
- asoc->peer.asconf_capable = 1;
-
/* Create an input queue. */
sctp_inq_init(&asoc->base.inqueue);
sctp_inq_set_th_handler(&asoc->base.inqueue, sctp_assoc_bh_rcv);
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 3/8] sctp: check asoc peer.asconf_capable before processing asconf
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
asconf chunks should be dropped when the asoc doesn't support
asconf feature.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/sm_statefuns.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 2c244b2..0c21c52 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3721,7 +3721,8 @@ enum sctp_disposition sctp_sf_do_asconf(struct net *net,
* is received unauthenticated it MUST be silently discarded as
* described in [I-D.ietf-tsvwg-sctp-auth].
*/
- if (!net->sctp.addip_noauth && !chunk->auth)
+ if (!asoc->peer.asconf_capable ||
+ (!net->sctp.addip_noauth && !chunk->auth))
return sctp_sf_discard_chunk(net, ep, asoc, type, arg,
commands);
@@ -3863,7 +3864,8 @@ enum sctp_disposition sctp_sf_do_asconf_ack(struct net *net,
* is received unauthenticated it MUST be silently discarded as
* described in [I-D.ietf-tsvwg-sctp-auth].
*/
- if (!net->sctp.addip_noauth && !asconf_ack->auth)
+ if (!asoc->peer.asconf_capable ||
+ (!net->sctp.addip_noauth && !asconf_ack->auth))
return sctp_sf_discard_chunk(net, ep, asoc, type, arg,
commands);
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 4/8] sctp: add SCTP_ASCONF_SUPPORTED sockopt
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
SCTP_ASCONF_SUPPORTED sockopt is used to set enpoint's asconf
flag. With this feature, each endpoint will have its own flag
for its future asoc's asconf_capable, instead of netns asconf
flag.
Note that when both ep's asconf_enable and auth_enable are
enabled, SCTP_CID_ASCONF and SCTP_CID_ASCONF_ACK should be
added into auth_chunk_list.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/uapi/linux/sctp.h | 1 +
net/sctp/socket.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index b8f2c4d..9b9b82d 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -134,6 +134,7 @@ typedef __s32 sctp_assoc_t;
#define SCTP_INTERLEAVING_SUPPORTED 125
#define SCTP_SENDMSG_CONNECT 126
#define SCTP_EVENT 127
+#define SCTP_ASCONF_SUPPORTED 128
/* PR-SCTP policies */
#define SCTP_PR_SCTP_NONE 0x0000
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 559793f..b21a707 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4496,6 +4496,42 @@ static int sctp_setsockopt_event(struct sock *sk, char __user *optval,
return retval;
}
+static int sctp_setsockopt_asconf_supported(struct sock *sk,
+ char __user *optval,
+ unsigned int optlen)
+{
+ struct sctp_assoc_value params;
+ struct sctp_association *asoc;
+ struct sctp_endpoint *ep;
+ int retval = -EINVAL;
+
+ if (optlen != sizeof(params))
+ goto out;
+
+ if (copy_from_user(¶ms, optval, optlen)) {
+ retval = -EFAULT;
+ goto out;
+ }
+
+ asoc = sctp_id2assoc(sk, params.assoc_id);
+ if (!asoc && params.assoc_id != SCTP_FUTURE_ASSOC &&
+ sctp_style(sk, UDP))
+ goto out;
+
+ ep = sctp_sk(sk)->ep;
+ ep->asconf_enable = !!params.assoc_value;
+
+ if (ep->asconf_enable && ep->auth_enable) {
+ sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF);
+ sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF_ACK);
+ }
+
+ retval = 0;
+
+out:
+ return retval;
+}
+
/* API 6.2 setsockopt(), getsockopt()
*
* Applications use setsockopt() and getsockopt() to set or retrieve
@@ -4696,6 +4732,9 @@ static int sctp_setsockopt(struct sock *sk, int level, int optname,
case SCTP_EVENT:
retval = sctp_setsockopt_event(sk, optval, optlen);
break;
+ case SCTP_ASCONF_SUPPORTED:
+ retval = sctp_setsockopt_asconf_supported(sk, optval, optlen);
+ break;
default:
retval = -ENOPROTOOPT;
break;
@@ -7675,6 +7714,45 @@ static int sctp_getsockopt_event(struct sock *sk, int len, char __user *optval,
return 0;
}
+static int sctp_getsockopt_asconf_supported(struct sock *sk, int len,
+ char __user *optval,
+ int __user *optlen)
+{
+ struct sctp_assoc_value params;
+ struct sctp_association *asoc;
+ int retval = -EFAULT;
+
+ if (len < sizeof(params)) {
+ retval = -EINVAL;
+ goto out;
+ }
+
+ len = sizeof(params);
+ if (copy_from_user(¶ms, optval, len))
+ goto out;
+
+ asoc = sctp_id2assoc(sk, params.assoc_id);
+ if (!asoc && params.assoc_id != SCTP_FUTURE_ASSOC &&
+ sctp_style(sk, UDP)) {
+ retval = -EINVAL;
+ goto out;
+ }
+
+ params.assoc_value = asoc ? asoc->peer.asconf_capable
+ : sctp_sk(sk)->ep->asconf_enable;
+
+ if (put_user(len, optlen))
+ goto out;
+
+ if (copy_to_user(optval, ¶ms, len))
+ goto out;
+
+ retval = 0;
+
+out:
+ return retval;
+}
+
static int sctp_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
@@ -7876,6 +7954,10 @@ static int sctp_getsockopt(struct sock *sk, int level, int optname,
case SCTP_EVENT:
retval = sctp_getsockopt_event(sk, len, optval, optlen);
break;
+ case SCTP_ASCONF_SUPPORTED:
+ retval = sctp_getsockopt_asconf_supported(sk, len, optval,
+ optlen);
+ break;
default:
retval = -ENOPROTOOPT;
break;
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 5/8] sctp: use ep and asoc auth_enable properly
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
sctp has per endpoint auth flag and per asoc auth flag, and
the asoc one should be checked when coming to asoc and the
endpoint one should be checked when coming to endpoint.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/auth.c | 32 +++++++++++++++++++++++++-------
net/sctp/socket.c | 45 +++++++++++++++++++--------------------------
2 files changed, 44 insertions(+), 33 deletions(-)
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index de4c78d..61b0090 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -389,7 +389,7 @@ int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp)
/* If we don't support AUTH, or peer is not capable
* we don't need to do anything.
*/
- if (!asoc->ep->auth_enable || !asoc->peer.auth_capable)
+ if (!asoc->peer.auth_capable)
return 0;
/* If the key_id is non-zero and we couldn't find an
@@ -675,7 +675,7 @@ int sctp_auth_send_cid(enum sctp_cid chunk, const struct sctp_association *asoc)
if (!asoc)
return 0;
- if (!asoc->ep->auth_enable || !asoc->peer.auth_capable)
+ if (!asoc->peer.auth_capable)
return 0;
return __sctp_auth_cid(chunk, asoc->peer.peer_chunks);
@@ -687,7 +687,7 @@ int sctp_auth_recv_cid(enum sctp_cid chunk, const struct sctp_association *asoc)
if (!asoc)
return 0;
- if (!asoc->ep->auth_enable)
+ if (!asoc->peer.auth_capable)
return 0;
return __sctp_auth_cid(chunk,
@@ -831,10 +831,15 @@ int sctp_auth_set_key(struct sctp_endpoint *ep,
/* Try to find the given key id to see if
* we are doing a replace, or adding a new key
*/
- if (asoc)
+ if (asoc) {
+ if (!asoc->peer.auth_capable)
+ return -EACCES;
sh_keys = &asoc->endpoint_shared_keys;
- else
+ } else {
+ if (!ep->auth_enable)
+ return -EACCES;
sh_keys = &ep->endpoint_shared_keys;
+ }
key_for_each(shkey, sh_keys) {
if (shkey->key_id == auth_key->sca_keynumber) {
@@ -875,10 +880,15 @@ int sctp_auth_set_active_key(struct sctp_endpoint *ep,
int found = 0;
/* The key identifier MUST correst to an existing key */
- if (asoc)
+ if (asoc) {
+ if (!asoc->peer.auth_capable)
+ return -EACCES;
sh_keys = &asoc->endpoint_shared_keys;
- else
+ } else {
+ if (!ep->auth_enable)
+ return -EACCES;
sh_keys = &ep->endpoint_shared_keys;
+ }
key_for_each(key, sh_keys) {
if (key->key_id == key_id) {
@@ -911,11 +921,15 @@ int sctp_auth_del_key_id(struct sctp_endpoint *ep,
* The key identifier MUST correst to an existing key
*/
if (asoc) {
+ if (!asoc->peer.auth_capable)
+ return -EACCES;
if (asoc->active_key_id == key_id)
return -EINVAL;
sh_keys = &asoc->endpoint_shared_keys;
} else {
+ if (!ep->auth_enable)
+ return -EACCES;
if (ep->active_key_id == key_id)
return -EINVAL;
@@ -950,11 +964,15 @@ int sctp_auth_deact_key_id(struct sctp_endpoint *ep,
* The key identifier MUST correst to an existing key
*/
if (asoc) {
+ if (!asoc->peer.auth_capable)
+ return -EACCES;
if (asoc->active_key_id == key_id)
return -EINVAL;
sh_keys = &asoc->endpoint_shared_keys;
} else {
+ if (!ep->auth_enable)
+ return -EACCES;
if (ep->active_key_id == key_id)
return -EINVAL;
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index b21a707..dcde8d9 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3687,9 +3687,6 @@ static int sctp_setsockopt_auth_key(struct sock *sk,
struct sctp_association *asoc;
int ret = -EINVAL;
- if (!ep->auth_enable)
- return -EACCES;
-
if (optlen <= sizeof(struct sctp_authkey))
return -EINVAL;
/* authkey->sca_keylength is u16, so optlen can't be bigger than
@@ -3756,9 +3753,6 @@ static int sctp_setsockopt_active_key(struct sock *sk,
struct sctp_authkeyid val;
int ret = 0;
- if (!ep->auth_enable)
- return -EACCES;
-
if (optlen != sizeof(struct sctp_authkeyid))
return -EINVAL;
if (copy_from_user(&val, optval, optlen))
@@ -3810,9 +3804,6 @@ static int sctp_setsockopt_del_key(struct sock *sk,
struct sctp_authkeyid val;
int ret = 0;
- if (!ep->auth_enable)
- return -EACCES;
-
if (optlen != sizeof(struct sctp_authkeyid))
return -EINVAL;
if (copy_from_user(&val, optval, optlen))
@@ -3863,9 +3854,6 @@ static int sctp_setsockopt_deactivate_key(struct sock *sk, char __user *optval,
struct sctp_authkeyid val;
int ret = 0;
- if (!ep->auth_enable)
- return -EACCES;
-
if (optlen != sizeof(struct sctp_authkeyid))
return -EINVAL;
if (copy_from_user(&val, optval, optlen))
@@ -6872,9 +6860,6 @@ static int sctp_getsockopt_active_key(struct sock *sk, int len,
struct sctp_authkeyid val;
struct sctp_association *asoc;
- if (!ep->auth_enable)
- return -EACCES;
-
if (len < sizeof(struct sctp_authkeyid))
return -EINVAL;
@@ -6886,10 +6871,15 @@ static int sctp_getsockopt_active_key(struct sock *sk, int len,
if (!asoc && val.scact_assoc_id && sctp_style(sk, UDP))
return -EINVAL;
- if (asoc)
+ if (asoc) {
+ if (!asoc->peer.auth_capable)
+ return -EACCES;
val.scact_keynumber = asoc->active_key_id;
- else
+ } else {
+ if (!ep->auth_enable)
+ return -EACCES;
val.scact_keynumber = ep->active_key_id;
+ }
if (put_user(len, optlen))
return -EFAULT;
@@ -6902,7 +6892,6 @@ static int sctp_getsockopt_active_key(struct sock *sk, int len,
static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
char __user *optval, int __user *optlen)
{
- struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_authchunks __user *p = (void __user *)optval;
struct sctp_authchunks val;
struct sctp_association *asoc;
@@ -6910,9 +6899,6 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
u32 num_chunks = 0;
char __user *to;
- if (!ep->auth_enable)
- return -EACCES;
-
if (len < sizeof(struct sctp_authchunks))
return -EINVAL;
@@ -6924,6 +6910,9 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
if (!asoc)
return -EINVAL;
+ if (!asoc->peer.auth_capable)
+ return -EACCES;
+
ch = asoc->peer.peer_chunks;
if (!ch)
goto num;
@@ -6955,9 +6944,6 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
u32 num_chunks = 0;
char __user *to;
- if (!ep->auth_enable)
- return -EACCES;
-
if (len < sizeof(struct sctp_authchunks))
return -EINVAL;
@@ -6970,8 +6956,15 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
sctp_style(sk, UDP))
return -EINVAL;
- ch = asoc ? (struct sctp_chunks_param *)asoc->c.auth_chunks
- : ep->auth_chunk_list;
+ if (asoc) {
+ if (!asoc->peer.auth_capable)
+ return -EACCES;
+ ch = (struct sctp_chunks_param *)asoc->c.auth_chunks;
+ } else {
+ if (!ep->auth_enable)
+ return -EACCES;
+ ch = ep->auth_chunk_list;
+ }
if (!ch)
goto num;
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 6/8] sctp: add sctp_auth_init and sctp_auth_free
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
This patch is to factor out sctp_auth_init and sctp_auth_free
functions, and sctp_auth_init will also be used in the next
patch for SCTP_AUTH_SUPPORTED sockopt.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/net/sctp/auth.h | 2 ++
net/sctp/auth.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++
net/sctp/endpointola.c | 61 ++++---------------------------------------
3 files changed, 76 insertions(+), 56 deletions(-)
diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h
index caaae2d..d4b3b2d 100644
--- a/include/net/sctp/auth.h
+++ b/include/net/sctp/auth.h
@@ -107,5 +107,7 @@ int sctp_auth_del_key_id(struct sctp_endpoint *ep,
struct sctp_association *asoc, __u16 key_id);
int sctp_auth_deact_key_id(struct sctp_endpoint *ep,
struct sctp_association *asoc, __u16 key_id);
+int sctp_auth_init(struct sctp_endpoint *ep, gfp_t gfp);
+void sctp_auth_free(struct sctp_endpoint *ep);
#endif
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index 61b0090..4278764 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -1007,3 +1007,72 @@ int sctp_auth_deact_key_id(struct sctp_endpoint *ep,
return 0;
}
+
+int sctp_auth_init(struct sctp_endpoint *ep, gfp_t gfp)
+{
+ int err = -ENOMEM;
+
+ /* Allocate space for HMACS and CHUNKS authentication
+ * variables. There are arrays that we encode directly
+ * into parameters to make the rest of the operations easier.
+ */
+ if (!ep->auth_hmacs_list) {
+ struct sctp_hmac_algo_param *auth_hmacs;
+
+ auth_hmacs = kzalloc(struct_size(auth_hmacs, hmac_ids,
+ SCTP_AUTH_NUM_HMACS), gfp);
+ if (!auth_hmacs)
+ goto nomem;
+ /* Initialize the HMACS parameter.
+ * SCTP-AUTH: Section 3.3
+ * Every endpoint supporting SCTP chunk authentication MUST
+ * support the HMAC based on the SHA-1 algorithm.
+ */
+ auth_hmacs->param_hdr.type = SCTP_PARAM_HMAC_ALGO;
+ auth_hmacs->param_hdr.length =
+ htons(sizeof(struct sctp_paramhdr) + 2);
+ auth_hmacs->hmac_ids[0] = htons(SCTP_AUTH_HMAC_ID_SHA1);
+ ep->auth_hmacs_list = auth_hmacs;
+ }
+
+ if (!ep->auth_chunk_list) {
+ struct sctp_chunks_param *auth_chunks;
+
+ auth_chunks = kzalloc(sizeof(*auth_chunks) +
+ SCTP_NUM_CHUNK_TYPES, gfp);
+ if (!auth_chunks)
+ goto nomem;
+ /* Initialize the CHUNKS parameter */
+ auth_chunks->param_hdr.type = SCTP_PARAM_CHUNKS;
+ auth_chunks->param_hdr.length =
+ htons(sizeof(struct sctp_paramhdr));
+ ep->auth_chunk_list = auth_chunks;
+ }
+
+ /* Allocate and initialize transorms arrays for supported
+ * HMACs.
+ */
+ err = sctp_auth_init_hmacs(ep, gfp);
+ if (err)
+ goto nomem;
+
+ return 0;
+
+nomem:
+ /* Free all allocations */
+ kfree(ep->auth_hmacs_list);
+ kfree(ep->auth_chunk_list);
+ ep->auth_hmacs_list = NULL;
+ ep->auth_chunk_list = NULL;
+ return err;
+}
+
+void sctp_auth_free(struct sctp_endpoint *ep)
+{
+ kfree(ep->auth_hmacs_list);
+ kfree(ep->auth_chunk_list);
+ ep->auth_hmacs_list = NULL;
+ ep->auth_chunk_list = NULL;
+ sctp_auth_destroy_hmacs(ep->auth_hmacs);
+ ep->auth_hmacs = NULL;
+}
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 38b8d7c..75a407d 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -43,10 +43,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
gfp_t gfp)
{
struct net *net = sock_net(sk);
- struct sctp_hmac_algo_param *auth_hmacs = NULL;
- struct sctp_chunks_param *auth_chunks = NULL;
struct sctp_shared_key *null_key;
- int err;
ep->digest = kzalloc(SCTP_SIGNATURE_SIZE, gfp);
if (!ep->digest)
@@ -55,51 +52,12 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
ep->asconf_enable = net->sctp.addip_enable;
ep->auth_enable = net->sctp.auth_enable;
if (ep->auth_enable) {
- /* Allocate space for HMACS and CHUNKS authentication
- * variables. There are arrays that we encode directly
- * into parameters to make the rest of the operations easier.
- */
- auth_hmacs = kzalloc(struct_size(auth_hmacs, hmac_ids,
- SCTP_AUTH_NUM_HMACS), gfp);
- if (!auth_hmacs)
- goto nomem;
-
- auth_chunks = kzalloc(sizeof(*auth_chunks) +
- SCTP_NUM_CHUNK_TYPES, gfp);
- if (!auth_chunks)
+ if (sctp_auth_init(ep, gfp))
goto nomem;
-
- /* Initialize the HMACS parameter.
- * SCTP-AUTH: Section 3.3
- * Every endpoint supporting SCTP chunk authentication MUST
- * support the HMAC based on the SHA-1 algorithm.
- */
- auth_hmacs->param_hdr.type = SCTP_PARAM_HMAC_ALGO;
- auth_hmacs->param_hdr.length =
- htons(sizeof(struct sctp_paramhdr) + 2);
- auth_hmacs->hmac_ids[0] = htons(SCTP_AUTH_HMAC_ID_SHA1);
-
- /* Initialize the CHUNKS parameter */
- auth_chunks->param_hdr.type = SCTP_PARAM_CHUNKS;
- auth_chunks->param_hdr.length =
- htons(sizeof(struct sctp_paramhdr));
-
- /* If the Add-IP functionality is enabled, we must
- * authenticate, ASCONF and ASCONF-ACK chunks
- */
if (ep->asconf_enable) {
- auth_chunks->chunks[0] = SCTP_CID_ASCONF;
- auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK;
- auth_chunks->param_hdr.length =
- htons(sizeof(struct sctp_paramhdr) + 2);
+ sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF);
+ sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF_ACK);
}
-
- /* Allocate and initialize transorms arrays for supported
- * HMACs.
- */
- err = sctp_auth_init_hmacs(ep, gfp);
- if (err)
- goto nomem;
}
/* Initialize the base structure. */
@@ -146,8 +104,6 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
/* Add the null key to the endpoint shared keys list and
* set the hmcas and chunks pointers.
*/
- ep->auth_hmacs_list = auth_hmacs;
- ep->auth_chunk_list = auth_chunks;
ep->prsctp_enable = net->sctp.prsctp_enable;
ep->reconf_enable = net->sctp.reconf_enable;
@@ -158,11 +114,8 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
return ep;
nomem_shkey:
- sctp_auth_destroy_hmacs(ep->auth_hmacs);
+ sctp_auth_free(ep);
nomem:
- /* Free all allocations */
- kfree(auth_hmacs);
- kfree(auth_chunks);
kfree(ep->digest);
return NULL;
@@ -245,11 +198,7 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep)
* chunks and hmacs arrays that were allocated
*/
sctp_auth_destroy_keys(&ep->endpoint_shared_keys);
- kfree(ep->auth_hmacs_list);
- kfree(ep->auth_chunk_list);
-
- /* AUTH - Free any allocated HMAC transform containers */
- sctp_auth_destroy_hmacs(ep->auth_hmacs);
+ sctp_auth_free(ep);
/* Cleanup. */
sctp_inq_free(&ep->base.inqueue);
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 7/8] sctp: add SCTP_AUTH_SUPPORTED sockopt
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
SCTP_AUTH_SUPPORTED sockopt is used to set enpoint's auth
flag. With this feature, each endpoint will have its own
flag for its future asoc's auth_capable, instead of netns
auth flag.
Note that when both ep's auth_enable is enabled, endpoint
auth related data should be initialized. If asconf_enable
is also set, SCTP_CID_ASCONF/SCTP_CID_ASCONF_ACK should
be added into auth_chunk_list.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/uapi/linux/sctp.h | 1 +
net/sctp/socket.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index 9b9b82d..62527ac 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -135,6 +135,7 @@ typedef __s32 sctp_assoc_t;
#define SCTP_SENDMSG_CONNECT 126
#define SCTP_EVENT 127
#define SCTP_ASCONF_SUPPORTED 128
+#define SCTP_AUTH_SUPPORTED 129
/* PR-SCTP policies */
#define SCTP_PR_SCTP_NONE 0x0000
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index dcde8d9..82bc252 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4520,6 +4520,46 @@ static int sctp_setsockopt_asconf_supported(struct sock *sk,
return retval;
}
+static int sctp_setsockopt_auth_supported(struct sock *sk,
+ char __user *optval,
+ unsigned int optlen)
+{
+ struct sctp_assoc_value params;
+ struct sctp_association *asoc;
+ struct sctp_endpoint *ep;
+ int retval = -EINVAL;
+
+ if (optlen != sizeof(params))
+ goto out;
+
+ if (copy_from_user(¶ms, optval, optlen)) {
+ retval = -EFAULT;
+ goto out;
+ }
+
+ asoc = sctp_id2assoc(sk, params.assoc_id);
+ if (!asoc && params.assoc_id != SCTP_FUTURE_ASSOC &&
+ sctp_style(sk, UDP))
+ goto out;
+
+ ep = sctp_sk(sk)->ep;
+ if (params.assoc_value) {
+ retval = sctp_auth_init(ep, GFP_KERNEL);
+ if (retval)
+ goto out;
+ if (ep->asconf_enable) {
+ sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF);
+ sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF_ACK);
+ }
+ }
+
+ ep->auth_enable = !!params.assoc_value;
+ retval = 0;
+
+out:
+ return retval;
+}
+
/* API 6.2 setsockopt(), getsockopt()
*
* Applications use setsockopt() and getsockopt() to set or retrieve
@@ -4723,6 +4763,9 @@ static int sctp_setsockopt(struct sock *sk, int level, int optname,
case SCTP_ASCONF_SUPPORTED:
retval = sctp_setsockopt_asconf_supported(sk, optval, optlen);
break;
+ case SCTP_AUTH_SUPPORTED:
+ retval = sctp_setsockopt_auth_supported(sk, optval, optlen);
+ break;
default:
retval = -ENOPROTOOPT;
break;
@@ -7746,6 +7789,45 @@ static int sctp_getsockopt_asconf_supported(struct sock *sk, int len,
return retval;
}
+static int sctp_getsockopt_auth_supported(struct sock *sk, int len,
+ char __user *optval,
+ int __user *optlen)
+{
+ struct sctp_assoc_value params;
+ struct sctp_association *asoc;
+ int retval = -EFAULT;
+
+ if (len < sizeof(params)) {
+ retval = -EINVAL;
+ goto out;
+ }
+
+ len = sizeof(params);
+ if (copy_from_user(¶ms, optval, len))
+ goto out;
+
+ asoc = sctp_id2assoc(sk, params.assoc_id);
+ if (!asoc && params.assoc_id != SCTP_FUTURE_ASSOC &&
+ sctp_style(sk, UDP)) {
+ retval = -EINVAL;
+ goto out;
+ }
+
+ params.assoc_value = asoc ? asoc->peer.auth_capable
+ : sctp_sk(sk)->ep->auth_enable;
+
+ if (put_user(len, optlen))
+ goto out;
+
+ if (copy_to_user(optval, ¶ms, len))
+ goto out;
+
+ retval = 0;
+
+out:
+ return retval;
+}
+
static int sctp_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
@@ -7951,6 +8033,10 @@ static int sctp_getsockopt(struct sock *sk, int level, int optname,
retval = sctp_getsockopt_asconf_supported(sk, len, optval,
optlen);
break;
+ case SCTP_AUTH_SUPPORTED:
+ retval = sctp_getsockopt_auth_supported(sk, len, optval,
+ optlen);
+ break;
default:
retval = -ENOPROTOOPT;
break;
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 8/8] sctp: remove net sctp.x_enable working as a global switch
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>
The netns sctp feature flags shouldn't work as a global switch,
which is mostly like a firewall/netfilter's job. Also, it will
break asoc as it discard or accept chunks incorrectly when net
sctp.x_enable is changed after the asoc is created.
Since each type of chunk's processing function will check the
corresp asoc's feature flag, this 'global switch' should be
removed, and net sctp.x_enable will only work as the default
feature flags for the future sctp sockets/endpoints.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/sm_statetable.c | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c
index 61ed9c6..88ea87f 100644
--- a/net/sctp/sm_statetable.c
+++ b/net/sctp/sm_statetable.c
@@ -976,26 +976,22 @@ static const struct sctp_sm_table_entry *sctp_chunk_event_lookup(
if (cid <= SCTP_CID_BASE_MAX)
return &chunk_event_table[cid][state];
- if (net->sctp.prsctp_enable) {
- if (cid == SCTP_CID_FWD_TSN || cid == SCTP_CID_I_FWD_TSN)
- return &prsctp_chunk_event_table[0][state];
- }
+ switch ((u16)cid) {
+ case SCTP_CID_FWD_TSN:
+ case SCTP_CID_I_FWD_TSN:
+ return &prsctp_chunk_event_table[0][state];
- if (net->sctp.addip_enable) {
- if (cid == SCTP_CID_ASCONF)
- return &addip_chunk_event_table[0][state];
+ case SCTP_CID_ASCONF:
+ return &addip_chunk_event_table[0][state];
- if (cid == SCTP_CID_ASCONF_ACK)
- return &addip_chunk_event_table[1][state];
- }
+ case SCTP_CID_ASCONF_ACK:
+ return &addip_chunk_event_table[1][state];
- if (net->sctp.reconf_enable)
- if (cid == SCTP_CID_RECONF)
- return &reconf_chunk_event_table[0][state];
+ case SCTP_CID_RECONF:
+ return &reconf_chunk_event_table[0][state];
- if (net->sctp.auth_enable) {
- if (cid == SCTP_CID_AUTH)
- return &auth_chunk_event_table[0][state];
+ case SCTP_CID_AUTH:
+ return &auth_chunk_event_table[0][state];
}
return &chunk_event_table_unknown[state];
--
2.1.0
^ permalink raw reply related
* Re: [PATCH net-next 4/8] sctp: add SCTP_ASCONF_SUPPORTED sockopt
From: Marcelo Ricardo Leitner @ 2019-08-19 14:30 UTC (permalink / raw)
To: Xin Long; +Cc: network dev, linux-sctp, Neil Horman, davem
In-Reply-To: <f4fbfa28a7fd2ed85f0fc66ddcbd4249e6e7b487.1566223325.git.lucien.xin@gmail.com>
On Mon, Aug 19, 2019 at 10:02:46PM +0800, Xin Long wrote:
> SCTP_ASCONF_SUPPORTED sockopt is used to set enpoint's asconf
> flag. With this feature, each endpoint will have its own flag
> for its future asoc's asconf_capable, instead of netns asconf
> flag.
Is this backed by a RFC? If yes, it should be noted in the patch
description.
Quickly searching, I found only FreeBSD references.
^ permalink raw reply
* Re: [PATCH bpf-next v4 07/11] mlx5e: modify driver for handling offsets
From: Maxim Mikityanskiy @ 2019-08-19 14:36 UTC (permalink / raw)
To: Kevin Laatz
Cc: netdev@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
bjorn.topel@intel.com, magnus.karlsson@intel.com,
jakub.kicinski@netronome.com, jonathan.lemon@gmail.com,
Saeed Mahameed, stephen@networkplumber.org,
bruce.richardson@intel.com, ciara.loftus@intel.com,
bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org
In-Reply-To: <bc0c966f-4cda-4d48-566f-f5bff376210a@mellanox.com>
On 2019-08-01 13:05, Maxim Mikityanskiy wrote:
> On 2019-07-30 11:53, Kevin Laatz wrote:
>> With the addition of the unaligned chunks option, we need to make sure we
>> handle the offsets accordingly based on the mode we are currently running
>> in. This patch modifies the driver to appropriately mask the address for
>> each case.
>>
>> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
>
> Please note that this patch doesn't actually add the support for the new
> feature, because the validation checks in mlx5e_rx_get_linear_frag_sz
> and mlx5e_validate_xsk_param need to be relaxed. Currently the frame
> size of PAGE_SIZE is forced, and the fragment size is increased to
> PAGE_SIZE in case of XDP (including XSK).
>
> After making the changes required to permit frame sizes smaller than
> PAGE_SIZE, our Striding RQ feature will be used in a way we haven't used
> it before, so we need to verify with the hardware team that this usage
> is legitimate.
After discussing it internally, we found a way to support unaligned XSK
with Striding RQ, and the hardware is compatible with this way. I have
performed some testing, and it looks working.
Your patch only adds support for the new handle format to our driver,
and I've made another patch that actually enables the new feature (makes
mlx5e accept frame sizes different from PAGE_SIZE). It's currently on
internal review.
Please also don't forget to fix the s/_handle_/_adjust_/ typo.
>> ---
>> v3:
>> - Use new helper function to handle offset
>>
>> v4:
>> - fixed headroom addition to handle. Using xsk_umem_adjust_headroom()
>> now.
>> ---
>> drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 8 ++++++--
>> drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 3 ++-
>> 2 files changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
>> b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
>> index b0b982cf69bb..d5245893d2c8 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
>> @@ -122,6 +122,7 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct
>> mlx5e_dma_info *di,
>> void *va, u16 *rx_headroom, u32 *len, bool xsk)
>> {
>> struct bpf_prog *prog = READ_ONCE(rq->xdp_prog);
>> + struct xdp_umem *umem = rq->umem;
>> struct xdp_buff xdp;
>> u32 act;
>> int err;
>> @@ -138,8 +139,11 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct
>> mlx5e_dma_info *di,
>> xdp.rxq = &rq->xdp_rxq;
>> act = bpf_prog_run_xdp(prog, &xdp);
>> - if (xsk)
>> - xdp.handle += xdp.data - xdp.data_hard_start;
>> + if (xsk) {
>> + u64 off = xdp.data - xdp.data_hard_start;
>> +
>> + xdp.handle = xsk_umem_handle_offset(umem, xdp.handle, off);
>> + }
>> switch (act) {
>> case XDP_PASS:
>> *rx_headroom = xdp.data - xdp.data_hard_start;
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
>> b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
>> index 6a55573ec8f2..7c49a66d28c9 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
>> @@ -24,7 +24,8 @@ int mlx5e_xsk_page_alloc_umem(struct mlx5e_rq *rq,
>> if (!xsk_umem_peek_addr_rq(umem, &handle))
>> return -ENOMEM;
>> - dma_info->xsk.handle = handle + rq->buff.umem_headroom;
>> + dma_info->xsk.handle = xsk_umem_adjust_offset(umem, handle,
>> + rq->buff.umem_headroom);
>> dma_info->xsk.data = xdp_umem_get_data(umem, dma_info->xsk.handle);
>> /* No need to add headroom to the DMA address. In striding RQ
>> case, we
>>
>
^ permalink raw reply
* Re: [PATCH net-next 4/8] sctp: add SCTP_ASCONF_SUPPORTED sockopt
From: Xin Long @ 2019-08-19 14:43 UTC (permalink / raw)
To: Marcelo Ricardo Leitner; +Cc: network dev, linux-sctp, Neil Horman, davem
In-Reply-To: <20190819143052.GC2870@localhost.localdomain>
On Mon, Aug 19, 2019 at 10:30 PM Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
>
> On Mon, Aug 19, 2019 at 10:02:46PM +0800, Xin Long wrote:
> > SCTP_ASCONF_SUPPORTED sockopt is used to set enpoint's asconf
> > flag. With this feature, each endpoint will have its own flag
> > for its future asoc's asconf_capable, instead of netns asconf
> > flag.
>
> Is this backed by a RFC? If yes, it should be noted in the patch
> description.
> Quickly searching, I found only FreeBSD references.
RFC doesn't define this sockopt clearly, unlike prsctp and reconfig,
not sure why.
but BSD supports it, so does some userland SCTP.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox