linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: James Morse <james.morse@arm.com>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: stop messing with set_fs in arm_sdei
Date: Mon, 20 Apr 2020 12:22:59 +0200	[thread overview]
Message-ID: <20200420102259.GA7862@lst.de> (raw)
In-Reply-To: <cc0b5d01-bd19-3437-a76e-2d1daa86f9a4@arm.com>

On Tue, Apr 14, 2020 at 04:59:16PM +0100, James Morse wrote:
> Hi Christoph,
> 
> On 14/04/2020 15:23, Christoph Hellwig wrote:
> > can you take a look at this series?  I've been trying to figure out
> > what the set_fs in arm_sdei is good for, and could not find any
> > good reason.  But I don't have any hardware implementing this interface,
> > so the changes are entirely untested.
> 
> Its a firmware thing, think of it as a firmware assisted software NMI.
> 
> The arch code save/restores set_fs() because the entry code does that when taking an
> exception from EL1. SDEI does the same because it doesn't come via the same entry code. It
> does it in C because that C is always run before the handler, something that isn't true
> for the regular assembly version.
> 
> The regular entry code does this because any exception may have interrupted code that had
> addr_limit set to something else:
> https://bugs.chromium.org/p/project-zero/issues/detail?id=822
> 
> and the patch that fixed it: commit e19a6ee2460b "arm64: kernel: Save and restore UAO and
> addr_limit on exception entry"

Can you throw in a comment documenting this better?  And pick up the
first patch while we're at it - no need to expose such low-level
mechanisms to modules.

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

      reply	other threads:[~2020-04-20 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 14:23 stop messing with set_fs in arm_sdei Christoph Hellwig
2020-04-14 14:23 ` [PATCH 1/2] firmware: arm_sdei: remove unused interfaces Christoph Hellwig
2020-04-14 14:23 ` [PATCH 2/2] arm_sdei: remove the set_fs calls in sdei_event_handler Christoph Hellwig
2020-04-14 15:59 ` stop messing with set_fs in arm_sdei James Morse
2020-04-20 10:22   ` Christoph Hellwig [this message]

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=20200420102259.GA7862@lst.de \
    --to=hch@lst.de \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).