From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933335AbcFQID7 (ORCPT ); Fri, 17 Jun 2016 04:03:59 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33355 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755319AbcFQIDw (ORCPT ); Fri, 17 Jun 2016 04:03:52 -0400 Date: Fri, 17 Jun 2016 10:03:46 +0200 From: Ingo Molnar To: Dmitry Safonov Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, luto@amacapital.net, tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, 0x7f454c46@gmail.com, Shuah Khan , linux-kselftest@vger.kernel.org Subject: Re: [PATCHv9 2/2] selftest/x86: add mremap vdso test Message-ID: <20160617080346.GB30525@gmail.com> References: <1463487232-4377-1-git-send-email-dsafonov@virtuozzo.com> <1463487232-4377-3-git-send-email-dsafonov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463487232-4377-3-git-send-email-dsafonov@virtuozzo.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dmitry Safonov wrote: > Should print on success: > [root@localhost ~]# ./test_mremap_vdso_32 > AT_SYSINFO_EHDR is 0xf773f000 > [NOTE] Moving vDSO: [f773f000, f7740000] -> [a000000, a001000] > [OK] > Or segfault if landing was bad (before patches): > [root@localhost ~]# ./test_mremap_vdso_32 > AT_SYSINFO_EHDR is 0xf774f000 > [NOTE] Moving vDSO: [f774f000, f7750000] -> [a000000, a001000] > Segmentation fault (core dumped) Yeah, so I changed my mind again, I still don't like that the testcase faults on old kernels: triton:~/tip/tools/testing/selftests/x86> ./test_mremap_vdso_32 AT_SYSINFO_EHDR is 0xf7786000 [NOTE] Moving vDSO: [0xf7786000, 0xf7787000] -> [0xf7781000, 0xf7782000] Segmentation fault How do I know that this testcase is special and that a segmentation fault in this case means that I'm running it on a too old kernel and that it's not some other unexpected failure in the test? At minimum please run it behind fork() and catch the -SIGSEGV child exit: mremap(0xf7747000, 4096, 4096, MREMAP_MAYMOVE|MREMAP_FIXED, 0xf7742000) = 0xf7742000 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xf7747be9} --- +++ killed by SIGSEGV +++ and print: [FAIL] mremap() of the vDSO does not work on this kernel! or such. Ok? Thanks, Ingo