From patchwork Thu Sep 28 18:04:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 9976653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AB1E60375 for ; Thu, 28 Sep 2017 18:19:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EBE0296F5 for ; Thu, 28 Sep 2017 18:19:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0137F296F8; Thu, 28 Sep 2017 18:19:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5DC32296F5 for ; Thu, 28 Sep 2017 18:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mZ0pnB3WKc3cToc9AccxKQkZvhlT64gJEe0q9Gez2LM=; b=X7beHivaK+NWD6 xsYvuo1fRyW675VlPOF62Y2mRqym/66gQJ6P3lmy404icF5Q+fV3hn1KDU8AkurIbbgd9YSdl8imL dX0fDWVYtLtRy39HCFB2qmE2tDxne9g6zymlhQ0m04vo5avAhgyAzalQfldFXEFYuvsyhexNLFGAO /DqlNPGqr6HHhiczkA2FPen9uiOd/N3VX6F0ePNsG2avOi93ZFsHmZWGGpKU+pP0eK7MOzJeKIFqn qQ0PZC2P943I/6lLAMqYGK13IuNzMZINPd0psgiux84jGoDD9fDwpvB+u4gOsL+KlK5AvrWDLMza8 T4zd5qyspUFZec9LJQ3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dxdPY-0007lG-FH; Thu, 28 Sep 2017 18:19:48 +0000 Received: from mail-he1eur01on0615.outbound.protection.outlook.com ([2a01:111:f400:fe1e::615] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dxdCl-0005kE-Bu for linux-arm-kernel@lists.infradead.org; Thu, 28 Sep 2017 18:06:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EPAM.onmicrosoft.com; s=selector1-epam-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bwgNeco6+aT2ASCKM4txfPaD29s6oWByFi9CBUakO/E=; b=irqhu59p5LoFlSMBXyFMrqssqj2OG36gJpJ3ouVVjAiADNX8FcZNfU79TsFeyfldAqTg5TW0Z86ZhqPzKlagzh+cYwQMIpaZn/QddHAdPDT64VZyl5PXU4yKYKMjjSt3wIEDnq6huj3fJHpqsUxtbm45J2NQx0x64qkReFW/IiU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@epam.com; Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.59) by HE1PR0301MB2139.eurprd03.prod.outlook.com (2603:10a6:3:21::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 28 Sep 2017 18:05:37 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Thu, 28 Sep 2017 21:05:33 +0300 From: Volodymyr Babchuk To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tee-dev@lists.linaro.org, Jens Wiklander Subject: [PATCH v1 10/14] tee: optee: store OP-TEE capabilities in private data Date: Thu, 28 Sep 2017 21:04:07 +0300 Message-Id: <1506621851-6929-11-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506621851-6929-1-git-send-email-volodymyr_babchuk@epam.com> References: <1506621851-6929-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.59] X-ClientProxiedBy: VI1PR0101CA0048.eurprd01.prod.exchangelabs.com (2603:10a6:800:1f::16) To HE1PR0301MB2139.eurprd03.prod.outlook.com (2603:10a6:3:21::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5a7fe86-6098-4efa-7ddd-08d5069b8603 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:HE1PR0301MB2139; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0301MB2139; 3:7VTFF4sxiJJcuBJerKs8vJKSHtBrWh5ReP/55gjuNL+kI0MyLtigupj7I7nh4ZUNOilBd9/NFtmC/EAyYvQQCT6rGnPon3vghRrOA0gEmeqZuhdbGB5UV+0JqhJodLZ7R5o59oUxbNnNchw1HNjIE9Z1nAgfH8A/uKoEGp62qnwzZift3eplfk0Kkpc1VVnq1YZnOtqjWbfp+V9CZOmNu0qc+3HMOAOT3VtkHWKVxKKfZexErC2BgyQWpAr3hJvl; 25:DbYe2G4QyKvTZ7FfdqkKnurOIrgN/EHNQsMdSb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VGdeImATTudFnhX7UoKRI38pIkia1Nj0kPWMgDOi1PSpZ0bzi; 4:xz6CrSVdMpDmJKk1kDOtGwrYgA1hXWyrSNZJuFdWo2yRH3Z6n09EarzLwPLcuBercyEVrxG4TLLpjHRCI31fMznjp2UFkADMTirvLDN/b35OLWkQbTsWjJa/NnbKWsczX6cNhxoLQyJZ8GZDB+1A1GQgtloj+BxH8b+kGnmggm7FN7y1dP2V099g6z44354PiCrle8xRlno08PcP804jpAoRM18fkB9iJZZ2pL17w2eAd+Jk6PnRrS67rh+O6lih X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0301MB2139; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0301MB2139; X-Forefront-PRVS: 0444EB1997 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(199003)(189002)(189998001)(86362001)(8936002)(97736004)(106356001)(105586002)(50986999)(80792005)(7736002)(305945005)(81166006)(81156014)(33646002)(101416001)(76176999)(8676002)(68736007)(72206003)(5003940100001)(50466002)(5660300001)(2906002)(48376002)(4326008)(53936002)(39060400002)(478600001)(36756003)(6916009)(122856001)(16586007)(2950100002)(6116002)(6666003)(47776003)(316002)(50226002)(3846002)(66066001)(42186006); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0301MB2139; H:EPUAKYIW2556.kyiv.epam.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0301MB2139; 23:XSXUL4fcsPlzZwypKMLbPG9wAy5r6WouKKCWSSA?= =?us-ascii?Q?x9cEbKWjSSX/9zugQcyPdw2BvaxO67k1bKsIQzxrhp5z5omQHcodwwrSr4/X?= =?us-ascii?Q?8UF0ksWiMSgSXBPCZrQ1wgH9b2JNhuepf6g+PpsJ587iG2vNDfy0QNWr+hsl?= =?us-ascii?Q?u2cEPdOIvtPiuyAuqEm3UaHr5t/+Fp8UO7BEX2ogQebjY5oFPBUwEWk3a5/s?= =?us-ascii?Q?atjnKRPvA2S2lNvoeYbRbl9PUuCzdlWxDT88vPbSsmU5s9OnvGoRYqAymZNE?= =?us-ascii?Q?o8RH85jxJ+C4vwKvmtjY4D93YY5Ap8Z5FWfTdrfQwRJXLvdjJYrpYt1m5ifU?= =?us-ascii?Q?hISHiEr8EIsHbJP4D5UxwtUky8EHo9Nn4RFwxPqUqhmCO78Pm5oD2pW2a9uP?= =?us-ascii?Q?M6kVQ5VCTslBDqFYr8hHYvGz+A9ZyZey8SqLNWkI5pUZD04NPwuH2FAYrMJS?= =?us-ascii?Q?GtSwreDDRjRXKXj1g2LMU4RpFY+GZ9rBIYcZbo2R4C5JDIVSeKioZDFF+0zp?= =?us-ascii?Q?YVDH7rdiLLbebGovNna4V7GxkxhR0y5KcTfT0nm2KJ1vk253oFk+YsEhwdL7?= =?us-ascii?Q?in7TGWciCZDvfc7g72DwnebJ3g+dVV68vpa9xPh8qgRpssKzuUSv2PEBmm24?= =?us-ascii?Q?nyKp5DUVaBxpAv8hpqllWIc9FxZcJioYE1hvM0rk44cH0nCaVPh5OPAY2Fwj?= =?us-ascii?Q?A1b4PV/Yc6cm0Q6I7GEbpnb2A6zo/8NzziouqY8VOmdytQSnScyjl0t8GkM6?= =?us-ascii?Q?x79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4NbmxQOlCYQkqSUesd30qPYn57fHzlEOXVkkyBGYEE/Mvn5mxwhpK5SPRIbhznVBZzaNpmzLlaoW+KC9gr5zx4aOR20oXOS08Fsmxu0WXs/zHYig55gTmpc20ThMGVJDwlDA4gXTb6/61EJ3RY5QCoctYfyfP3vp1Z7Vm7wLsaWgwLcZ7JDX6A0Y0hKwHlfM3fjBXQsU8R3XgkFre880= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 18:05:37.4616 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0301MB2139 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170928_110635_953369_7C409EA9 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Volodymyr Babchuk Those capabilities will be used in subsequent patches. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/core.c | 1 + drivers/tee/optee/optee_private.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 9883592..8e012ea 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -553,6 +553,7 @@ static struct optee *optee_probe(struct device_node *np) } optee->invoke_fn = invoke_fn; + optee->sec_caps = sec_caps; teedev = tee_device_alloc(&optee_desc, NULL, pool, optee); if (IS_ERR(teedev)) { diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h index dfe1158..fc534d7 100644 --- a/drivers/tee/optee/optee_private.h +++ b/drivers/tee/optee/optee_private.h @@ -96,6 +96,8 @@ struct optee_supp { * @supp: supplicant synchronization struct for RPC to supplicant * @pool: shared memory pool * @memremaped_shm virtual address of memory in shared memory pool + * @sec_caps: secure world capabilities defined by + * OPTEE_SMC_SEC_CAP_* in optee_smc.h */ struct optee { struct tee_device *supp_teedev; @@ -106,6 +108,7 @@ struct optee { struct optee_supp supp; struct tee_shm_pool *pool; void *memremaped_shm; + u32 sec_caps; }; struct optee_session {