Re: [PATCH] x86: Implement Linear Address Masking support

From: Matthew Wilcox
Date: Thu May 12 2022 - 10:07:45 EST


On Thu, May 12, 2022 at 01:01:07PM +0000, David Laight wrote:
> > +static inline int64_t sign_extend64(uint64_t value, int index)
> > +{
> > + int shift = 63 - index;
> > + return (int64_t)(value << shift) >> shift;
> > +}
>
> Shift of signed integers are UB.

Citation needed.