From: James Morse <james.morse@arm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: stop messing with set_fs in arm_sdei
Date: Tue, 14 Apr 2020 16:59:16 +0100 [thread overview]
Message-ID: <cc0b5d01-bd19-3437-a76e-2d1daa86f9a4@arm.com> (raw)
In-Reply-To: <20200414142302.448447-1-hch@lst.de>
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"
Thanks,
James
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-14 15:59 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 ` James Morse [this message]
2020-04-20 10:22 ` stop messing with set_fs in arm_sdei Christoph Hellwig
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=cc0b5d01-bd19-3437-a76e-2d1daa86f9a4@arm.com \
--to=james.morse@arm.com \
--cc=hch@lst.de \
--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).