From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEA0FC433F5 for ; Mon, 10 Jan 2022 11:09:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244430AbiAJLJz (ORCPT ); Mon, 10 Jan 2022 06:09:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233981AbiAJLJz (ORCPT ); Mon, 10 Jan 2022 06:09:55 -0500 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09982C06173F; Mon, 10 Jan 2022 03:09:55 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 660093FA5E; Mon, 10 Jan 2022 11:09:44 +0000 (UTC) Message-ID: <5785c77d-9746-4b3f-b1dc-63270a2b1e73@marcan.st> Date: Mon, 10 Jan 2022 20:09:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH v2 17/35] brcmfmac: pcie: Provide a buffer of random bytes to the device Content-Language: en-US To: Arend van Spriel , Kalle Valo , "David S. Miller" , Jakub Kicinski , Rob Herring , "Rafael J. Wysocki" , Len Brown , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Dmitry Osipenko Cc: Sven Peter , Alyssa Rosenzweig , Mark Kettenis , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Pieter-Paul Giesberts , Linus Walleij , Hans de Goede , "John W. Linville" , "brian m. carlson" , Andy Shevchenko , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com References: <20220104072658.69756-1-marcan@marcan.st> <20220104072658.69756-18-marcan@marcan.st> <3844c03f-627b-8bf6-f526-8fda3e7892e0@broadcom.com> From: Hector Martin In-Reply-To: <3844c03f-627b-8bf6-f526-8fda3e7892e0@broadcom.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2022/01/10 18:11, Arend van Spriel wrote: > On 1/4/2022 8:26 AM, Hector Martin wrote: >> Newer Apple firmwares on chipsets without a hardware RNG require the >> host to provide a buffer of 256 random bytes to the device on >> initialization. This buffer is present immediately before NVRAM, >> suffixed by a footer containing a magic number and the buffer length. >> >> This won't affect chips/firmwares that do not use this feature, so do it >> unconditionally. > > Not sure what the general opinion is here, but pulling random bytes for > naught seems wasteful to me. So if there is a way of knowing it is > needed please make it conditional. We could gate it on specific chips only, if you don't mind maintaining a list of those. AIUI that would be all the T2 platform chips or so (the newer two don't seem to need it). Alternatively we could just do this only if an Apple OTP is detected. That is already implicitly gated by the OTP offset chip list. -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub