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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C229EB64D7 for ; Tue, 13 Jun 2023 16:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IRmonKAVTkbMqzB8zEy/aXLAFkcks3IA1vDM86/usdY=; b=1yVgY6AG5zUEru DHWEzgFe09xOnz+sz4aLtZUdIfDu9H9IqJsKknj/bnn1ftyy+MIrLaJIWzxmC7zkhoNN4zd8IdRH9 0nyv1KCwN4E3jAZYnniLqUfgeOsoHH1xBVKjJO21GZZaAr13pht08ZVlO2HVqtZz/eHYYgoduC5Lw 1g4FudvNs4IP8HDk7eW6Unn5glAAYh9EWOIXyQbmpCQVYbjC/wonvIPO9aGORnqBlB08iCcqmRocK vz+v8FEZLrew+D6EvllnLE4+6OmP68RFXULGtT+5+mZgALVaV/dapyhgp95lNVvBLGnwyh95jYx4v A8bQE1Al3/6WS4IPySvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q96ru-008aun-2Q; Tue, 13 Jun 2023 16:27:42 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q96rq-008atR-2r for linux-arm-kernel@lists.infradead.org; Tue, 13 Jun 2023 16:27:41 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f81b83b8d5so95725e9.1 for ; Tue, 13 Jun 2023 09:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686673655; x=1689265655; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=bb4r2L6AwZcib8eVRxm1j5QUlHnbK0ehOb0SKNt4SPU=; b=e1nUAZBxdwX20Geah9m+G2IuD80yh27ymA1hBhn7th6kdEYIhlb08tJahgei4NPXLE TlgGmEgc/p6XQ6zk4vL56FkhUwBSL2bytiyhe160o8dx4NCqmLjbae7t31KRCQRN5KNx 3hhxUBhBgtAs7xhBDEFEufLFY2enbRYoWTN9q/jrnljkFWOGqQoYNSZT7gfzthNY+WR1 4hcYZG9ZLw+0nMSl1O2pRZ17wkZjAUMR12qlZ8VWScwA7kRnDpTOd0fpeeb9vJ0IX5fB 9qkvdJmUkTsAE0tRIFrrg7DjwsArDvIScL8EA1RoZxyN0KzqhZZR/IeLyckCMNlJx8dv 8dVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686673655; x=1689265655; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bb4r2L6AwZcib8eVRxm1j5QUlHnbK0ehOb0SKNt4SPU=; b=eSBV8UySZCEaMbNK62Ij4gtVAWqRa2am0QXsEninN9gMogY/mZ9FbNArBDelGiNUOi 92MYCcfi/lmgtStJ3ci5TwUyx0QRFZgQmmkFe166tcyDyrsZzvlVsMLkOnljLYk0VBHn U5gZTD/XGmytDfnpLiGJuiMbqh9mjiePiTrgnGWjcNtNt5bKJh3M3VnvFs0IIouer0Tr GujuMzZntMb123aBlBssjCC3LfAg8krXlP9JU466OGBLKnfZvuBDSlo4Y8zG8MuJUL9Q 4+VG+ZUAbL4TG2MFI/pQZ1nftdePS3oLenwvQArPHh/U4Zg0WOshepZpDHMyyB6TaHw5 tkog== X-Gm-Message-State: AC+VfDxoIx18mq9HjSucbDt7u4KWPvP0MulL5YeNBZWAJ8HX+3s3HlMD SaZxSlZZkkIdajFAGGzvHhb2Yw== X-Google-Smtp-Source: ACHHUZ7WP0YlatKkxy7A15OCib42caMtXP4jusH0MPAzWXQ3c89i4Ak3A54HsaSwRdX46YQ2Sv6VAA== X-Received: by 2002:a05:600c:3c86:b0:3f7:3654:8d3 with SMTP id bg6-20020a05600c3c8600b003f7365408d3mr148549wmb.2.1686673655192; Tue, 13 Jun 2023 09:27:35 -0700 (PDT) Received: from google.com (44.232.78.34.bc.googleusercontent.com. [34.78.232.44]) by smtp.gmail.com with ESMTPSA id t11-20020a7bc3cb000000b003f60eb72cf5sm14998338wmj.2.2023.06.13.09.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 09:27:34 -0700 (PDT) Date: Tue, 13 Jun 2023 16:27:30 +0000 From: Mostafa Saleh To: Oliver Upton Cc: kvmarm@lists.linux.dev, maz@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com, kaleshsingh@google.com, tabba@google.com, yuzenghui@huawei.com, catalin.marinas@arm.com, james.morse@arm.com, will@kernel.org Subject: Re: [PATCH] KVM: arm64: Use different pointer authentication keys for pKVM Message-ID: References: <20230516141531.791492-1-smostafa@google.com> <168665854178.2681974.13725664134174024912.b4-ty@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <168665854178.2681974.13725664134174024912.b4-ty@linux.dev> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230613_092738_928003_33BF2CD0 X-CRM114-Status: GOOD ( 18.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Oliver, On Tue, Jun 13, 2023 at 12:16:02PM +0000, Oliver Upton wrote: > On Tue, 16 May 2023 14:15:31 +0000, Mostafa Saleh wrote: > > When the kernel is compiled with CONFIG_ARM64_PTR_AUTH_KERNEL, it > > uses Armv8.3-Pauth for return address protection for the kernel code > > including nvhe code in EL2. > > > > Same keys are used in both kernel(EL1) and nvhe code(EL2), this is > > fine for nvhe but not when running in protected mode(pKVM) as the host > > can't be trusted. > > > > [...] > > Applied to kvmarm/next, thanks! > > [1/1] KVM: arm64: Use different pointer authentication keys for pKVM > https://git.kernel.org/kvmarm/kvmarm/c/fb737685beee > > -- Thanks! I did more testing and I found a bug in this patch. It seems there is another entry point for the kenrel where pauth was not handled properly "kvm_host_psci_cpu_entry", I will investigate this further and send V2. Sorry for the inconvenience! Thanks, Mostafa _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel