[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87czulwg55.ffs@nanos.tec.linutronix.de>
Date: Fri, 23 Apr 2021 10:37:26 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Xu Yihang <xuyihang@...wei.com>
Cc: mingo@...nel.org, bp@...en8.de, x86@...nel.org, hpa@...or.com,
dwmw@...zon.co.uk, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] x86/apic: Force logial APIC ID in range from 0 to 8
On Fri, Apr 23 2021 at 15:53, Xu Yihang wrote:
> According to Intel 64 and IA-32 Architectures Software Developer’s Manuals
> Vol. 3A 10.6.2.2, Logical APIC ID locates on bit 24 to 31, can only
> support up to 8 local APIC under flat mode. Also C99 says left shift exceeding
> maximum value representable in the result type is undefined behavior. But
> under x86 architecture, it seems doesn't do any actual damage.
>
> There is KASAN warning on a 80 cores machine after booting #64 CPU.
> ```
> [ 1.681097] UBSAN: Undefined behaviour in arch/x86/kernel/apic/apic_flat_64.c:51:11
> [ 1.688739] shift exponent 64 is too large for 64-bit type 'long unsigned int'
> ```
This function should not be invoked on a 80 core machine at all.
Can you please add 'apic=verbose' to the kernel command line and provide
a full boot log?
Thanks,
tglx
Powered by blists - more mailing lists