All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Florian Bezdeka <florian.bezdeka@siemens.com>,  xenomai@xenomai.org
Subject: Re: [dovetail][PATCH v2 4/4] ARM: dovetail: Fix VFP exception trap notification
Date: Mon, 30 Nov 2026 10:59:21 +0100	[thread overview]
Message-ID: <87ik1emyh2.fsf@xenomai.org> (raw)
In-Reply-To: <81387618-c55c-43c7-9c93-e9f808d2f208@siemens.com> (Jan Kiszka's message of "Mon, 30 Nov 2026 07:41:38 +0100")

Jan Kiszka <jan.kiszka@siemens.com> writes:

> On 11.11.26 13:10, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>> 
>> The trap annotation of the VFP bounce path predates upstream
>> commit c0b5195bad63 ("ARM: 9426/1: vfp: Move sending signals outside of vfp_state_hold()ed section.")
>> which turned vfp_raise_exceptions() into returning the si_code,
>> deferring vfp_raise_sigfpe() to the exit of VFP_bounce() after
>> vfp_state_release(). The Dovetail hunk was kept in place verbatim,
>> which is now wrong in three ways:
>>

[snip]

>
> What do we do with this one? The AI failed to find a test case that 
> allows to stress this on virtual or even real hardware. But the current 
> code looks wrong.
>

I would pick it for 7.x, because VFP bouncing can only happen on armv7
these days, in situations which should be avoided anyway:

- legacy code originally built for armv6, or without neon support.
- code using deprecated vfp features using direct asm code.
- code relying on armv8 fp features which are not enabled on armv7 hw

All the same, I believe it's fine to demote the caller to the in-band
stage in order to process the fault triggered by those rare (and
avoidable) events.

> Beyond that, these are still in my queue:
>
> - https://lore.kernel.org/xenomai/4d7b7926-4a09-40c0-b4e8-d5512f8107ef@siemens.com/

This one seems too pessimistic, and we should not even need to take such
preventive action, provided we can nest exceptions safely, see my
previous answer (assuming that get_user() is the only problematic
involved). In most cases, we should get no minor fault when reading the
user mapping since we entered this code precisely because we just did
so. IOW, the .text page userland was executing when the fault is taken
is likely to be (still) around.

> - https://lore.kernel.org/xenomai/ca829aa7-2caf-493e-be78-e5a97e624e0e@siemens.com/

I'm ok with this one, the resulting code is clearer.

> - https://lore.kernel.org/xenomai/ccf75b59-e0e0-45c7-a7bc-7d3bfaa3ee3f@siemens.com/
>

Obviously correct.

-- 
Philippe.

  reply	other threads:[~2026-11-30  9:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 12:10 [dovetail][PATCH v2 0/4] ARM trap fixes and generic handling of trap nesting Jan Kiszka
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-19 16:52   ` Jan Kiszka
2026-11-19 18:29     ` Philippe Gerum
2026-11-20  6:24       ` Jan Kiszka
2026-11-20  9:13         ` Philippe Gerum
2026-11-20  9:24           ` Philippe Gerum
2026-11-20 10:45             ` Jan Kiszka
2026-11-20 11:03               ` Philippe Gerum
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-30  6:41   ` Jan Kiszka
2026-11-30  9:59     ` Philippe Gerum [this message]
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=87ik1emyh2.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --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.