This commit is contained in:
Konstantin Belousov committed 2026-07-07 04:27:16 +03:00
1 parent 3e8b68c26e
commit f7675fab20
12 files changed
+72 -3

No files matched your search

+2
View File
@@ -475,6 +475,7 @@ typedef int (__sys_kexec_load_t)(uint64_t, u_long, struct kexec_segment *, u_lon
typedef int (__sys_pdrfork_t)(int *, int, int);
typedef int (__sys_pdwait_t)(int, int *, int, struct __wrusage *, struct __siginfo *);
typedef int (__sys_renameat2_t)(int, const char *, int, const char *, int);
typedef int (__sys_pdopenpid_t)(pid_t, int);
_Noreturn void __sys__exit(int rval);
int __sys_fork(void);
@@ -885,6 +886,7 @@ int __sys_kexec_load(uint64_t entry, u_long nseg, struct kexec_segment * segment
int __sys_pdrfork(int * fdp, int pdflags, int rfflags);
int __sys_pdwait(int fd, int * status, int options, struct __wrusage * wrusage, struct __siginfo * info);
int __sys_renameat2(int oldfd, const char * old, int newfd, const char * new, int flags);
int __sys_pdopenpid(pid_t pid, int flags);
__END_DECLS
#endif /* __LIBSYS_H_ */
+2
View File
@@ -825,4 +825,6 @@ FBSDprivate_1.0 {
__sys_pdwait;
_renameat2;
__sys_renameat2;
_pdopenpid;
__sys_pdopenpid;
};
+2 -1
View File
@@ -520,4 +520,5 @@
#define FREEBSD32_SYS_pdrfork 600
#define FREEBSD32_SYS_freebsd32_pdwait 601
#define FREEBSD32_SYS_renameat2 602
#define FREEBSD32_SYS_MAXSYSCALL 603
#define FREEBSD32_SYS_pdopenpid 603
#define FREEBSD32_SYS_MAXSYSCALL 604
@@ -608,4 +608,5 @@ const char *freebsd32_syscallnames[] = {
"pdrfork", /* 600 = pdrfork */
"freebsd32_pdwait", /* 601 = freebsd32_pdwait */
"renameat2", /* 602 = renameat2 */
"pdopenpid", /* 603 = pdopenpid */
};
+1
View File
@@ -670,4 +670,5 @@ struct sysent freebsd32_sysent[] = {
{ .sy_narg = AS(pdrfork_args), .sy_call = (sy_call_t *)sys_pdrfork, .sy_auevent = AUE_PDRFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 600 = pdrfork */
{ .sy_narg = AS(freebsd32_pdwait_args), .sy_call = (sy_call_t *)freebsd32_pdwait, .sy_auevent = AUE_PDWAIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 601 = freebsd32_pdwait */
{ .sy_narg = AS(renameat2_args), .sy_call = (sy_call_t *)sys_renameat2, .sy_auevent = AUE_RENAMEAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 602 = renameat2 */
{ .sy_narg = AS(pdopenpid_args), .sy_call = (sy_call_t *)sys_pdopenpid, .sy_auevent = AUE_PDOPENPID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 603 = pdopenpid */
};
@@ -3458,6 +3458,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 5;
break;
}
/* pdopenpid */
case 603: {
struct pdopenpid_args *p = params;
iarg[a++] = p->pid; /* pid_t */
iarg[a++] = p->flags; /* int */
*n_args = 2;
break;
}
default:
*n_args = 0;
break;
@@ -9347,6 +9355,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* pdopenpid */
case 603:
switch (ndx) {
case 0:
p = "pid_t";
break;
case 1:
p = "int";
break;
default:
break;
};
break;
default:
break;
};
@@ -11280,6 +11301,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* pdopenpid */
case 603:
if (ndx == 0 || ndx == 1)
p = "int";
break;
default:
break;
};
+1
View File
@@ -669,4 +669,5 @@ struct sysent sysent[] = {
{ .sy_narg = AS(pdrfork_args), .sy_call = (sy_call_t *)sys_pdrfork, .sy_auevent = AUE_PDRFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 600 = pdrfork */
{ .sy_narg = AS(pdwait_args), .sy_call = (sy_call_t *)sys_pdwait, .sy_auevent = AUE_PDWAIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 601 = pdwait */
{ .sy_narg = AS(renameat2_args), .sy_call = (sy_call_t *)sys_renameat2, .sy_auevent = AUE_RENAMEAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 602 = renameat2 */
{ .sy_narg = AS(pdopenpid_args), .sy_call = (sy_call_t *)sys_pdopenpid, .sy_auevent = AUE_PDOPENPID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 603 = pdopenpid */
};
+1
View File
@@ -608,4 +608,5 @@ const char *syscallnames[] = {
"pdrfork", /* 600 = pdrfork */
"pdwait", /* 601 = pdwait */
"renameat2", /* 602 = renameat2 */
"pdopenpid", /* 603 = pdopenpid */
};
+26
View File
@@ -3555,6 +3555,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 5;
break;
}
/* pdopenpid */
case 603: {
struct pdopenpid_args *p = params;
iarg[a++] = p->pid; /* pid_t */
iarg[a++] = p->flags; /* int */
*n_args = 2;
break;
}
default:
*n_args = 0;
break;
@@ -9521,6 +9529,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* pdopenpid */
case 603:
switch (ndx) {
case 0:
p = "pid_t";
break;
case 1:
p = "int";
break;
default:
break;
};
break;
default:
break;
};
@@ -11549,6 +11570,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* pdopenpid */
case 603:
if (ndx == 0 || ndx == 1)
p = "int";
break;
default:
break;
};
+2 -1
View File
@@ -541,4 +541,5 @@
#define SYS_pdrfork 600
#define SYS_pdwait 601
#define SYS_renameat2 602
#define SYS_MAXSYSCALL 603
#define SYS_pdopenpid 603
#define SYS_MAXSYSCALL 604
+2 -1
View File
@@ -444,4 +444,5 @@ MIASM = \
kexec_load.o \
pdrfork.o \
pdwait.o \
renameat2.o
renameat2.o \
pdopenpid.o
+6
View File
@@ -1932,6 +1932,10 @@ struct renameat2_args {
char new_l_[PADL_(const char *)]; const char * new; char new_r_[PADR_(const char *)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
struct pdopenpid_args {
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
int sys__exit(struct thread *, struct _exit_args *);
int sys_fork(struct thread *, struct fork_args *);
int sys_read(struct thread *, struct read_args *);
@@ -2342,6 +2346,7 @@ int sys_kexec_load(struct thread *, struct kexec_load_args *);
int sys_pdrfork(struct thread *, struct pdrfork_args *);
int sys_pdwait(struct thread *, struct pdwait_args *);
int sys_renameat2(struct thread *, struct renameat2_args *);
int sys_pdopenpid(struct thread *, struct pdopenpid_args *);
#ifdef COMPAT_43
@@ -3344,6 +3349,7 @@ int freebsd14_setgroups(struct thread *, struct freebsd14_setgroups_args *);
#define SYS_AUE_pdrfork AUE_PDRFORK
#define SYS_AUE_pdwait AUE_PDWAIT
#define SYS_AUE_renameat2 AUE_RENAMEAT
#define SYS_AUE_pdopenpid AUE_PDOPENPID
#undef PAD_
#undef PADL_