Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2910664rwd; Wed, 14 Jun 2023 08:47:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5J4hzjvnfpmJy86gx5ApwtsFtVFks235uSr5LqOgoMRnAPq50vjpvo1NLwUKAILIk1ZSrZ X-Received: by 2002:a17:906:4fce:b0:982:4abc:97d6 with SMTP id i14-20020a1709064fce00b009824abc97d6mr3542163ejw.4.1686757678188; Wed, 14 Jun 2023 08:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686757678; cv=none; d=google.com; s=arc-20160816; b=m91pEot73sdsZLv8oYGVu9hGEPvmOD1V+gy1YpwzOGoLC8DA8RK3QZarNDv6BIU8YX 5Qsay9Jy1662oB2WgJ6usJolZJtHb+UFXXtF4sJU7bAd9eDqxC/0Kmba/rC3aMMWty58 q6/Cd2OPAioXDyVrtu2No60HYC2IZWdZHrIo8qvnstxH3wHiYrw6+9lJGGsj7AI82gdG PZr6lL5vRosQHg1mK3lPRlFG50Vn1NA5n3FAZPJuRO3InATm3IA2BTWdyTkoJcbaQQV5 WyJ11qXkuuQ+6C/i8jDOZahNPI8RUO0B+ReVLoo8tL1pVFdkMkN/igr4rVEtu6+UbRZf h+nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CYKbp9Q0BeM52+XXi3aMvjzJfNpfbqXByiTdIuieW4g=; b=KC4z0o57UKF9VgcBONco8U6+Zu5EmbeaUVzvFTxJpa3UbCPbzx6OUpKiXbF72Yca08 PzWsc+m3j8cbvWxh9+hXZp62Tu0UPc47EmzT5UqH54WTh84UUhguqDeJ4QLEfoL8IEao COERZdTDehrlbt+AXI41LGD+Qbi3/5xNvNa6hqgO0uijUOd8/IDwEStQBum6ZPR1LBU+ BFPxHrJs48p3ayn8idgBJO+hAlpuTwHiR1d2X0zcnUtnTPimHTvBbD9zqn0VJa6QYCfu AjwJwyXr/JvjiNXg54tXjr26xmseIEQCVXGvzOrMlgYAENKh1sksOpsaRbOJqlDtdgD1 FiEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ejyEaxmg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b21-20020a170906195500b00977d2c8a210si8104561eje.560.2023.06.14.08.47.26; Wed, 14 Jun 2023 08:47:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ejyEaxmg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244220AbjFNPcQ (ORCPT + 99 others); Wed, 14 Jun 2023 11:32:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243752AbjFNPbs (ORCPT ); Wed, 14 Jun 2023 11:31:48 -0400 Received: from out-59.mta1.migadu.com (out-59.mta1.migadu.com [95.215.58.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B549FB6 for ; Wed, 14 Jun 2023 08:31:46 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1686756704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CYKbp9Q0BeM52+XXi3aMvjzJfNpfbqXByiTdIuieW4g=; b=ejyEaxmgzfyiMYJ2Vleh7ornI7PLLaFCXL0QtoGCEzSqXZeE+aeSAHa9bGs8qcEfvN+GdI 6QBiDAhRREsBGwDEHb0do6SgyuATtK5gKrAL0AETuPTeqL2mRZM939ezA8/a7/MJ6DBnmu hE3lVIU9tPflVcLqFu/8HdfnZ2QR9og= From: Oliver Upton To: kvmarm@lists.linux.dev, Mostafa Saleh , maz@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Oliver Upton , catalin.marinas@arm.com, yuzenghui@huawei.com, tabba@google.com, kaleshsingh@google.com, suzuki.poulose@arm.com, will@kernel.org, james.morse@arm.com Subject: Re: [PATCH v2] KVM: arm64: Use different pointer authentication keys for pKVM Date: Wed, 14 Jun 2023 15:31:28 +0000 Message-ID: <168675651878.3255755.17510485264525909343.b4-ty@linux.dev> In-Reply-To: <20230614122600.2098901-1-smostafa@google.com> References: <20230614122600.2098901-1-smostafa@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Jun 2023 12:25:59 +0000, Mostafa Saleh wrote: > When the use of pointer authentication is enabled in the kernel it > applies to both the kernel itself as well as KVM's nVHE hypervisor. The > same keys are used for both the kernel and the nVHE hypervisor, which is > less than desirable for pKVM as the host is not trusted at runtime. > > Naturally, the fix is to use a different set of keys for the hypervisor > when running in protected mode. Have the host generate a new set of keys > for the hypervisor before deprivileging the kernel. While there might be > other sources of random directly available at EL2, this keeps the > implementation simple, and the host is trusted anyways until it is > deprivileged. > > [...] Applied to kvmarm/next, thanks! [1/1] KVM: arm64: Use different pointer authentication keys for pKVM https://git.kernel.org/kvmarm/kvmarm/c/8c15c2a02810 -- Best, Oliver