From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 512701DDF6 for ; Thu, 28 Mar 2024 13:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711634347; cv=none; b=MyphtRoctHRvXPGt/ICBaSIS/uKcWntaYvFjiJnyATOYSzpJSvrzX1yc0gY51DVUzfQ4bv5qG+1qiU92HflLAxj5GZFSWWXEFDUsk6UbWtAW6cam5CglSYCMZA3XzaebJ14d18EDEmFvzuroihfDRyEpRySd8vnSdnNN+89jTlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711634347; c=relaxed/simple; bh=NK7LET77latJxFetZ4zO1WlQhyaBRI6+mpEFOHPiO1k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SwlTMgoZJwMhj6QYLc6Lq5OOuc7XuQWu/mm/ki5HsDBoD3OVOYp+nHVLHYNPVsajSGzb3ykFjzo9rWQ2rNxf6vjPBOkecE9EUUXtXnK9WVJLjoaOxHqHi4U9bWFGh9NitzbkyQJzRtrSpAnaFmCp+ZvYHULNSie+inSZBS04EG8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=XPoIQ5MR; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XPoIQ5MR" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-413f8c8192eso75045e9.0 for ; Thu, 28 Mar 2024 06:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711634343; x=1712239143; darn=lists.linux.dev; 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=UhSlWCplow3q0UiENwQXBqJUPqprxyAeOLjfYZq98Wg=; b=XPoIQ5MRFyuOvTaSy/QPMT+AqORSvKy0CM0uua1GwexcIo57QwEgfgEyyuVCrgBnHZ AI1KvOh/Zxc5cU695GZXTvc3AFAcx+j9PdyE7hcUL8QywwsU0zmYWLe6NrqJH1ATfERT i3q1MMCgdJ3a8exAr42dzF/T/BRwdSYwOJDmvbaCJpqiUn+IofSM8bUBJhhA4y5yhhG9 +NLaOBDVtkPwGQAS+IgXQ+CeyF/BRTe78WxrvuP18wvuOoCEPCkI9GU1bh3dyWqfqPez Vg5GmrzLkws8bf1bFGyWzDYuwQDHRYsSooYq/i28TCLjzToG2BOG6HGWodHXTL4i/L1R koFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711634343; x=1712239143; 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=UhSlWCplow3q0UiENwQXBqJUPqprxyAeOLjfYZq98Wg=; b=mCqE00wvjQ6sfn5+lp8mhxR2pJQ+10eOPC6/m10C3X+/wSEs6LXXYlR5sw66TBvEF+ VHAA1kZA1bogky+h+AWKHMTzqnMulyNP3gznXzfxBDsqKydpA5dBKc2MtbOFPk8k+/nc xhuMVtWzeCUnHZO5Hysi7vMI+Syz44iayKLw2ULbCczBUR0IalhyXJ1LQlRC6pYkl6WG 9xAFCXxbyO4p4eLLXIT2Ya15DIbztutcWwZpFQ4Jw4zJCqwsypBOm9z5GyqYwiwEogZW /zTJH1krZb4vZGYfakDMUjBT8H2VtFGKE3vs68HXRnNhpH4e+9tBdS1+gdVLdIVVRhpi WFag== X-Forwarded-Encrypted: i=1; AJvYcCUoLh1fXMSzpaptDdhr7/wfCoXScRiS9IL0bNku1+q/FMz/V3bXLAR2YNjjoP4Z6amxEmPODTWobVUku0o++IpTlwnOmjql X-Gm-Message-State: AOJu0YwOnTYhnQB26hngZdUbTdS84rDgD57/a1Crl1Sx2bAZjn2oGQ+a glYNBaDqczdT7o8PvqjTq69+QCsaQhx2jyDEOJhS2QCdDAjv109lkbmC0GKNhw== X-Google-Smtp-Source: AGHT+IFkjqEo9WYWh9uwV7qW8tTZm/X3G1itWmwY9D+9DsKXDmdQqm31owW8ZokBAn+BbbDZkcRWnw== X-Received: by 2002:a05:600c:3584:b0:414:daa3:c192 with SMTP id p4-20020a05600c358400b00414daa3c192mr213991wmq.0.1711634343417; Thu, 28 Mar 2024 06:59:03 -0700 (PDT) Received: from google.com (248.199.140.34.bc.googleusercontent.com. [34.140.199.248]) by smtp.gmail.com with ESMTPSA id l6-20020a05600c4f0600b0041469869d11sm5499477wmq.47.2024.03.28.06.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 06:59:02 -0700 (PDT) Date: Thu, 28 Mar 2024 13:59:00 +0000 From: Sebastian Ene To: Oliver Upton Cc: catalin.marinas@arm.com, james.morse@arm.com, jean-philippe@linaro.org, maz@kernel.org, qperret@google.com, qwandor@google.com, suzuki.poulose@arm.com, tabba@google.com, will@kernel.org, yuzenghui@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 2/2] KVM: arm64: Allow only the specified FF-A calls to be forwarded to TZ Message-ID: References: <20240322124303.309423-1-sebastianene@google.com> <20240322124303.309423-2-sebastianene@google.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Mar 26, 2024 at 01:42:26AM -0700, Oliver Upton wrote: > On Mon, Mar 25, 2024 at 11:29:39AM +0000, Sebastian Ene wrote: > > On Fri, Mar 22, 2024 at 07:07:52PM -0700, Oliver Upton wrote: > > > On Fri, Mar 22, 2024 at 12:43:03PM +0000, Sebastian Ene wrote: > > > > The previous logic used a deny list to filter the FF-A calls. Because of > > > > this, some of the calls escaped the check and they were forwarded by > > > > default to Trustzone. (eg. FFA_MSG_SEND_DIRECT_REQ was denied but the 64 > > > > bit version of the call was not). > > > > Modify the logic to use an allowlist and allow only the calls specified in > > > > the filter function to be proxied to TZ from the hypervisor. > > > > Hi Oliver, > > > > > > > > I had discussed this with Will back when the feature was upstreamed and > > > he said there's a lot of off-label calls that necessitate a denylist > > > implementation. Has anything changed to give us confidence that we can > > > be restrictive, at least on the FF-A range? > > > > > > > I remember your proposal for having an allowlist instead. The current change makes > > sense if we have https://lore.kernel.org/kvmarm/20240322124303.309423-1-sebastianene@google.com/ > > which opens the window for more FF-A calls to be forwarded to TZ. > > Got it. Last time I didn't catch the level of abuse we expect to endure > from vendors, but now it seems we will not support non-conforming calls > that appear in standardized SMC ranges. > > Adding mention of this to the changelog might be a good idea then. > That's a good point. I didn't create a changelog for this but I should add one and specify this. > -- > Thanks, > Oliver Thanks, Sebastian 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 95209C54E67 for ; Thu, 28 Mar 2024 13:59:20 +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=esXi9SndMZdayixzsClNQkyqsWcDgiHEUWWpi5vEpSg=; b=B2Oo4ASfySI8CH gAc7rbu3U3f6D8vEQIXvRlhvQF1WJW9ybhBBShca7AePH0fjJOpMn9sPrta/Aa+ZeuzTUV4XlDJnb roiqS9xOgH/H5SJw3l/iqzVaf5TzeoZ1LDZJKqglYjoH1EL1lRqVOL1rb3MCRHrbLEBbLi7RJr/pF sjL6o3DrjxKLTIcFV5ewLqOnl64IPDsP/GKlCtPa95GA0cb8QAJ3ItlJRUCULfY3XSzdlFoNQPb+j 5ahu2+tiv4JgspbvA8Dqvu3RCbMfkh6LoSC75NZ0Bs0Z5pkiSSXpBmKJsxLVJpkCj6FgwoSh7MbM+ y8y1FkZ6ewBd33vnvAkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpqHe-0000000EDE0-3hw1; Thu, 28 Mar 2024 13:59:10 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpqHb-0000000EDCc-1Urh for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 13:59:09 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41549a13fabso30035e9.1 for ; Thu, 28 Mar 2024 06:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711634343; x=1712239143; darn=lists.infradead.org; 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=UhSlWCplow3q0UiENwQXBqJUPqprxyAeOLjfYZq98Wg=; b=PzM47zolf9qdqMPaLYa3Ao4QtIEg16EPXh7v2va83LSwRLHo5BDWYkPDqU4ARIaG0X temQtHu8iQwdoE9E3T6XLzGo012q4lmJ+HL7WNLczH5roizfn7FADt4lxhPc1gtglGqZ bjiQismEg350RBX1vqso8XA0mU6brxBFp++QOynEcQRjPoU3vgoopcxka/qn0fMUkogT ONBQTNhxxzTlrG3WqCZbRT0gUnAFAN0K0O33M9MK5JcYT76Eq/1xHhYOHfLI99mCnYj8 8xD+tcqMJ/vg67zl3ZZ9NrgekXaKl/evt68JDzrRw/ib91/vRCV6KAAklKKRJ1241UAW BSLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711634343; x=1712239143; 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=UhSlWCplow3q0UiENwQXBqJUPqprxyAeOLjfYZq98Wg=; b=qJjc/YSt1WGzW2cI5OTo2+qFCeUyTh9CmnDoLc2C5eaoxy0Rqodh2cIYoL4s0Q3mcQ XgJAUllsUs7bF5LDc+Ik1wyvfjlL1dRFrOuakwBGAA+7R0LQyXW8N7+h+v6HKLJjybrl lSf5WzVccDeJlSD6Zx5ETFrDVRhe150mAMKrae7eYp9SW26cOXRTyqtwh3BmqKtdXCoD 1AG8pScEdhC+A8b6WIB0fke6I2iWwLXjIQNIDcFys4AGYJ6fsfGtJ4OmqKM+EYT6xYgO xnwKLgOs2sLFchSYKRREp55EJ7JGvkn3/pnrW9JFL8YiEM80Ygghzri+ZCQqSlKCxUWT Wtuw== X-Forwarded-Encrypted: i=1; AJvYcCWwhN46ulBgqk6C0Y0nV+wsvtwm3wVGruspQoXeFphJSQO3Xep4bm0BAW737P6QUHR5mwVZzzcI7cNBOSK2RLfwodoNE+vMIEIUQy4i8iejkv7LDlY= X-Gm-Message-State: AOJu0YxaEqRNMjO5wWnou/0C8hiRHJEaAuuMAlkxoIT/hyA/H0zqv3Vw VxWJInYVJJeWRGihjvh+5BfYGSUVWiDY+4x94zSUtF6yyqkqEub4uodfILgLqA== X-Google-Smtp-Source: AGHT+IFkjqEo9WYWh9uwV7qW8tTZm/X3G1itWmwY9D+9DsKXDmdQqm31owW8ZokBAn+BbbDZkcRWnw== X-Received: by 2002:a05:600c:3584:b0:414:daa3:c192 with SMTP id p4-20020a05600c358400b00414daa3c192mr213991wmq.0.1711634343417; Thu, 28 Mar 2024 06:59:03 -0700 (PDT) Received: from google.com (248.199.140.34.bc.googleusercontent.com. [34.140.199.248]) by smtp.gmail.com with ESMTPSA id l6-20020a05600c4f0600b0041469869d11sm5499477wmq.47.2024.03.28.06.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 06:59:02 -0700 (PDT) Date: Thu, 28 Mar 2024 13:59:00 +0000 From: Sebastian Ene To: Oliver Upton Cc: catalin.marinas@arm.com, james.morse@arm.com, jean-philippe@linaro.org, maz@kernel.org, qperret@google.com, qwandor@google.com, suzuki.poulose@arm.com, tabba@google.com, will@kernel.org, yuzenghui@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 2/2] KVM: arm64: Allow only the specified FF-A calls to be forwarded to TZ Message-ID: References: <20240322124303.309423-1-sebastianene@google.com> <20240322124303.309423-2-sebastianene@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_065907_466961_48E9F34A X-CRM114-Status: GOOD ( 27.36 ) 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 On Tue, Mar 26, 2024 at 01:42:26AM -0700, Oliver Upton wrote: > On Mon, Mar 25, 2024 at 11:29:39AM +0000, Sebastian Ene wrote: > > On Fri, Mar 22, 2024 at 07:07:52PM -0700, Oliver Upton wrote: > > > On Fri, Mar 22, 2024 at 12:43:03PM +0000, Sebastian Ene wrote: > > > > The previous logic used a deny list to filter the FF-A calls. Because of > > > > this, some of the calls escaped the check and they were forwarded by > > > > default to Trustzone. (eg. FFA_MSG_SEND_DIRECT_REQ was denied but the 64 > > > > bit version of the call was not). > > > > Modify the logic to use an allowlist and allow only the calls specified in > > > > the filter function to be proxied to TZ from the hypervisor. > > > > Hi Oliver, > > > > > > > > I had discussed this with Will back when the feature was upstreamed and > > > he said there's a lot of off-label calls that necessitate a denylist > > > implementation. Has anything changed to give us confidence that we can > > > be restrictive, at least on the FF-A range? > > > > > > > I remember your proposal for having an allowlist instead. The current change makes > > sense if we have https://lore.kernel.org/kvmarm/20240322124303.309423-1-sebastianene@google.com/ > > which opens the window for more FF-A calls to be forwarded to TZ. > > Got it. Last time I didn't catch the level of abuse we expect to endure > from vendors, but now it seems we will not support non-conforming calls > that appear in standardized SMC ranges. > > Adding mention of this to the changelog might be a good idea then. > That's a good point. I didn't create a changelog for this but I should add one and specify this. > -- > Thanks, > Oliver Thanks, Sebastian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel