RE: load_unaligned_zeropad() on x86-64
From: David Laight
Date: Sat Nov 14 2020 - 18:25:03 EST
From: Linus Torvalds
> Sent: 14 November 2020 18:02
>
> On Sat, Nov 14, 2020 at 7:53 AM David Laight <David.Laight@xxxxxxxxxx> wrote:
> >
> > The change e419b4cc585680940bc42f8ca8a071d6023fb1bb added
> > asm code for load_unaligned_zeropad().
> >
> > However it doesn't look right for 64bit.
> > It masks the address with ~3 not ~7 so the second
> > access could still cross a page boundary and fault.
>
> Can you explain more what you think is wrong?
>
> It uses
>
> "and %3,%1\n\t"
>
> for the masking, but note how that's a "%3", not a "$3".
Maybe I need to get better glasses.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)