Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6016697pxb; Mon, 14 Feb 2022 13:12:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5GDY28fjdFrPTuNuCu6QnSSBOYmNICtt7plWumhnwCa2T73Motml05ihX1X/DgNYL9Luu X-Received: by 2002:a62:3603:: with SMTP id d3mr631913pfa.2.1644873177845; Mon, 14 Feb 2022 13:12:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873177; cv=none; d=google.com; s=arc-20160816; b=gQM+v/88szDPGVxIIODxzCYZ+xN1vIhxzOoPIICmWc5GyQKHlFj3TwY5uY3e7hoX+L qCCUGwYuRNracHtdWlKCAFuE2O5DmHo18LCrL8OmwdBRM14JDaWhrai7A+YFbMy7KVJO XW5A6qB9bHkr3ZNBRmHS8IFrn9hlpK8zWAqVQVFCaEQsJY+1kqKwUxvkU9JIhLL+J7Rm AeKf6+ZmQgeYzYame0uMCa3D+KsVV6oHaTPFbXtMvI6Nzt1ppYw3d/v7ln6Pxig5rTnH l+cUxxeEC0CgCt3xiHXm4jx4gyC+e3HhzslAfhdlxqRd0ySa70cBefAO10WuvbUuX9aO +OCg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WsLUJlEetJQPFC0MP8uH9AuE55txM3lLZpjyauEiFN8=; b=H9AfCaE+btzE0umVBQYAbwHCoo3VZnvFilr/8NblF2T+PmWO/REnSDn9M0TD38+MYm u3fIjAVIZhMBFT4DBqHo8zZQFCCjm9jkT/gEJyLZwzsZz9T44m8JVOgMDxNtTEQFqOuc iC9TgRQj/JrrfvYtBlifP3dVcVpx90bvYtuhBityWad49wfUpVutSv2K00GD4PLCw8Zj 8mC7J1P8GepIoxYZhJaGKRy5UV5IBOvWyPGJdzWraLyxOIKE37hljPpdPNAd3nuF3A3+ y9vdxXJNPWpz+GexT/U+G1luZnZPlRRYGRiTpwzhosRThdXAPJEeK5YfJnKe8/T8MsjI 3l9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AaAnS09L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u62si723078pgd.482.2022.02.14.13.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:12:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AaAnS09L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DD6A714E945; Mon, 14 Feb 2022 12:32:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343947AbiBNK3m (ORCPT + 99 others); Mon, 14 Feb 2022 05:29:42 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:34826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347288AbiBNK1m (ORCPT ); Mon, 14 Feb 2022 05:27:42 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E82FA9680F; Mon, 14 Feb 2022 01:58:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B969B60909; Mon, 14 Feb 2022 09:58:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95FE1C340E9; Mon, 14 Feb 2022 09:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644832705; bh=EUxFAa0UKKcWMvF6DQFzzmdf+4g4HZ2M/fu4aqrh+Nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AaAnS09L4FNCAcVAzK8WujCouUHr7465fgiN6thBMQsjl2IIIUaG86pfBGQszWjYc uN5YC3WKEIZmtMO7MH+R3ZA+s9OnjuXX9glq810aCOFPLbWbYpgUDF8twd5ixvBnSf 2rTmUrd6Gm1eLW/Y365r0JPLF8AmOeQde/qonUXs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jerome Forissier , Sumit Garg , Jens Wiklander , Sasha Levin Subject: [PATCH 5.16 098/203] tee: optee: do not check memref size on return from Secure World Date: Mon, 14 Feb 2022 10:25:42 +0100 Message-Id: <20220214092513.587308135@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092510.221474733@linuxfoundation.org> References: <20220214092510.221474733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Jerome Forissier [ Upstream commit abc8dc34d1f6e34ed346c6e3fc554127e421b769 ] Commit c650b8dc7a79 ("tee: optee: do not check memref size on return from Secure World") was mistakenly lost in commit 4602c5842f64 ("optee: refactor driver with internal callbacks"). Remove the unwanted code again. Fixes: 4602c5842f64 ("optee: refactor driver with internal callbacks") Signed-off-by: Jerome Forissier Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander Signed-off-by: Sasha Levin --- drivers/tee/optee/smc_abi.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c index cf2e3293567d9..09e7ec673bb6b 100644 --- a/drivers/tee/optee/smc_abi.c +++ b/drivers/tee/optee/smc_abi.c @@ -71,16 +71,6 @@ static int from_msg_param_tmp_mem(struct tee_param *p, u32 attr, p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa; p->u.memref.shm = shm; - /* Check that the memref is covered by the shm object */ - if (p->u.memref.size) { - size_t o = p->u.memref.shm_offs + - p->u.memref.size - 1; - - rc = tee_shm_get_pa(shm, o, NULL); - if (rc) - return rc; - } - return 0; } -- 2.34.1