Thread (12 messages) flat view 12 messages, 3 authors, 2018-02-08

[PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

From: Jarkko Sakkinen <hidden>
Date: 2018-02-06 20:03:02
Also in: linux-integrity, lkml

On Sun, Jan 28, 2018 at 09:17:53PM +0000, Winkler, Tomas wrote:
quoted
On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote:
quoted
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index
bcdd3790e94d..06639fb6ab85 100644
+++ b/include/linux/tpm.h
@@ -44,7 +44,7 @@ struct tpm_class_ops {
 	bool (*update_timeouts)(struct tpm_chip *chip,
 				unsigned long *timeout_cap);
 	int (*request_locality)(struct tpm_chip *chip, int loc);
-	void (*relinquish_locality)(struct tpm_chip *chip, int loc);
+	int (*relinquish_locality)(struct tpm_chip *chip, int loc);
This seems wrong.. What is the core code supposed to do if relinquish fails?
Not much just propage the error to the caller and leave the policy
decision to it.
Your patch set must either cover this or keep it as void.

A better idea is to print an error to klog.

/Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help