lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: stop messing with set_fs in arm_sdei
From
Date
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

\
 
 \ /
  Last update: 2020-04-14 18:00    [W:0.058 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site