Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666AbeAEUKG (ORCPT + 1 other); Fri, 5 Jan 2018 15:10:06 -0500 Received: from mail-pl0-f41.google.com ([209.85.160.41]:46617 "EHLO mail-pl0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751814AbeAEUKF (ORCPT ); Fri, 5 Jan 2018 15:10:05 -0500 X-Google-Smtp-Source: ACJfBovf0GUsWb40C6tSH/PWcIVQRZ+CtWlBRhIfG942Dg1TT80OTlYuw2XXia/iSQxcpjt59zYm6w== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [RFC] selftests/x86: Add test_vsyscall From: Andy Lutomirski X-Mailer: iPhone Mail (15C153) In-Reply-To: <20180105192845.32ucll64aa34cf7w@pd.tnic> Date: Fri, 5 Jan 2018 12:10:02 -0800 Cc: Andy Lutomirski , X86 ML , LKML , Kees Cook , Peter Zijlstra , Greg Kroah-Hartman Content-Transfer-Encoding: 8BIT Message-Id: References: <17c5ebeb2e00879b0af1a9c32bf37ecdd9b9b31b.1515130397.git.luto@kernel.org> <20180105134025.kzmnydmzrnfdokz7@pd.tnic> <20180105183048.ywi5cccs4ecggwy3@pd.tnic> <20180105191000.n2gnkbsyry4kd65z@pd.tnic> <08190E47-05B3-4599-A415-DE4276D56B3F@amacapital.net> <20180105192845.32ucll64aa34cf7w@pd.tnic> To: Borislav Petkov Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > On Jan 5, 2018, at 11:28 AM, Borislav Petkov wrote: > >> On Fri, Jan 05, 2018 at 11:22:21AM -0800, Andy Lutomirski wrote: >> It's emulated! We catch the page fault and fake the whole thing :) > > Then I'm really confused. It says "ro" above, which means _PAGE_RW is > not set so page is read-only. > > I must be missing something... > It's meant to be read-only, user-acccessible, NX as far as the CPU is concerned. When user code calls it, we get an instruction fetch fault, and the kernel fixes it up. > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.