lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQKkCLaj=roayH=Mjiiqz_svdf1tsC3OE4EC0E=mAD+L1A@mail.gmail.com>
Date: Tue, 17 Dec 2024 16:07:16 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Sebastian Sewior <bigeasy@...utronix.de>, Network Development <netdev@...r.kernel.org>, 
	Jakub Kicinski <kuba@...nel.org>, Steffen Klassert <steffen.klassert@...unet.com>
Subject: xfrm in RT

Hi,

Looks like xfrm isn't friendly to PREEMPT_RT.
xfrm_input_state_lookup() is doing:

int cpu = get_cpu();
...
spin_lock_bh(&net->xfrm.xfrm_state_lock);

which causes a splat:

[  811.175877] BUG: sleeping function called from invalid context at
kernel/locking/spinlock_rt.c:48
[  811.175884] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid:
13785, name: ping
[  811.175886] preempt_count: 1, expected: 0
[  811.175888] RCU nest depth: 6, expected: 6
[  811.175889] INFO: lockdep is turned off.
[  811.175891] CPU: 9 UID: 0 PID: 13785 Comm: ping Tainted: G        W
 O       6.13.0-rc3-00067-ga3c4183875d5-dirty #2
[  811.175900] Call Trace:
[  811.175901]  <TASK>
[  811.175902]  dump_stack_lvl+0x80/0x90
[  811.175911]  __might_resched+0x2c7/0x480
[  811.175917]  rt_spin_lock+0xbd/0x240
[  811.175922]  ? rtlock_slowlock_locked+0x4cd0/0x4cd0
[  811.175925]  xfrm_input_state_lookup+0x643/0xa10
[  811.175930]  ? skb_ext_add+0x4dd/0x690
[  811.175934]  ? xfrm_state_lookup+0x1d0/0x1d0
[  811.175937]  ? __asan_memset+0x23/0x40
[  811.175940]  xfrm_input+0x78c/0x5820
[  811.175943]  ? reacquire_held_locks+0x4d0/0x4d0
[  811.175948]  ? bpf_prog_1a2cc90c3a1be51f_xfrm_get_state+0x31/0x7d
[  811.175978]  ? fib_multipath_hash+0x1190/0x1190
[  811.175983]  ? cls_bpf_classify+0x4ad/0x12e0
[  811.176001]  ? xfrm_rcv_cb+0x270/0x270
[  811.176001]  ? raw_rcv+0x6c0/0x6c0
[  811.176001]  xfrm4_esp_rcv+0x80/0x190
[  811.176001]  ip_protocol_deliver_rcu+0x82/0x300
[  811.176001]  ip_local_deliver_finish+0x29b/0x420
[  811.176001]  ip_local_deliver+0x17b/0x400
[  811.176001]  ? ip_local_deliver_finish+0x420/0x420
[  811.176001]  ? lock_release+0x464/0x640
[  811.176001]  ? rcu_read_lock_held+0xe/0x50
[  811.176001]  ? ip_rcv_finish_core.isra.0+0x943/0x1f80
[  811.176001]  ip_sublist_rcv_finish+0x84/0x230
[  811.176001]  ip_sublist_rcv+0x3e2/0x780
[  811.176001]  ? ip_rcv_finish_core.isra.0+0x1f80/0x1f80
[  811.176001]  ? do_xdp_generic+0xbf0/0xbf0
[  811.176001]  ? xfrm_state_lookup+0xf5/0x1d0
[  811.176001]  ? ip_sublist_rcv+0x780/0x780
[  811.176001]  ip_list_rcv+0x266/0x360

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ