From: Jan Kiszka <jan.kiszka@siemens.com>
To: Philippe Gerum <rpm@xenomai.org>,
Florian Bezdeka <florian.bezdeka@siemens.com>,
xenomai@xenomai.org
Subject: [dovetail][PATCH v2 0/4] ARM trap fixes and generic handling of trap nesting
Date: Wed, 11 Nov 2026 13:10:43 +0100 [thread overview]
Message-ID: <cover.1794399047.git.jan.kiszka@siemens.com> (raw)
[v2: rebased without changes, resent due to delivery issues of v1]
This is both an expression of personal laziness as well as an experiment
update about AI support for Xenomai core development - and it seems it
was fairly successful:
After noticing [1], I simply prompted in Opencode using Fable 5.1 to
review the ARM trap entry paths for inconsistencies:
"in arch/arm, analyse the annotation of trap entries with
dovetail_fault_entry and mark_trap_entry regarding completness and also
corresponding dovetail_fault_exit / mark_trap_exit"
For that, I just presented the wip/flo/v7.3-dovetail-rebase branch. And
the model came back with finding on [2] as well was these patches here.
Next, I asked for a review of arm64 and x86 as well, but there were no
findings.
Finally, I asked for the extension of smokey with some trap test cases
that demonstrate the ARM issues and test similar paths on arm64 and x86.
That turned out to be quite wasteful - I should have filtered out
irrelevant traps first, namely:
- ARM VFP exceptions - no hardware exit to stress them. But I'm leaving
the related kernel patch in here because the code was already
instrumented, just apparently incorrectly now.
- x86 Alignment Checks - can be enabled by userspace, but everything
left and right in common libs will then explode. IOW, they have no use
case in modern software. At the same time, some patching of libcobalt
would be needed to handle SIGDEBUG for an #AC migration.
I will share the lengthy test case as well once I'm done with stripping
it down further (if possible). What the tests already demonstrated is
that unpatched kernels crash.
These patches here are almost completely generated. One of my few
contributions was to encode _TLF_OOBTRAP into oob_trap_regs. The idea
of having oob_trap_regs as a nesting detector came from the AI, though.
As usual, AI is still rather verbose in descriptions and comments. Some
of them I already shortened, but most is still left. We can cut down
further, but I would first of all like to have another review round.
While doing that, keep in mind that AI tends to ignore issues left and
right when being told to do a specific task. It may have simply missed
further preexisting issues or even created new ones now. Watch out!
That said, it is definitely impressing to see that a frontier model is
able to build up decent understanding of the Dovetail architecture
without further hand-holding. I would not blindly trust them yet, but
they seem to be ready now to act as debugging agent or at least
companion, even in complex scenarios. Giving some LLM access to a CI
pipeline may even result in automatic regression handling, probably
already today. Also, I want to explore what is helpful and reasonably
needed to support stable kernel maintenance.
Jan
PS: If someone is interested in the token costs: Due to my inefficient
model usage, the counter stopped at about 170 EUR. Most tokes went into
test case development and its debugging (#AC issues, e.g.). These
patches here likely costed about 40 EUR with Fable 5.1, checking the
other archs maybe another 30 EUR.
[1] https://lore.kernel.org/xenomai/8ecd3d1a-86d1-4f39-b175-b712c0be6eec@siemens.com/
[2] https://lore.kernel.org/xenomai/2e3b8eec-7911-4abe-8082-97296000e88d@siemens.com/
Jan Kiszka (4):
dovetail: Track the owner of a trap notification by exception frame
ARM: dovetail: Fix trap unwind condition in __und_svc
ARM: dovetail: Notify the core about undefined instruction traps from
user mode
ARM: dovetail: Fix VFP exception trap notification
arch/arm/include/asm/thread_info.h | 1 -
arch/arm/include/asm/traps.h | 2 ++
arch/arm/kernel/asm-offsets.c | 2 --
arch/arm/kernel/entry-armv.S | 20 ++++----------------
arch/arm/kernel/swp_emulate.c | 22 ++++++++++++++++++----
arch/arm/kernel/traps.c | 27 +++++++++++++++++++++++++++
arch/arm/probes/uprobes/core.c | 10 ++++++++++
arch/arm/vfp/vfpmodule.c | 27 +++++++++++++++++++--------
arch/arm64/include/asm/thread_info.h | 1 -
arch/riscv/include/asm/thread_info.h | 1 -
arch/x86/include/asm/thread_info.h | 2 --
include/linux/dovetail.h | 12 ++++++++++--
include/linux/sched.h | 5 +++++
kernel/dovetail.c | 10 ++++++++--
14 files changed, 103 insertions(+), 39 deletions(-)
--
2.47.3
next reply other threads:[~2026-11-11 12:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 12:10 Jan Kiszka [this message]
2026-11-11 12:10 ` [dovetail][PATCH v2 1/4] dovetail: Track the owner of a trap notification by exception frame Jan Kiszka
2026-11-11 23:11 ` Florian Bezdeka
2026-11-11 12:10 ` [dovetail][PATCH v2 2/4] ARM: dovetail: Fix trap unwind condition in __und_svc Jan Kiszka
2026-11-11 12:10 ` [dovetail][PATCH v2 3/4] ARM: dovetail: Notify the core about undefined instruction traps from user mode Jan Kiszka
2026-11-11 12:10 ` [dovetail][PATCH v2 4/4] ARM: dovetail: Fix VFP exception trap notification Jan Kiszka
2026-11-11 23:21 ` [dovetail][PATCH v2 0/4] ARM trap fixes and generic handling of trap nesting Florian Bezdeka
2026-11-12 6:11 ` Jan Kiszka
2026-11-12 10:31 ` Philippe Gerum
2026-11-12 11:05 ` Florian Bezdeka
2026-11-12 11:16 ` Jan Kiszka
2026-11-12 11:25 ` Florian Bezdeka
2026-11-12 11:30 ` Jan Kiszka
2026-11-12 11:39 ` Florian Bezdeka
2026-11-12 12:04 ` Jan Kiszka
2026-11-12 12:59 ` Philippe Gerum
2026-11-12 13:29 ` Jan Kiszka
2026-11-12 13:49 ` Philippe Gerum
2026-11-12 14:03 ` Jan Kiszka
2026-11-12 14:43 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1794399047.git.jan.kiszka@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=florian.bezdeka@siemens.com \
--cc=rpm@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.