Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp284392pxf; Thu, 1 Apr 2021 00:42:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ/w/eFEJXEi2neVtwMY1vz9NHlPaBUtJQH1kA8AyEnH7ZLDWdNDbSbXrERP712QCoSd6G X-Received: by 2002:a05:6402:646:: with SMTP id u6mr8466399edx.250.1617262952150; Thu, 01 Apr 2021 00:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617262952; cv=none; d=google.com; s=arc-20160816; b=bFJVcs8iE3YTcD1aGLnB6r/pwj7JfVz48JNxpmnb7dlWl8z2Cewwm7pK+37pIDD4lI /gmOUNdADbOYyzv+kKBWYnIJvCc9IKQAa9+jd5ok8ijgsp5D9u5N4Qdl0PdAeo6BXpMR xwxwOq/Y5n+VQI2Gzi+5YfH5VCKUBeGWutfyOAKjRfe63IONJHBQ0dWw7UbSE1ix0LkB XpAfeUIRGGDXfCq80a5PF9BLPag4oftcK6PD6+wSA3MKH0mU5v9e8FuPBqXGwsMLh8+l ZjjWfG3muFf5Ywy2+BiHXFwezR3oBomK0BtcPeNruhocJzomGapQlv+3GlPLxq0pl7qs YVWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=D/ulkwguw7+8k5/tAEJnWieZv2I5VNSiJKBdc0AK5cQ=; b=DCKlRC5rWTggbTMHGQCIssBwhsX5lflAuNXlBTiH7a9BPFVvOPoJNx7LpHDDKbwqBX wqHN03THX+ApZsuGm28aij2zYLc+sSxBOeDnXCF8H4JLvNehpBhdY+J10g2K6tA3RBhn tGYAIO80FAiYRu7FrrXNdM0qAZRxiRMsR8Yy75oyPxT3ilbkB184eB1tPe0XM9H+hDtp Z0Jm6S/jsehRwdqEIc5lJAyvQRYgiwKULZX5QE9jrKKlZzBPBQ2aIDcruK1kEwezOUkz O1Z0ZWhYnaGz7eP5C9P6f1S3/bDit6K1q9kqNb6xVOU6M3BG3oCEQORFmJ8PbaLxTDNL 3WRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QXMzJnX9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si4276950edc.150.2021.04.01.00.42.10; Thu, 01 Apr 2021 00:42:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QXMzJnX9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233348AbhDAHlJ (ORCPT + 99 others); Thu, 1 Apr 2021 03:41:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbhDAHlF (ORCPT ); Thu, 1 Apr 2021 03:41:05 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD6BC0613E6 for ; Thu, 1 Apr 2021 00:41:04 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id k14-20020a9d7dce0000b02901b866632f29so1354391otn.1 for ; Thu, 01 Apr 2021 00:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D/ulkwguw7+8k5/tAEJnWieZv2I5VNSiJKBdc0AK5cQ=; b=QXMzJnX9o7ltI8gwhP/juDSXcuSSWP8jUVZ+4XCWXpU11sD04A/iqibPLpXZGCjigH jGcIpduX80123m3QFZ4yKzMtIyy+rc8Ywp6mmgd/umoBQf2A+Kqak55shjtB7S4hEBrC 4abCMSSb5OwbT9LulAymHbL2MLDMVQuc3juL8fnjzGK3cR+QwWlxk8qqJFPX2BCeJIRu 9wJ/F9BPiMSDVlYcCBsgnHnmra9k7Iy9Zl5jmfUSHAOttJeQGDs1ncdqKskSO+9QtYlq A704XoWYMrxr8s4gRZn+up8yrMsShSSG1cIlmZJCntj31dWtpSxb+69MbwUJMW90NcbS 9mNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D/ulkwguw7+8k5/tAEJnWieZv2I5VNSiJKBdc0AK5cQ=; b=NSKKcH7HrI/EeEAFLiz3puPhvMSM7B7MWbhcNCP1tNGG3toL2VjSxAV3c7D6elcWnu +xImaSjQr7qn2z3PKUFrnCUbCzV4yT5vmYVY6F+RHSubPn9j6xKvf0Kz1Su36KL9I4Y9 Pr4kPApN5FaN0r47RNF+095VouwCtIYnZf3ldJAB4JIkMbGMkvf+NmcOzrgd7FOjLfn9 29AlPpiQ/5axmJCgecxk2ILiiBFCVOuSBhU7r3WrL16bARuTnnsqY3WYGDr5hzCfZRVJ 2QYXzHE8GgXhjQd7+wo/LasjDz1n6vt8gkr+JdaIVQ+VR8ROFVDDoHmwG2C++m7OyrSs 8plQ== X-Gm-Message-State: AOAM533PUP3AeLsJsiptoF+a1yfjFC5OEk+U8xwiZ9ZmJlau1G+vAZU4 XFnjWT7PLRpdauw7cxA85tYOLoDmrtdUpOc6D5wy2g== X-Received: by 2002:a05:6830:1b7a:: with SMTP id d26mr5850595ote.324.1617262863644; Thu, 01 Apr 2021 00:41:03 -0700 (PDT) MIME-Version: 1.0 References: <010001785986e9be-63aa88ce-3cf8-425f-87da-b2e3f84f6ef5-000000@email.amazonses.com> In-Reply-To: From: Jens Wiklander Date: Thu, 1 Apr 2021 09:40:52 +0200 Message-ID: Subject: Re: [PATCH 1/1] tee: optee: do not check memref size on return from Secure World To: Sumit Garg Cc: Jerome Forissier , OP-TEE TrustedFirmware , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 25, 2021 at 3:18 PM Sumit Garg wrote: > > On Mon, 22 Mar 2021 at 16:11, Jerome Forissier via OP-TEE > wrote: > > > > When Secure World returns, it may have changed the size attribute of the > > memory references passed as [in/out] parameters. The GlobalPlatform TEE > > Internal Core API specification does not restrict the values that this > > size can take. In particular, Secure World may increase the value to be > > larger than the size of the input buffer to indicate that it needs more. > > > > Therefore, the size check in optee_from_msg_param() is incorrect and > > needs to be removed. This fixes a number of failed test cases in the > > GlobalPlatform TEE Initial Configuratiom Test Suite v2_0_0_0-2017_06_09 > > when OP-TEE is compiled without dynamic shared memory support > > (CFG_CORE_DYN_SHM=n). > > > > Suggested-by: Jens Wiklander > > Signed-off-by: Jerome Forissier > > --- > > drivers/tee/optee/core.c | 10 ---------- > > 1 file changed, 10 deletions(-) > > > > Looks good to me. > > Reviewed-by: Sumit Garg Thanks, I'm picking this up. Cheers, Jens