Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751614AbeAENka (ORCPT + 1 other); Fri, 5 Jan 2018 08:40:30 -0500 Received: from mail.skyhub.de ([5.9.137.197]:59398 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbeAENk3 (ORCPT ); Fri, 5 Jan 2018 08:40:29 -0500 Date: Fri, 5 Jan 2018 14:40:25 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Kees Cook , Peter Zijlstra , Greg Kroah-Hartman Subject: Re: [RFC] selftests/x86: Add test_vsyscall Message-ID: <20180105134025.kzmnydmzrnfdokz7@pd.tnic> References: <17c5ebeb2e00879b0af1a9c32bf37ecdd9b9b31b.1515130397.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <17c5ebeb2e00879b0af1a9c32bf37ecdd9b9b31b.1515130397.git.luto@kernel.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 09:38:37PM -0800, Andy Lutomirski wrote: > It's RFC because I want to re-read it myself first. It's also missing > a test that will reliably make sure that vsyscall=none prevents use of > vsyscalls. With my patch ontop of 4.4 from yesterday: # ./test_vsyscall_32 Warning: failed to find getcpu in vDSO [RUN] test gettimeofday() vDSO time offsets: 0.000001 0.000001 [OK] vDSO gettimeofday()'s timeval was okay [RUN] test time() [OK] vDSO time() is okay [RUN] getcpu() on CPU 0 [RUN] getcpu() on CPU 1 # ./test_vsyscall_64 vsyscall map: ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] vsyscall permissions are r-x [RUN] test gettimeofday() vDSO time offsets: 0.000000 0.000005 [OK] vDSO gettimeofday()'s timeval was okay vsyscall time offsets: 0.000004 0.000001 [OK] vsyscall gettimeofday()'s timeval was okay [RUN] test time() [OK] vDSO time() is okay [OK] vsyscall time() is okay [RUN] getcpu() on CPU 0 [OK] vDSO reported correct CPU [OK] vDSO reported correct node [OK] vsyscall reported correct CPU [OK] vsyscall reported correct node [RUN] getcpu() on CPU 1 [OK] vDSO reported correct CPU [OK] vDSO reported correct node [OK] vsyscall reported correct CPU [OK] vsyscall reported correct node [RUN] Checking read access to the vsyscall page [FAIL] We don't have read access, but we should Do I really need the read access? :-) I have CONFIG_LEGACY_VSYSCALL_EMULATE=y Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.