Received: by 10.192.165.148 with SMTP id m20csp3703437imm; Mon, 23 Apr 2018 10:51:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx49CKA6+zfXSiWgOgjK1x6zxGk5/SxBMuoTmDmr6mAFj1QlpQ9yyGyesQDrQDTI2kNQBPeTv X-Received: by 2002:a17:902:8e8c:: with SMTP id bg12-v6mr21515543plb.295.1524505870626; Mon, 23 Apr 2018 10:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524505870; cv=none; d=google.com; s=arc-20160816; b=YcLq8/DkxM5CRzbuV2sW3HpROaGcAtYHnTLrqi07n5lckxxe9nOyOchxnrTDdoPObd 2eif2WWFFk/ImRyAk8YXb87vscMWjjfxRoDd2AXkFWHktIkA8Zx6xXzdRgCL9MeqVxP7 cjMcfFAybQCF/zWhzzAmhTP1zFxlB15hEuTZB98CJq8oCY25NcP8LlGApcFBB0yCi1vZ wY9ukmDskzB84/j7wYaB1togAVMJnuDbkgRnHcMTNqy46j+O/YcKMTPHW2pbZj4N2q9C O3ffY3a/wy77cMc2ktt2H7yx/nx8ShQ0y/scr/NYOKIxQjpVIvL3CUXVvL68WrDw+Bpl NG9Q== 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:arc-authentication-results; bh=aOq9JaGUNJFdbhoXvn47RkGh1x5tWgQqU3lHE866bdg=; b=CCyGJmwT2TpP2kjhYnwpLZUI/dLNQoti3KyaV4/Tny0G2DN0KkBcCEnmWSf/Z7LOf2 quyAMIlh1BEZhHW08ut0QzbdrRLU7oKzcoUk/AHaKSPKq3V//T5X2fhC7d8wwKoV91k4 cUNmhW5/seamy1vMhAdPANR+5ih5hFaEZ9yUuF9Rgq3xv8AM0pfhAsNZXqSGeRSSCIQZ 9Bh/ox1sknG3qvQ5s74ezSMWAWNcBfoWMOUggZ0SdhoDlbWKtPGdVtU7sX/04BafVIjt LI5WHb8y9pAkUrRJu3Jv+Vuqra7muopmBh6d6awvEuH9nEn/1oQnvpSeRsk9nRoOsXoj RGog== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si11768033pfa.346.2018.04.23.10.50.56; Mon, 23 Apr 2018 10:51:10 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932415AbeDWRtM (ORCPT + 99 others); Mon, 23 Apr 2018 13:49:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:35137 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932379AbeDWRsx (ORCPT ); Mon, 23 Apr 2018 13:48:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 55266AE00; Mon, 23 Apr 2018 17:48:52 +0000 (UTC) Date: Mon, 23 Apr 2018 19:48:50 +0200 From: Joerg Roedel To: Kees Cook Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , Anthony Liguori , Daniel Gruss , Hugh Dickins , Andrea Arcangeli , Waiman Long , Pavel Machek , "David H . Gutteridge" Subject: Re: [PATCH 28/37] x86/mm/pti: Map kernel-text to user-space on 32 bit kernels Message-ID: <20180423174850.zjpx2mcs6dtfkgl3@suse.de> References: <1524498460-25530-1-git-send-email-joro@8bytes.org> <1524498460-25530-29-git-send-email-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 10:09:19AM -0700, Kees Cook wrote: > On Mon, Apr 23, 2018 at 8:47 AM, Joerg Roedel wrote: > > From: Joerg Roedel > > > > Keeping the kernel text mapped with G bit set keeps its > > entries in the TLB across kernel entry/exit and improved the > > performance. The 64 bit x86 kernels already do this when > > there is no PCID, so do this in 32 bit as well since PCID is > > not even supported there. > > I think this should keep at least part of the logic as 64-bit since > there are other reasons to turn off the Global flag: > > https://lkml.kernel.org/r/20180420222026.D0B4AAC9@viggo.jf.intel.com That patch you linked is for function pti_kernel_image_global_ok() which is used on 32 bit too. So any logic implemented for 64 bit to turn off the global bit will automatically be used on 32 bit. Regards, Joerg