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

CUSE TPM fails to initialize (reason: seccomp profile) #520

Closed
stefanberger opened this issue Aug 13, 2021 · 0 comments
Closed

CUSE TPM fails to initialize (reason: seccomp profile) #520

stefanberger opened this issue Aug 13, 2021 · 0 comments

Comments

@stefanberger
Copy link
Owner

Describe the bug

Initialization of the CUSE TPM fails like this:

$ sudo swtpm_ioctl --tpm-device /dev/foobar -i
Could not execute PTM_INIT: Software caused connection abort

To Reproduce
Steps to reproduce the behavior:

  1. Start CUSE TPM:
$ sudo mkdir /tmp/myvtpm1
$ sudo swtpm cuse -n foobar --tpmstate dir=/tmp/myvtpm1/
  1. Initialize the CUSE TPM:
$ sudo swtpm_ioctl --tpm-device /dev/foobar -i
Could not execute PTM_INIT: Software caused connection abort

Expected behavior

No error should occur following swtpm_ioctl.

Desktop (please complete the following information):

  • OS: Fedora
  • Version 33

Versions of relevant components

  • swtpm: 0.7.0 development
  • libtpms: 0.9.0
  • glib: 2.68

The reason is due to the seccomp profile preventing the execution of sched_setattr syscall invoked by glib v2.68 g_thread_pool_new().

stefanberger added a commit that referenced this issue Aug 13, 2021
glib's (v2.68) g_thread_pool_new() calls the syscall sched_setattr(),
which we must allow to avoid termination of the CUSE TPM.

Thispact resolves issue #520.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
stefanberger added a commit that referenced this issue Aug 13, 2021
glib's (v2.68) g_thread_pool_new() calls the syscall sched_setattr(),
which we must allow to avoid termination of the CUSE TPM.

This patch resolves issue #520.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
stefanberger added a commit that referenced this issue Aug 13, 2021
glib's (v2.68) g_thread_pool_new() calls the syscall sched_setattr(),
which we must allow to avoid termination of the CUSE TPM.

This patch resolves issue #520.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
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

No branches or pull requests

1 participant