The patch titled Subject: proc: fixup map_files test on arm has been added to the -mm tree. Its filename is proc-fixup-map_files-test-on-arm.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/proc-fixup-map_files-test-on-arm.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/proc-fixup-map_files-test-on-arm.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Alexey Dobriyan <adobriyan@xxxxxxxxx> Subject: proc: fixup map_files test on arm https://bugs.linaro.org/show_bug.cgi?id=3782 Turns out arm doesn't allow to map address 0, so try minimum virtual address instead. Link: http://lkml.kernel.org/r/20181113165446.GA28157@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx> Reported-by: Rafael David Tinoco <rafael.tinoco@xxxxxxxxxx> Tested-by: Rafael David Tinoco <rafael.tinoco@xxxxxxxxxx> Acked-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Cc: Shuah Khan <shuah@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/tools/testing/selftests/proc/proc-self-map-files-002.c~proc-fixup-map_files-test-on-arm +++ a/tools/testing/selftests/proc/proc-self-map-files-002.c @@ -13,7 +13,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* Test readlink /proc/self/map_files/... with address 0. */ +/* Test readlink /proc/self/map_files/... with minimum address. */ #include <errno.h> #include <sys/types.h> #include <sys/stat.h> @@ -47,6 +47,11 @@ static void fail(const char *fmt, unsign int main(void) { const unsigned int PAGE_SIZE = sysconf(_SC_PAGESIZE); +#ifdef __arm__ + unsigned long va = 2 * PAGE_SIZE; +#else + unsigned long va = 0; +#endif void *p; int fd; unsigned long a, b; @@ -55,7 +60,7 @@ int main(void) if (fd == -1) return 1; - p = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0); + p = mmap((void *)va, PAGE_SIZE, PROT_NONE, MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0); if (p == MAP_FAILED) { if (errno == EPERM) return 2; _ Patches currently in -mm which might be from adobriyan@xxxxxxxxx are proc-update-maintainers-with-proctxt.patch proc-fixup-map_files-test-on-arm.patch mm-make-migratetype_names-const-char.patch mm-make-migrate_reason_names-const-char.patch mm-make-free_reserved_area-return-const-char.patch coding-style-dont-use-extern-with-function-prototypes.patch drop-silly-static-inline-asmlinkage-from-dump_stack.patch make-initcall_level_names-const-char.patch