lkml.org 
[lkml]   [2019]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/16] sparc64: use the generic get_user_pages_fast code
Hi,

On Tue, Jun 25, 2019 at 04:37:08PM +0200, Christoph Hellwig wrote:
> The sparc64 code is mostly equivalent to the generic one, minus various
> bugfixes and two arch overrides that this patch adds to pgtable.h.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
> ---
> arch/sparc/Kconfig | 1 +
> arch/sparc/include/asm/pgtable_64.h | 18 ++
> arch/sparc/mm/Makefile | 2 +-
> arch/sparc/mm/gup.c | 340 ----------------------------
> 4 files changed, 20 insertions(+), 341 deletions(-)
> delete mode 100644 arch/sparc/mm/gup.c

So this ended up as commit 7b9afb86b6328f10dc2cad9223d7def12d60e505
(thanks to Anatoly for bisecting) and introduced a regression:
futex.test from the strace test suite now causes an Oops on sparc64
in futex syscall.

Here is a heavily stripped down reproducer:

// SPDX-License-Identifier: GPL-2.0-or-later
#include <err.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <asm/unistd.h>
int main(void)
{
size_t page_size = sysconf(_SC_PAGESIZE);
size_t alloc_size = 3 * page_size;
void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (MAP_FAILED == p)
err(EXIT_FAILURE, "mmap(%zu)", alloc_size);
void *hole = p + page_size;
if (munmap(hole, page_size))
err(EXIT_FAILURE, "munmap(%p, %zu)", hole, page_size);
syscall(__NR_futex, (unsigned long) hole, 0L, 0L, 0L, 0L, 0L);
return 0;
}

--
ldv
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-07-18 00:00    [W:0.203 / U:6.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site