Received: by 10.223.185.116 with SMTP id b49csp5531235wrg; Tue, 27 Feb 2018 15:15:51 -0800 (PST) X-Google-Smtp-Source: AH8x224zD5Br+rpMsvU0eAjQo4KplSb3VpSHJvVzQMI6xHypaePTM+OjbacL6Bfp50Rmu7Ia3qTQ X-Received: by 10.98.139.145 with SMTP id e17mr15581373pfl.53.1519773351720; Tue, 27 Feb 2018 15:15:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519773351; cv=none; d=google.com; s=arc-20160816; b=KnoWytEZo3xhasaJtqQ8L+xTvcLopj4Gla/1r3THVfntN9iUDFAQww094dpEn9/P8I pGjaT4reJd0jeh1qZ+gkXNvCdsBAXE1UR2BuLjwyeMQj5j02zUhSeUbn6gaTjf94kdXN oSzz9O53OrQVrTuYpsKHzwc2qJ4o1jiD9Xy3mlDVxrJlJszbB+mYRofycTPLqpe1ufrP 2pHQbSsyFCutq0E3gWiBs7FhfyP5/1/uXuqy3z2qzWMtqd3P6vpCNFB5uQugyoIYcvH8 JB+IEQrD7tg46uMG0s5xn99eC8+txYQXKdkvl8a9vZgGGpMueiICKEL2Te0v0NEN0MJk j5FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=cMlrpI0dJi5lrpMGURmsEAyLWruwLTK+0UHX7i+edfo=; b=0cdDJ3RXSKGjG6fIHtZEeNvS/V0CX4J/w4OyPpQ8gnAM4e8rMTUrZ4BpoxGOBBLz5j kXFSdeCee8AE3WpjYELaX8QPFv6fITKV9NG6K0TLWzeOPQLrE8zPkzq2Xemb8FFAEPnq VuGZGe8BeMzKcX2MzuLKphnwn51ql3nGjtEL2+FbH+vMlyjg3uqScgp6TsrVbrJx5U72 lPFPuZElFjr9aRqKIWE10D3LZ6FtYXdTXgdp0qmnXvN8t6E6jD8eQhht7bJZnNNBHGyB 1DYsKusy6hvxnfHqtiTFQTvPkma5Z8gf/sG+T84JUa9X8BPTL19mVz84xLN7VmDOrZ2O 1iIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=g04HrWsy; dkim=fail header.i=@chromium.org header.s=google header.b=RmHuTeit; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u23-v6si191570plk.116.2018.02.27.15.15.36; Tue, 27 Feb 2018 15:15:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=g04HrWsy; dkim=fail header.i=@chromium.org header.s=google header.b=RmHuTeit; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961AbeB0XO5 (ORCPT + 99 others); Tue, 27 Feb 2018 18:14:57 -0500 Received: from mail-vk0-f68.google.com ([209.85.213.68]:46738 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbeB0XOz (ORCPT ); Tue, 27 Feb 2018 18:14:55 -0500 Received: by mail-vk0-f68.google.com with SMTP id x125so339243vkc.13 for ; Tue, 27 Feb 2018 15:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cMlrpI0dJi5lrpMGURmsEAyLWruwLTK+0UHX7i+edfo=; b=g04HrWsy4tiuuf3TIBMqCyt2V93inGyUaJXs/MF1Im+KfJtYF6JdefqLo6xiu5Navo ddCp466USqHoepDMO+KyMFxnHp6z6Yx7psS9oBVT5He90q/UYjDgudc4oXPNUQvGYZzp PutGJRyVjKbjPA5wmzWA/lxOoryS3LiXttzpK+w7/eC9kwXZUYOz02PAkdNh6j5OaP3S 1smDTNsdaonWXi0upAzxKA4eOsRTwmYXfQdKNzEZP93dsQpLxgqGWdInDjTq1YqBEhpE cFH51W3FGaUZgNsza4OUvcN0nIk4eAv1l0AV/bMh1WiHi0MpkJY/uo+QfYP1h/v2l4qx +SIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cMlrpI0dJi5lrpMGURmsEAyLWruwLTK+0UHX7i+edfo=; b=RmHuTeitjx4v+jcIq/X0YkQTyu/064BGep1cU3pr4swLxBqZtdZLjSpAOvn6c3nP5u wNZ4AofXqI5Bw0kkTA4pnkVeSW5aw1tPGnMIFedNd4SBKWj1qWksKm3DZv6aCSP/n7+s wbM36YomUPL3hpiCJR4F0YJTcMwzz/LbUAONk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cMlrpI0dJi5lrpMGURmsEAyLWruwLTK+0UHX7i+edfo=; b=dlkVrmqOfrkV5Ywk3xBvqGcJCMEgfqN7+2Th8mL6gyt7fTVRItjkNx5j74RFC2/fQ8 hj0DSpzX/ECvsq/x59mF6UH8/0V+kjPqFNVwfGi7ewDe/zYoKVjSZbRgoeSH116nvMVK YxsnMobOLX9Y0uTh6h92dtLEXgfbhrxbXUTPhqgg6BWJh+25tENp0WAevMLG3NsDwH3x lUTuW0gzBYEc+AuThAo61sBndLWChnxN17IOeQefhvP7/Pn/LSNUbvlYwHM1xb3nvVXi 9d1oC1AH87p4zmsHWklB+WJe5EckiPkB2yib+GcOtEIBPK5lYY5Q7z++wFJfwFL5R0fo O5qg== X-Gm-Message-State: APf1xPAHKy9dzHkFCi7T8iv/SVHdTZbUgHwx4qVDL1J+64gDn/1Muwji NCwntmfs6rCRxW3OLBtUE47zUcbPhnmuR7gZK2hhQA== X-Received: by 10.31.152.139 with SMTP id a133mr12587529vke.96.1519773294598; Tue, 27 Feb 2018 15:14:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.242.140 with HTTP; Tue, 27 Feb 2018 15:14:53 -0800 (PST) In-Reply-To: <20180224024613.24078-8-mcgrof@kernel.org> References: <20180224024613.24078-1-mcgrof@kernel.org> <20180224024613.24078-8-mcgrof@kernel.org> From: Kees Cook Date: Tue, 27 Feb 2018 15:14:53 -0800 X-Google-Sender-Auth: U4faNyP4tQxMJZkgyrr1ugerxTU Message-ID: Subject: Re: [PATCH v2 07/11] firmware: split firmware fallback functionality into its own file To: "Luis R. Rodriguez" Cc: Greg KH , Andrew Morton , Shuah Khan , Martin Fuzzey , Mimi Zohar , David Howells , pali.rohar@gmail.com, Takashi Iwai , arend.vanspriel@broadcom.com, =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , nbroeking@me.com, Vikram Mulukutla , stephen.boyd@linaro.org, Mark Brown , Dmitry Torokhov , David Woodhouse , Linus Torvalds , Abhay_Salunke@dell.com, bjorn.andersson@linaro.org, jewalt@lgsinnovations.com, LKML , "linux-fsdevel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > The firmware fallback code is optional. Split that code out to help > distinguish the fallback functionlity from othere core firmware loader > features. This should make it easier to maintain and review code > changes. > > The reason for keeping the configuration onto a table which is built-in > if you enable firmware loading is so that we can later enable the kernel > after subsequent patches to tweak this configuration, even if the > firmware loader is modular. > > This introduces no functional changes. > > Signed-off-by: Luis R. Rodriguez > --- > drivers/base/Makefile | 4 +- > drivers/base/firmware_fallback.c | 661 +++++++++++++++++++++++++++ > drivers/base/firmware_fallback.h | 61 +++ > drivers/base/firmware_fallback_table.c | 29 ++ > drivers/base/firmware_loader.c | 803 +-------------------------------- > drivers/base/firmware_loader.h | 115 +++++ > 6 files changed, 874 insertions(+), 799 deletions(-) > create mode 100644 drivers/base/firmware_fallback.c > create mode 100644 drivers/base/firmware_fallback.h > create mode 100644 drivers/base/firmware_fallback_table.c > create mode 100644 drivers/base/firmware_loader.h Does it make sense to have a separate subdirectory for firmware instead? I did this _ stuff with lkdtm and have regretted it. (I'm likely going to make a subdirectory for it this cycle...) -Kees -- Kees Cook Pixel Security