From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30E96313E29; Tue, 7 Jul 2026 14:03:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783433010; cv=none; b=mk1YK10y42+PlCwRAEcAGg23+oqTMVdhAZSbCN8uHzMWdnrSg+0L6O9RHz9Fp2eAQl8ZR8BHVpMGJSvFN6Sr+8fKE4pZOa6eQEB8pTnWWyUWM0/TdwiB18ETB8PRrtG0I5/25/xslsPplht7P72hX1guolOhSMMseTgql4wXi/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783433010; c=relaxed/simple; bh=il2J2gdV62bj82WEBJwjQ4QoNdv/Fpkk+Qw1CgrRbvk=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=a5921kFO2qdtYR/0vuvtG776Bp2d4YJ+i4NyZPcYwHe97KoqmpYmEzeQglfSLAYplQk5B4GulP40ovjVMzfqeTGcceZ/3glJd2VPgaTQeeeI9o0cw4lI5+B6BxsLy2ZaJ9AfVb0degjocasrW8TPPmhCo9WDAyfVP9BfzbIE4KI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l0bldvom; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l0bldvom" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6BBE1F000E9; Tue, 7 Jul 2026 14:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783433008; bh=tTRBXbvulB91ZVKgj2dOdSPkdCSn+3IeDxDA7Og0HyM=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=l0bldvom+caLP5yxjwhpxc1Q9tIBSGgD9FBkTCNJMcAJevbO//baG8pQfZCeo+7xM ZzKsLwooUHUpSwFStTa0zagHbVsoWeYNiSJjNPTTLtQBbbYB1oVuUcef9VytYQc4ii YoFbLm2ydM+E3L9+ky0G6zDJKMzZYQzyxlXlsAZkc80t7zyILm1zvwFtgRBsnGmSXd YcVWyDWQtiT+ZHVsov1P5XcmnZPm5YLFLSRM0ijyiCdVJg5FmlBoiENQygRBq4aBr/ Ec1PbTPQ66iu8T8D/FoLUhkwJzKksZPp9EDXAkrKQi/UIGzn5SveUeWf2H2Q/8xQ9e ug22o/sZcoERg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wh6OU-00000002RFJ-3ZbS; Tue, 07 Jul 2026 14:03:26 +0000 Date: Tue, 07 Jul 2026 15:03:26 +0100 Message-ID: <864iiaq4lt.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon Cc: sudeep.holla@kernel.org, catalin.marinas@arm.com, oupton@kernel.org, Sebastian Ene , jens.wiklander@linaro.org, joey.gouly@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, android-kvm@google.com, mrigendra.chaubey@gmail.com, op-tee@lists.trustedfirmware.org, perlarsen@google.com, seiden@linux.ibm.com, smostafa@google.com, sumit.garg@kernel.org, suzuki.poulose@arm.com, vdonnefort@google.com, yuzenghui@huawei.com Subject: Re: (subset) [PATCH v9 0/6] arm_ffa, KVM: Fix FF-A emad offset calculations In-Reply-To: References: <20260702103848.1647249-1-sebastianene@google.com> <178342187223.1892339.1923162787460489447.b4-ty@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: will@kernel.org, sudeep.holla@kernel.org, catalin.marinas@arm.com, oupton@kernel.org, sebastianene@google.com, jens.wiklander@linaro.org, joey.gouly@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, android-kvm@google.com, mrigendra.chaubey@gmail.com, op-tee@lists.trustedfirmware.org, perlarsen@google.com, seiden@linux.ibm.com, smostafa@google.com, sumit.garg@kernel.org, suzuki.poulose@arm.com, vdonnefort@google.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 07 Jul 2026 12:56:24 +0100, Will Deacon wrote: > > On Tue, Jul 07, 2026 at 11:58:01AM +0100, Marc Zyngier wrote: > > On Thu, 02 Jul 2026 10:38:37 +0000, Sebastian Ene wrote: > > > This series fixes the Endpoint Memory Access Descriptor (EMAD) offset > > > calculations and adds the necessary bounds checks for both the core > > > FF-A driver and the pKVM hypervisor. > > > > > > Prior to FF-A version 1.1, the memory region header didn't specify an > > > explicit offset for the EMADs, leading to the assumption that they > > > immediately follow the header. > > > However, from v1.1 onwards, the specification dictates using the > > > ep_mem_offset` field to determine the start of the memory access > > > array. > > > > > > [...] > > > > Applied to fixes, thanks! > > > > [3/6] KVM: arm64: Fix bounds checking in do_ffa_mem_reclaim() > > commit: 8c6db30d79528279abbeb416e4f533f1f91b8724 > > [4/6] KVM: arm64: Validate the offset to the mem access descriptor > > commit: a6b49d27c17909608d54523220bb6f3498d4a1df > > [5/6] KVM: arm64: Ensure FFA ranges are page aligned > > commit: 6a7a181f6921db3d9aed1bba7e15547fefd7eedc > > [6/6] KVM: arm64: Zero out the stack initialized data in the FFA handler > > commit: 2bd3c6c702f3a9e2bcb3b536b0fbbaa645005d71 > > Thanks, Marc! > > I think Sudeep was also happy for the driver changes to go via the KVM > tree, unless you'd prefer not to pick them up [1]. Ah, I missed that. Let me queue these suckers as well. Thanks, M. -- Without deviation from the norm, progress is not possible. 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 lists.trustedfirmware.org (lists.trustedfirmware.org [18.214.241.189]) (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 81C39C44501 for ; Tue, 7 Jul 2026 14:03:40 +0000 (UTC) Received: from lists.trustedfirmware.org (localhost [127.0.0.1]) by lists.trustedfirmware.org (Postfix) with ESMTP id A9FD944FDA for ; Tue, 7 Jul 2026 14:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.trustedfirmware.org; s=2024; t=1783433019; bh=il2J2gdV62bj82WEBJwjQ4QoNdv/Fpkk+Qw1CgrRbvk=; h=Date:To:Subject:In-Reply-To:References:CC:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Reply-To:From; b=yn8ivrFGX8pSThRXvxi2x+wlcfAzIqW0kZIkeAAGtBjg/zGtjuPZZtQRiG4GKXgrh ix36ioTXDLSt6G7m4aD01tx+losoZRn5fD9UwTLdQT5Jk3UiMhTVE75EVg9xEfxF4Y lAZzVDVmBJa/R8LI8dsGM/htTiTBsq9GtLYTDo3J37L48FkKDu1ote1h6t7X9zE9hv ogSYEqHz8ZauqCEX1cRc5kTijBuiHzVc+Wbo4+c7JdZC+MF6Kt5+YVaE0IwXj0IpDw JTuKZVzcUTc1r4HPOV1XJb8Yh1ZTEHFAgddHSLBo4Qr7q3/eI4sx2RUrFsPI/Zsf7/ 6MrlHHze+TzTQ== Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by lists.trustedfirmware.org (Postfix) with ESMTPS id A4E1A43815 for ; Tue, 7 Jul 2026 14:03:29 +0000 (UTC) Authentication-Results: lists.trustedfirmware.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l0bldvom; dkim-atps=neutral Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id E8C564008D; Tue, 7 Jul 2026 14:03:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6BBE1F000E9; Tue, 7 Jul 2026 14:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783433008; bh=tTRBXbvulB91ZVKgj2dOdSPkdCSn+3IeDxDA7Og0HyM=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=l0bldvom+caLP5yxjwhpxc1Q9tIBSGgD9FBkTCNJMcAJevbO//baG8pQfZCeo+7xM ZzKsLwooUHUpSwFStTa0zagHbVsoWeYNiSJjNPTTLtQBbbYB1oVuUcef9VytYQc4ii YoFbLm2ydM+E3L9+ky0G6zDJKMzZYQzyxlXlsAZkc80t7zyILm1zvwFtgRBsnGmSXd YcVWyDWQtiT+ZHVsov1P5XcmnZPm5YLFLSRM0ijyiCdVJg5FmlBoiENQygRBq4aBr/ Ec1PbTPQ66iu8T8D/FoLUhkwJzKksZPp9EDXAkrKQi/UIGzn5SveUeWf2H2Q/8xQ9e ug22o/sZcoERg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wh6OU-00000002RFJ-3ZbS; Tue, 07 Jul 2026 14:03:26 +0000 Date: Tue, 07 Jul 2026 15:03:26 +0100 Message-ID: <864iiaq4lt.wl-maz@kernel.org> To: Will Deacon Subject: Re: (subset) [PATCH v9 0/6] arm_ffa, KVM: Fix FF-A emad offset calculations In-Reply-To: References: <20260702103848.1647249-1-sebastianene@google.com> <178342187223.1892339.1923162787460489447.b4-ty@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: will@kernel.org, sudeep.holla@kernel.org, catalin.marinas@arm.com, oupton@kernel.org, sebastianene@google.com, jens.wiklander@linaro.org, joey.gouly@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, android-kvm@google.com, mrigendra.chaubey@gmail.com, op-tee@lists.trustedfirmware.org, perlarsen@google.com, seiden@linux.ibm.com, smostafa@google.com, sumit.garg@kernel.org, suzuki.poulose@arm.com, vdonnefort@google.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Rspamd-Action: no action X-Spamd-Result: default: False [-6.50 / 15.00]; WHITELIST_SPF_DKIM(-3.00)[kernel.org:d:+,kernel.org:s:+]; BAYES_HAM(-3.00)[99.99%]; DWL_DNSWL_MED(-2.00)[kernel.org:dkim]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW(-0.50)[kernel.org,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:172.234.252.31]; R_DKIM_ALLOW(-0.20)[kernel.org:s=k20260515]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWELVE(0.00)[20]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM(-0.00)[-1.000]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[kernel.org,arm.com,google.com,linaro.org,lists.linux.dev,lists.infradead.org,vger.kernel.org,gmail.com,lists.trustedfirmware.org,linux.ibm.com,huawei.com]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ALIAS_RESOLVED(0.00)[]; DKIM_TRACE(0.00)[kernel.org:+] X-Rspamd-Server: lists.trustedfirmware.org X-Rspamd-Queue-Id: A4E1A43815 X-Spamd-Bar: ------ Message-ID-Hash: ALOVEO3NCFV4NGYOZDRMJVFQ6A6I6RHD X-Message-ID-Hash: ALOVEO3NCFV4NGYOZDRMJVFQ6A6I6RHD X-MailFrom: maz@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-op-tee.lists.trustedfirmware.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sudeep.holla@kernel.org, catalin.marinas@arm.com, oupton@kernel.org, Sebastian Ene , joey.gouly@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, android-kvm@google.com, mrigendra.chaubey@gmail.com, op-tee@lists.trustedfirmware.org, perlarsen@google.com, seiden@linux.ibm.com, smostafa@google.com, sumit.garg@kernel.org, suzuki.poulose@arm.com, vdonnefort@google.com, yuzenghui@huawei.com X-Mailman-Version: 3.3.5 Precedence: list List-Id: Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Marc Zyngier via OP-TEE Reply-To: Marc Zyngier On Tue, 07 Jul 2026 12:56:24 +0100, Will Deacon wrote: > > On Tue, Jul 07, 2026 at 11:58:01AM +0100, Marc Zyngier wrote: > > On Thu, 02 Jul 2026 10:38:37 +0000, Sebastian Ene wrote: > > > This series fixes the Endpoint Memory Access Descriptor (EMAD) offset > > > calculations and adds the necessary bounds checks for both the core > > > FF-A driver and the pKVM hypervisor. > > > > > > Prior to FF-A version 1.1, the memory region header didn't specify an > > > explicit offset for the EMADs, leading to the assumption that they > > > immediately follow the header. > > > However, from v1.1 onwards, the specification dictates using the > > > ep_mem_offset` field to determine the start of the memory access > > > array. > > > > > > [...] > > > > Applied to fixes, thanks! > > > > [3/6] KVM: arm64: Fix bounds checking in do_ffa_mem_reclaim() > > commit: 8c6db30d79528279abbeb416e4f533f1f91b8724 > > [4/6] KVM: arm64: Validate the offset to the mem access descriptor > > commit: a6b49d27c17909608d54523220bb6f3498d4a1df > > [5/6] KVM: arm64: Ensure FFA ranges are page aligned > > commit: 6a7a181f6921db3d9aed1bba7e15547fefd7eedc > > [6/6] KVM: arm64: Zero out the stack initialized data in the FFA handler > > commit: 2bd3c6c702f3a9e2bcb3b536b0fbbaa645005d71 > > Thanks, Marc! > > I think Sudeep was also happy for the driver changes to go via the KVM > tree, unless you'd prefer not to pick them up [1]. Ah, I missed that. Let me queue these suckers as well. Thanks, M. -- Without deviation from the norm, progress is not possible.