tpm: fix locality and power saving handling
Subsystems (3)
v3 cover tpm: fix locality and power saving handling
Devices that support locality has failed to transmit due to reserved order of locality request and cmdReady/goIdle handshake. The cmdReady/goIdle should be performed on the requested locality.
The first patch corrects the locality and power-save order, adds required polling for completion of goIdle and locality relinquish.
The second patch removes cmdRead/goIdle handshake from runtime_pm as it's rather a part of TPM2 protocol then true device power management, and on device it's no longer optional.
Tomas Winkler (2):
tpm: cmd_ready command can be issued only after granting locality
tpm: separate cmd_ready/go_idle from runtime_pm
drivers/char/tpm/tpm-interface.c | 28 +++++-- drivers/char/tpm/tpm_crb.c | 157 +++++++++++++++++++++++---------------- drivers/char/tpm/tpm_tis_core.c | 4 +- include/linux/tpm.h | 4 +- 4 files changed, 122 insertions(+), 71 deletions(-)
Signature · 6 lines
2.14.3 -- 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
PATCH v3 1/2 tpm: cmd_ready command can be issued only after granting locality
The correct sequence is to first request locality and only after that perform cmd_ready handshake, otherwise the hardware will drop the subsequent message as from the device point of view the cmd_ready handshake wasn't performed. Symmetrically locality has to be relinquished only after going idle handshake has completed, this requires that go_idle has to poll for the completion and as well locality relinquish has to poll for completion so it is not overridden in back to back commands flow.
The issue is only visible on devices that support multiple localities.
---
V2: poll for locality relinquish completion
V3: 1. Print error message upon locality relinquish failure
2. Don't override rc code on error path with locality relinquish return value.
drivers/char/tpm/tpm-interface.c | 21 +++++--- drivers/char/tpm/tpm_crb.c | 108 +++++++++++++++++++++++++++------------ drivers/char/tpm/tpm_tis_core.c | 4 +- include/linux/tpm.h | 2 +- 4 files changed, 94 insertions(+), 41 deletions(-)
drivers/char/tpm/tpm-interface.c +15 -6
@@ -422,8 +422,6 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,if (!(flags &TPM_TRANSMIT_UNLOCKED ))mutex_lock (&chip->tpm_mutex); -if (chip->dev.parent) -pm_runtime_get_sync (chip->dev.parent);if (chip->ops->clk_enable !=NULL ) chip->ops->clk_enable (chip, true);
@@ -439,6 +437,9 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, chip->locality = rc; } +if (chip->dev.parent) +pm_runtime_get_sync (chip->dev.parent); + rc =tpm2_prepare_space (chip, space, ordinal, buf);if (rc) goto out;
@@ -499,17 +500,25 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, rc =tpm2_commit_space (chip, space, ordinal, buf, &len); out: +if (chip->dev.parent) +pm_runtime_put_sync (chip->dev.parent); +if (need_locality && chip->ops->relinquish_locality) { - chip->ops->relinquish_locality (chip, chip->locality); +/* this coud be on error path, don't override error code */ +int l_rc = chip->ops->relinquish_locality (chip, chip->locality); + +if (l_rc) { +dev_err (&chip->dev,"%s: relinquish_locality: error %d\n" , + __func__, l_rc); + rc = l_rc; + } chip->locality =-1 ; } + out_no_locality:if (chip->ops->clk_enable !=NULL ) chip->ops->clk_enable (chip, false); -if (chip->dev.parent) -pm_runtime_put_sync (chip->dev.parent); -if (!(flags &TPM_TRANSMIT_UNLOCKED ))mutex_unlock (&chip->tpm_mutex);return rc ? rc : len;
drivers/char/tpm/tpm_crb.c +75 -33
192 lines not on this page · raw message
drivers/char/tpm/tpm_tis_core.c +3 -1
@@ -143,11 +143,13 @@ static bool check_locality(struct tpm_chip *chip, int l)return false; } -static void release_locality (struct tpm_chip *chip,int l) +static int release_locality (struct tpm_chip *chip,int l) {struct tpm_tis_data *priv =dev_get_drvdata (&chip->dev);tpm_tis_write8 (priv,TPM_ACCESS (l),TPM_ACCESS_ACTIVE_LOCALITY ); + +return 0 ; }static int request_locality (struct tpm_chip *chip,int l)
include/linux/tpm.h +1 -1
@@ -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);void (*clk_enable)(struct tpm_chip *chip,bool value); };
Signature · 6 lines
2.14.3 -- 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
Re: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality
drivers/char/tpm/tpm-interface.c ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, · line 508
Quoted 4 lines · Tomas Winkler
drivers/char/tpm/tpm-interface.c +2
-1if (need_locality && chip->ops->relinquish_locality) { - chip->ops->relinquish_locality (chip, chip->locality); +/* this coud be on error path, don't override error code */ +int l_rc = chip->ops->relinquish_locality (chip, chip->locality);
All local variable declarations must be in the beginning of the function.
drivers/char/tpm/tpm-interface.c ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, · line 514
Quoted 6 lines
drivers/char/tpm/tpm-interface.c +6
-0+ +if (l_rc) { +dev_err (&chip->dev,"%s: relinquish_locality: error %d\n" , + __func__, l_rc); + rc = l_rc; + }
Your comment about not overriding error code is incorrect.
The value of 'rc' should be never overridden, which kind of supports to "just print" behavior that we had for a locality error.
Is your fix somehow dependent on changing relinquish_locality() behavior? If not, please remove this change. If you want to contribute such behavioral change, you should make a separate patch of it.
Now it's like a trojan horse bundled inside a bug fix.
/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
RE: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality
Quoted 8 lines · Tomas Winkler
drivers/char/tpm/tpm-interface.c ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, · line 508
Quoted 4 lines
drivers/char/tpm/tpm-interface.c +2
-1if (need_locality && chip->ops->relinquish_locality) { - chip->ops->relinquish_locality (chip, chip->locality); +/* this coud be on error path, don't override error code */ +int l_rc = chip->ops->relinquish_locality (chip, chip->locality);All local variable declarations must be in the beginning of the function.
Who says?
Quoted 10 lines
drivers/char/tpm/tpm-interface.c ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
Quoted 4 lines
drivers/char/tpm/tpm-interface.c +3
-0+ +if (l_rc) { + dev_err(&chip->dev, "%s: relinquish_locality: error%d\n",
drivers/char/tpm/tpm-interface.c ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, · line 514
Quoted 3 lines
drivers/char/tpm/tpm-interface.c +3
-0+ __func__, l_rc); + rc = l_rc; + }Your comment about not overriding error code is incorrect.
Please explain?
Quoted 2 lines
The value of 'rc' should be never overridden, which kind of supports to "just print" behavior that we had for a locality error.
You are not consistent, you've agreed with propagating it to user space. The error will be propagated in case of an error in locality relinquish the device is pretty much in non functional state and provious errors do not matter much, but rc value won't be modified if locality_reliquish succeeds.
Quoted 3 lines
Is your fix somehow dependent on changing
relinquish_locality()behavior? If not, please remove this change. If you want to contribute such behavioral change, you should make a separate patch of it.
The issue is structural, this is required just because the relinquish locality is inside the error path handling.
Quoted 1 line
Now it's like a trojan horse bundled inside a bug fix.
Not sure I understand your methaphore.
Please review again.
Thanks
Tomas
--
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
Re: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality
Quoted 4 lines · Tomas
Quoted 2 lines
All local variable declarations must be in the beginning of the function.
Who says?
It is coherent how we have everything else.
It is much easier to see the stack allocation this way when the allocation is only done in the beginning of each function. If you really need to do such pattern, then it would be a better idea to consider an additional helper function.
Quoted 3 lines
Quoted 1 line
Your comment about not overriding error code is incorrect.
Please explain?
'l_rc' overrides 'rc' in the case when both are non-zero.
Quoted 9 lines
Quoted 3 lines
The value of 'rc' should be never overridden, which kind of supports to "just
print" behavior that we had for a locality error.You are not consistent, you've agreed with propagating it to user space. The error will be propagated in case of an error in locality relinquish the device is pretty much in non functional state and provious errors do not matter much, but rc value won't be modified if
locality_reliquishsucceeds.
Well, sometimes you fail to notice things and I failed to notice the collision above. The commit message does not describe why 'l_rc' overrides 'rc' in the case when both are non-zero. What was the reasoning, which made you end up with this priority order? Why is 'l_rc' more important than 'rc'?
My take is that does it really make sense have this change as part of a high priority bug fix that should be as localized as possible? Seems like a non-trivial problem by itself.
/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
RE: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality
Quoted 8 lines · Tomas
Quoted 4 lines
Quoted 2 lines
All local variable declarations must be in the beginning of the function.
Who says?
It is coherent how we have everything else.
I will have to care about its value out of the scope where the variable existence is not relevant.
Quoted 4 lines
It is much easier to see the stack allocation this way when the allocation is only done in the beginning of each function. If you really need to do such pattern, then it would be a better idea to consider an additional helper function.
The code block decides whether to modify 'rc'. I'm not sure if additional function will make
the code cleaner, on the opposite.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Your comment about not overriding error code is incorrect.
Please explain?
'
l_rc' overrides 'rc' in the case when both are non-zero.
Yes, that's been the intention, we cannot return more than one value. l_rc if set it has hire priority.
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
The value of 'rc' should be never overridden, which kind of supports to "just print" behavior that we had for a locality error.
You are not consistent, you've agreed with propagating it to user space. The error will be propagated in case of an error in locality relinquish the device is pretty much in non functional state and provious errors do not matter much, but rc value won't be modified if
locality_reliquishsucceeds.
Quoted 5 lines
Well, sometimes you fail to notice things and I failed to notice the collision above. The commit message does not describe why '
l_rc'
overrides 'rc' in the case when both are non-zero. What was the reasoning, which made you end up with this priority order? Why is 'l_rc' more important than 'rc'?
Because, it's fatal. I'm not sure it's matter much what the previous error was, it cannot be recovered That's my understanding of this flow.
Quoted 3 lines
My take is that does it really make sense have this change as part of a high priority bug fix that should be as localized as possible?
Seems like a non-trivial problem by itself.
Yes, the issue here is that also an error path can fail. Now what is the correct return value..
In any case, in order to resolve this dispute, I will post a version when the error is just prints out, Once, however fatal the error is, it's very unlikely that it will happen.
Second the driver will find the device not responding in a subsequent command.
Not perfect, but at least we will have functional driver.
Thanks
Tomas
????{.n?+???????+%?????????w??{.n?+????{??????????v?^?)????w*jg??????????j????G?????????j:+v???w?j?m????????w?????f???h?????????
Re: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality
Quoted 52 lines · Tomas
Quoted 8 lines · Tomas
Quoted 4 lines
Quoted 2 lines
All local variable declarations must be in the beginning of the function.
Who says?
It is coherent how we have everything else.
I will have to care about its value out of the scope where the variable existence is not relevant.
Quoted 4 lines
It is much easier to see the stack allocation this way when the allocation is only done in the beginning of each function. If you really need to do such pattern, then it would be a better idea to consider an additional helper function.
The code block decides whether to modify 'rc'. I'm not sure if additional function will make
the code cleaner, on the opposite.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Your comment about not overriding error code is incorrect.
Please explain?
'
l_rc' overrides 'rc' in the case when both are non-zero.Yes, that's been the intention, we cannot return more than one value.
l_rcif set it has hire priority.Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
The value of 'rc' should be never overridden, which kind of supports to "just print" behavior that we had for a locality error.
You are not consistent, you've agreed with propagating it to user space. The error will be propagated in case of an error in locality relinquish the device is pretty much in non functional state and provious errors do not matter much, but rc value won't be modified if
locality_reliquishsucceeds.Quoted 5 lines
Well, sometimes you fail to notice things and I failed to notice the collision above. The commit message does not describe why '
l_rc'
overrides 'rc' in the case when both are non-zero. What was the reasoning, which made you end up with this priority order? Why is 'l_rc' more important than 'rc'?Because, it's fatal. I'm not sure it's matter much what the previous error was, it cannot be recovered That's my understanding of this flow.
Quoted 3 lines
My take is that does it really make sense have this change as part of a high priority bug fix that should be as localized as possible?
Seems like a non-trivial problem by itself.Yes, the issue here is that also an error path can fail. Now what is the correct return value..
Quoted 9 lines
In any case, in order to resolve this dispute, I will post a version when the error is just prints out, Once, however fatal the error is, it's very unlikely that it will happen.
Second the driver will find the device not responding in a subsequent command.Not perfect, but at least we will have functional driver.
Thanks
Tomas
Please add my tested by to next version. Thanks.
/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
Jarkko Sakkinen
Tested-byRe: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality
In reply to Jarkko SakkinenQuoted 25 lines · Jarkko Sakkinen
Quoted 7 lines · Tomas Winkler
(quoted diff) +0
-1if (need_locality && chip->ops->relinquish_locality) { - chip->ops->relinquish_locality(chip, chip-Quoted 1 line
locality);
(quoted diff) +1
-0+ /* this coud be on error path, don't overrideerror code */
(quoted diff) +1
-0+ int l_rc = chip->ops->relinquish_locality(chip,
chip->locality);All local variable declarations must be in the beginning of the function.
drivers/char/tpm/tpm-interface.c ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, · line 514
Quoted 7 lines
drivers/char/tpm/tpm-interface.c +3
-0+ +if (l_rc) { + dev_err(&chip->dev, "%s:
relinquish_locality: error %d\n",drivers/char/tpm/tpm-interface.c +3
-0+ __func__, l_rc); + rc = l_rc; + }Your comment about not overriding error code is incorrect.
The value of 'rc' should be never overridden, which kind of supports to "just print" behavior that we had for a locality error.
Quoted 6 lines
Is your fix somehow dependent on changing
relinquish_locality()behavior? If not, please remove this change. If you want to contribute
such behavioral change, you should make a separate patch of it.Now it's like a trojan horse bundled inside a bug fix.
[And while doing this noticed a flaw in my test suite:
https://github.com/jsakkine-intel/tpm2-scripts/issues/3]
/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
PATCH v3 2/2 tpm: separate cmd_ready/go_idle from runtime_pm
In reply to Tomas WinklerWe cannot use go_idle cmd_ready commands via runtime_pm handles as with the introduction of localities this is no longer an optional feature, while runtime pm can be not enabled.
Though cmd_ready/go_idle provides power saving feature, it's also part of TPM2 protocol and should be called explicitly.
This patch exposes cmd_read/go_idle via tpm class ops and removes runtime pm support as it is not used by any driver.
---
V2: resent
V3: resent
drivers/char/tpm/tpm-interface.c | 15 ++++++--- drivers/char/tpm/tpm_crb.c | 69 +++++++++++++++++----------------------- include/linux/tpm.h | 2 ++ 3 files changed, 42 insertions(+), 44 deletions(-)
drivers/char/tpm/tpm-interface.c +10 -5
@@ -29,7 +29,6 @@#include <linux/mutex.h> #include <linux/spinlock.h> #include <linux/freezer.h> -#include <linux/pm_runtime.h> #include <linux/tpm_eventlog.h> #include "tpm.h"
@@ -437,8 +436,11 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, chip->locality = rc; } -if (chip->dev.parent) -pm_runtime_get_sync (chip->dev.parent); +if (chip->ops->cmd_ready) { + rc = chip->ops->cmd_ready (chip); +if (rc) + goto out; + } rc =tpm2_prepare_space (chip, space, ordinal, buf);if (rc)
@@ -500,8 +502,11 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, rc =tpm2_commit_space (chip, space, ordinal, buf, &len); out: -if (chip->dev.parent) -pm_runtime_put_sync (chip->dev.parent); +if (chip->ops->go_idle) { + rc = chip->ops->go_idle (chip); +if (rc) + goto out; + }if (need_locality && chip->ops->relinquish_locality) {/* this coud be on error path, don't override error code */
drivers/char/tpm/tpm_crb.c +30 -39
158 lines not on this page · raw message
include/linux/tpm.h +2 -0
@@ -43,6 +43,8 @@ struct tpm_class_ops {u8 (*status) (struct tpm_chip *chip);bool (*update_timeouts)(struct tpm_chip *chip,unsigned long *timeout_cap); +int (*go_idle)(struct tpm_chip *chip); +int (*cmd_ready)(struct tpm_chip *chip);int (*request_locality)(struct tpm_chip *chip,int loc);int (*relinquish_locality)(struct tpm_chip *chip,int loc);void (*clk_enable)(struct tpm_chip *chip,bool value);
Signature · 6 lines
2.14.3 -- 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
Re: [PATCH 2/2 v3] tpm: separate cmd_ready/go_idle from runtime_pm
Quoted 8 lines · Tomas Winkler
We cannot use
go_idlecmd_readycommands viaruntime_pmhandles as with the introduction of localities this is no longer an optional feature, while runtime pm can be not enabled.
Though cmd_ready/go_idle provides power saving feature, it's also part of TPM2 protocol and should be called explicitly.
This patch exposes cmd_read/go_idle via tpm class ops and removes runtime pm support as it is not used by any driver.
Quoted 4 lines
Signed-off-by Tomas Winkler <[email protected]>---
V2: resent
V3: resent
Only the cover letter needs a backlog but the code change looks good to me.
/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
Jarkko Sakkinen
Tested-byRe: [PATCH 2/2 v3] tpm: separate cmd_ready/go_idle from runtime_pm
Quoted 16 lines · Jarkko Sakkinen
Quoted 10 lines · Tomas Winkler
We cannot use
go_idlecmd_readycommands viaruntime_pmhandles as with the introduction of localities this is no longer an optional
feature, while runtime pm can be not enabled.
Though cmd_ready/go_idle provides power saving feature, it's also part of
TPM2 protocol and should be called explicitly.
This patch exposes cmd_read/go_idle via tpm class ops and removes runtime pm support as it is not used by any driver.Quoted 4 lines
Signed-off-by Tomas Winkler <[email protected]>---
V2: resent
V3: resent
Quoted 4 lines
Only the cover letter needs a backlog but the code change looks good to me.
Reviewed-by Jarkko Sakkinen <[email protected]>
/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
Jarkko Sakkinen
AppliedRe: [PATCH 2/2 v3] tpm: separate cmd_ready/go_idle from runtime_pm
Quoted 17 lines · Jarkko Sakkinen
Quoted 16 lines · Jarkko Sakkinen
Quoted 14 lines · Tomas Winkler
We cannot use
go_idlecmd_readycommands viaruntime_pmhandles as with the introduction of localities this is no longer an optional
feature, while runtime pm can be not enabled.
Though cmd_ready/go_idle provides power saving feature, it's also part of
TPM2 protocol and should be called explicitly.
This patch exposes cmd_read/go_idle via tpm class ops and removes runtime pm support as it is not used by any driver.Signed-off-by Tomas Winkler <[email protected]>---
V2: resent
V3: resent
Quoted 8 lines
Quoted 4 lines
Only the cover letter needs a backlog but the code change looks good to me.
Reviewed-by Jarkko Sakkinen <[email protected]>Tested-by Jarkko Sakkinen <[email protected]>/Jarkko
Applied.
/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
Re: [PATCH 2/2 v3] tpm: separate cmd_ready/go_idle from runtime_pm
Quoted 23 lines · Jarkko Sakkinen
Quoted 22 lines · Jarkko Sakkinen
Quoted 20 lines · Jarkko Sakkinen
Quoted 10 lines · Tomas Winkler
We cannot use
go_idlecmd_readycommands viaruntime_pmhandles as with the introduction of localities this is no longer an optional
feature, while runtime pm can be not enabled.
Though cmd_ready/go_idle provides power saving feature, it's also part of
TPM2 protocol and should be called explicitly.
This patch exposes cmd_read/go_idle via tpm class ops and removes runtime pm support as it is not used by any driver.Quoted 4 lines
Signed-off-by Tomas Winkler <[email protected]>---
V2: resent
V3: resentOnly the cover letter needs a backlog but the code change looks good to me.
Reviewed-by Jarkko Sakkinen <[email protected]>
Quoted 7 lines
Quoted 3 lines
Tested-by Jarkko Sakkinen <[email protected]>/Jarkko
Applied.
/Jarkko
This commit breaks my smoke tests on Kabylake [1] so I need to drop it. The bug fix for locality works without any issues.
[1]
$ python -m unittest -v tpm2_smoke test_seal_with_auth (tpm2_smoke.SmokeTest) ... ok test_seal_with_policy (tpm2_smoke.SmokeTest) ... ok test_seal_with_too_long_auth (tpm2_smoke.SmokeTest) ... ok test_too_short_cmd (tpm2_smoke.SmokeTest) ... ok test_unseal_with_wrong_auth (tpm2_smoke.SmokeTest) ... ok test_unseal_with_wrong_policy (tpm2_smoke.SmokeTest) ... ok test_flush_context (tpm2_smoke.SpaceTest) ... ERROR test_get_handles (tpm2_smoke.SpaceTest) ... ERROR test_invalid_cc (tpm2_smoke.SpaceTest) ... ok test_make_two_spaces (tpm2_smoke.SpaceTest) ... ERROR
======================================================================
ERROR: test_flush_context (tpm2_smoke.SpaceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tpm2_smoke.py", line 185, in test_flush_context
space1.flush_context(root1)
File "tpm2.py", line 517, in flush_context
self.send_cmd(cmd)
File "tpm2.py", line 378, in send_cmd
raise ProtocolError(cc, rc)
ProtocolError: TPM_RC_UNKNOWN: cc=0x00000165, rc=0x00000165
======================================================================
ERROR: test_get_handles (tpm2_smoke.SpaceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tpm2_smoke.py", line 195, in test_get_handles
space2.create_root_key()
File "tpm2.py", line 562, in create_root_key
return struct.unpack('>I', self.send_cmd(cmd)[10:14])[0] File "tpm2.py", line 378, in send_cmd
raise ProtocolError(cc, rc)
ProtocolError: TPM_RC_UNBALANCED: cc=0x00000131, rc=0x00000131
======================================================================
ERROR: test_make_two_spaces (tpm2_smoke.SpaceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tpm2_smoke.py", line 171, in test_make_two_spaces
root3 = space2.create_root_key()
File "tpm2.py", line 562, in create_root_key
return struct.unpack('>I', self.send_cmd(cmd)[10:14])[0] File "tpm2.py", line 378, in send_cmd
raise ProtocolError(cc, rc)
ProtocolError: TPM_RC_UNBALANCED: cc=0x00000131, rc=0x00000131
----------------------------------------------------------------------
Ran 10 tests in 44.545s
FAILED (errors=3)
/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