All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keno Fischer <keno@juliacomputing.com>
To: Dave Martin <Dave.Martin@arm.com>
Cc: Will Deacon <will@kernel.org>, Kyle Huey <khuey@pernos.co>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: arm64: Register modification during syscall entry/exit stop
Date: Mon, 1 Jun 2020 05:23:01 -0400	[thread overview]
Message-ID: <CABV8kRz2ineTcLS29Lh=BW_kJB_X7PoqY-MaMj_pUUziOxrYCw@mail.gmail.com> (raw)
In-Reply-To: <20200601091441.GW5031@arm.com>

On Mon, Jun 1, 2020 at 5:14 AM Dave Martin <Dave.Martin@arm.com> wrote:
> Can you explain why userspace would write a changed value for x7
> but at the same time need that new to be thrown away?

The discarding behavior is the primary reason things aren't completely
broken at the moment. If it read the wrong x7 value and didn't know about
the Aarch64 quirk, it's often just trying to write that same wrong
value back during the next stop, so if that's just ignored,
that's probably fine in 99% of cases, since the value in the
tracee will be undisturbed.

I don't think there's a sane way to change the aarch64 NT_PRSTATUS
semantics without just completely removing the x7 behavior, but of course
people may be relying on that (I think somebody said upthread that strace does?)

Keno

WARNING: multiple messages have this Message-ID (diff)
From: Keno Fischer <keno@juliacomputing.com>
To: Dave Martin <Dave.Martin@arm.com>
Cc: Kyle Huey <khuey@pernos.co>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Oleg Nesterov <oleg@redhat.com>, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: arm64: Register modification during syscall entry/exit stop
Date: Mon, 1 Jun 2020 05:23:01 -0400	[thread overview]
Message-ID: <CABV8kRz2ineTcLS29Lh=BW_kJB_X7PoqY-MaMj_pUUziOxrYCw@mail.gmail.com> (raw)
In-Reply-To: <20200601091441.GW5031@arm.com>

On Mon, Jun 1, 2020 at 5:14 AM Dave Martin <Dave.Martin@arm.com> wrote:
> Can you explain why userspace would write a changed value for x7
> but at the same time need that new to be thrown away?

The discarding behavior is the primary reason things aren't completely
broken at the moment. If it read the wrong x7 value and didn't know about
the Aarch64 quirk, it's often just trying to write that same wrong
value back during the next stop, so if that's just ignored,
that's probably fine in 99% of cases, since the value in the
tracee will be undisturbed.

I don't think there's a sane way to change the aarch64 NT_PRSTATUS
semantics without just completely removing the x7 behavior, but of course
people may be relying on that (I think somebody said upthread that strace does?)

Keno

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-06-01  9:23 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19  1:05 arm64: Register modification during syscall entry/exit stop Keno Fischer
2020-05-19  1:05 ` Keno Fischer
2020-05-19  8:15 ` Will Deacon
2020-05-19  8:15   ` Will Deacon
2020-05-19  8:37   ` Keno Fischer
2020-05-19  8:37     ` Keno Fischer
2020-05-20 17:41     ` Will Deacon
2020-05-20 17:41       ` Will Deacon
2020-05-23  5:35       ` Keno Fischer
2020-05-23  5:35         ` Keno Fischer
2020-05-24  6:56         ` Keno Fischer
2020-05-24  6:56           ` Keno Fischer
2020-05-27  9:55           ` Will Deacon
2020-05-27  9:55             ` Will Deacon
2020-05-27 10:19             ` Dave Martin
2020-05-27 10:19               ` Dave Martin
2020-05-31  9:33               ` Will Deacon
2020-05-31  9:33                 ` Will Deacon
2020-05-31 16:13                 ` Keno Fischer
2020-05-31 16:13                   ` Keno Fischer
2020-06-01  9:14                   ` Dave Martin
2020-06-01  9:14                     ` Dave Martin
2020-06-01  9:23                     ` Keno Fischer [this message]
2020-06-01  9:23                       ` Keno Fischer
2020-06-01  9:52                       ` Dave Martin
2020-06-01  9:52                         ` Dave Martin
2020-05-31 16:20               ` Keno Fischer
2020-05-31 16:20                 ` Keno Fischer
2020-06-01  9:23                 ` Dave Martin
2020-06-01  9:23                   ` Dave Martin
2020-06-01  9:40                   ` Keno Fischer
2020-06-01  9:40                     ` Keno Fischer
2020-06-01  9:59                     ` Dave Martin
2020-06-01  9:59                       ` Dave Martin

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='CABV8kRz2ineTcLS29Lh=BW_kJB_X7PoqY-MaMj_pUUziOxrYCw@mail.gmail.com' \
    --to=keno@juliacomputing.com \
    --cc=Dave.Martin@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=khuey@pernos.co \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=will@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.