Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3410821ybt; Tue, 30 Jun 2020 02:00:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqxuAwxjn2nPTldEtP5YzPLFsMJ9Va/Xk1i1Ut5o8v2i4iLC0w8ecPsTiU9jZDMNQ87wNE X-Received: by 2002:a17:906:6499:: with SMTP id e25mr17318659ejm.352.1593507621854; Tue, 30 Jun 2020 02:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593507621; cv=none; d=google.com; s=arc-20160816; b=fjzd0SnHgAptmKUAhsc2y2sEy8j+qTN89wSU4Mqj23yANL7veFiXYzF0omAv1XZUSS VLfGX5NnFTKR+OaKcuKJP+sM0YM4h5OgZSIgTLPzuyMiuKVF4TCUJp6bx0WvLsQC6z4V CZdLNXrFMJ2FmO/h4IjV1CS0fklKTH1C6tkkPR+X1LZltaVAIjs9jZ3kulnPIZdJIS3Y /eBnZPHLaXuxlmRULIa+LF2OD1dtXpZX18+cUXAw12whwGPahZdgI+Jv+s8oWT2Yn/UW s0zIjWSQ9wLngwmVXSLujJeelY5jxqhMaUly9PIGj+JcMoS0tTrG7oBonfMY5YTzz8Ib mNRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ekjzNXYDmJpI8pFHk4nNtM123Rktqx/qfqI8wy0STZ0=; b=NfBXueEE1G4Tzda8cYPG/h0yyQ32CtQ4su7U4tr3EFY+SJIjfbeq/yZHbaMSKI6RL4 Ks3DKTeqesYoWkg4lCLhCso8C4mVPgcU/XgBE0OZrvraRKm90YH7hUbrXK3pM6n2SIH3 Nj4ObY6ZDNatsrSvkRdUnj6/HYWeYltzQ1dus44jxJlxfqi73p4NzOAbbcKpS08Jq5XU mNOh7vMYQ7vYo+Hc9daWSH2WXsWuEVk1zLYoIcJ4V4GLAOt6r871qnaTyyefSzym42SX qI2xVU3lCloqkkzDOS2Ug7RblMBielawESdzO4CyWL3foygsuKr0r4QPj7IUpA54GUnv upjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eZgC5J/R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du6si1807675ejc.189.2020.06.30.01.59.58; Tue, 30 Jun 2020 02:00:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eZgC5J/R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731744AbgF3I7g (ORCPT + 99 others); Tue, 30 Jun 2020 04:59:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:57418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731591AbgF3I7f (ORCPT ); Tue, 30 Jun 2020 04:59:35 -0400 Received: from localhost (unknown [84.241.197.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 65C2F206BE; Tue, 30 Jun 2020 08:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593507575; bh=EV9ZqH5oEK7a6YYZW6fTv1AYKNoaDzHSVlCdKDobGyA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eZgC5J/RTiX2Kxby20jQ3LqKRg2WX+fffLCY591ZMMHOM4ZBNx/7+JyTOxaM/JNFe xptiNdXp9BZqYNrz6MW+K/SSzC7wP/VFMofmr64tsYMWIdK1+xjilUzrISRxJZLNrA KvB6oSajBv02CVQ0WL0vDGblfwfeLAioc2ODlgVg= Date: Tue, 30 Jun 2020 10:59:32 +0200 From: Greg Kroah-Hartman To: Daniel Gutson Cc: Derek Kiernan , Arnd Bergmann , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Richard Hughes , Alex Bazhaniuk Subject: Re: [PATCH] SPI LPC information kernel module Message-ID: <20200630085932.GF637809@kroah.com> References: <20200629225932.5036-1-daniel.gutson@eclypsium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200629225932.5036-1-daniel.gutson@eclypsium.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2020 at 07:59:32PM -0300, Daniel Gutson wrote: > This kernel module exports configuration attributes for the > system SPI chip. > This initial version exports the BIOS Write Enable (bioswe), > BIOS Lock Enable (ble), and the SMM Bios Write Protect (SMM_BWP) > fields of the Bios Control register. The idea is to keep adding more > flags, not only from the BC but also from other registers in following > versions. > > The goal is that the attributes are avilable to fwupd when SecureBoot > is turned on. > > A technical note: I check if *ppos == BUFFER_SIZE in the reading function > to exit early and avoid an extra access to the HW, for example when using > the 'cat' command, which causes two read operations. > > Signed-off-by: Daniel Gutson > --- > Documentation/ABI/stable/securityfs-spi-lpc | 23 + > MAINTAINERS | 6 + > drivers/misc/Kconfig | 1 + > drivers/misc/Makefile | 1 + > drivers/misc/spi_lpc/Kconfig | 20 + > drivers/misc/spi_lpc/Makefile | 8 + > drivers/misc/spi_lpc/bios_data_access.c | 559 +++++++++++++++++++ > drivers/misc/spi_lpc/bios_data_access.h | 181 +++++++ > drivers/misc/spi_lpc/low_level_access.c | 59 ++ > drivers/misc/spi_lpc/low_level_access.h | 21 + > drivers/misc/spi_lpc/spi_lpc_main.c | 176 ++++++ > drivers/misc/spi_lpc/viddid_arch_map.c | 566 ++++++++++++++++++++ > drivers/misc/spi_lpc/viddid_arch_map.h | 17 + > 13 files changed, 1638 insertions(+) A single driver that is 1500 lines long is fine, why split this up into tiny pieces? thanks, greg k-h