Received: by 10.223.185.116 with SMTP id b49csp3072930wrg; Mon, 5 Mar 2018 13:38:47 -0800 (PST) X-Google-Smtp-Source: AG47ELvFihFmYazqhKDiEJQoHCUboVfbtTl5gnU7aNLWg9JBfWAn4tMYG0cXtGCjVzFc3jrAxBJ7 X-Received: by 10.98.161.10 with SMTP id b10mr16665685pff.240.1520285927588; Mon, 05 Mar 2018 13:38:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520285927; cv=none; d=google.com; s=arc-20160816; b=NCKoKA4JduA3MCwZAxsHXZRKxt8pFznOcMqZ1XlnW8RrnSxiIRRlNC0odOxskmUHmh OYD86V5JuELfqU5Dm/6CXoRlRN0+pGDBLzxgYv3ccxOu3TiGeacfEefCwaI6cp5vT2ph OeOnOOVzQadzekg4WtEXO8jn3NhAt1m/E96GgGXJtV6ilue2J0xu1RAA9U9wmr9y+wxI rsYNmdl3oS38JXsDNkD8RD4WwZb5/AuxrmOfp921RRB6PkPkuCQ1Mb2yuD+mLeSetl6a crmEKu53eNoEZJ+anFQOIMT79gEWEKI+xoSaLH4cNIlk9wkXJ3pg5ZZByhIQb9T4R0+w GEmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=YkG5o87QVFAv4DcoNh0ORrjGhd/zFyVM+rEWX6BE5v8=; b=FHKs8MLkz9+wJ+juGU0igjehpMSQK3azq02aZE0XqVTcAnQvs8Tw+it5SOF4GzwefI D2hoOGsZAVZzuXkGabkzCl2coLFu8T/rl5Zg3apjN7yXs0foHcU0gDouGMWvb0+mYrdx T+PSgpNNVJe4kSqHLpd56slKPA6zs2SvdrX19zwg5wp6yIIh2r7QXOV4Dq/XCTaoTdFO BWCQoUjuNfDQ+Z0SkZnG7m30CIM+kysMh3rnuKXCjfvX4WYx6pxxkHOu5a42CuA2Ev9R BRtqRoSRHTiLCejFMaWzjxjvIrUgyZfsxJ+GrGjNoJYp0syW0wvTrP753agNJ15AT4HC GfYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=AXamb/K9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si8877796pgs.605.2018.03.05.13.38.33; Mon, 05 Mar 2018 13:38:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=AXamb/K9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933172AbeCEVf5 (ORCPT + 99 others); Mon, 5 Mar 2018 16:35:57 -0500 Received: from 8bytes.org ([81.169.241.247]:47808 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932470AbeCEVfw (ORCPT ); Mon, 5 Mar 2018 16:35:52 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id EF5FED4; Mon, 5 Mar 2018 22:35:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1520285750; bh=Vq1K7Z1R5P6czMoZO+2+bW9FZbtHk4USSn6E4jZFHw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AXamb/K9XRmylOg3NoUWnyGCECr08ja0legQrg/kIqZ2RkOctZgxK0SUKA5OZfmf1 KkbCelcItWtKIXQLkJWJDvN4bkrMiY6lASyOWLm2AJ8f6euUBPjl9XJHBj25yt/aKR djYMP8JNDCrqGy/7POSCIkFb2ClvDj8gcd0ASfrc+SBUiNTWGmYTbPKPPjttINfM7n sSghLjDKucRdnXc/ZoEwmx4sDpN63H+HL6CjPJZIsMl3pKv3v+IqSppS1oNQu1ND7X x+flgXIKS7OAgOJUAi9053FiWaTxGnbEzIspc+SlQIf+28PflADZORSbHnDopy9p5p JmvsKRduQlFjA== Date: Mon, 5 Mar 2018 22:35:50 +0100 From: Joerg Roedel To: Linus Torvalds Cc: Brian Gerst , Thomas Gleixner , Ingo Molnar , Peter Anvin , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andrew Lutomirski , Dave Hansen , Josh Poimboeuf , =?iso-8859-1?Q?J=FCrgen_Gro=DF?= , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , David Laight , Denys Vlasenko , Eduardo Valentin , Greg Kroah-Hartman , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , Joerg Roedel Subject: Re: [PATCH 07/34] x86/entry/32: Restore segments before int registers Message-ID: <20180305213550.GV16484@8bytes.org> References: <1520245563-8444-1-git-send-email-joro@8bytes.org> <1520245563-8444-8-git-send-email-joro@8bytes.org> <20180305131231.GR16484@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 05, 2018 at 12:50:33PM -0800, Linus Torvalds wrote: > On Mon, Mar 5, 2018 at 12:38 PM, Brian Gerst wrote: > > > > There already is a test: single_step_syscall.c > > Ahh, good. So presumably Joerg actually did check it, just didn't even notice ;) Yeah, sort of. I ran the test, but it didn't catch the failure case in previous versions which was return to user with kernel-cr3 :) I could probably add some debug instrumentation to check for that in my future testing, as there is no NX protection in the user address-range for the kernel-cr3. Joerg