Date: Fri, 17 Jun 2022 19:39:21 GMT From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b203abf47aed - stable/13 - linux(4): Regen for rseq syscall. Message-ID: <202206171939.25HJdLMZ015906@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b203abf47aeda9ca008e89cd6672f9b71c7cf0eb commit b203abf47aeda9ca008e89cd6672f9b71c7cf0eb Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-06-17 19:34:03 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-06-17 19:34:03 +0000 linux(4): Regen for rseq syscall. (cherry picked from commit 75e409495f67a39114e09224b8915cb0ecc481c4) --- sys/amd64/linux/linux_proto.h | 5 ++++- sys/amd64/linux/linux_sysent.c | 2 +- sys/amd64/linux/linux_systrace_args.c | 26 +++++++++++++++++++++++++- sys/amd64/linux32/linux32_proto.h | 5 ++++- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 26 +++++++++++++++++++++++++- sys/arm64/linux/linux_proto.h | 5 ++++- sys/arm64/linux/linux_sysent.c | 2 +- sys/arm64/linux/linux_systrace_args.c | 26 +++++++++++++++++++++++++- sys/i386/linux/linux_proto.h | 5 ++++- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 26 +++++++++++++++++++++++++- 12 files changed, 120 insertions(+), 12 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index e609d3deeb31..5a71da9083ef 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -1319,7 +1319,10 @@ struct linux_io_pgetevents_args { register_t dummy; }; struct linux_rseq_args { - register_t dummy; + char rseq_l_[PADL_(struct linux_rseq *)]; struct linux_rseq * rseq; char rseq_r_[PADR_(struct linux_rseq *)]; + char rseq_len_l_[PADL_(uint32_t)]; uint32_t rseq_len; char rseq_len_r_[PADR_(uint32_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char sig_l_[PADL_(uint32_t)]; uint32_t sig; char sig_r_[PADR_(uint32_t)]; }; struct linux_pidfd_send_signal_args { char pidfd_l_[PADL_(l_int)]; l_int pidfd; char pidfd_r_[PADR_(l_int)]; diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index c866076fa9d3..c4b18ef74995 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -351,7 +351,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_pkey_free_args), .sy_call = (sy_call_t *)linux_pkey_free, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 331 = linux_pkey_free */ { .sy_narg = AS(linux_statx_args), .sy_call = (sy_call_t *)linux_statx, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 332 = linux_statx */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 333 = linux_io_pgetevents */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 334 = linux_rseq */ + { .sy_narg = AS(linux_rseq_args), .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 334 = linux_rseq */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 335 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 336 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 337 = nosys */ diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 9db01b6b7440..9746e3dd83e6 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2612,7 +2612,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rseq */ case 334: { - *n_args = 0; + struct linux_rseq_args *p = params; + uarg[0] = (intptr_t)p->rseq; /* struct linux_rseq * */ + uarg[1] = p->rseq_len; /* uint32_t */ + iarg[2] = p->flags; /* l_int */ + uarg[3] = p->sig; /* uint32_t */ + *n_args = 4; break; } /* linux_pidfd_send_signal */ @@ -6963,6 +6968,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rseq */ case 334: + switch (ndx) { + case 0: + p = "userland struct linux_rseq *"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_pidfd_send_signal */ case 424: @@ -8498,6 +8519,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 333: /* linux_rseq */ case 334: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_pidfd_send_signal */ case 424: if (ndx == 0 || ndx == 1) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 819ec994d0c9..f0b83563b8df 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1470,7 +1470,10 @@ struct linux_io_pgetevents_args { register_t dummy; }; struct linux_rseq_args { - register_t dummy; + char rseq_l_[PADL_(struct linux_rseq *)]; struct linux_rseq * rseq; char rseq_r_[PADR_(struct linux_rseq *)]; + char rseq_len_l_[PADL_(uint32_t)]; uint32_t rseq_len; char rseq_len_r_[PADR_(uint32_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char sig_l_[PADL_(uint32_t)]; uint32_t sig; char sig_r_[PADR_(uint32_t)]; }; struct linux_semget_args { char key_l_[PADL_(l_key_t)]; l_key_t key; char key_r_[PADR_(l_key_t)]; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index 46b74d6a8139..3aa32866427d 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -403,7 +403,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = AS(linux_statx_args), .sy_call = (sy_call_t *)linux_statx, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 383 = linux_statx */ { .sy_narg = AS(linux_arch_prctl_args), .sy_call = (sy_call_t *)linux_arch_prctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 384 = linux_arch_prctl */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 385 = linux_io_pgetevents */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 386 = linux_rseq */ + { .sy_narg = AS(linux_rseq_args), .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 386 = linux_rseq */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 387 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 388 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 389 = nosys */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 8ff6242542f3..2a31ddc3f7a5 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -2866,7 +2866,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rseq */ case 386: { - *n_args = 0; + struct linux_rseq_args *p = params; + uarg[0] = (intptr_t)p->rseq; /* struct linux_rseq * */ + uarg[1] = p->rseq_len; /* uint32_t */ + iarg[2] = p->flags; /* l_int */ + uarg[3] = p->sig; /* uint32_t */ + *n_args = 4; break; } /* linux_semget */ @@ -7872,6 +7877,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rseq */ case 386: + switch (ndx) { + case 0: + p = "userland struct linux_rseq *"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_semget */ case 393: @@ -9923,6 +9944,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 385: /* linux_rseq */ case 386: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_semget */ case 393: if (ndx == 0 || ndx == 1) diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 6b12f819c87c..a18c177a494c 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -1126,7 +1126,10 @@ struct linux_io_pgetevents_args { register_t dummy; }; struct linux_rseq_args { - register_t dummy; + char rseq_l_[PADL_(struct linux_rseq *)]; struct linux_rseq * rseq; char rseq_r_[PADR_(struct linux_rseq *)]; + char rseq_len_l_[PADL_(uint32_t)]; uint32_t rseq_len; char rseq_len_r_[PADR_(uint32_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char sig_l_[PADL_(uint32_t)]; uint32_t sig; char sig_r_[PADR_(uint32_t)]; }; struct linux_kexec_file_load_args { register_t dummy; diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 5228faa77b8c..aae80f4ed528 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -310,7 +310,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_pkey_free_args), .sy_call = (sy_call_t *)linux_pkey_free, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 290 = linux_pkey_free */ { .sy_narg = AS(linux_statx_args), .sy_call = (sy_call_t *)linux_statx, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 291 = linux_statx */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 292 = linux_io_pgetevents */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 293 = linux_rseq */ + { .sy_narg = AS(linux_rseq_args), .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 293 = linux_rseq */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_kexec_file_load, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 294 = linux_kexec_file_load */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 295 = unimpl_md_syscall */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 296 = unimpl_md_syscall */ diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 42f37dbff137..e3bdb075bcac 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -2229,7 +2229,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rseq */ case 293: { - *n_args = 0; + struct linux_rseq_args *p = params; + uarg[0] = (intptr_t)p->rseq; /* struct linux_rseq * */ + uarg[1] = p->rseq_len; /* uint32_t */ + iarg[2] = p->flags; /* l_int */ + uarg[3] = p->sig; /* uint32_t */ + *n_args = 4; break; } /* linux_kexec_file_load */ @@ -6035,6 +6040,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rseq */ case 293: + switch (ndx) { + case 0: + p = "userland struct linux_rseq *"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_kexec_file_load */ case 294: @@ -7356,6 +7377,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 292: /* linux_rseq */ case 293: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_kexec_file_load */ case 294: /* linux_pidfd_send_signal */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index d6e87072a89a..413804c68b16 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1463,7 +1463,10 @@ struct linux_io_pgetevents_args { register_t dummy; }; struct linux_rseq_args { - register_t dummy; + char rseq_l_[PADL_(struct linux_rseq *)]; struct linux_rseq * rseq; char rseq_r_[PADR_(struct linux_rseq *)]; + char rseq_len_l_[PADL_(uint32_t)]; uint32_t rseq_len; char rseq_len_r_[PADR_(uint32_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char sig_l_[PADL_(uint32_t)]; uint32_t sig; char sig_r_[PADR_(uint32_t)]; }; struct linux_semget_args { char key_l_[PADL_(l_key_t)]; l_key_t key; char key_r_[PADR_(l_key_t)]; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 4435ef97a831..7c77d90b5bbd 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -403,7 +403,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_statx_args), .sy_call = (sy_call_t *)linux_statx, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 383 = linux_statx */ { .sy_narg = AS(linux_arch_prctl_args), .sy_call = (sy_call_t *)linux_arch_prctl, .sy_auevent = AUE_PRCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 384 = linux_arch_prctl */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 385 = linux_io_pgetevents */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 386 = linux_rseq */ + { .sy_narg = AS(linux_rseq_args), .sy_call = (sy_call_t *)linux_rseq, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 386 = linux_rseq */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 387 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 388 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 389 = nosys */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index baee524e5a6d..dd62c925ccc2 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -2905,7 +2905,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rseq */ case 386: { - *n_args = 0; + struct linux_rseq_args *p = params; + uarg[0] = (intptr_t)p->rseq; /* struct linux_rseq * */ + uarg[1] = p->rseq_len; /* uint32_t */ + iarg[2] = p->flags; /* l_int */ + uarg[3] = p->sig; /* uint32_t */ + *n_args = 4; break; } /* linux_semget */ @@ -7949,6 +7954,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rseq */ case 386: + switch (ndx) { + case 0: + p = "userland struct linux_rseq *"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_semget */ case 393: @@ -10029,6 +10050,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 385: /* linux_rseq */ case 386: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_semget */ case 393: if (ndx == 0 || ndx == 1)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206171939.25HJdLMZ015906>