summaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2020-11-17 19:53:59 +0000
committerConrad Meyer <cem@FreeBSD.org>2020-11-17 19:53:59 +0000
commit77eb9841471345a729ebbd0902c1eee08b18b176 (patch)
tree419af21a88badcfc259342f6c76d7b98f3ee73be /sys/amd64
parentde774e422e7f8abf9d4c6084165c9de66f11b2de (diff)
downloadsrc-test2-77eb9841471345a729ebbd0902c1eee08b18b176.tar.gz
src-test2-77eb9841471345a729ebbd0902c1eee08b18b176.zip
Notes
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/linux/linux_proto.h10
-rw-r--r--sys/amd64/linux/linux_sysent.c4
-rw-r--r--sys/amd64/linux/linux_systrace_args.c52
-rw-r--r--sys/amd64/linux32/linux32_proto.h10
-rw-r--r--sys/amd64/linux32/linux32_sysent.c4
-rw-r--r--sys/amd64/linux32/linux32_systrace_args.c52
6 files changed, 120 insertions, 12 deletions
diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
index b4cff9bfbcdd..b03540f9b7c8 100644
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -1143,10 +1143,16 @@ struct linux_prlimit64_args {
char old_l_[PADL_(struct rlimit *)]; struct rlimit * old; char old_r_[PADR_(struct rlimit *)];
};
struct linux_name_to_handle_at_args {
- register_t dummy;
+ char dirfd_l_[PADL_(l_int)]; l_int dirfd; char dirfd_r_[PADR_(l_int)];
+ char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
+ char handle_l_[PADL_(struct l_file_handle *)]; struct l_file_handle * handle; char handle_r_[PADR_(struct l_file_handle *)];
+ char mnt_id_l_[PADL_(l_int *)]; l_int * mnt_id; char mnt_id_r_[PADR_(l_int *)];
+ char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
};
struct linux_open_by_handle_at_args {
- register_t dummy;
+ char mountdirfd_l_[PADL_(l_int)]; l_int mountdirfd; char mountdirfd_r_[PADR_(l_int)];
+ char handle_l_[PADL_(struct l_file_handle *)]; struct l_file_handle * handle; char handle_r_[PADR_(struct l_file_handle *)];
+ char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
};
struct linux_clock_adjtime_args {
register_t dummy;
diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c
index b140e8878336..558e56f87ba7 100644
--- a/sys/amd64/linux/linux_sysent.c
+++ b/sys/amd64/linux/linux_sysent.c
@@ -320,8 +320,8 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fanotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 300 = linux_fanotify_init */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fanotify_mark, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 301 = linux_fanotify_mark */
{ .sy_narg = AS(linux_prlimit64_args), .sy_call = (sy_call_t *)linux_prlimit64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 302 = linux_prlimit64 */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_name_to_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 303 = linux_name_to_handle_at */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_open_by_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 304 = linux_open_by_handle_at */
+ { .sy_narg = AS(linux_name_to_handle_at_args), .sy_call = (sy_call_t *)linux_name_to_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 303 = linux_name_to_handle_at */
+ { .sy_narg = AS(linux_open_by_handle_at_args), .sy_call = (sy_call_t *)linux_open_by_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 304 = linux_open_by_handle_at */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_adjtime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 305 = linux_clock_adjtime */
{ .sy_narg = AS(linux_syncfs_args), .sy_call = (sy_call_t *)linux_syncfs, .sy_auevent = AUE_SYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 306 = linux_syncfs */
{ .sy_narg = AS(linux_sendmmsg_args), .sy_call = (sy_call_t *)linux_sendmmsg, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 307 = linux_sendmmsg */
diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c
index 4203723ff99f..5aa83b94e7a3 100644
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -2321,12 +2321,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_name_to_handle_at */
case 303: {
- *n_args = 0;
+ struct linux_name_to_handle_at_args *p = params;
+ iarg[0] = p->dirfd; /* l_int */
+ uarg[1] = (intptr_t) p->name; /* const char * */
+ uarg[2] = (intptr_t) p->handle; /* struct l_file_handle * */
+ uarg[3] = (intptr_t) p->mnt_id; /* l_int * */
+ iarg[4] = p->flags; /* l_int */
+ *n_args = 5;
break;
}
/* linux_open_by_handle_at */
case 304: {
- *n_args = 0;
+ struct linux_open_by_handle_at_args *p = params;
+ iarg[0] = p->mountdirfd; /* l_int */
+ uarg[1] = (intptr_t) p->handle; /* struct l_file_handle * */
+ iarg[2] = p->flags; /* l_int */
+ *n_args = 3;
break;
}
/* linux_clock_adjtime */
@@ -6340,9 +6350,41 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_name_to_handle_at */
case 303:
+ switch(ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "userland const char *";
+ break;
+ case 2:
+ p = "userland struct l_file_handle *";
+ break;
+ case 3:
+ p = "userland l_int *";
+ break;
+ case 4:
+ p = "l_int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_open_by_handle_at */
case 304:
+ switch(ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "userland struct l_file_handle *";
+ break;
+ case 2:
+ p = "l_int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_clock_adjtime */
case 305:
@@ -8153,8 +8195,14 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_name_to_handle_at */
case 303:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_open_by_handle_at */
case 304:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_clock_adjtime */
case 305:
/* linux_syncfs */
diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h
index 948cf582c681..f9402c8e815b 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -1218,10 +1218,16 @@ struct linux_prlimit64_args {
char old_l_[PADL_(struct rlimit *)]; struct rlimit * old; char old_r_[PADR_(struct rlimit *)];
};
struct linux_name_to_handle_at_args {
- register_t dummy;
+ char dirfd_l_[PADL_(l_int)]; l_int dirfd; char dirfd_r_[PADR_(l_int)];
+ char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
+ char handle_l_[PADL_(struct l_file_handle *)]; struct l_file_handle * handle; char handle_r_[PADR_(struct l_file_handle *)];
+ char mnt_id_l_[PADL_(l_int *)]; l_int * mnt_id; char mnt_id_r_[PADR_(l_int *)];
+ char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
};
struct linux_open_by_handle_at_args {
- register_t dummy;
+ char mountdirfd_l_[PADL_(l_int)]; l_int mountdirfd; char mountdirfd_r_[PADR_(l_int)];
+ char handle_l_[PADL_(struct l_file_handle *)]; struct l_file_handle * handle; char handle_r_[PADR_(struct l_file_handle *)];
+ char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)];
};
struct linux_clock_adjtime_args {
register_t dummy;
diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c
index caaa4c3c4447..6da5fcb1fad9 100644
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -358,8 +358,8 @@ struct sysent linux32_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fanotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 338 = linux_fanotify_init */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fanotify_mark, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 339 = linux_fanotify_mark */
{ .sy_narg = AS(linux_prlimit64_args), .sy_call = (sy_call_t *)linux_prlimit64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 340 = linux_prlimit64 */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_name_to_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 341 = linux_name_to_handle_at */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_open_by_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 342 = linux_open_by_handle_at */
+ { .sy_narg = AS(linux_name_to_handle_at_args), .sy_call = (sy_call_t *)linux_name_to_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 341 = linux_name_to_handle_at */
+ { .sy_narg = AS(linux_open_by_handle_at_args), .sy_call = (sy_call_t *)linux_open_by_handle_at, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 342 = linux_open_by_handle_at */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_adjtime, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 343 = linux_clock_adjtime */
{ .sy_narg = AS(linux_syncfs_args), .sy_call = (sy_call_t *)linux_syncfs, .sy_auevent = AUE_SYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 344 = linux_syncfs */
{ .sy_narg = AS(linux_sendmmsg_args), .sy_call = (sy_call_t *)linux_sendmmsg, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 345 = linux_sendmmsg */
diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c
index 9913fe8fcc75..8e2c11e380c2 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -2445,12 +2445,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_name_to_handle_at */
case 341: {
- *n_args = 0;
+ struct linux_name_to_handle_at_args *p = params;
+ iarg[0] = p->dirfd; /* l_int */
+ uarg[1] = (intptr_t) p->name; /* const char * */
+ uarg[2] = (intptr_t) p->handle; /* struct l_file_handle * */
+ uarg[3] = (intptr_t) p->mnt_id; /* l_int * */
+ iarg[4] = p->flags; /* l_int */
+ *n_args = 5;
break;
}
/* linux_open_by_handle_at */
case 342: {
- *n_args = 0;
+ struct linux_open_by_handle_at_args *p = params;
+ iarg[0] = p->mountdirfd; /* l_int */
+ uarg[1] = (intptr_t) p->handle; /* struct l_file_handle * */
+ iarg[2] = p->flags; /* l_int */
+ *n_args = 3;
break;
}
/* linux_clock_adjtime */
@@ -6970,9 +6980,41 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_name_to_handle_at */
case 341:
+ switch(ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "userland const char *";
+ break;
+ case 2:
+ p = "userland struct l_file_handle *";
+ break;
+ case 3:
+ p = "userland l_int *";
+ break;
+ case 4:
+ p = "l_int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_open_by_handle_at */
case 342:
+ switch(ndx) {
+ case 0:
+ p = "l_int";
+ break;
+ case 1:
+ p = "userland struct l_file_handle *";
+ break;
+ case 2:
+ p = "l_int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_clock_adjtime */
case 343:
@@ -9326,8 +9368,14 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_name_to_handle_at */
case 341:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_open_by_handle_at */
case 342:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_clock_adjtime */
case 343:
/* linux_syncfs */