lkml.org 
[lkml]   [2020]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/8] x86/mce: Avoid tail copy when machine check terminated a copy from user
On Thu, Sep 17, 2020 at 02:57:51PM -0700, Luck, Tony wrote:
> On Thu, Sep 17, 2020 at 07:04:06PM +0200, Borislav Petkov wrote:
> > So actually, I'm thinking:
> >
> > .LMCE_during_user_access:
> > mov $-ENODEV, %eax
> > ASM_CLAC
> > ret
> >
> > I have no clue which error code we should put there but it should be an
> > error code which tells you not to retry and to back off immediately.
>
> That does look a lot easier to understand *at this point* in the code.
>
> But the existing iterator code is not expecting an error code. Just a
> count of bytes not copied.
>
> So doing this would mean some surgery on the maze of giant #defines that
> is lib/iov_iter.c

Ok, since the user task is guaranteed to get the SIGBUS, let's just
resort to documenting this properly for now and we can consider more
involved surgery later, if really needed.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2020-09-18 09:51    [W:0.057 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site