From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753787AbdEHNxo (ORCPT ); Mon, 8 May 2017 09:53:44 -0400 Received: from mrelay.tugraz.at ([129.27.2.203]:54367 "EHLO mrelay.tugraz.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbdEHNxn (ORCPT ); Mon, 8 May 2017 09:53:43 -0400 Subject: Re: [kernel-hardening] [RFC, PATCH] x86_64: KAISER - do not map kernel in user mode To: David Gens , Thomas Garnier References: <9df77051-ac01-bfe9-3cf7-4c2ecbcb9292@iaik.tugraz.at> <55fa194e-69bd-fe39-f915-6f77673aea36@iaik.tugraz.at> <01ebda5d918d9cbfd36d8ec4e6c12f55@cs.tu-darmstadt.de> CC: kernel list , Kernel Hardening , , , Michael Schwarz , Richard Fellner , "Kirill A. Shutemov" , Ingo Molnar , From: Daniel Gruss Message-ID: <62c69fb5-03a8-4f30-cbc1-4955e9efbb18@iaik.tugraz.at> Date: Mon, 8 May 2017 15:53:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [129.27.152.126] X-ClientProxiedBy: EXCG01-EXT.iaik.tugraz.at (2002:811b:98d3::811b:98d3) To EXCG01-INT.iaik.tugraz.at (2002:811b:981a::811b:981a) X-TM-AS-Product-Ver: SMEX-12.0.0.1464-8.100.1062-23056.002 X-TM-AS-Result: No--7.833500-0.000000-31 X-TM-AS-MatchedID: 150567-700075-139010-703417-704689-188019-702762-701236-7 02010-863828-700752-701604-706564-105700-700624-703747-700756-703523-148004 -148040-148053-10019-41000-42000-42003 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TUG-Backscatter-control: IqAlG2Mm08USmfDJcRVXXA X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06.05.2017 10:38, Daniel Gruss wrote: > On 2017-05-06 06:02, David Gens wrote: >> Assuming that their patch indeed leaks per-cpu addresses.. it might not >> necessarily >> be required to change it. > > I think we're not leaking them (unless we still have some bug in our code). Just to correct my answer here as well: Although we experimented with fixed mappings for per-cpu addresses, the current patch does not incorporate this yet, so it indeed still leaks. However, it is not a severe problem. The mapping of the required (per-cpu) variables would be at a fixed location in the user CR3, instead of the ones that are used in the kernel.