Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cbmem work and print TCPA log #197

Merged

Conversation

SergiiDmytruk
Copy link
Member

This includes cleaned up changes from #62, because they were necessary.

If Dasharo/skiboot#2 is merged first, this PR can be changed to update skiboot payload to use that fork.

This way this memory will be available for mapping via /dev/mem even
when kernel is configured with CONFIG_[IO_]STRICT_DEVMEM.  This makes
CBMEM available in host via cbmem tool.

Change-Id: I968067ebb8dfcf816fe72ea9c00985d0d10f5fbb
Signed-off-by: Sergii Dmytruk <[email protected]>
The range needs to be filled in log-tpm.c, so it's available in
write_tables().

CBMEM_ID_TCPA_LOG_REF was added to avoid the necessity of code outside
of log-tpm.c to know about the layout.

Change-Id: I1deae6ce00d1d7a96c02358b387592c41a8ac5f8
Signed-off-by: Sergii Dmytruk <[email protected]>
Aligning use of the log for skiboot, cbmem and Linux drivers is pain in
the ass not just in terms of access to reserved memory but even in terms
of endianness.

Just pass log to skiboot, which is enough for printing it via `cbmem`
because Linux doesn't change it and
`/sys/kernel/security/tpm0/binary_bios_measurements` is not needed.

Change-Id: I4014d4944e876d34e6a392b9ce7104d0ad57b6f9
Signed-off-by: Sergii Dmytruk <[email protected]>
Change-Id: I1cd89d720ba79e44b033fe5b1ee6a21bfa3584b3
Signed-off-by: Igor Bagnucki <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
util/cbmem/cbmem.c Outdated Show resolved Hide resolved
Detected via header_bytes field of table header.

Change-Id: I6c5c15c4590a45cbcbf4c6fd11fac936a5412430
Signed-off-by: Igor Bagnucki <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Change-Id: I113e1b4fd5932c28075930d318b8938ab10d75c4
Signed-off-by: Michał Żygowski <[email protected]>
Signed-off-by: Krystian Hebel <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Copy link
Contributor

@krystian-hebel krystian-hebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SergiiDmytruk approved, but please also change Skiboot revision in this PR.

Change-Id: I77df37c63b250d153f4297135bbff4333aa36696
Signed-off-by: Sergii Dmytruk <[email protected]>
@SergiiDmytruk
Copy link
Member Author

@krystian-hebel Added repository option and updated revision.

@macpijan macpijan changed the base branch from raptor-cs_talos-2/develop to raptor-cs_talos-2/tpm-poc-integration June 24, 2022 20:08
@macpijan macpijan merged commit fc36973 into raptor-cs_talos-2/tpm-poc-integration Jun 24, 2022
@macpijan macpijan deleted the raptor-cs_talos-2/cbmem branch June 24, 2022 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants