Messages in this thread | | | Subject | Re: stop messing with set_fs in arm_sdei | From | James Morse <> | Date | Tue, 14 Apr 2020 16:59:16 +0100 |
| |
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
| |