Re: [patch 01/10] x86/fpu/signal: Clarify exception handling in restore_fpregs_from_user()
From: Al Viro
Date: Mon Aug 30 2021 - 20:06:51 EST
On Mon, Aug 30, 2021 at 03:00:06PM -0700, Linus Torvalds wrote:
> On Mon, Aug 30, 2021 at 2:33 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > There's a place where we care about #PF vs. #MC (see upthread)...
>
> Interestingly (or perhaps not), that case is a problem case in general
> for "fault_in_pages_readable()".
s/a/the one and only/
> I'm not sure what the right model here is. We might need to make
> fault_in_pages_readable() do things a cacheline at a time, at which
> point those repeat loops start working, and the error code thing
> becomes pointless.
We really don't want to do that to fault_in_pages_readable();
a separate primitive doing that - perhaps, but fault_in_pages_readable()
is used on fairly hot paths and all callers except this one don't need
anything of that sort.
Similar for fault_in_pages_writeable() - there's exactly one
caller that needs the same kind of warranties, only there it's in
arch-independent code and I'm fairly sure that it (btrfs ioctl) really
is broken on arm64...