Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632864

[PATCH v2 2/3] tpm: vtpm_proxy: Implement request_locality

From Stefan Berger <stefanb@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/3] tpm: vtpm_proxy: Implement request_locality
Date 2017-04-28 15:10 +0200
Message-ID <tBdOO-7J4-21@gated-at.bofh.it> (permalink)
References <tBdON-7J4-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Implement the request_locality function. Accept all localities assuming
that the emulator handling the localities will check for a valid locality.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
 drivers/char/tpm/tpm_vtpm_proxy.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/char/tpm/tpm_vtpm_proxy.c b/drivers/char/tpm/tpm_vtpm_proxy.c
index fb4d207..48b9818 100644
--- a/drivers/char/tpm/tpm_vtpm_proxy.c
+++ b/drivers/char/tpm/tpm_vtpm_proxy.c
@@ -371,6 +371,11 @@ static bool vtpm_proxy_tpm_req_canceled(struct tpm_chip  *chip, u8 status)
 	return ret;
 }
 
+static int vtpm_proxy_request_locality(struct tpm_chip *chip, int locality)
+{
+	return locality;
+}
+
 static const struct tpm_class_ops vtpm_proxy_tpm_ops = {
 	.flags = TPM_OPS_AUTO_STARTUP,
 	.recv = vtpm_proxy_tpm_op_recv,
@@ -380,6 +385,7 @@ static const struct tpm_class_ops vtpm_proxy_tpm_ops = {
 	.req_complete_mask = VTPM_PROXY_REQ_COMPLETE_FLAG,
 	.req_complete_val = VTPM_PROXY_REQ_COMPLETE_FLAG,
 	.req_canceled = vtpm_proxy_tpm_req_canceled,
+	.request_locality = vtpm_proxy_request_locality,
 };
 
 /*
-- 
2.4.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/3]  Extend the vTPM proxy driver to pass locality to emulator Stefan Berger <stefanb@linux.vnet.ibm.com> - 2017-04-28 15:10 +0200
  [PATCH v2 2/3] tpm: vtpm_proxy: Implement request_locality Stefan Berger <stefanb@linux.vnet.ibm.com> - 2017-04-28 15:10 +0200
  [PATCH v2 1/3] tpm: vtpm_proxy: Add ioctl to get supported flags Stefan Berger <stefanb@linux.vnet.ibm.com> - 2017-04-28 15:10 +0200
    Re: [PATCH v2 1/3] tpm: vtpm_proxy: Add ioctl to get supported flags Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-05-04 00:40 +0200
  Re: [PATCH v2 0/3]  Extend the vTPM proxy driver to pass locality to  emulator Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-04-29 14:00 +0200
  Re: [PATCH v2 0/3]  Extend the vTPM proxy driver to pass locality to  emulator Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-05-04 00:40 +0200
    Re: [PATCH v2 0/3] Extend the vTPM proxy driver to pass locality to  emulator Stefan Berger <stefanb@linux.vnet.ibm.com> - 2017-05-04 01:50 +0200
      Re: [PATCH v2 0/3] Extend the vTPM proxy driver to pass locality to  emulator Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-05-04 11:20 +0200

csiph-web