Re: [PATCH v2] x86/cpu: replacing the open-coded shift with BIT(x)

From: cuigaosheng
Date: Tue Nov 01 2022 - 10:05:31 EST


Yes, maybe we can do the same thing with BIT(), so I add other modifications, should I remove them?

Thanks very much!

On 2022/11/1 21:43, Jason A. Donenfeld wrote:
On Tue, Nov 1, 2022 at 2:37 PM cuigaosheng <cuigaosheng1@xxxxxxxxxx> wrote:
215 [ 0.953146][ T0] UBSAN: shift-out-of-bounds in mm/shmem.c:3749:18
216 [ 0.953863][ T0] left shift of 1 by 31 places cannot be represented in type 'int'
Isn't this just an issue with `1 << 31` needing to be `1U << 31`?

Jason
.