From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9885C04EB8 for ; Sat, 8 Dec 2018 10:32:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9541820837 for ; Sat, 8 Dec 2018 10:32:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9541820837 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726165AbeLHKcj (ORCPT ); Sat, 8 Dec 2018 05:32:39 -0500 Received: from foss.arm.com ([217.140.101.70]:59064 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726107AbeLHKcj (ORCPT ); Sat, 8 Dec 2018 05:32:39 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 860C4EBD; Sat, 8 Dec 2018 02:32:38 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 30E4A3F575; Sat, 8 Dec 2018 02:32:33 -0800 (PST) Date: Sat, 08 Dec 2018 10:32:31 +0000 Message-ID: <861s6scnr4.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Kristina Martsenko Cc: , Adam Wallis , Amit Kachhap , Andrew Jones , Ard Biesheuvel , Catalin Marinas , Christoffer Dall , Cyrill Gorcunov , Dave P Martin , Jacob Bramley , Kees Cook , Mark Rutland , Ramana Radhakrishnan , Richard Henderson , Suzuki K Poulose , Will Deacon , , Subject: Re: [PATCH v6 04/13] arm64/kvm: hide ptrauth from guests In-Reply-To: <20181207183931.4285-5-kristina.martsenko@arm.com> References: <20181207183931.4285-1-kristina.martsenko@arm.com> <20181207183931.4285-5-kristina.martsenko@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 07 Dec 2018 18:39:22 +0000, Kristina Martsenko wrote: > > From: Mark Rutland > > In subsequent patches we're going to expose ptrauth to the host kernel > and userspace, but things are a bit trickier for guest kernels. For the > time being, let's hide ptrauth from KVM guests. > > Regardless of how well-behaved the guest kernel is, guest userspace > could attempt to use ptrauth instructions, triggering a trap to EL2, > resulting in noise from kvm_handle_unknown_ec(). So let's write up a > handler for the PAC trap, which silently injects an UNDEF into the > guest, as if the feature were really missing. > > Signed-off-by: Mark Rutland > Signed-off-by: Kristina Martsenko > Reviewed-by: Andrew Jones > Reviewed-by: Christoffer Dall > Cc: Marc Zyngier > Cc: kvmarm@lists.cs.columbia.edu Reviewed-by: Marc Zyngier M. -- Jazz is not dead, it just smell funny.