Re: [PATCH] x86/uaccess: Use pointer masking to limit uaccess speculation
From: Christoph Hellwig
Date: Tue Sep 01 2020 - 11:06:21 EST
On Tue, Sep 01, 2020 at 03:54:42PM +0100, Mark Rutland wrote:
> On Tue, Sep 01, 2020 at 04:46:41PM +0200, Christoph Hellwig wrote:
> > On Tue, Sep 01, 2020 at 03:02:08PM +0100, Mark Rutland wrote:
> > > One thing to consider is whether you need a speculation barrier after
> > > set_fs(). Otherwise for code like:
> >
> > FYI, at least for x86 and powerpc I have a pending series to kill
> > set_fs(). I'd love to see someone help with the arm/arm64 side, otherwise
> > I'll try to get to it eventually.
>
> Is there anything in particular that's tricky, or do you just want
> someone to look generally? From a quick grep arch/arm64/* looks clean, but
> I suspect that's misleading.
Yes, it should be mostly trivial. I just bet the maintainers are
better at optimizing the low-level assembly code with the variable
address limit gone than I am. (See Linus comments on the x86 version
for example). And I don't have a physical arm64 to test with so I'd
have to rely on qemu for any testing.