Patch "powerpc/64s/hash: Fix 512T hint detection to use >= 128T" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
powerpc/64s/hash: Fix 512T hint detection to use >= 128T
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-64s-hash-fix-512t-hint-detection-to-use-128t.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7ece370996b694ae263025e056ad785afc1be5abMon Sep 17 00:00:00 2001
From: Michael Ellerman <[email protected]>
Date: Mon, 13 Nov 2017 23:17:28 +1100
Subject: powerpc/64s/hash: Fix 512T hint detection to use >= 128T
From: Michael Ellerman <[email protected]>
commit 7ece370996b694ae263025e056ad785afc1be5ab upstream.
Currently userspace is able to request mmap() search between 128T-512T by specifying a hint address that is greater than 128T. But that means a hint of 128T exactly will return an address below 128T, which is confusing and wrong.
So fix the logic to check the hint is greater than *or equal* to 128T.
--- arch/powerpc/mm/slice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/mm/slice.c +2 -2
@@ -419,7 +419,7 @@ unsigned long slice_get_unmapped_area(un/* * Check if we need to expland slice area. */ -if (unlikely (addr > mm->context.addr_limit && +if (unlikely (addr >= mm->context.addr_limit && mm->context.addr_limit !=TASK_SIZE )) { mm->context.addr_limit =TASK_SIZE ;on_each_cpu (slice_flush_segments, mm,1 );
@@ -427,7 +427,7 @@ unsigned long slice_get_unmapped_area(un/* * This mmap request can allocate upt to 512TB */ -if (addr >DEFAULT_MAP_WINDOW ) +if (addr >=DEFAULT_MAP_WINDOW ) high_limit = mm->context.addr_limit;else high_limit =DEFAULT_MAP_WINDOW ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/powerpc-perf-imc-use-cpu_to_node-not-topology_physical_package_id.patch queue-4.14/powerpc-64s-hash-fix-128tb-512tb-virtual-address-boundary-case-allocation.patch queue-4.14/powerpc-fix-boot-on-book3s_32-with-config_strict_kernel_rwx.patch queue-4.14/powerpc-64s-hash-fix-fork-with-512tb-process-address-space.patch queue-4.14/powerpc-mm-radix-fix-crashes-on-power9-dd1-with-radix-mmu-and-strict_rwx.patch queue-4.14/powerpc-64s-radix-fix-128tb-512tb-virtual-address-boundary-case-allocation.patch queue-4.14/powerpc-signal-properly-handle-return-value-from-uprobe_deny_signal.patch queue-4.14/powerpc-64s-hash-allow-map_fixed-allocations-to-cross-128tb-boundary.patch queue-4.14/powerpc-64s-hash-fix-512t-hint-detection-to-use-128t.patch queue-4.14/powerpc-64s-fix-masking-of-srr1-bits-on-instruction-fault.patch