[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yn0bI2W7JnZnHmj+@hirez.programming.kicks-ass.net>
Date: Thu, 12 May 2022 16:35:15 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: David Laight <David.Laight@...lab.com>
Cc: "'Kirill A. Shutemov'" <kirill.shutemov@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
"x86@...nel.org" <x86@...nel.org>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
"H . J . Lu" <hjl.tools@...il.com>,
Andi Kleen <ak@...ux.intel.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Implement Linear Address Masking support
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.
The kernel uses -fno-strict-overflow, all the signed UB is gone.
Powered by blists - more mailing lists