public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tpm: Allow tpm_tis drivers to set hwrng quality.
@ 2018-06-08  7:11 Louis Collard
  2018-06-18 18:09 ` Jarkko Sakkinen
  0 siblings, 1 reply; 3+ messages in thread
From: Louis Collard @ 2018-06-08  7:11 UTC (permalink / raw)
  To: linux-integrity
  Cc: Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel, apronin

Adds plumbing required for drivers based on tpm_tis to set hwrng quality.

Signed-off-by: Louis Collard <louiscollard@chromium.org>
---
 drivers/char/tpm/tpm_tis_core.c | 2 ++
 drivers/char/tpm/tpm_tis_core.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 8b46aaa9e049..d2345d9fd7b5 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -875,6 +875,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 	chip->acpi_dev_handle = acpi_dev_handle;
 #endif
 
+	chip->hwrng.quality = priv->rng_quality;
+
 	/* Maximum timeouts */
 	chip->timeout_a = msecs_to_jiffies(TIS_TIMEOUT_A_MAX);
 	chip->timeout_b = msecs_to_jiffies(TIS_TIMEOUT_B_MAX);
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index f6e1dbe212a7..f48125f1e6e0 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -99,6 +99,7 @@ struct tpm_tis_data {
 	wait_queue_head_t int_queue;
 	wait_queue_head_t read_queue;
 	const struct tpm_tis_phy_ops *phy_ops;
+	unsigned short rng_quality;
 };
 
 struct tpm_tis_phy_ops {
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tpm: Allow tpm_tis drivers to set hwrng quality.
  2018-06-08  7:11 [PATCH] tpm: Allow tpm_tis drivers to set hwrng quality Louis Collard
@ 2018-06-18 18:09 ` Jarkko Sakkinen
       [not found]   ` <CAKNRAJW-7BUCRwiUneW+pDU4k4jXY6S5XNxAJCmQnE9AkP2ooA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2018-06-18 18:09 UTC (permalink / raw)
  To: Louis Collard
  Cc: linux-integrity, Peter Huewe, Jason Gunthorpe, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel, apronin

On Fri, Jun 08, 2018 at 03:11:46PM +0800, Louis Collard wrote:
> Adds plumbing required for drivers based on tpm_tis to set hwrng quality.
> 
> Signed-off-by: Louis Collard <louiscollard@chromium.org>

NAK because this not connected to the current GIT tree (should probably
make a patch set?).

/Jarkko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tpm: Allow tpm_tis drivers to set hwrng quality.
       [not found]   ` <CAKNRAJW-7BUCRwiUneW+pDU4k4jXY6S5XNxAJCmQnE9AkP2ooA@mail.gmail.com>
@ 2018-06-27  6:09     ` Louis Collard
  0 siblings, 0 replies; 3+ messages in thread
From: Louis Collard @ 2018-06-27  6:09 UTC (permalink / raw)
  To: linux-integrity; +Cc: linux-kernel

Hi sorry I'm not sure I understand; I based the change on linux-next
master, let me know if I should be using something else. The change is
not dependent on https://patchwork.kernel.org/patch/10453893/

On Wed, Jun 27, 2018 at 1:28 PM, Louis Collard
<louiscollard@chromium.org> wrote:
> Hi sorry I'm not sure I understand; I based the change on linux-next master,
> let me know if I should be using something else. The change is not dependent
> on https://patchwork.kernel.org/patch/10453893/
>
> On Tue, Jun 19, 2018 at 2:09 AM, Jarkko Sakkinen
> <jarkko.sakkinen@linux.intel.com> wrote:
>>
>> On Fri, Jun 08, 2018 at 03:11:46PM +0800, Louis Collard wrote:
>> > Adds plumbing required for drivers based on tpm_tis to set hwrng
>> > quality.
>> >
>> > Signed-off-by: Louis Collard <louiscollard@chromium.org>
>>
>> NAK because this not connected to the current GIT tree (should probably
>> make a patch set?).
>>
>> /Jarkko
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-27  6:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-08  7:11 [PATCH] tpm: Allow tpm_tis drivers to set hwrng quality Louis Collard
2018-06-18 18:09 ` Jarkko Sakkinen
     [not found]   ` <CAKNRAJW-7BUCRwiUneW+pDU4k4jXY6S5XNxAJCmQnE9AkP2ooA@mail.gmail.com>
2018-06-27  6:09     ` Louis Collard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox