From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: tpmdd-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org
Cc: jgunthorpe@obsidianresearch.com,
Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: [PATCH 2/3] tpm: vtpm_proxy: Implement request_locality
Date: Mon, 17 Apr 2017 11:19:30 -0400 [thread overview]
Message-ID: <1492442371-30252-3-git-send-email-stefanb@linux.vnet.ibm.com> (raw)
In-Reply-To: <1492442371-30252-1-git-send-email-stefanb@linux.vnet.ibm.com>
Implement the request_locality function. Accept all localties 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 be0a268..bf59426 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
next prev parent reply other threads:[~2017-04-17 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 15:19 [PATCH 0/3] Extend the vTPM proxy driver to pass locality to emulator Stefan Berger
2017-04-17 15:19 ` [PATCH 1/3] tpm: vtpm_proxy: Add ioctl to get supported flags Stefan Berger
2017-04-17 15:19 ` Stefan Berger [this message]
2017-04-18 16:47 ` [PATCH 2/3] tpm: vtpm_proxy: Implement request_locality Jason Gunthorpe
2017-04-18 22:41 ` Stefan Berger
2017-04-19 15:35 ` Jarkko Sakkinen
[not found] ` <1492442371-30252-1-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-04-17 15:19 ` [PATCH 3/3] tpm: vtpm_proxy: Add ioctl to request locality prepended to command Stefan Berger
2017-04-20 11:58 ` Stefan Berger
2017-04-23 12:18 ` [tpmdd-devel] " Jarkko Sakkinen
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=1492442371-30252-3-git-send-email-stefanb@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-security-module@vger.kernel.org \
--cc=tpmdd-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).