aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/gcc-generate-rtl-pass.h
diff options
context:
space:
mode:
authorLi RongQing <[email protected]>2018-04-10 09:16:06 +0800
committerThomas Gleixner <[email protected]>2018-04-10 16:46:39 +0200
commita774635db5c430cbf21fa5d2f2df3d23aaa8e782 (patch)
tree901a79ca1293a6ef62e57de71e74496347f1ad35 /scripts/gcc-plugins/gcc-generate-rtl-pass.h
parentd94a155c59c98c19b98ee949eaab6a0312bbd6be (diff)
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 are detected as valid. This happens because the 'apicid' argument of the apic_id_valid() callback is type 'int'. So the resulting comparison apicid < 0xFF evaluates to true for all unsigned int values > 0x7FFFFFFF which are handed to default_apic_id_valid(). As a consequence, invalid APIC IDs in !X2APIC mode are considered valid and accounted as possible CPUs. Change the apicid argument type of the apic_id_valid() callback to u32 so the evaluation is unsigned and returns the correct result. [ tglx: Massaged changelog ] Signed-off-by: Li RongQing <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Dou Liyang <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-rtl-pass.h')
0 files changed, 0 insertions, 0 deletions