[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1804112221080.1564@nanos.tec.linutronix.de>
Date: Wed, 11 Apr 2018 22:21:37 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Dou Liyang <douly.fnst@...fujitsu.com>
cc: peterz@...radead.org, lirongqing@...du.com,
linux-kernel@...r.kernel.org, mingo@...nel.org, hpa@...or.com,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/urgent] x86/apic: Fix signedness bug in APIC ID validity
checks
On Wed, 11 Apr 2018, Dou Liyang wrote:
> Hi Thomas,
>
> At 04/10/2018 10:51 PM, tip-bot for Li RongQing wrote:
> [...]
>
> > x86/apic: Fix signedness bug in APIC ID validity checks
> >
> > The APIC ID as parsed from ACPI MADT is validity checked with the
> > apic->apic_id_valid() callback, which depends on the selected APIC type.
> >
> > For non X2APIC types APIC IDs >= 0xFF are invalid, but values > 0x7FFFFFFF
>
> Today when I am reading "IntelĀ® 64 Architecture x2APIC Specification", I
> find that below in chapter 2.4.1:
>
> The APIC ID value of FFFF_FFFFH and the highest value corresponding to
> the imple-mented bit-width of the local APIC ID register in the system
> are reserved and cannot be assigned to any logical processor.
>
> Seems, FFFF_FFFFH is also invalid for X2APIC types, Shall we also do the
> validity check for X2APIC ID?
>
> acpi_parse_x2apic()
> ...
> /* Ignore invalid ID */
> if (apic_id == 0xffffffff)
> return 0;
Yes. I noticed that as well and just did not come around to write the
patch.
Thanks,
tglx
Powered by blists - more mailing lists