Received: by 10.223.164.202 with SMTP id h10csp2027047wrb; Sat, 18 Nov 2017 11:11:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMamIDrV14POLsLhWCUTmzUnCllgLcXaPS5L4Jq5ZlqeS3EUXb9c5hfk9JgLFlmWyi3mnRSh X-Received: by 10.98.9.79 with SMTP id e76mr6125687pfd.70.1511032295385; Sat, 18 Nov 2017 11:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511032295; cv=none; d=google.com; s=arc-20160816; b=1KqlF0iIaqlOVhQt/PqWKKVcrTwgzgflOVvUWSo3CBa9ESAkeF63c50OnibBJrPEFD Bpn18jpHzxIKkFUc4QMnegFZvMT7UDl1lmM4ANzHCVhNVbVDX6YZVJbq7OL2m3MU5Yx/ joI1fOXvz4hi66xcaNmIlaHWE9RxBp/8kkTeeR7RAtxnR8l9N6FCLIf6RAIRigaZ+1ms ZNVMNmwW1468sTtN2M2m7U1Ipk0J86LjBDkTD5h3p053J2DdQONvyTwj7Bz33/irqm6P B77zJ3iN3JxziAN4MfOWVTNC2ZNDAkpSlW/bI8YiHLvlxV1yFM/psL8yCfCLUhy7w3NQ PESg== 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:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=Q6RM25Kv3zQX7ER+yiCzJj7iWbnrMTu0ECxX61/Hk1Y=; b=c02pEuusj2FzU14y5mhVm2ymcP5WTYc54nuqyUcozogfJOWSfkjVmRQRn5OSkLQ9Fr usf7u2nq/j8js/R1STn0fr73+2HWpqPeePRAkThZHowkrXG/+r5tqrdGo2DT92v8scpn 73N7PWMvBJ645KeW7hhlVbCRr6IdiwugxMW6mu19UzWbyqEETS/DqGK9HOOI8eQmwimH SfenGLeHvVodraZ2rp2lanJ3WOSl9tBGo1JdTe+Ex1h1lf/V9ZDHgJ3kS3dVD2EE8BK7 VXme6tPXA3wAxuSWbwLbRJRgvbSC1OZywvaMWOGI3uKHdMKDuIt7od/1JLaeAATu/5E9 jezQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=kNdvMHV6; dkim=pass header.i=@codeaurora.org header.s=default header.b=I2zZs7XI; 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 o7si476891pgr.665.2017.11.18.11.11.22; Sat, 18 Nov 2017 11:11:35 -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=pass header.i=@codeaurora.org header.s=default header.b=kNdvMHV6; dkim=pass header.i=@codeaurora.org header.s=default header.b=I2zZs7XI; 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 S1030542AbdKRATp (ORCPT + 93 others); Fri, 17 Nov 2017 19:19:45 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:49080 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756913AbdKRATh (ORCPT ); Fri, 17 Nov 2017 19:19:37 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 30FD56020A; Sat, 18 Nov 2017 00:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510964377; bh=xKPNMa63dc0I8tEzCecyZgv1G7PH4eaqNQZK2615BPc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kNdvMHV6icCB7758+8eFmYuQxqeFJ7R6kwPIOrZ3whfJzm4YKmlqVuPKehQbohxfs dB6gAPXqHlGJRHho3ES8rh+1zgsKvgoLmmsBEiygqHCquiuxEB5MP9afX5PNLZbcvk hvp4Lk0Z09K2fKQNJdTdr+c1WW2/FuP3TURu8TM0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 006E26020A; Sat, 18 Nov 2017 00:19:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510964376; bh=xKPNMa63dc0I8tEzCecyZgv1G7PH4eaqNQZK2615BPc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I2zZs7XIr6bKUSbs732tA4f0V8F05VQ/epdlf0BnnyoZyU8MvgxIMIuSUK6xa/W8q Wh6mzFgxTggQugG42JYXN48FXLOQ3IMlzEGalSehpOwDy5SLd3hjkXQtlOwbZgmXEK P/1l3ywaxGwYKrv+3pG5YU9V2KURgiEy9chVWdps= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 006E26020A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Fri, 17 Nov 2017 16:19:35 -0800 From: Stephen Boyd To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, ard.biesheuvel@linaro.org, dave.hansen@linux.intel.com, keescook@chromium.org Subject: Re: [PATCH 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER) Message-ID: <20171118001935.GB18379@codeaurora.org> References: <1510942921-12564-1-git-send-email-will.deacon@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1510942921-12564-1-git-send-email-will.deacon@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/17, Will Deacon wrote: > Hi all, > > This patch series implements something along the lines of KAISER for arm64: > > https://gruss.cc/files/kaiser.pdf > > although I wrote this from scratch because the paper has some funny > assumptions about how the architecture works. There is a patch series > in review for x86, which follows a similar approach: > > http://lkml.kernel.org/r/<20171110193058.BECA7D88@viggo.jf.intel.com> > > and the topic was recently covered by LWN (currently subscriber-only): > > https://lwn.net/Articles/738975/ > > The basic idea is that transitions to and from userspace are proxied > through a trampoline page which is mapped into a separate page table and > can switch the full kernel mapping in and out on exception entry and > exit respectively. This is a valuable defence against various KASLR and > timing attacks, particularly as the trampoline page is at a fixed virtual > address and therefore the kernel text can be randomized independently. > > The major consequences of the trampoline are: > > * We can no longer make use of global mappings for kernel space, so > each task is assigned two ASIDs: one for user mappings and one for > kernel mappings > > * Our ASID moves into TTBR1 so that we can quickly switch between the > trampoline and kernel page tables > > * Switching TTBR0 always requires use of the zero page, so we can > dispense with some of our errata workaround code. > > * entry.S gets more complicated to read > > The performance hit from this series isn't as bad as I feared: things > like cyclictest and kernbench seem to be largely unaffected, although > syscall micro-benchmarks appear to show that syscall overhead is roughly > doubled, and this has an impact on things like hackbench which exhibits > a ~10% hit due to its heavy context-switching. Do you have performance benchmark numbers on CPUs with the Falkor errata? I'm interested to see how much the TLB invalidate hurts heavy context-switching workloads on these CPUs. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project From 1584366039367167465@xxx Sat Nov 18 01:39:59 +0000 2017 X-GM-THRID: 1584366039367167465 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread