From patchwork Thu Apr 4 13:19:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1919806 X-Patchwork-Delegate: apalos@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=EknUSRcL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9MgD3MSZz1yYf for ; Fri, 5 Apr 2024 00:20:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F31888281; Thu, 4 Apr 2024 15:20:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EknUSRcL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D47EF88274; Thu, 4 Apr 2024 15:20:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E7B3F88274 for ; Thu, 4 Apr 2024 15:20:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-51581c51ee6so244277e87.0 for ; Thu, 04 Apr 2024 06:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712236801; x=1712841601; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o8Es4I6W/ckZvI4pjafaxAdhh6VCVQz0Q/4qVZhLC9Y=; b=EknUSRcLY7F9mjty4Ux1Gxb0/Wzp/1dgZ6RcLoAcI2KkhfrJuJxfY6HhJ7vopEaD6h 11Dl8Z/E9lcNjBU2l+V7MHcEhLDlpghiaZF0jzpncvP+Xwb3O2p9GJ5tdqomgRG5jwaJ Hj/rV4iL8fpZcaxewKVeDuYXaImTgT40najcF9IjtWygWy+ml6f43sn3YTsVB4Fdllm2 pBmO7HP+3MRoCHWExs8BXEu1lFQnELj3m+vTPs+FONaARn7s5yuil7kGjFzUhoeD5LZU CaHtzt5sRP+kMGbttHZaUCl/ekxfsajX0fpgbSu9/+tqF/WlHXBElkgY7pdkyCuqo6uU L0TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712236801; x=1712841601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o8Es4I6W/ckZvI4pjafaxAdhh6VCVQz0Q/4qVZhLC9Y=; b=hb0aZZ8p2bNnQy3+BO4o7sXHGjNOTP++EKz1l/tP18cGG7mRaeqgjIMOZq3TOBCPQa z+rwlJ4L+KWt4EXTeujo4i0vaXz9hyrLenc0fk2CODWH7U/b0YK5H57Vuf5pPf4+RlJd M9tW8D/+NRO6lRhjbrEeHEaes2Z8h5o09s/zjZGORzpierdyf6vKP506PRFEn1TygEns rEIIPWsnTTvbFutXiQVyF3W55RS0pgYzqW3vzO2WhU5HvvSz2OjbUKo+1XdplapQ75rt 1EdZaKT19IQsknsMW1dBnOTGV5SQR/kS6vbWzbsseSdydsLn6B8nwcZfzgaN+Azc8XTI 42Pg== X-Gm-Message-State: AOJu0YwynqeFEc56voDfG8w4OkzX+qn69IxBqed0F1DloPB59tNZalpR YayCOSaaxEpG7i8trlNV79vqoU9piXw1oeGHy4LQ/QbZgKTr5v2lxGwEGPSs1cMFsQ== X-Google-Smtp-Source: AGHT+IEmHdEfigX4HO2gSCFAaACGZSiGxmJZIrb5Ojd4Pw/LnWYH6WqBNpxroQJDy9K/fmnIE1v1vg== X-Received: by 2002:ac2:4c19:0:b0:513:c428:9daa with SMTP id t25-20020ac24c19000000b00513c4289daamr1572434lfq.0.1712236801140; Thu, 04 Apr 2024 06:20:01 -0700 (PDT) Received: from localhost ([185.186.156.113]) by smtp.gmail.com with ESMTPSA id m10-20020a05651202ea00b00515aa359f8fsm2304994lfq.225.2024.04.04.06.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:20:00 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Ilias Apalodimas , jens.wiklander@linaro.org, Igor Opaniuk , Heinrich Schuchardt , Tom Rini Subject: [PATCH v5 1/5] tee: optee: fix description in Kconfig Date: Thu, 4 Apr 2024 15:19:47 +0200 Message-Id: <20240404131952.3252301-2-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240404131952.3252301-1-igor.opaniuk@gmail.com> References: <20240404131952.3252301-1-igor.opaniuk@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Fix OPTEE_TA_AVB symbol description in Kconfig: s/"write"rb"/"write_rb"/g Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas Signed-off-by: Igor Opaniuk --- (no changes since v2) Changes in v2: - Applied R-b tags drivers/tee/optee/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig index 9dc65b0501e..db0bcfa6f15 100644 --- a/drivers/tee/optee/Kconfig +++ b/drivers/tee/optee/Kconfig @@ -19,7 +19,7 @@ config OPTEE_TA_AVB default y help Enables support for the AVB Trusted Application (TA) in OP-TEE. - The TA can support the "avb" subcommands "read_rb", "write"rb" + The TA can support the "avb" subcommands "read_rb", "write_rb" and "is_unlocked". config OPTEE_TA_RPC_TEST From patchwork Thu Apr 4 13:19:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1919807 X-Patchwork-Delegate: apalos@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Blz7bRvo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9MgM3Kbjz1yYf for ; Fri, 5 Apr 2024 00:20:31 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6CBA68827F; Thu, 4 Apr 2024 15:20:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Blz7bRvo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6647988286; Thu, 4 Apr 2024 15:20:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 34D2188276 for ; Thu, 4 Apr 2024 15:20:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2d84a5f4a20so2170471fa.1 for ; Thu, 04 Apr 2024 06:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712236804; x=1712841604; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MD4V59DZ0FT7BcjNHj1oMvqv9lQZOXXNk6ycPb10cnM=; b=Blz7bRvooYJogxccVqIh5pguB/SRf9d9FB9u7g+N+W81OZ/sdSBmpjYRn5WEod5Krr YMBWABu9pO5/phnLi1WQZ5VjrXGQsf3iVdMuOTgsOawcYwrTJO5RyJQGqKuNAKD/f6Ey GqoHHo4XXHQCBxN3ZpIg1X8aLi3R6DF7dXo+cqH2z8U5eyON2PVECF0wo8MR0HBHYaBR AP2xB12mu6JLPYglWxCNJnMedDIksccCn7NRCvpuaY+U7OCGgXQA5OcI/an6SFjeHLB/ u3bG+yEEjMhgR4alBNAVXrjV+2nZT0F8OiN1uHh9dezVa0k0U/C7SEIWHFXdlu+7EWAe Nm4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712236804; x=1712841604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MD4V59DZ0FT7BcjNHj1oMvqv9lQZOXXNk6ycPb10cnM=; b=NZ/qmmkSFV0uPDFvEYi0FjQdItPh67EKpFTp2yfD3iaaR96hPYDKHbpXZstTfCktML Q2O6HvhN7dwAVv6H/z927mXHhn+ewxzMjjgOBxJHGWu/V7SJBWbJkfdRFGbOd8O7G0Qv mvJHEE7jNXVko4sciNNUeVGJFkh1doKJL9qlOrrecWAngqNrMLDP/bUGYGWPD0jON9/b J4lMiubi22iPfRrGTXXqeyjWv1BwjTuMF88FqH8ZIRpkOmcney5izXAGSZnJAlVG4gID G89YYXW3hEm6Rw0EqG/EwVf5S4gKt6LTJVEm746y9vSYBHwGM7SAIzFhgbP5ZX09Kw3k 12xg== X-Gm-Message-State: AOJu0YxxEwcB5EDNR/1lS1kz1PkhSwBMv0U2lNGFzuETpHtOV2OwkJJb 8Kj2CK/iLojl9cwqhVkBfxiTN4ZAYQQE8o8YfrngNsKFI9F8/kK7NF0T61pEO9odrQ== X-Google-Smtp-Source: AGHT+IEiuAiIgh9N6N+dVJrXB9HDFMeL/UZUp5LsWLn/gJ0+rAftM4sHc7K/cNGYqy+fzzItSFRTjA== X-Received: by 2002:a05:651c:97:b0:2d8:1b2a:6526 with SMTP id 23-20020a05651c009700b002d81b2a6526mr1631196ljq.4.1712236803289; Thu, 04 Apr 2024 06:20:03 -0700 (PDT) Received: from localhost ([185.186.156.113]) by smtp.gmail.com with ESMTPSA id g5-20020a2e9385000000b002d42b1c3750sm2092263ljh.67.2024.04.04.06.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:20:02 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Ilias Apalodimas , jens.wiklander@linaro.org, Igor Opaniuk , Tom Rini Subject: [PATCH v5 2/5] cmd: optee_rpmb: close tee session Date: Thu, 4 Apr 2024 15:19:48 +0200 Message-Id: <20240404131952.3252301-3-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240404131952.3252301-1-igor.opaniuk@gmail.com> References: <20240404131952.3252301-1-igor.opaniuk@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Close tee session after each optee_rpmb invocation, as there is no reason to keep it open, considering the absence of any available mechanism to clean up all open sessions automatically before handing over control to the Linux kernel. Without proper clean-up we might end up with orphaned sessions registered in OP-TEE OS core (obvious resource leak). Signed-off-by: Igor Opaniuk --- Changes in v5: - Extended commit message, added more details about the reasons why the change was needed cmd/optee_rpmb.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/cmd/optee_rpmb.c b/cmd/optee_rpmb.c index e0e44bbed04..b3cafd92410 100644 --- a/cmd/optee_rpmb.c +++ b/cmd/optee_rpmb.c @@ -87,8 +87,10 @@ static int read_persistent_value(const char *name, rc = tee_shm_alloc(tee, name_size, TEE_SHM_ALLOC, &shm_name); - if (rc) - return -ENOMEM; + if (rc) { + rc = -ENOMEM; + goto close_session; + } rc = tee_shm_alloc(tee, buffer_size, TEE_SHM_ALLOC, &shm_buf); @@ -125,6 +127,9 @@ out: tee_shm_free(shm_buf); free_name: tee_shm_free(shm_name); +close_session: + tee_close_session(tee, session); + tee = NULL; return rc; } @@ -139,17 +144,20 @@ static int write_persistent_value(const char *name, struct tee_param param[2]; size_t name_size = strlen(name) + 1; + if (!value_size) + return -EINVAL; + if (!tee) { if (avb_ta_open_session()) return -ENODEV; } - if (!value_size) - return -EINVAL; rc = tee_shm_alloc(tee, name_size, TEE_SHM_ALLOC, &shm_name); - if (rc) - return -ENOMEM; + if (rc) { + rc = -ENOMEM; + goto close_session; + } rc = tee_shm_alloc(tee, value_size, TEE_SHM_ALLOC, &shm_buf); @@ -178,6 +186,9 @@ out: tee_shm_free(shm_buf); free_name: tee_shm_free(shm_name); +close_session: + tee_close_session(tee, session); + tee = NULL; return rc; } From patchwork Thu Apr 4 13:19:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1919808 X-Patchwork-Delegate: apalos@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=feHVlK8K; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9MgZ2RJ1z1yYf for ; Fri, 5 Apr 2024 00:20:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D52AF882BE; Thu, 4 Apr 2024 15:20:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="feHVlK8K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DD5278828B; Thu, 4 Apr 2024 15:20:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0D12E88276 for ; Thu, 4 Apr 2024 15:20:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2d84a5f4a20so2170801fa.1 for ; Thu, 04 Apr 2024 06:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712236806; x=1712841606; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g2xJmeqV7J9yDPWcWLWnQojhOFW5Vl2ZjST8ffro7Ow=; b=feHVlK8KJ4a1++cHsMVFkYdcmtV96FJ0XskBlCk4xDxm4GYzrjWwkkjAF74+VeUp71 VajND63WuwEG9PbrrqZYvQ3/p5nzOl65X/Q1j0xXjdz12Yr7KKHf1iT9sl7XoCKMBrn7 b5aczpSA3KJg87Sgj7xune0UnFzZzFSrJm1hs0io9Qcc6EB37vUorZH4aAn7XIy9hIuq WoovLzXawtBw6+b11y7yNshehbwUe20YmOyTqoxpFhbP79ZuxYHChWaou0RZ6ECVXJCS IQUrPK3nksLznlHTiJURegs/MEyC5tTSWnCdr2MzZV6yy9oR75Zi6bzS1htSVyJwc6b9 qQcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712236806; x=1712841606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g2xJmeqV7J9yDPWcWLWnQojhOFW5Vl2ZjST8ffro7Ow=; b=Cwvr6zycY8FUWEciWYXdQwLNHxE3pF1AtSYnJUqmKdcLMiVoTF84G/xY94W0XTwtaV eoByDEWVSONTsQTRetHjAsybBuN8zDtQzNiIQ+SC1aTyTmUu0UQ8LhtFqlaoae8Zulm9 Wyi+PO5IQTuL4MMA644fmXWCn+dtq8FB4MKpUN5SqSz0vZOlf8kaXkU0oPr2B0TOFoC4 LKqMx79+iBTFx87ifdedFBGFIh6HoVxp3D9lyA2JOg8grpnM/AaLivGuzPV3KdtBKquR 8cKteRFYaM1rhi5cL6rAZPdanqfN9scr1iiiKDB8DTHys3tbGfFUPGgV4h25Maf++K2X o7Qw== X-Gm-Message-State: AOJu0YwHUkYczay8Lw5N0WFwMFEVIkIhp1eYaOJnfynVr3Eav5lpjHjO 1fu9tTjt3kPPCALqTmpCQhRYR2D/1COvctZ6abnkcx8soRsIY590uVvFyZzfAU9dqQ== X-Google-Smtp-Source: AGHT+IEP7BtDVSIiGBNRXe1XbMJWfxrMW6glTHrRhyWuiLOJG73iXexRfYvEkhzyAL+O+blTWZtGTQ== X-Received: by 2002:a2e:99cf:0:b0:2d6:c59e:37bd with SMTP id l15-20020a2e99cf000000b002d6c59e37bdmr1783542ljj.3.1712236806513; Thu, 04 Apr 2024 06:20:06 -0700 (PDT) Received: from localhost ([185.186.156.113]) by smtp.gmail.com with ESMTPSA id i15-20020a2e808f000000b002d2e81c0f18sm2170424ljg.45.2024.04.04.06.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:20:04 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Ilias Apalodimas , jens.wiklander@linaro.org, Igor Opaniuk , Mattijs Korpershoek , AKASHI Takahiro , Abdellatif El Khlifi , Bin Meng , Francis Laniel , Heinrich Schuchardt , Miquel Raynal , Peter Robinson , Sean Edmond , Simon Glass , Tom Rini Subject: [PATCH v5 3/5] cmd: optee_rpmb: build cmd for sandbox Date: Thu, 4 Apr 2024 15:19:49 +0200 Message-Id: <20240404131952.3252301-4-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240404131952.3252301-1-igor.opaniuk@gmail.com> References: <20240404131952.3252301-1-igor.opaniuk@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Support CMD_OPTEE_RPMB for SANDBOX configurations. Test: $ ./u-boot -d arch/sandbox/dts/test.dtb ... => optee_rpmb write_pvalue test_variable test_value Wrote 11 bytes => optee_rpmb read_pvalue test_variable 11 Read 11 bytes, value = test_value Reviewed-by: Mattijs Korpershoek Tested-by: Mattijs Korpershoek Signed-off-by: Igor Opaniuk --- (no changes since v2) Changes in v2: - Applied R-b and T-b tags cmd/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 61e280fb1a4..227d66a7eea 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1394,7 +1394,9 @@ config CMD_CLONE config CMD_OPTEE_RPMB bool "Enable read/write support on RPMB via OPTEE" - depends on SUPPORT_EMMC_RPMB && OPTEE + depends on (SUPPORT_EMMC_RPMB && OPTEE) || SANDBOX_TEE + default y if SANDBOX_TEE + select OPTEE_TA_AVB if SANDBOX_TEE help Enable the commands for reading, writing persistent named values in the Replay Protection Memory Block partition in eMMC by From patchwork Thu Apr 4 13:19:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1919809 X-Patchwork-Delegate: apalos@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=ITTEIPmp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9Mgm4ryjz1yYf for ; Fri, 5 Apr 2024 00:20:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 607D58828B; Thu, 4 Apr 2024 15:20:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ITTEIPmp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9AF09883A9; Thu, 4 Apr 2024 15:20:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B2C0188288 for ; Thu, 4 Apr 2024 15:20:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-513d492c3cdso264320e87.0 for ; Thu, 04 Apr 2024 06:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712236809; x=1712841609; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YJtJUJcbedJqKOLkywTj0CdSYjis/eHZTLZ328mQ3BU=; b=ITTEIPmpvvnDZzVgUuvRdD1AVaXW/3FsEUHpYu9i/KxyPyfzOMAz8o4QN2ykkkIWx4 3TZVZH5Bna/YkB/tBJmEzrf4BlV0stxmwA0u56mi70NRNs/yBghGIRcdBO+bGYiRitRs SVSaZbx4HKZaBBBldiuQXH9Cdth+QmCLOD7HBFS8u4dJuIKkWPFzmxP+7ABcWb3wGHio a9SKRUzroVxm1scRSzyaaTEIL29Ysj1gmS0BjJFL+wH2dHSN3+wD3ETNqKmuXsTX/+jl Lz8Rz7K0w6rS+bthVBX6hDcArkkdIgpLOTLAABHd5qTtDRlGAMpGv7JH8ECvuNja6O1u fKEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712236809; x=1712841609; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YJtJUJcbedJqKOLkywTj0CdSYjis/eHZTLZ328mQ3BU=; b=El0g1Qq/2t/hj5m/G9DJ+dfQQ4Ar5WETcRid860Zxuu8a/zz+RmHWt1bF09tiz9CI/ M0CcqjYIcDZo1SY1aE5evD88tqSUTAnF8V0VxftfTy+IaYU2fKGYKSBzGds9MPkAx8k9 7GlKN5TLSqeAV95e9PKd7nRoyHThao9DKdk8c651O12g0AYcqz5AHr+Q3yWKD5s8Hkyd RxVJ9eWXJigNrBzva1MHVyQXU3hEWu0QQ0scqMT7BmLwpCSX63Mu/ZnBfo4UQ5M7VYbO j9JCdtZarZK8bfmmIQWeBl/UHZtUAYM6zmNkWDhuQ/eJLPStaPQm/A8BI6hF+R4BcnUq CXSA== X-Gm-Message-State: AOJu0Yzm6Lsd0loQNSleZvobXENfEvklIxhNJU/xta347RZOg0NCzzBm LLzoUJxmkIKyE3a74mKJrhNbM+xlj7O3PJ0gJ88OSCGGQK26jmZ5ys0M4YzhSgXFQQ== X-Google-Smtp-Source: AGHT+IHIwlBn9GLZ5HhWeexdPSG4hHMqSyIJkcw8f+6QHTpCFyyY5X+145NIeALmmcjd3806CEOtWQ== X-Received: by 2002:ac2:46f7:0:b0:516:d0ba:68fc with SMTP id q23-20020ac246f7000000b00516d0ba68fcmr586239lfo.6.1712236808589; Thu, 04 Apr 2024 06:20:08 -0700 (PDT) Received: from localhost ([185.186.156.113]) by smtp.gmail.com with ESMTPSA id z19-20020a195e53000000b00516cc2153d0sm166737lfi.103.2024.04.04.06.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:20:07 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Ilias Apalodimas , jens.wiklander@linaro.org, Igor Opaniuk , Tom Rini Subject: [PATCH v5 4/5] test: py: add optee_rpmb tests Date: Thu, 4 Apr 2024 15:19:50 +0200 Message-Id: <20240404131952.3252301-5-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240404131952.3252301-1-igor.opaniuk@gmail.com> References: <20240404131952.3252301-1-igor.opaniuk@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add read/write tests for optee_rpmb cmd. Signed-off-by: Igor Opaniuk --- (no changes since v1) test/py/tests/test_optee_rpmb.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/py/tests/test_optee_rpmb.py diff --git a/test/py/tests/test_optee_rpmb.py b/test/py/tests/test_optee_rpmb.py new file mode 100644 index 00000000000..8a081b5c494 --- /dev/null +++ b/test/py/tests/test_optee_rpmb.py @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Tests for OP-TEE RPMB read/write support + +""" +This tests optee_rpmb cmd in U-Boot +""" + +import pytest +import u_boot_utils as util + +@pytest.mark.buildconfigspec('cmd_optee_rpmb') +def test_optee_rpmb_read_write(u_boot_console): + """Test OP-TEE RPMB cmd read/write + """ + response = u_boot_console.run_command('optee_rpmb write_pvalue test_variable test_value') + assert response == 'Wrote 11 bytes' + + response = u_boot_console.run_command('optee_rpmb read_pvalue test_variable 11') + assert response == 'Read 11 bytes, value = test_value' \ No newline at end of file From patchwork Thu Apr 4 13:19:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1919810 X-Patchwork-Delegate: apalos@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BJsIaz5h; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9Mgz204wz1yYf for ; Fri, 5 Apr 2024 00:21:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D113D8828C; Thu, 4 Apr 2024 15:20:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BJsIaz5h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A82AC883BA; Thu, 4 Apr 2024 15:20:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8A897883A2 for ; Thu, 4 Apr 2024 15:20:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2d7169ec836so2427811fa.0 for ; Thu, 04 Apr 2024 06:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712236810; x=1712841610; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gX7lbsNsDSs/7jJICXPoTPGqtx7aNIRO4H1gnPqpcyA=; b=BJsIaz5hVb3D84Fo/RgiYV2uMPmuvkwlG7tgMYkXtOp5GLk8YZA8y/A34kuTRamOfh 8PbHWHQfy00CrDxEcKyYhEFFJAmzRPIKQn9PbSdw6hiwTa1T1/yMVbJOAb8VGV+jKWq8 66OxhxORJqOaBpkdlWv++G5VGryn/VcvFxblgCiTWYa+Py2chyC7KeVgaEeXmOiPIvW3 eZg1eX1dts8t2JHYsF53p1eoH0Ok2xLED51t5g3jR7wQNYDCH1fTgVN7BbspkSRpz22L YzxS2/SAPUMT/HD1NNzGg+jnW4/9E1rWX4qcm2JxUwfLbNs9gim3KOkuKp6w9MvKgE5Y RgVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712236810; x=1712841610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gX7lbsNsDSs/7jJICXPoTPGqtx7aNIRO4H1gnPqpcyA=; b=Cc2eYdMp123XTbNMx2VJWENMM4//+sY5hyOg6/5eGY1BVS2zLzBVFZN0zQX8+5VI9B JyXv/kPqSGzMJOef7zhlNWidUdfy3ttzBqQD1A9Rcl9cv9xTk/m3lsdWg/CIT0JKiY6J qPqj3okPUZurS++McaM9gVvWJgVJnyBZXOCd707nXnWTM3cz9R0WLr5aBbrXueRQXcIw +h+iPqWyYU8pK7BtbLqRZovSWdvWfy48BkL9d8x2Tsxv6xrdyIQd5AyFsvggpBkbtmzT vujt4kahhpaZDUM3qc8+NVlOYu44HNxu6PsQRq5FeW+UM63fMuhNXZWx5D/17FY74mu+ NoRg== X-Gm-Message-State: AOJu0Yye8fX/gO1mv+VkT4vkhYlMQRb4y45l8v38CSV3khug/+rfpKK6 Av2bP/r0zu3AhgQSvByRtDOUSwIBvT9LZjMCbhVgFplthzyUpAR/8Jq6hHLxDsNBQA== X-Google-Smtp-Source: AGHT+IE+iPAbu64giF3Z5uFFkNRH4pRsIdOxrT6C+g3WOzIaAB5MRpWhQy0zFiJbgXyS6muT1nA7ow== X-Received: by 2002:a2e:301a:0:b0:2d4:7f17:185d with SMTP id w26-20020a2e301a000000b002d47f17185dmr1822405ljw.0.1712236810111; Thu, 04 Apr 2024 06:20:10 -0700 (PDT) Received: from localhost ([185.186.156.113]) by smtp.gmail.com with ESMTPSA id t16-20020a2e9c50000000b002d6a40a26a5sm2173615ljj.87.2024.04.04.06.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:20:09 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Ilias Apalodimas , jens.wiklander@linaro.org, Igor Opaniuk , Etienne Carriere , Heinrich Schuchardt , Jorge Ramirez-Ortiz , Patrice Chotard , Simon Glass , Tom Rini Subject: [PATCH v5 5/5] tee: remove common.h inclusion Date: Thu, 4 Apr 2024 15:19:51 +0200 Message-Id: <20240404131952.3252301-6-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240404131952.3252301-1-igor.opaniuk@gmail.com> References: <20240404131952.3252301-1-igor.opaniuk@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The usage of the common.h include file is deprecated [1], and has already been removed from several files. Get rid of all inclusions in the "drivers/tee" directory, and replace it with required include files directly where needed. [1] doc/develop/codingstyle.rst Reviewed-by: Ilias Apalodimas Signed-off-by: Igor Opaniuk --- Changes in v5: - Extended commit message for "cmd: optee_rpmb: close tee session" - Added R-b tag Changes in v4: - Rebased on the latest master and excluded "tee: sandbox: fix spelling errors", as it was merged already by Heinrich Schuchardt Changes in v3: - Added calls for closing tee session after every read/write operation - Added calls for closing tee session after every read/write operation Changes in v2: - Fixed chimp_optee.c:37:9: error: implicit declaration of function 'memset' - Applied R-b and T-b tags - Fixed chimp_optee.c:37:9: error: implicit declaration of function 'memset' drivers/tee/broadcom/chimp_optee.c | 3 ++- drivers/tee/optee/core.c | 1 - drivers/tee/optee/i2c.c | 1 - drivers/tee/optee/rpmb.c | 1 - drivers/tee/optee/supplicant.c | 2 +- drivers/tee/sandbox.c | 2 +- drivers/tee/tee-uclass.c | 1 - 7 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/tee/broadcom/chimp_optee.c b/drivers/tee/broadcom/chimp_optee.c index 37f9b094f76..bd146ef2899 100644 --- a/drivers/tee/broadcom/chimp_optee.c +++ b/drivers/tee/broadcom/chimp_optee.c @@ -3,9 +3,10 @@ * Copyright 2020 Broadcom. */ -#include #include #include +#include +#include #ifdef CONFIG_CHIMP_OPTEE diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 47f845cffe3..5fc0505c788 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -3,7 +3,6 @@ * Copyright (c) 2018-2020 Linaro Limited */ -#include #include #include #include diff --git a/drivers/tee/optee/i2c.c b/drivers/tee/optee/i2c.c index ef4e10f9912..e3fb99897c5 100644 --- a/drivers/tee/optee/i2c.c +++ b/drivers/tee/optee/i2c.c @@ -3,7 +3,6 @@ * Copyright (c) 2020 Foundries.io Ltd */ -#include #include #include #include diff --git a/drivers/tee/optee/rpmb.c b/drivers/tee/optee/rpmb.c index 5bc13757ea8..bacced6af6c 100644 --- a/drivers/tee/optee/rpmb.c +++ b/drivers/tee/optee/rpmb.c @@ -3,7 +3,6 @@ * Copyright (c) 2018 Linaro Limited */ -#include #include #include #include diff --git a/drivers/tee/optee/supplicant.c b/drivers/tee/optee/supplicant.c index f9dd874b594..8a426f53ba8 100644 --- a/drivers/tee/optee/supplicant.c +++ b/drivers/tee/optee/supplicant.c @@ -3,10 +3,10 @@ * Copyright (c) 2018, Linaro Limited */ -#include #include #include #include +#include #include #include "optee_msg.h" diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c index ec66401878c..8ad7c09efdd 100644 --- a/drivers/tee/sandbox.c +++ b/drivers/tee/sandbox.c @@ -2,7 +2,7 @@ /* * Copyright (C) 2018 Linaro Limited */ -#include + #include #include #include diff --git a/drivers/tee/tee-uclass.c b/drivers/tee/tee-uclass.c index 52412a4098e..0194d732193 100644 --- a/drivers/tee/tee-uclass.c +++ b/drivers/tee/tee-uclass.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY UCLASS_TEE -#include #include #include #include