Star64_linux/arch/x86
Alison Schofield 3a0060d2ba x86/numa: Fix the sort compare func used in numa_fill_memblks()
[ Upstream commit b626070ffc14acca5b87a2aa5f581db98617584c ]

The compare function used to sort memblks into starting address
order fails when the result of its u64 address subtraction gets
truncated to an int upon return.

The impact of the bad sort is that memblks will be filled out
incorrectly. Depending on the set of memblks, a user may see no
errors at all but still have a bad fill, or see messages reporting
a node overlap that leads to numa init failure:

[] node 0 [mem: ] overlaps with node 1 [mem: ]
[] No NUMA configuration found

Replace with a comparison that can only result in: 1, 0, -1.

Fixes: 8f012db27c95 ("x86/numa: Introduce numa_fill_memblks()")
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/99dcb3ae87e04995e9f293f6158dc8fa0749a487.1705085543.git.alison.schofield@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:35:06 +01:00
..
boot x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section 2024-02-23 09:25:27 +01:00
coco x86/tdx: Allow 32-bit emulation by default 2023-12-13 18:45:02 +01:00
configs - The first, cleanup part of the microcode loader reorg tglx has been 2023-08-28 15:55:20 -07:00
crypto crypto: x86/sha - load modules based on CPU features 2023-11-28 17:19:56 +00:00
entry x86/bugs: Add asm helpers for executing VERW 2024-03-01 13:34:58 +01:00
events perf/x86/intel/uncore: Fix NULL pointer dereference issue in upi_fill_topology() 2024-01-25 15:35:14 -08:00
hyperv x86/hyperv: Fix the detection of E820_TYPE_PRAM in a Gen2 VM 2023-12-20 17:01:55 +01:00
ia32
include x86/bugs: Add asm helpers for executing VERW 2024-03-01 13:34:58 +01:00
kernel x86/barrier: Do not serialize MSR accesses on AMD 2024-02-23 09:25:27 +01:00
kvm KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl 2024-02-23 09:25:10 +01:00
lib x86/lib: Revert to _ASM_EXTABLE_UA() for {get,put}_user() fixups 2024-02-16 19:10:54 +01:00
math-emu
mm x86/numa: Fix the sort compare func used in numa_fill_memblks() 2024-03-01 13:35:06 +01:00
net bpf: Fix prog_array_map_poke_run map poke update 2024-01-01 12:42:23 +00:00
pci x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS 2024-01-25 15:35:48 -08:00
platform efi/x86: Move EFI runtime call setup/teardown helpers out of line 2023-09-11 06:37:50 +00:00
power
purgatory x86/purgatory: Remove LTO flags 2023-09-17 09:49:03 +02:00
ras
realmode
tools
um um: Hard-code the result of 'uname -s' 2023-08-26 22:40:37 +02:00
video Merge drm/drm-next into drm-misc-next 2023-07-24 15:44:47 +02:00
virt/vmx/tdx
xen x86/xen: add CPU dependencies for 32-bit build 2024-01-01 12:42:35 +00:00
.gitignore
Kbuild
Kconfig kexec: fix KEXEC_FILE dependencies 2024-01-05 15:19:41 +01:00
Kconfig.assembler x86/shstk: Add Kconfig option for shadow stack 2023-07-11 14:12:18 -07:00
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-23 09:25:10 +01:00
Kconfig.debug
Makefile Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
Makefile.postlink
Makefile.um
Makefile_32.cpu