From: Thomas Gleixner <tglx@linutronix.de>
To: Xu Yihang <xuyihang@huawei.com>
Cc: mingo@kernel.org, bp@alien8.de, x86@kernel.org, hpa@zytor.com,
dwmw@amazon.co.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] x86/apic: Force logial APIC ID in range from 0 to 8
Date: Fri, 23 Apr 2021 10:37:26 +0200 [thread overview]
Message-ID: <87czulwg55.ffs@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210423075324.133463-1-xuyihang@huawei.com>
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
next prev parent reply other threads:[~2021-04-23 8:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 7:53 Xu Yihang
2021-04-23 8:37 ` Thomas Gleixner [this message]
2021-04-26 2:09 ` xuyihang
2021-04-26 11:09 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czulwg55.ffs@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=bp@alien8.de \
--cc=dwmw@amazon.co.uk \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
--cc=xuyihang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®