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

tpm2-software / tpm2-abrmd / 988 / 2
80%
master: 80%

Build:
DEFAULT BRANCH: master
Ran 18 Dec 2018 12:06AM UTC
Files 64
Run time 4s
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

18 Dec 2018 12:00AM UTC coverage: 0.0%. Remained the same
SCANBUILD= CONFIG_EXTRA=--enable-code-coverage

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

Source Files on job 988.2 (SCANBUILD= CONFIG_EXTRA=--enable-code-coverage)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 116
  • Travis Job 988.2
  • f75bc1bf on github
  • Prev Job for SCANBUILD= CONFIG_EXTRA=--enable-code-coverage on master (#984.2)
  • Next Job for SCANBUILD= CONFIG_EXTRA=--enable-code-coverage on master (#990.2)
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