Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1025924ybh; Tue, 21 Jul 2020 13:53:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCp/A7FKPzLBLFhahFoHRJfgoYBEpGShmWGH/ZZ7CtkDwuMqVXIkepxSF6ABQAj1GwiEQ1 X-Received: by 2002:a17:906:c18d:: with SMTP id g13mr26044904ejz.239.1595364792306; Tue, 21 Jul 2020 13:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595364792; cv=none; d=google.com; s=arc-20160816; b=EbrY3Iw1SZMWQDKO4zAT6vImPyaj6V/h+S5dVLcLb7GUtTQkXHX7JUtEHxozNjrWLM JxSPgII86wEmQ66sjdOHmX1WoeBuF3vtMhxvWfc5I34dYvpJb7HqSBkuaOTen7K2yKcy MLd/oxTv9TUF2fqY+8QAAb5wvXkyMYxxqSSmbEmPnFpOtBm1tbGiDUQPwxq+Vx8F/1B9 lpaGBXEIIzLU3dFM33kUBPqHj3owbj7hduJTTIh8ah0Bi89p/dUd1ZUHutvK6ne1aPs5 BgWuaxZO/eNq8pwZ5uSw1gMUZigAZyXLjfBOKrfSEdoJCyM6IaMqIs73rBhI1nSJR5Fj 7p8w== 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 :in-reply-to:references:mime-version; bh=m0EfzEZN57vpVycsrkdSWJl7YusriC0Q88RaRlYlThU=; b=b3sciVLvSd6DthQElOfDPEGk5vo+DdvgWWP3Wn7hbBO5SzpGciP4PccemSyV1kBFk5 et946I3FmvYHlQRMuEFdM5+L1vZTDAXSIZB/KuKJUz33r7+vjzTkPbCe5Uy/iYjjZUZa BTPMincB79pmeVXIgm9flBu8oAoYZMCsGEhNCw2X7EyLpLkLqSxjwdzFaM8LwB9sfH4M L/LzJJGKG5nulnHRmfI1mqHHPzJZV4hETBMJuEQKCLMznYstXVKtLO4Q+ufWb8e+3q8g lZHHpLwJ9gZ8fHExZdK+zZ3Ox/34replvzi+VVz+32YteppjhrA/FR5885K/yNJWP20S bXnQ== ARC-Authentication-Results: i=1; mx.google.com; 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 l15si13201121ejq.119.2020.07.21.13.52.49; Tue, 21 Jul 2020 13:53:12 -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; 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 S1728785AbgGUUu2 (ORCPT + 99 others); Tue, 21 Jul 2020 16:50:28 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:49855 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbgGUUu2 (ORCPT ); Tue, 21 Jul 2020 16:50:28 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Mj8eD-1kRWbf2kzd-00f8yZ for ; Tue, 21 Jul 2020 22:50:26 +0200 Received: by mail-qk1-f182.google.com with SMTP id k18so20793034qke.4 for ; Tue, 21 Jul 2020 13:50:26 -0700 (PDT) X-Gm-Message-State: AOAM533IKaBrZhFCu9gbPq8gEHqf7J5RQssCXA60Mu+dcGNYLBPULRH3 1mZaB3q6RBlyBwCsJGQTx3pwPEtIIsvky1TwfVY= X-Received: by 2002:a37:b484:: with SMTP id d126mr28688657qkf.394.1595364625563; Tue, 21 Jul 2020 13:50:25 -0700 (PDT) MIME-Version: 1.0 References: <20200716223627.253936-1-daniel.gutson@eclypsium.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 21 Jul 2020 22:50:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [PATCH] Firmware security information in SYSFS To: Daniel Gutson Cc: Derek Kiernan , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Greg Kroah-Hartman , Mauro Carvalho Chehab , "linux-kernel@vger.kernel.org" , Richard Hughes , Alex Bazhaniuk Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:XFCRV57n8lc2c4nXLuLzPsaiIy9oNKovSXugEQ5Te7ZzAgTe52M i6v+5ku4J1Kdc9gZALd55mLDrbzMm5PYoUI5Pcx9zpi9s7kldz17tUMMkFw1H6nEHzu2oTx /QdW6htNEt10uJIO9OhMLyZ3NHVe8o2kUJbmTO6Uw0MqtGZSq7h1gPy2DaeuUXBYOQ9dIZH sffdBBjvdqezG7eKdfILA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Wa54Ie32LFY=:7lsbXAL0QlG6TmwNNMCvl9 Mw4wsJ8PRUQa3mTOMq6RQV82zaqEtYBfCA+/6BC1yW3JcbHX2eHnfdVyo1qaL9pJSBVXHjFx7 3/U/JHDjeetoRdWXesWcxORwZjggnHD4SVo0B6gGMlo6DXyWKnwMF1EdS1u0E3S8UyCy6dNvc xTWfo83FdJJ5CuQlI70uN6KTYPZfcQwzVJN0D2Czfx86g8jbVEYhBx/ysuAAvt5Ixmalb/L+H fjIkU1bNBmlQyvKWcwiNVk55IYOP9YVgnZkhi31GQDXOPh4RFP4AMZTdtTTZ8kh5mp98g8JYO dWwy0pHJG+uG+S3bo6/rkt3VrKs6w6/mNDYjYUIEaG6wcDLDWLJKHEkeTWeAZ7tHPPk9v6yxr pUi0BwU6x+DKCKrOn1BNFlJtVvtlqHHZIiySgmHcLjTNpTjl7pkNzkLmMxnTnTXjDrDUNkZXH hDIBVs+9FCJmzdKAdrZYh4gnxWpuhroHOSNGQSp9Ahr6k+Kx7M9uCOxjaxTM6qTW4h39Zp+da b6642Trz6/Jk+tixCJCJubRfr5blhK865usqBoigrCM6+gMs+iZVqZ27L4Mm0nkOGA0N/1tZY gQvZY88L7a594qb6h19QmQkxYOxbbonBn2Cem/Vfgg/stNwMa/qjW2PbByXxahUw1ZfOcw7E2 3U45dxn6HTmFrpYHW1lmjex0Oy8u389ZohX1YNgnvwihF3lT3139PDjZQecVPgYD9uMCEUSOP 45J0qcVkPGvY4ZlxaZxlFazsHy8/7c9LrltyC1z6nahgROSZU5TmWDlJLh4mNTtDOY7hzIbbz F16/nF2DjhV9gSGhinTz4XmwzqNR2N2IcDAiYki0QAD7LW2zeYlOlAPAWNw63n8OVN/CO3Cxq G6QchsYyhm01Nzun1iF9VUi2kUPS+zhYPkhaE5OYH+E93yq3inheGYfdCW0/xuswuifdsnFC4 En6FBuqiOugDYpj1vX3S9a6oZHXllWfhttMR3V9QOTZxJ22Rea5W0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 9:49 PM Daniel Gutson wrote: > On Fri, Jul 17, 2020 at 12:39 PM Arnd Bergmann wrote: >> >> My impression was that the state of the registers you read would >> be the same if you read them multiple times, at least until you >> reboot and the firmware has a chance to change them. > > > That's not always the case, for example for the SMI count. > Another example is WPD, a driver (such as the intel-spi for instance) can change its value if it is unlocked. > But many others don't change so it might be a good idea to add another function to the API to register constant values. Ok, if the value can change, then I suppose you can pass a pointer to the 'struct class_attribute' or 'struct file_operations' with the appropriate 'show' callbacks, this should be easier than creating another callback abstraction. For values that can not change, passing the value should be easier. Arnd