From: "Auer, Lukas" Subject: Re: [RESEND PATCH 6/6] crypto: caam: detect RNG init when TrustZone is active Date: Thu, 25 Jan 2018 13:20:55 +0000 Message-ID: <1516886454.3733.23.camel@aisec.fraunhofer.de> References: <1516805435-15034-1-git-send-email-pure.logic@nexus-software.ie> <1516805435-15034-7-git-send-email-pure.logic@nexus-software.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: "peng.fan@nxp.com" , "davem@davemloft.net" , "ryan.harkin@linaro.org" , "fabio.estevam@nxp.com" , "rui.silva@linaro.org" , "herbert@gondor.apana.org.au" To: "linux-kernel@vger.kernel.org" , "aymen.sghaier@nxp.com" , "horia.geanta@nxp.com" , "pure.logic@nexus-software.ie" , "linux-crypto@vger.kernel.org" Return-path: Received: from mail-edgeka24.fraunhofer.de ([153.96.1.24]:38296 "EHLO mail-edgeKA24.fraunhofer.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbeAYNVE (ORCPT ); Thu, 25 Jan 2018 08:21:04 -0500 In-Reply-To: <1516805435-15034-7-git-send-email-pure.logic@nexus-software.ie> Content-Language: en-US Content-ID: <0EA716E512C8F84598CEA20171FE1BE0@xch.fraunhofer.de> Sender: linux-crypto-owner@vger.kernel.org List-ID: T24gV2VkLCAyMDE4LTAxLTI0IGF0IDE0OjUwICswMDAwLCBCcnlhbiBPJ0Rvbm9naHVlIHdyb3Rl Og0KPiBXaGVuIFRydXN0Wm9uZSBpcyBlbmFibGVkIG9uIHNlYzQgY29tcGF0aWJsZSBzaWxpY29u IHRoZSBmaXJzdCBwYWdlDQo+IG9mIHRoZQ0KPiBDQUFNIGlzIHJlc2VydmVkIGZvciBUcnVzdFpv bmUgb25seSwgdGhpcyBtZWFucyB0aGF0IGFjY2VzcyB0byB0aGUNCj4gZGVjbw0KPiByZWdpc3Rl cnMgaXMgcmVzdHJpY3RlZCBhbmQgd2lsbCByZXR1cm4gemVybyB3aGVuIHJlYWQuDQ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