From: Scheie, Peter M <Petre.Scheie at gd-ms.com>
To: tpm2@lists.01.org
Subject: [tpm2] getting segfaults with tss-2.0.0, abrmd-2.0.0, tools-3.1.0
Date: Wed, 18 Jul 2018 21:17:53 +0000 [thread overview]
Message-ID: <b8a792c20cf64e448d1a3e8f4252f0b3@AZDC-MMB02.GD-MS.US> (raw)
[-- Attachment #1: Type: text/plain, Size: 4291 bytes --]
The good news is that with help from Wind River, I've been able to get tpm2-tss 2.0.0, tpm2-abrmd 2.0.0, and tpm2-tools 3.1.0 to build in our WR Linux 8 environment. We had been on versions 1.4.0, 1.2.0, and 3.0.3 respectively, which are working fine, but I wanted to get onto current releases. Had to add a couple patches and a bunch of package declarations into our bbappend files (we're using @flihp's OE recipes which were written for the earlier versions), but now they all build without error.
The bad news is that now on the target I'm getting segfaults with the tools and I can't really use the TPM. As the system boots up, I see some abrmd errors in the log, but I think that's just abrmd trying to talk to the TPM before the TPM is ready; eventually systemd restarts abrmd and it does start without errors. Here's the log in case it's helpful:
Jun 27 22:27:14 localhost kernel: ACPI: TPM2 0x000000009CBF9000 000034 (v03 INSYDE HSW-LPT 00000000 ACPI 00040000)
Jun 27 22:27:15 localhost systemd[1]: Starting TPM2 Access Broker and Resource Management Daemon...
Jun 27 22:27:15 localhost systemd[1]: tpm2-abrmd.service: Main process exited, code=exited, status=1/FAILURE
Jun 27 22:27:15 localhost systemd[1]: Failed to start TPM2 Access Broker and Resource Management Daemon.
Jun 27 22:27:15 localhost systemd[1]: tpm2-abrmd.service: Unit entered failed state.
Jun 27 22:27:15 localhost systemd[1]: tpm2-abrmd.service: Failed with result 'exit-code'.
Jun 27 22:27:15 localhost kernel[363]: ACPI: TPM2 0x000000009CBF9000 000034 (v03 INSYDE HSW-LPT 00000000 ACPI 00040000)
Jun 27 22:27:15 localhost tpm2-abrmd[366]: ERROR:tcti:/localhome/pscheie/workspace-mdsu-scheie/projects/mdsu/bitbake_build/tmp/work/broadwell-64-wrs-linux/tpm2-tss/2.0.0-r0/tpm2-tss-2.0.0/src/tss2-tcti/tcti-device.c:281:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpm0: No such file or directory
Jun 27 22:27:15 localhost tpm2-abrmd[366]: ** (tpm2-abrmd:366): WARNING **: failed to initialize device TCTI context: 0xa000a
Jun 27 22:27:15 localhost tpm2-abrmd[366]: ** (tpm2-abrmd:366): CRITICAL **: TCTI initialization failed: 0xa000a
Jun 27 22:27:20 localhost systemd[1]: tpm2-abrmd.service: Service hold-off time over, scheduling restart.
Jun 27 22:27:20 localhost systemd[1]: Stopped TPM2 Access Broker and Resource Management Daemon.
Jun 27 22:27:20 localhost systemd[1]: Starting TPM2 Access Broker and Resource Management Daemon...
Jun 27 22:27:20 localhost systemd[1]: Started TPM2 Access Broker and Resource Management Daemon.
By the way, does abrmd default to trying to connect to /dev/tpm0? When working with the emulator on my laptop, I have to start abrmd with '--tcti=libtss2-tcti-mssim.so' but I assume that's just for when there is no TPM device, right?
So, with tpm2-abrmd running, if I call, say, tpm2_pcrlist or tpm2_nvlist, to just query the TPM, it will display the PCRs or the NV indexes but then follow that with a "Segmentation fault", and syslog shows things like this:
Jun 27 22:32:42 localhost audit[1432]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=1 pid=1432 comm="gdbus" exe="/usr/bin/tpm2_pcrlist" sig=11
Jun 27 22:32:42 localhost kernel: gdbus[1432]: segfault at 7f8327acc750 ip 00007f8327acc750 sp 00007f8326ab2c38 error 14 in libtss2-mu.so.0.0.0[7f8328284000+3f000]
Jun 27 22:32:42 localhost kernel[363]: gdbus[1432]: segfault at 7f8327acc750 ip 00007f8327acc750 sp 00007f8326ab2c38 error 14 in libtss2-mu.so.0.0.0[7f8328284000+3f000]
Trying to write to the TPM, e.g., take ownership, doesn't work at all:
localhost:~$ tpm2_takeownership -o ownerpass -e endorsepass -l lockpass
ERROR: Could not change hierarchy for Owner. TPM Error:0x9a2
ERROR: Unable to run tpm2_takeownership
Segmentation fault
and syslog shows
Jun 27 23:08:03 localhost audit[1539]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=1 pid=1539 comm="gdbus" exe="/usr/bin/tpm2_takeownership" sig=11
Jun 27 23:08:03 localhost kernel: gdbus[1539]: segfault at 7ff2fe95c750 ip 00007ff2fe95c750 sp 00007ff2fd942c38 error 14 in libtss2-mu.so.0.0.0[7ff2ff114000+3f000]
Jun 27 23:08:03 localhost kernel[363]: gdbus[1539]: segfault at 7ff2fe95c750 ip 00007ff2fe95c750 sp 00007ff2fd942c38 error 14 in libtss2-mu.so.0.0.0[7ff2ff114000+3f000]
Any suggestions?
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 9177 bytes --]
next reply other threads:[~2018-07-18 21:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 21:17 Scheie, Peter M [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-19 10:24 [tpm2] getting segfaults with tss-2.0.0, abrmd-2.0.0, tools-3.1.0 Joshua Lock
2018-07-19 14:31 Philip Tricca
2018-07-19 16:08 Scheie, Peter M
2018-07-19 16:18 Scheie, Peter M
2018-07-20 11:00 Joshua Lock
2018-07-20 13:33 Scheie, Peter M
2018-07-23 15:23 Philip Tricca
2018-07-23 15:28 Scheie, Peter M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8a792c20cf64e448d1a3e8f4252f0b3@AZDC-MMB02.GD-MS.US \
--to=tpm2@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox