Re: [LTP] [PATCH] Added test for mmap() with MAP_SHARED_VALIDATE.

Petr Vorel
2023-04-04T11:15:24Z

> Hi all,

> FYI test fails on ppc64le: mmap() with MAP_SHARED_VALIDATE | (1 << 7) is
> supposed to fail with EOPNOTSUPP, but on ppc64le it fails with EFAULT.

> Obviously (1 << 7) being expected as invalid flag is not working well at least
> on ppc64le. It might be something page size related or alignment. I was looking
> into SYSCALL_DEFINE6(mmap, ...) implementations. Although ppc64le implementation
> is not the same as most of implementations on other archs, in the end it also
> calls ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> shift) as the other
> archs. Any idea what could be a problem?

OK, 1 << 7 defined as MAP_LOCKED on ppc64le and mips. 1 << 9 looks to be working
on more archs, I'll send a patch.

Kind regards,
Petr

> Kind regards,
> Petr