git: b356030e6706 - main - linux(4): Regen for clone3 system call.
Dmitry Chagin
dchagin at FreeBSD.org
Thu Aug 12 08:50:39 UTC 2021
The branch main has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=b356030e670686df1300edf851e146c5d274e4f8
commit b356030e670686df1300edf851e146c5d274e4f8
Author: Dmitry Chagin <dchagin at FreeBSD.org>
AuthorDate: 2021-08-12 08:50:22 +0000
Commit: Dmitry Chagin <dchagin at FreeBSD.org>
CommitDate: 2021-08-12 08:50:22 +0000
linux(4): Regen for clone3 system call.
MFC after: 2 weeks
---
sys/amd64/linux/linux_proto.h | 3 ++-
sys/amd64/linux/linux_sysent.c | 2 +-
sys/amd64/linux/linux_systrace_args.c | 18 +++++++++++++++++-
sys/amd64/linux32/linux32_proto.h | 3 ++-
sys/amd64/linux32/linux32_sysent.c | 2 +-
sys/amd64/linux32/linux32_systrace_args.c | 18 +++++++++++++++++-
sys/arm64/linux/linux_proto.h | 3 ++-
sys/arm64/linux/linux_sysent.c | 2 +-
sys/arm64/linux/linux_systrace_args.c | 18 +++++++++++++++++-
sys/i386/linux/linux_proto.h | 3 ++-
sys/i386/linux/linux_sysent.c | 2 +-
sys/i386/linux/linux_systrace_args.c | 18 +++++++++++++++++-
12 files changed, 80 insertions(+), 12 deletions(-)
diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
index 5ebf28723c64..e609d3deeb31 100644
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -1358,7 +1358,8 @@ struct linux_pidfd_open_args {
register_t dummy;
};
struct linux_clone3_args {
- register_t dummy;
+ char uargs_l_[PADL_(struct l_user_clone_args *)]; struct l_user_clone_args * uargs; char uargs_r_[PADR_(struct l_user_clone_args *)];
+ char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)];
};
struct linux_close_range_args {
register_t dummy;
diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c
index cca061243a2f..c866076fa9d3 100644
--- a/sys/amd64/linux/linux_sysent.c
+++ b/sys/amd64/linux/linux_sysent.c
@@ -452,7 +452,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fsmount, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 432 = linux_fsmount */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
+ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */
diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c
index 3101b8672ce2..9db01b6b7440 100644
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -2677,7 +2677,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_clone3 */
case 435: {
- *n_args = 0;
+ struct linux_clone3_args *p = params;
+ uarg[0] = (intptr_t)p->uargs; /* struct l_user_clone_args * */
+ iarg[1] = p->usize; /* l_size_t */
+ *n_args = 2;
break;
}
/* linux_close_range */
@@ -7012,6 +7015,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_clone3 */
case 435:
+ switch (ndx) {
+ case 0:
+ p = "userland struct l_user_clone_args *";
+ break;
+ case 1:
+ p = "l_size_t";
+ break;
+ default:
+ break;
+ };
break;
/* linux_close_range */
case 436:
@@ -8512,6 +8525,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
case 434:
/* linux_clone3 */
case 435:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_close_range */
case 436:
/* linux_openat2 */
diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h
index 07e673a862ad..819ec994d0c9 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -1646,7 +1646,8 @@ struct linux_pidfd_open_args {
register_t dummy;
};
struct linux_clone3_args {
- register_t dummy;
+ char uargs_l_[PADL_(struct l_user_clone_args *)]; struct l_user_clone_args * uargs; char uargs_r_[PADR_(struct l_user_clone_args *)];
+ char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)];
};
struct linux_close_range_args {
register_t dummy;
diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c
index cf4ccc56990c..46b74d6a8139 100644
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -452,7 +452,7 @@ struct sysent linux32_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fsmount, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 432 = linux_fsmount */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
+ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */
diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c
index 79605a335aaf..8ff6242542f3 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -3166,7 +3166,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_clone3 */
case 435: {
- *n_args = 0;
+ struct linux_clone3_args *p = params;
+ uarg[0] = (intptr_t)p->uargs; /* struct l_user_clone_args * */
+ iarg[1] = p->usize; /* l_size_t */
+ *n_args = 2;
break;
}
/* linux_close_range */
@@ -8285,6 +8288,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_clone3 */
case 435:
+ switch (ndx) {
+ case 0:
+ p = "userland struct l_user_clone_args *";
+ break;
+ case 1:
+ p = "l_size_t";
+ break;
+ default:
+ break;
+ };
break;
/* linux_close_range */
case 436:
@@ -10054,6 +10067,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
case 434:
/* linux_clone3 */
case 435:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_close_range */
case 436:
/* linux_openat2 */
diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h
index 83237b046f85..6b12f819c87c 100644
--- a/sys/arm64/linux/linux_proto.h
+++ b/sys/arm64/linux/linux_proto.h
@@ -1168,7 +1168,8 @@ struct linux_pidfd_open_args {
register_t dummy;
};
struct linux_clone3_args {
- register_t dummy;
+ char uargs_l_[PADL_(struct l_user_clone_args *)]; struct l_user_clone_args * uargs; char uargs_r_[PADR_(struct l_user_clone_args *)];
+ char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)];
};
struct linux_close_range_args {
register_t dummy;
diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c
index a11c9b80cb11..5228faa77b8c 100644
--- a/sys/arm64/linux/linux_sysent.c
+++ b/sys/arm64/linux/linux_sysent.c
@@ -452,7 +452,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fsmount, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 432 = linux_fsmount */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
+ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */
diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c
index 6c0eeb5ae0f4..42f37dbff137 100644
--- a/sys/arm64/linux/linux_systrace_args.c
+++ b/sys/arm64/linux/linux_systrace_args.c
@@ -2299,7 +2299,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_clone3 */
case 435: {
- *n_args = 0;
+ struct linux_clone3_args *p = params;
+ uarg[0] = (intptr_t)p->uargs; /* struct l_user_clone_args * */
+ iarg[1] = p->usize; /* l_size_t */
+ *n_args = 2;
break;
}
/* linux_close_range */
@@ -6087,6 +6090,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_clone3 */
case 435:
+ switch (ndx) {
+ case 0:
+ p = "userland struct l_user_clone_args *";
+ break;
+ case 1:
+ p = "l_size_t";
+ break;
+ default:
+ break;
+ };
break;
/* linux_close_range */
case 436:
@@ -7372,6 +7385,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
case 434:
/* linux_clone3 */
case 435:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_close_range */
case 436:
/* linux_openat2 */
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
index 24b912757e61..d6e87072a89a 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -1639,7 +1639,8 @@ struct linux_pidfd_open_args {
register_t dummy;
};
struct linux_clone3_args {
- register_t dummy;
+ char uargs_l_[PADL_(struct l_user_clone_args *)]; struct l_user_clone_args * uargs; char uargs_r_[PADR_(struct l_user_clone_args *)];
+ char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)];
};
struct linux_close_range_args {
register_t dummy;
diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c
index 5c592cd2c141..4435ef97a831 100644
--- a/sys/i386/linux/linux_sysent.c
+++ b/sys/i386/linux/linux_sysent.c
@@ -452,7 +452,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fsmount, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 432 = linux_fsmount */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
+ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */
diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c
index 0752304d5872..baee524e5a6d 100644
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -3205,7 +3205,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_clone3 */
case 435: {
- *n_args = 0;
+ struct linux_clone3_args *p = params;
+ uarg[0] = (intptr_t)p->uargs; /* struct l_user_clone_args * */
+ iarg[1] = p->usize; /* l_size_t */
+ *n_args = 2;
break;
}
/* linux_close_range */
@@ -8362,6 +8365,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_clone3 */
case 435:
+ switch (ndx) {
+ case 0:
+ p = "userland struct l_user_clone_args *";
+ break;
+ case 1:
+ p = "l_size_t";
+ break;
+ default:
+ break;
+ };
break;
/* linux_close_range */
case 436:
@@ -10160,6 +10173,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
case 434:
/* linux_clone3 */
case 435:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_close_range */
case 436:
/* linux_openat2 */
More information about the dev-commits-src-main
mailing list