Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,7 @@ set(BASIC_TESTS
prctl_auxv
prctl_caps
prctl_deathsig
prctl_mdwe
prctl_name
prctl_short_name
prctl_speculation_ctrl
Expand Down
5 changes: 5 additions & 0 deletions src/kernel_supplement.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ enum {
#define MEMREAD _IOWR('M', 26, typename Arch::mtd_read_req)
#endif

// New in the 6.3 kernel
#ifndef PR_GET_MDWE
#define PR_GET_MDWE 66
#endif

// New in the 6.4 kernel
#ifndef PR_GET_AUXV
#define PR_GET_AUXV 0x41555856
Expand Down
1 change: 1 addition & 0 deletions src/record_syscall.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4791,6 +4791,7 @@ static Switchable rec_prepare_syscall_arch(RecordTask* t,
case PR_SET_SECUREBITS:
case PR_GET_SECUREBITS:
case PR_GET_TAGGED_ADDR_CTRL:
case PR_GET_MDWE:
break;

case PR_SET_TAGGED_ADDR_CTRL:
Expand Down
15 changes: 15 additions & 0 deletions src/test/prctl_mdwe.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* -*- Mode: C; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */

#include "util.h"

int main(void) {
int ret = prctl(PR_GET_MDWE, 0, 0, 0, 0);
if (ret == -1 && errno == EINVAL) {
atomic_puts("PR_GET_MDWE not supported, skipping test");
atomic_puts("EXIT-SUCCESS");
return 0;
}
test_assert(ret >= 0);
atomic_puts("EXIT-SUCCESS");
return 0;
}
3 changes: 3 additions & 0 deletions src/test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ struct rr_open_how {
#ifndef PR_SET_VMA_ANON_NAME
#define PR_SET_VMA_ANON_NAME 0
#endif
#ifndef PR_GET_MDWE
#define PR_GET_MDWE 66
#endif
#ifndef PR_GET_AUXV
#define PR_GET_AUXV 0x41555856
#endif
Expand Down