diff --git a/compel/arch/x86/src/lib/infect.c b/compel/arch/x86/src/lib/infect.c index 048b2498fd..8451e530f5 100644 --- a/compel/arch/x86/src/lib/infect.c +++ b/compel/arch/x86/src/lib/infect.c @@ -274,6 +274,10 @@ static int get_task_xsave(pid_t pid, user_fpregs_struct_t *xsave) unsigned long features = 0; if (ptrace(PTRACE_ARCH_PRCTL, pid, (unsigned long)&features, ARCH_SHSTK_STATUS)) { + /* kernels that don't support shadow stack return -EINVAL */ + if (errno == EINVAL) + return 0; + pr_perror("shstk: can't get shadow stack status for %d", pid); return -1; }