From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: tpmdd-devel@lists.sourceforge.net,
Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, Rajiv Andrade <mail@srajiv.net>,
Sirrix AG <tpmdd@sirrix.com>
Subject: Re: [tpmdd-devel] [PATCH 09/13] tpm: Pull everything related to sysfs into tpm-sysfs.c
Date: Mon, 23 Sep 2013 13:36:33 -0600 [thread overview]
Message-ID: <20130923193633.GA9194@obsidianresearch.com> (raw)
In-Reply-To: <52408E5D.4020904@tycho.nsa.gov>
On Mon, Sep 23, 2013 at 02:54:21PM -0400, Daniel De Graaf wrote:
> On 09/23/2013 02:14 PM, Jason Gunthorpe wrote:
> >CLASS-sysfs.c is a common idiom for linux subsystems.
> >
> >This pulls all the sysfs attribute functions and related code
> >into tpm-sysfs.c. To support this change some constants are moved
> >from tpm.c to tpm.h and __tpm_pcr_read is made non-static and is
> >called tpm_pcr_read_dev.
> >
> >Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> [...]
> >diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c
> >index 12a4ab2..7892557 100644
> >+++ b/drivers/char/tpm/xen-tpmfront.c
> [...]
> >-static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL);
> >-static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL);
> >-static DEVICE_ATTR(locality, S_IRUGO | S_IWUSR, tpm_show_locality,
> >- tpm_store_locality);
>
> This patch drops the "locality" sysfs attribute from xen-tpmfront. Since
> that attribute is currently only implemented for the xen TPM driver, it
> is best to leave it there for now (and its show/store functions could
> also be made static, an oversight I just noticed now). If this attribute
> is later made available on other TPM drivers, it may need to contain
> device-specific logic, but such an implementation is well outside the
> scope of this series.
Okay, I see what you are talking about, the compiler didn't warn
because of the missing static.
This really is a core functionality. Lots of other drivers support
locality, but none have dared actually expose the functionality. IHMO,
it is a mistake to just jam a locality attribute in one driver.
Sorry, I would have said something when the driver was posted if it
was obvious this was hiding in there :|
It looks like this driver was introduced in the 3.12 merge window, we
could drop the attribute, and try to merge a core supported locality
API in 3.13? What do you think?
But, if you say it is needed, it is easy enough to adjust this patch
series.
Thanks,
Jason
next prev parent reply other threads:[~2013-09-23 19:36 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 18:14 [PATCH 00/13] TPM cleanup Jason Gunthorpe
2013-09-23 18:14 ` [PATCH 01/13] tpm: ibmvtpm: Use %zd formatting for size_t format arguments Jason Gunthorpe
2013-10-01 21:58 ` Peter Hüwe
2013-10-02 19:37 ` [tpmdd-devel] " Ashley D Lai
2013-09-23 18:14 ` [PATCH 02/13] tpm atmel: Call request_region with the correct base Jason Gunthorpe
[not found] ` <201310020000.13490.PeterHuewe@gmx.de>
2013-10-03 0:11 ` [tpmdd-devel] " Ashley D Lai
2013-10-03 4:36 ` Jason Gunthorpe
2013-10-04 17:21 ` Joel Schopp
2013-09-23 18:14 ` [PATCH 03/13] tpm: xen-tpmfront: Fix default durations Jason Gunthorpe
2013-09-23 18:51 ` Konrad Rzeszutek Wilk
2013-09-23 18:57 ` Daniel De Graaf
2013-09-23 18:14 ` [PATCH 04/13] tpm: Store devname in the tpm_chip Jason Gunthorpe
2013-10-04 15:57 ` [tpmdd-devel] " Ashley Lai
2013-09-23 18:14 ` [PATCH 05/13] tpm: Use container_of to locate the tpm_chip in tpm_open Jason Gunthorpe
2013-10-05 1:47 ` [tpmdd-devel] " Ashley Lai
2013-09-23 18:14 ` [PATCH 06/13] tpm: Remove redundant dev_set_drvdata Jason Gunthorpe
2013-10-05 2:14 ` [tpmdd-devel] " Ashley Lai
2013-09-23 18:14 ` [PATCH 07/13] tpm: Remove tpm_show_caps_1_2 Jason Gunthorpe
[not found] ` <201310020009.22952.PeterHuewe@gmx.de>
2013-10-01 22:21 ` Jason Gunthorpe
2013-10-01 22:38 ` [tpmdd-devel] " Peter Hüwe
2013-09-23 18:14 ` [PATCH 08/13] tpm: Pull everything related to /dev/tpmX into tpm-dev.c Jason Gunthorpe
2013-10-01 22:52 ` Peter Hüwe
2013-10-01 22:57 ` Jason Gunthorpe
2013-10-01 23:14 ` Peter Hüwe
2013-10-01 23:23 ` Jason Gunthorpe
2013-10-03 5:05 ` Jason Gunthorpe
2013-10-04 15:50 ` TPM.ko module rename (was tpm: Pull everything related to /dev/tpmX into tpm-dev.c) Peter Hüwe
2013-10-04 16:28 ` Jason Gunthorpe
2013-10-04 16:45 ` Ashley Lai
2013-09-23 18:14 ` [PATCH 09/13] tpm: Pull everything related to sysfs into tpm-sysfs.c Jason Gunthorpe
2013-09-23 18:54 ` [tpmdd-devel] " Daniel De Graaf
2013-09-23 19:36 ` Jason Gunthorpe [this message]
2013-09-23 20:20 ` Daniel De Graaf
2013-09-23 20:42 ` Jason Gunthorpe
2013-09-23 22:00 ` Daniel De Graaf
2013-09-23 22:23 ` Jason Gunthorpe
2013-09-24 14:28 ` Daniel De Graaf
2013-09-30 18:10 ` Jason Gunthorpe
2013-09-30 20:36 ` Daniel De Graaf
2013-09-30 21:20 ` Jason Gunthorpe
2013-09-30 22:09 ` Joel Schopp
2013-10-04 17:08 ` Jason Gunthorpe
2013-10-04 19:17 ` Stefan Berger
2013-10-04 22:02 ` Peter Hüwe
2013-10-07 15:06 ` Daniel De Graaf
2013-10-08 9:15 ` AW: [TrouSerS-tech] " Fuchs, Andreas
2013-10-09 17:38 ` Jason Gunthorpe
2013-10-10 7:42 ` AW: " Fuchs, Andreas
2013-10-10 16:50 ` Jason Gunthorpe
2013-09-23 18:14 ` [PATCH 10/13] tpm: Create a tpm_class_ops structure and use it in the drivers Jason Gunthorpe
2013-09-23 18:14 ` [PATCH 11/13] tpm: Use the ops structure instead of a copy in tpm_vendor_specific Jason Gunthorpe
2013-09-23 18:14 ` [PATCH 12/13] tpm: st33: Remove chip->data_buffer access from this driver Jason Gunthorpe
2013-09-23 18:14 ` [PATCH 13/13] tpm: Make tpm-dev allocate a per-file structure Jason Gunthorpe
2013-09-23 21:27 ` [tpmdd-devel] [PATCH 00/13] TPM cleanup Joel Schopp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130923193633.GA9194@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=leosilva@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@srajiv.net \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@sirrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox