git: 69bd4901427f - stable/13 - Regen for ('19f9a0e4df54f8d1e99234146024422bdcfa09ce') Linux clock_settime64 system call.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jun 2022 19:28:58 UTC
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=69bd4901427fdab203908319d9c27cfa3a54ab7a commit 69bd4901427fdab203908319d9c27cfa3a54ab7a Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2021-06-07 02:14:04 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-06-17 19:27:57 +0000 Regen for ('19f9a0e4df54f8d1e99234146024422bdcfa09ce') Linux clock_settime64 system call. MFC after: 2 weeks (cherry picked from commit 82e38486548c70b9e7fc4323376aab85f5cc026c) --- sys/amd64/linux32/linux32_proto.h | 3 ++- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_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 +++++++++++++++++- 6 files changed, 40 insertions(+), 6 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index b1cd97ee6e74..18b448d57a8d 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1523,7 +1523,8 @@ struct linux_clock_gettime64_args { char tp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tp; char tp_r_[PADR_(struct l_timespec64 *)]; }; struct linux_clock_settime64_args { - register_t dummy; + char which_l_[PADL_(clockid_t)]; clockid_t which; char which_r_[PADR_(clockid_t)]; + char tp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tp; char tp_r_[PADR_(struct l_timespec64 *)]; }; struct linux_clock_adjtime64_args { register_t dummy; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index c1d92dc14299..d33fa28f7a32 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -421,7 +421,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = AS(linux_msgrcv_args), .sy_call = (sy_call_t *)linux_msgrcv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 401 = linux_msgrcv */ { .sy_narg = AS(linux_msgctl_args), .sy_call = (sy_call_t *)linux_msgctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 402 = linux_msgctl */ { .sy_narg = AS(linux_clock_gettime64_args), .sy_call = (sy_call_t *)linux_clock_gettime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 403 = linux_clock_gettime64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 404 = linux_clock_settime64 */ + { .sy_narg = AS(linux_clock_settime64_args), .sy_call = (sy_call_t *)linux_clock_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 404 = linux_clock_settime64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_adjtime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 405 = linux_clock_adjtime64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_getres_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 406 = linux_clock_getres_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_nanosleep_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 407 = linux_clock_nanosleep_time64 */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 4c5c8a65c2b3..6999999399eb 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -2970,7 +2970,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_clock_settime64 */ case 404: { - *n_args = 0; + struct linux_clock_settime64_args *p = params; + iarg[0] = p->which; /* clockid_t */ + uarg[1] = (intptr_t)p->tp; /* struct l_timespec64 * */ + *n_args = 2; break; } /* linux_clock_adjtime64 */ @@ -8007,6 +8010,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_clock_settime64 */ case 404: + switch (ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "userland struct l_timespec64 *"; + break; + default: + break; + }; break; /* linux_clock_adjtime64 */ case 405: @@ -9795,6 +9808,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_clock_settime64 */ case 404: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_clock_adjtime64 */ case 405: /* linux_clock_getres_time64 */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 6adcdcc08f14..6fc65571cade 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1516,7 +1516,8 @@ struct linux_clock_gettime64_args { char tp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tp; char tp_r_[PADR_(struct l_timespec64 *)]; }; struct linux_clock_settime64_args { - register_t dummy; + char which_l_[PADL_(clockid_t)]; clockid_t which; char which_r_[PADR_(clockid_t)]; + char tp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tp; char tp_r_[PADR_(struct l_timespec64 *)]; }; struct linux_clock_adjtime64_args { register_t dummy; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index c62a5921100d..743c541f9277 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -421,7 +421,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_msgrcv_args), .sy_call = (sy_call_t *)linux_msgrcv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 401 = linux_msgrcv */ { .sy_narg = AS(linux_msgctl_args), .sy_call = (sy_call_t *)linux_msgctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 402 = linux_msgctl */ { .sy_narg = AS(linux_clock_gettime64_args), .sy_call = (sy_call_t *)linux_clock_gettime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 403 = linux_clock_gettime64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 404 = linux_clock_settime64 */ + { .sy_narg = AS(linux_clock_settime64_args), .sy_call = (sy_call_t *)linux_clock_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 404 = linux_clock_settime64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_adjtime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 405 = linux_clock_adjtime64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_getres_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 406 = linux_clock_getres_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_nanosleep_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 407 = linux_clock_nanosleep_time64 */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index dc07c0d135b2..fde853acdeec 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3009,7 +3009,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_clock_settime64 */ case 404: { - *n_args = 0; + struct linux_clock_settime64_args *p = params; + iarg[0] = p->which; /* clockid_t */ + uarg[1] = (intptr_t)p->tp; /* struct l_timespec64 * */ + *n_args = 2; break; } /* linux_clock_adjtime64 */ @@ -8084,6 +8087,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_clock_settime64 */ case 404: + switch (ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "userland struct l_timespec64 *"; + break; + default: + break; + }; break; /* linux_clock_adjtime64 */ case 405: @@ -9901,6 +9914,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_clock_settime64 */ case 404: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_clock_adjtime64 */ case 405: /* linux_clock_getres_time64 */