Skip to contentSkip to conversation

Dovetail: x86 compat syscall handling broken, missing backport in 6.6 and 6.1

DISCUSSION Applied Florian Bezdeka 3 participants 3 messages Aug 26, 2024 – Sep 3, 2024

lore
Share & tools
lore
#0 lore raw

Hi Philippe,

I think we found a missing backport in dovetail 6.6 and 6.1. Jan observed the kernel splat below while testing.

I'm quite sure that [1] should be applied to both mentioned branches.

Best regards,
Florian

[1] https://source.denx.de/Xenomai/linux-dovetail/-/commit/1e530a1a8bbd0b7db0e660d27a3c191a649718c3

The log:

[  101.430669] ------------[ cut here ]------------
[  101.430671] WARNING: CPU: 3 PID: 1944 at ../kernel/irq/pipeline.c:303 inband_irq_enable+0x10/0x20
[  101.430676] Modules linked in: 9p netfs rt_e1000 rt_e1000_new rtnet
[  101.430682] CPU: 3 PID: 1944 Comm: ld-linux.so.2 Not tainted 6.6.41+ #105
[  101.430684] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
[  101.430684] IRQ stage: Linux
[  101.430685] RIP: 0010:inband_irq_enable+0x10/0x20
[  101.430687] Code: cc cc 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 80 3d aa 3f 2b 03 00 75 09 9c 58 f6 c4 02 75 02 <0f> 0b e9 69 ff ff ff 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
[  101.430688] RSP: 0000:ffffc900016d7f28 EFLAGS: 00010046
[  101.430690] RAX: 0000000000000046 RBX: ffffc900016d7f58 RCX: 0000000000000814
[  101.430691] RDX: 0000000000000000 RSI: ffffffff829c5c37 RDI: ffffffff8299b2c4
[  101.430692] RBP: ffffc900016d7f48 R08: 0000000000000001 R09: 0000000000000001
[  101.430693] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000002d
[  101.430694] R13: ffffffffffffffda R14: 0000000000000000 R15: 0000000000000000
[  101.430695] FS:  0000000000000000(0000) GS:ffff88803ed80000(0000) knlGS:0000000000000000
[  101.430697] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
[  101.430698] CR2: 00000000f7f79270 CR3: 0000000006676004 CR4: 0000000000370ee0
[  101.430699] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  101.430700] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  101.430701] Call Trace:
[  101.430702]  <TASK>
[  101.430704]  ? __warn+0x81/0x180
[  101.430707]  ? inband_irq_enable+0x10/0x20
[  101.430710]  ? report_bug+0x10b/0x200
[  101.430718]  ? handle_bug+0x50/0xc0
[  101.430720]  ? exc_invalid_op+0xc7/0xe0
[  101.430722]  ? asm_exc_invalid_op+0x16/0x20
[  101.430731]  ? inband_irq_enable+0x10/0x20
[  101.430735]  do_int80_emulation+0x62/0x120
[  101.430740]  asm_int80_emulation+0x16/0x20
[  101.430742] RIP: 0023:0xf7f88907
[  101.430744] Code: 00 50 8d 87 34 46 ff ff 50 e8 35 91 ff ff 66 90 66 90 90 e8 08 33 00 00 81 c2 eb 26 01 00 53 b8 2d 00 00 00 8b 5c 24 08 cd 80 <89> 82 20 0a 00 00 39 d8 72 07 31 c0 5b c3 8d 76 00 c7 82 24 0a 00
[  101.430745] RSP: 002b:00000000ff9b80d8 EFLAGS: 00000292 ORIG_RAX: 000000000000002d
[  101.430747] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000000000c
[  101.430747] RDX: 00000000f7f9afe0 RSI: 00000000f7f9afe0 RDI: 00000000000007f0
[  101.430748] RBP: 00000000ff9b8294 R08: 0000000000000000 R09: 0000000000000000
[  101.430749] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  101.430749] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  101.430758]  </TASK>
[  101.430759] irq event stamp: 1889
[  101.430760] hardirqs last  enabled at (1889): [<ffffffff821c444d>] do_int80_emulation+0x5d/0x120
[  101.430762] hardirqs last disabled at (1888): [<ffffffff821c440e>] do_int80_emulation+0x1e/0x120
[  101.430765] softirqs last  enabled at (1724): [<ffffffff810949cf>] handle_softirqs+0x23f/0x3e0
[  101.430767] softirqs last disabled at (1715): [<ffffffff8109525f>] irq_exit_rcu+0x9f/0xd0
[  101.430769] ---[ end trace 0000000000000000 ]---
#1 lore raw
Quoted 7 lines · Florian Bezdeka

Hi Philippe,

I think we found a missing backport in dovetail 6.6 and 6.1. Jan observed the kernel splat below while testing.

I'm quite sure that [1] should be applied to both mentioned branches.

And it seems to help with my 6.6 case - didn't see the splat again after applying the change.

Jan

Quoted 52 lines

Best regards,
Florian

[1] https://source.denx.de/Xenomai/linux-dovetail/-/commit/1e530a1a8bbd0b7db0e660d27a3c191a649718c3

The log:

[  101.430669] ------------[ cut here ]------------
[  101.430671] WARNING: CPU: 3 PID: 1944 at ../kernel/irq/pipeline.c:303 inband_irq_enable+0x10/0x20
[  101.430676] Modules linked in: 9p netfs rt_e1000 rt_e1000_new rtnet
[  101.430682] CPU: 3 PID: 1944 Comm: ld-linux.so.2 Not tainted 6.6.41+ #105
[  101.430684] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
[  101.430684] IRQ stage: Linux
[  101.430685] RIP: 0010:inband_irq_enable+0x10/0x20
[  101.430687] Code: cc cc 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 80 3d aa 3f 2b 03 00 75 09 9c 58 f6 c4 02 75 02 <0f> 0b e9 69 ff ff ff 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
[  101.430688] RSP: 0000:ffffc900016d7f28 EFLAGS: 00010046
[  101.430690] RAX: 0000000000000046 RBX: ffffc900016d7f58 RCX: 0000000000000814
[  101.430691] RDX: 0000000000000000 RSI: ffffffff829c5c37 RDI: ffffffff8299b2c4
[  101.430692] RBP: ffffc900016d7f48 R08: 0000000000000001 R09: 0000000000000001
[  101.430693] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000002d
[  101.430694] R13: ffffffffffffffda R14: 0000000000000000 R15: 0000000000000000
[  101.430695] FS:  0000000000000000(0000) GS:ffff88803ed80000(0000) knlGS:0000000000000000
[  101.430697] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
[  101.430698] CR2: 00000000f7f79270 CR3: 0000000006676004 CR4: 0000000000370ee0
[  101.430699] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  101.430700] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  101.430701] Call Trace:
[  101.430702]  <TASK>
[  101.430704]  ? __warn+0x81/0x180
[  101.430707]  ? inband_irq_enable+0x10/0x20
[  101.430710]  ? report_bug+0x10b/0x200
[  101.430718]  ? handle_bug+0x50/0xc0
[  101.430720]  ? exc_invalid_op+0xc7/0xe0
[  101.430722]  ? asm_exc_invalid_op+0x16/0x20
[  101.430731]  ? inband_irq_enable+0x10/0x20
[  101.430735]  do_int80_emulation+0x62/0x120
[  101.430740]  asm_int80_emulation+0x16/0x20
[  101.430742] RIP: 0023:0xf7f88907
[  101.430744] Code: 00 50 8d 87 34 46 ff ff 50 e8 35 91 ff ff 66 90 66 90 90 e8 08 33 00 00 81 c2 eb 26 01 00 53 b8 2d 00 00 00 8b 5c 24 08 cd 80 <89> 82 20 0a 00 00 39 d8 72 07 31 c0 5b c3 8d 76 00 c7 82 24 0a 00
[  101.430745] RSP: 002b:00000000ff9b80d8 EFLAGS: 00000292 ORIG_RAX: 000000000000002d
[  101.430747] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000000000c
[  101.430747] RDX: 00000000f7f9afe0 RSI: 00000000f7f9afe0 RDI: 00000000000007f0
[  101.430748] RBP: 00000000ff9b8294 R08: 0000000000000000 R09: 0000000000000000
[  101.430749] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  101.430749] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  101.430758]  </TASK>
[  101.430759] irq event stamp: 1889
[  101.430760] hardirqs last  enabled at (1889): [<ffffffff821c444d>] do_int80_emulation+0x5d/0x120
[  101.430762] hardirqs last disabled at (1888): [<ffffffff821c440e>] do_int80_emulation+0x1e/0x120
[  101.430765] softirqs last  enabled at (1724): [<ffffffff810949cf>] handle_softirqs+0x23f/0x3e0
[  101.430767] softirqs last disabled at (1715): [<ffffffff8109525f>] irq_exit_rcu+0x9f/0xd0
[  101.430769] ---[ end trace 0000000000000000 ]---
Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
#2 lore raw
In reply to Florian Bezdeka
Quoted 7 lines · Florian Bezdeka

Hi Philippe,

I think we found a missing backport in dovetail 6.6 and 6.1. Jan observed the kernel splat below while testing.

I'm quite sure that [1] should be applied to both mentioned branches.

Merged, thanks.

Signature · 1 line
Philippe.