]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
io_uring/parisc: Adjust pgoff in io_uring mmap() for parisc
authorHelge Deller <deller@gmx.de>
Mon, 7 Aug 2023 18:04:09 +0000 (20:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Aug 2023 18:37:01 +0000 (12:37 -0600)
commit56675f8b9f9b15b024b8e3145fa289b004916ab7
tree864ebcfd3ea0c76fe6df5cefc177b5f0ee45d85b
parent72dbde0f2afbe4af8e8595a89c650ae6b9d9c36f
io_uring/parisc: Adjust pgoff in io_uring mmap() for parisc

The changes from commit 32832a407a71 ("io_uring: Fix io_uring mmap() by
using architecture-provided get_unmapped_area()") to the parisc
implementation of get_unmapped_area() broke glibc's locale-gen
executable when running on parisc.

This patch reverts those architecture-specific changes, and instead
adjusts in io_uring_mmu_get_unmapped_area() the pgoff offset which is
then given to parisc's get_unmapped_area() function.  This is much
cleaner than the previous approach, and we still will get a coherent
addresss.

This patch has no effect on other architectures (SHM_COLOUR is only
defined on parisc), and the liburing testcase stil passes on parisc.

Cc: stable@vger.kernel.org # 6.4
Signed-off-by: Helge Deller <deller@gmx.de>
Reported-by: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Fixes: 32832a407a71 ("io_uring: Fix io_uring mmap() by using architecture-provided get_unmapped_area()")
Fixes: d808459b2e31 ("io_uring: Adjust mapping wrt architecture aliasing requirements")
Link: https://lore.kernel.org/r/ZNEyGV0jyI8kOOfz@p100
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/parisc/kernel/sys_parisc.c
io_uring/io_uring.c