All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Xenomai <xenomai@lists.linux.dev>,
	 Florian Bezdeka <florian.bezdeka@siemens.com>
Subject: Re: [dovetail][PATCH] x86: dovetail: Drop bogus local_irq_disable_full from __bad_area_nosemaphore
Date: Thu, 12 Nov 2026 15:01:22 +0100	[thread overview]
Message-ID: <8733t6174d.fsf@xenomai.org> (raw)
In-Reply-To: <174b3fcf-32ff-4b80-a33e-1c87d0585159@siemens.com> (Jan Kiszka's message of "Thu, 12 Nov 2026 14:38:11 +0100")

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

> On 12.11.26 14:09, Philippe Gerum wrote:
>> Jan Kiszka <jan.kiszka@siemens.com> writes:
>> 
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> There is no technical reason to disable IRQs here again, neither when
>>> the IRQ pipeline is enable nor when it is off, which this change also
>>> causes. We are never passing this point from OOB because of the
>>> !running_inband check and jump earlier in function. The inband case is
>>> identical to the !IRQ_PIPELINE case, and that one does not need any
>>> additional IRQ disabling as well (upstream code path).
>>>
>>> The addition was most likely a mismerged during the forward-port from
>>> 6.18 to 6.19. Remove it.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>>  arch/x86/mm/fault.c | 2 --
>>>  1 file changed, 2 deletions(-)
>>>
>>> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
>>> index e41ed2092730c..e9a08a5d26e60 100644
>>> --- a/arch/x86/mm/fault.c
>>> +++ b/arch/x86/mm/fault.c
>>> @@ -886,8 +886,6 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
>>>  		force_sig_pkuerr((void __user *)address, pkey);
>>>  	else
>>>  		force_sig_fault(SIGSEGV, si_code, (void __user *)address);
>>> -
>>> -	local_irq_disable_full();
>>>  out:
>>>  	oob_trap_unwind(X86_TRAP_PF, regs);
>>>  }
>> 
>> When removing such code, replacing it by an assertion like
>> WARN_ON_ONCE(irqs_pipelined() && !irqs_disabled()) would catch wrong
>> moves.
>> 
>
> IRQs are enabled at the point where local_irq_disable_full was located
> (-> cond_reenable_irqs_user / local_irq_enable), so this warning would
> always trigger.
>

See my previous answer.

-- 
Philippe.

  reply	other threads:[~2026-11-12 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 11:32 [dovetail][PATCH] x86: dovetail: Drop bogus local_irq_disable_full from __bad_area_nosemaphore Jan Kiszka
2026-11-12 13:09 ` Philippe Gerum
2026-11-12 13:38   ` Jan Kiszka
2026-11-12 14:01     ` Philippe Gerum [this message]
2026-11-12 14:37       ` Jan Kiszka

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=8733t6174d.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@lists.linux.dev \
    /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.