All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@stackframe.org>
To: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Subject: Re: [PATCH] parisc/entry: fix trace test in syscall exit path
Date: Fri, 12 Nov 2021 08:18:35 +0100	[thread overview]
Message-ID: <87tughalkk.fsf@x1.stackframe.org> (raw)
In-Reply-To: <20211111220429.797-1-svens@stackframe.org> (Sven Schnelle's message of "Thu, 11 Nov 2021 23:04:29 +0100")

Sven Schnelle <svens@stackframe.org> writes:

> commit 8779e05ba8aa ("parisc: Fix ptrace check on syscall return")
> fixed testing of TI_FLAGS. This uncovered a bug in the test mask.
> syscall_restore_rfi is only used when the kernel needs to exit to
> usespace with single stepping via recovery counter enabled. The test
> however used _TIF_SYSCALL_TRACE_MASK, which includes a lot of bits
> that shouldn't be tested here.
>
> Fix this by using TIF_SINGLESTEP and TIF_BLOCKSTEP directly and
> remove those bits from TIF_SYSCALL_TRACE_MASK.

I think we need to have TIF_SINGLESTEP and TIF_BLOCKSTEP in
TIF_SYSCALL_TRACE_MASK otherwise do_syscall_trace_exit() isn't
called when leaving to userspace. I'll read the code a bit more
during the weekend and prepare a v2.

  parent reply	other threads:[~2021-11-12  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 22:04 [PATCH] parisc/entry: fix trace test in syscall exit path Sven Schnelle
2021-11-11 23:24 ` John David Anglin
2021-11-11 23:39   ` John David Anglin
2021-11-12  7:18 ` Sven Schnelle [this message]
2021-11-13 14:31   ` John David Anglin

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=87tughalkk.fsf@x1.stackframe.org \
    --to=svens@stackframe.org \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.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.