SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(int, "procctl", vki_idtype_t, idtype, vki_id_t, id, int, cmd, void *, arg);
switch (ARG3) {
- case PROC_ASLR_CTL:
- case PROC_SPROTECT:
- case PROC_TRACE_CTL:
- case PROC_TRAPCAP_CTL:
- case PROC_PDEATHSIG_CTL:
- case PROC_STACKGAP_CTL:
+ case VKI_PROC_ASLR_CTL:
+ case VKI_PROC_SPROTECT:
+ case VKI_PROC_TRACE_CTL:
+ case VKI_PROC_TRAPCAP_CTL:
+ case VKI_PROC_PDEATHSIG_CTL:
+ case VKI_PROC_STACKGAP_CTL:
+ case VKI_PROC_NO_NEW_PRIVS_CTL:
+ case VKI_PROC_WXMAP_CTL:
PRE_MEM_READ("procctl(arg)", ARG4, sizeof(int));
break;
- case PROC_REAP_STATUS:
+ case VKI_PROC_REAP_STATUS:
PRE_MEM_READ("procctl(arg)", ARG4, sizeof(struct vki_procctl_reaper_status));
break;
- case PROC_REAP_GETPIDS:
+ case VKI_PROC_REAP_GETPIDS:
PRE_MEM_READ("procctl(arg)", ARG4, sizeof(struct vki_procctl_reaper_pids));
break;
- case PROC_REAP_KILL:
+ case VKI_PROC_REAP_KILL:
/* The first three fields are reads
* int rk_sig;
* u_int rk_flags;
PRE_MEM_READ("procctl(arg)", ARG4, sizeof(int) + sizeof(u_int) + sizeof(vki_pid_t));
PRE_MEM_WRITE("procctl(arg)", ARG4+offsetof(struct vki_procctl_reaper_kill, rk_killed), sizeof(u_int) + sizeof(vki_pid_t));
break;
- case PROC_ASLR_STATUS:
- case PROC_PDEATHSIG_STATUS:
- case PROC_STACKGAP_STATUS:
- case PROC_TRAPCAP_STATUS:
- case PROC_TRACE_STATUS:
+ case VKI_PROC_ASLR_STATUS:
+ case VKI_PROC_PDEATHSIG_STATUS:
+ case VKI_PROC_STACKGAP_STATUS:
+ case VKI_PROC_TRAPCAP_STATUS:
+ case VKI_PROC_TRACE_STATUS:
+ case VKI_PROC_NO_NEW_PRIVS_STATUS:
+ case VKI_PROC_WXMAP_STATUS:
PRE_MEM_WRITE("procctl(arg)", ARG4, sizeof(int));
- case PROC_REAP_ACQUIRE:
- case PROC_REAP_RELEASE:
+ case VKI_PROC_REAP_ACQUIRE:
+ case VKI_PROC_REAP_RELEASE:
default:
break;
}
POST(sys_procctl)
{
switch (ARG3) {
- case PROC_REAP_KILL:
+ case VKI_PROC_REAP_KILL:
POST_MEM_WRITE(ARG4+offsetof(struct vki_procctl_reaper_kill, rk_killed), sizeof(u_int) + sizeof(vki_pid_t));
break;
- case PROC_ASLR_STATUS:
- case PROC_PDEATHSIG_STATUS:
- case PROC_STACKGAP_STATUS:
- case PROC_TRAPCAP_STATUS:
- case PROC_TRACE_STATUS:
+ case VKI_PROC_ASLR_STATUS:
+ case VKI_PROC_PDEATHSIG_STATUS:
+ case VKI_PROC_STACKGAP_STATUS:
+ case VKI_PROC_TRAPCAP_STATUS:
+ case VKI_PROC_TRACE_STATUS:
+ case VKI_PROC_NO_NEW_PRIVS_STATUS:
+ case VKI_PROC_WXMAP_STATUS:
POST_MEM_WRITE(ARG4, sizeof(int));
default:
break;
vki_uint32_t, MERGE64_SECOND(id),
int, cmd, void *, arg);
switch (ARG4) {
- case PROC_ASLR_CTL:
- case PROC_SPROTECT:
- case PROC_TRACE_CTL:
- case PROC_TRAPCAP_CTL:
- case PROC_PDEATHSIG_CTL:
- case PROC_STACKGAP_CTL:
+ case VKI_PROC_ASLR_CTL:
+ case VKI_PROC_SPROTECT:
+ case VKI_PROC_TRACE_CTL:
+ case VKI_PROC_TRAPCAP_CTL:
+ case VKI_PROC_PDEATHSIG_CTL:
+ case VKI_PROC_STACKGAP_CTL:
+ case VKI_PROC_NO_NEW_PRIVS_CTL:
+ case VKI_PROC_WXMAP_CTL:
PRE_MEM_READ("procctl(arg)", ARG5, sizeof(int));
break;
- case PROC_REAP_STATUS:
+ case VKI_PROC_REAP_STATUS:
PRE_MEM_READ("procctl(arg)", ARG5, sizeof(struct vki_procctl_reaper_status));
break;
- case PROC_REAP_GETPIDS:
+ case VKI_PROC_REAP_GETPIDS:
PRE_MEM_READ("procctl(arg)", ARG5, sizeof(struct vki_procctl_reaper_pids));
break;
- case PROC_REAP_KILL:
+ case VKI_PROC_REAP_KILL:
/* The first three fields are reads
* int rk_sig;
* u_int rk_flags;
PRE_MEM_READ("procctl(arg)", ARG5, sizeof(int) + sizeof(u_int) + sizeof(vki_pid_t));
PRE_MEM_WRITE("procctl(arg)", ARG5+offsetof(struct vki_procctl_reaper_kill, rk_killed), sizeof(u_int) + sizeof(vki_pid_t));
break;
- case PROC_ASLR_STATUS:
- case PROC_PDEATHSIG_STATUS:
- case PROC_STACKGAP_STATUS:
- case PROC_TRAPCAP_STATUS:
- case PROC_TRACE_STATUS:
+ case VKI_PROC_ASLR_STATUS:
+ case VKI_PROC_PDEATHSIG_STATUS:
+ case VKI_PROC_STACKGAP_STATUS:
+ case VKI_PROC_TRAPCAP_STATUS:
+ case VKI_PROC_TRACE_STATUS:
PRE_MEM_WRITE("procctl(arg)", ARG5, sizeof(int));
- case PROC_REAP_ACQUIRE:
- case PROC_REAP_RELEASE:
+ case VKI_PROC_REAP_ACQUIRE:
+ case VKI_PROC_REAP_RELEASE:
default:
break;
}
POST(sys_procctl)
{
switch (ARG4) {
- case PROC_REAP_KILL:
+ case VKI_PROC_REAP_KILL:
POST_MEM_WRITE(ARG5+offsetof(struct vki_procctl_reaper_kill, rk_killed), sizeof(u_int) + sizeof(vki_pid_t));
break;
- case PROC_ASLR_STATUS:
- case PROC_PDEATHSIG_STATUS:
- case PROC_STACKGAP_STATUS:
- case PROC_TRAPCAP_STATUS:
- case PROC_TRACE_STATUS:
+ case VKI_PROC_ASLR_STATUS:
+ case VKI_PROC_PDEATHSIG_STATUS:
+ case VKI_PROC_STACKGAP_STATUS:
+ case VKI_PROC_TRAPCAP_STATUS:
+ case VKI_PROC_TRACE_STATUS:
+ case VKI_PROC_NO_NEW_PRIVS_STATUS:
+ case VKI_PROC_WXMAP_STATUS:
POST_MEM_WRITE(ARG5, sizeof(int));
default:
break;
// From sys/procctl.h
//----------------------------------------------------------------------
-#define PROC_SPROTECT 1
-#define PROC_REAP_ACQUIRE 2
-#define PROC_REAP_RELEASE 3
-#define PROC_REAP_STATUS 4
-#define PROC_REAP_GETPIDS 5
-#define PROC_REAP_KILL 6
-#define PROC_TRACE_CTL 7
-#define PROC_TRACE_STATUS 8
-#define PROC_TRAPCAP_CTL 9
-#define PROC_TRAPCAP_STATUS 10
-#define PROC_PDEATHSIG_CTL 11
-#define PROC_PDEATHSIG_STATUS 12
-#define PROC_ASLR_CTL 13
-#define PROC_ASLR_STATUS 14
-#define PROC_STACKGAP_CTL 17
-#define PROC_STACKGAP_STATUS 18
-
+#define VKI_PROC_SPROTECT 1
+#define VKI_PROC_REAP_ACQUIRE 2
+#define VKI_PROC_REAP_RELEASE 3
+#define VKI_PROC_REAP_STATUS 4
+#define VKI_PROC_REAP_GETPIDS 5
+#define VKI_PROC_REAP_KILL 6
+#define VKI_PROC_TRACE_CTL 7
+#define VKI_PROC_TRACE_STATUS 8
+#define VKI_PROC_TRAPCAP_CTL 9
+#define VKI_PROC_TRAPCAP_STATUS 10
+#define VKI_PROC_PDEATHSIG_CTL 11
+#define VKI_PROC_PDEATHSIG_STATUS 12
+#define VKI_PROC_ASLR_CTL 13
+#define VKI_PROC_ASLR_STATUS 14
+#define VKI_PROC_STACKGAP_CTL 17
+#define VKI_PROC_STACKGAP_STATUS 18
+#define VKI_PROC_NO_NEW_PRIVS_CTL 19
+#define VKI_PROC_NO_NEW_PRIVS_STATUS 20
+#define VKI_PROC_WXMAP_CTL 21
+#define VKI_PROC_WXMAP_STATUS 22
struct vki_procctl_reaper_status {
u_int rs_flags;