lkml.org 
[lkml]   [2018]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [tip:x86/urgent] x86/apic: Fix signedness bug in APIC ID validity checks
From
Date
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;
...

Thanks,
dou



\
 
 \ /
  Last update: 2018-04-11 09:02    [W:0.050 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site