• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tpm2-software / tpm2-abrmd / 988
80%

Build:
DEFAULT BRANCH: master
Ran 18 Dec 2018 12:06AM UTC
Jobs 2
Files 64
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
988

push

travis-ci

flihp
ResourceManager: Handle context gap event when saving sessions.

When we send context management commands (Context[Load|Save] and
StartAuthSession) we need to deal with a TPM2 replay protection
mechanism designed to prevent authorization replay. For details
consult part 1 of the TPM2 specification, section 30.5.

When the TPM responds to one of these commands with the
TPM_RC_CONTEXT_GAP response code we must manipulate the session contexts
such that their sequence numbers are within the context gap. The only
way we can effect a contexts sequence is to load it back into the TPM
and then save it again. So when the TPM sends us the gap RC indicating
that a session context is out of the gap we iterate over all sessions
loading and resaving any that had been previously saved. This algorithm
in this patch is the most simple possible and pretty inefficient.

There are three places in the ResourceManager code where we have to deal
with the gap RC:
- When the RM is loading session contexts that is required for a command
sent by a client.
- When the RM is saving session contexts that were previously loaded by
the RM for use by a command.
- When clients send the StartAuthSession command.

We do *not* need to handle the GAP RC when clients send the
Context[Load|Save] commands. When a client sends one of these commands
the RM changes the state of the associated SessionEntry but it does not
send the Context[Load|Save] command to the TPM.

Experimentally the TPM simulator only produces this RC in response to
the SaveContext command. The specification however allows for this RC to
be returned by all of the 3 context management functions. This patch
adds code to the ResourceManager in the 3 areas identified above.

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 988.1 (SCANBUILD="scan-build --status-bugs" CFLAGS=-D_REENTRANT) 18 Dec 2018 12:06AM UTC 0
0.0
Travis Job 988.1
2 988.2 (SCANBUILD= CONFIG_EXTRA=--enable-code-coverage) 18 Dec 2018 12:06AM UTC 0
0.0
Travis Job 988.2
Source Files on build 988
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #988
  • f75bc1bf on github
  • Prev Build on master (#984)
  • Next Build on master (#990)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc