diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -431,6 +431,7 @@ #define LINUX_ARCH_SET_FS 0x1002 #define LINUX_ARCH_GET_FS 0x1003 #define LINUX_ARCH_GET_GS 0x1004 +#define LINUX_ARCH_CET_STATUS 0x3001 #define linux_copyout_rusage(r, u) copyout(r, u, sizeof(*r)) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -242,6 +242,7 @@ int linux_arch_prctl(struct thread *td, struct linux_arch_prctl_args *args) { + unsigned long long cet[3]; struct pcb *pcb; int error; @@ -275,7 +276,12 @@ error = copyout(&pcb->pcb_gsbase, PTRIN(args->addr), sizeof(args->addr)); break; + case LINUX_ARCH_CET_STATUS: + memset(cet, 0, sizeof(cet)); + error = copyout(&cet, PTRIN(args->addr), sizeof(cet)); + break; default: + linux_msg(td, "unsupported arch_prctl code %#x", args->code); error = EINVAL; } return (error);