Skip to content

Commit

Permalink
swtpm: Allow sched_setattr in seccomp profile for CUSE TPM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stefanberger committed Aug 13, 2021
1 parent 59ad298 commit 98b7af8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/swtpm/seccomp_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ int create_seccomp_profile(bool cusetpm, unsigned int action)
SCMP_SYS(sched_setparam),
SCMP_SYS(sched_setscheduler),
SCMP_SYS(sched_setaffinity),
SCMP_SYS(sched_setattr),
SCMP_SYS(vhangup),
SCMP_SYS(sethostname),
SCMP_SYS(setdomainname),
Expand Down Expand Up @@ -253,6 +252,8 @@ int create_seccomp_profile(bool cusetpm, unsigned int action)
#ifdef __NR_clone3
SCMP_SYS(clone3),
#endif
/* misc */
SCMP_SYS(sched_setattr), /* caller: g_thread_pool_new() glib v2.68 */
};
scmp_filter_ctx ctx;
int ret;
Expand Down

0 comments on commit 98b7af8

Please sign in to comment.