mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2] ARM, ARM64, LONGARCH: Delay HW BP notification to task_work()
Date: Thu, 3 Sep 2026 12:47:24 -0300	[thread overview]
Message-ID: <apmWjJquEQIHeFrW@redhat.com> (raw)
In-Reply-To: <20260814092049.EHIf1eeX@linutronix.de>

On Fri, Aug 14, 2026 at 11:20:49AM +0200, Sebastian Andrzej Siewior wrote:
> On 2026-08-14 09:03:03 [+0000], sashiko-bot@kernel.org wrote:
> > > +	if (xchg_relaxed(&bp->hw.arch_hw_notif_busy, 1) ||
> > > +	    WARN_ON_ONCE(task_work_add(current, &bp->hw.arch_hw_notif, TWA_RESUME)))
> > [Severity: High]
> > Will using TWA_RESUME here cause a hang if a hardware watchpoint is triggered
> > during a blocking syscall like futex() or read()?
> > 
> > When a blocking syscall accesses watched memory (e.g., via get_user()), the
> > watchpoint synchronously triggers and queues the SIGTRAP task work via
> > task_work_add(). Since TWA_RESUME only sets TIF_NOTIFY_RESUME, and
> > signal_pending() ignores TIF_NOTIFY_RESUME, the syscall wait loop will not
> > abort. 
> > 
> > Does this need to use TWA_SIGNAL instead so that TIF_NOTIFY_SIGNAL is set and
> > the interruptible sleep correctly aborts to deliver the pending task work?
> 
> Well, this only means that the signal will be delivered once the syscall
> handling is complete. I don't see a reason why the syscall should be
> interrupted just to deliver the signal right away. The logic should not
> be affected by delivering the signal immediately.
> 
> > > +		put_event(bp);
> > > +}
> > > +#endif

Sebastian, do you intend to perform any extra work on this patch or is it
ready for consumption? I have been using this change in test kernels for a
while now and haven't had a single problem so far.

Best,
Luis

> Sebastian
> 
---end quoted text---


  reply	other threads:[~2026-09-03 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  8:51 Sebastian Andrzej Siewior
2026-08-14  9:03 ` sashiko-bot
2026-08-14  9:20   ` Sebastian Andrzej Siewior
2026-09-03 15:47     ` Luis Claudio R. Goncalves [this message]
2026-09-03 16:07 ` Sebastian Andrzej Siewior
2026-09-03 16:47   ` Russell King
2026-09-03 17:31     ` Steven Rostedt
2026-09-04 15:54       ` Sebastian Andrzej Siewior

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=apmWjJquEQIHeFrW@redhat.com \
    --to=lgoncalv@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-rt-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®