From: Laurent Vivier <laurent@vivier.eu> To: Alistair Francis <alistair23@gmail.com> Cc: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, "open list:RISC-V" <qemu-riscv@nongnu.org>, "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org> Subject: Re: [PATCH v2 2/2] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel Date: Thu, 27 Feb 2020 01:02:28 +0100 [thread overview] Message-ID: <fd0e0b49-b2c4-9adf-8cbe-9e160b89f9f2@vivier.eu> (raw) In-Reply-To: <CAKmqyKObXNXj2jsMYTvAL-eHS43Wb5upwq6mHeHo7q-4Pr4W7g@mail.gmail.com> Le 26/02/2020 à 20:32, Alistair Francis a écrit : > On Tue, Feb 25, 2020 at 3:50 AM Laurent Vivier <laurent@vivier.eu> wrote: >> >> Le 25/02/2020 à 00:21, Alistair Francis a écrit : >>> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> ... >> I think you can remove following defintion as they should be translated >> by the target glibc. > > glibc won't be exposing these externally, the current plan is just to > use this internally to glibc. But if they are defined internally to glibc, glibc will always translate the older ones to the 64bit ones and thus glibc will never use the older ones with the kernel, only the 64bit ones, thus the older syscalls should never come to QEMU. So why do we need to define the translation older-to-64bit in QEMU too? > >> >>> +/* >>> + * Alias some of the older pre 64-bit time_t syscalls to the 64-bit >>> + * ones for RV32. This is based on the list used by glibc. >>> + */ >>> +#define TARGET_NR_futex TARGET_NR_futex_time64 >>> +#define TARGET_NR_rt_sigtimedwait TARGET_NR_rt_sigtimedwait_time64 >>> +#define TARGET_NR_ppoll TARGET_NR_ppoll_time64 >>> +#define TARGET_NR_utimensat TARGET_NR_utimensat_time64 >>> +#define TARGET_NR_pselect6 TARGET_NR_pselect6_time64 >>> +#define TARGET_NR_recvmmsg TARGET_NR_recvmmsg_time64 >>> +#define TARGET_NR_semtimedop TARGET_NR_semtimedop_time64 >>> +#define TARGET_NR_mq_timedreceive TARGET_NR_mq_timedreceive_time64 >>> +#define TARGET_NR_mq_timedsend TARGET_NR_mq_timedsend_time64 >>> +#define TARGET_NR_clock_getres TARGET_NR_clock_getres_time64 >>> +#define TARGET_NR_timerfd_settime TARGET_NR_timerfd_settime64 >>> +#define TARGET_NR_timerfd_gettime TARGET_NR_timerfd_gettime64 >>> +#define TARGET_NR_sched_rr_get_interval TARGET_NR_sched_rr_get_interval_time64 >>> +#define TARGET_NR_clock_adjtime TARGET_NR_clock_adjtime64 >>> + >>> +#endif >>> diff --git a/linux-user/riscv/syscall64_nr.h b/linux-user/riscv/syscall64_nr.h >>> new file mode 100644 >>> index 0000000000..b58364b570 >>> --- /dev/null >>> +++ b/linux-user/riscv/syscall64_nr.h >> >> syscall64_nr.h is correct. >> >> Thanks, >> Laurent >> >
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Vivier <laurent@vivier.eu> To: Alistair Francis <alistair23@gmail.com> Cc: "open list:RISC-V" <qemu-riscv@nongnu.org>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org> Subject: Re: [PATCH v2 2/2] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel Date: Thu, 27 Feb 2020 01:02:28 +0100 [thread overview] Message-ID: <fd0e0b49-b2c4-9adf-8cbe-9e160b89f9f2@vivier.eu> (raw) In-Reply-To: <CAKmqyKObXNXj2jsMYTvAL-eHS43Wb5upwq6mHeHo7q-4Pr4W7g@mail.gmail.com> Le 26/02/2020 à 20:32, Alistair Francis a écrit : > On Tue, Feb 25, 2020 at 3:50 AM Laurent Vivier <laurent@vivier.eu> wrote: >> >> Le 25/02/2020 à 00:21, Alistair Francis a écrit : >>> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> ... >> I think you can remove following defintion as they should be translated >> by the target glibc. > > glibc won't be exposing these externally, the current plan is just to > use this internally to glibc. But if they are defined internally to glibc, glibc will always translate the older ones to the 64bit ones and thus glibc will never use the older ones with the kernel, only the 64bit ones, thus the older syscalls should never come to QEMU. So why do we need to define the translation older-to-64bit in QEMU too? > >> >>> +/* >>> + * Alias some of the older pre 64-bit time_t syscalls to the 64-bit >>> + * ones for RV32. This is based on the list used by glibc. >>> + */ >>> +#define TARGET_NR_futex TARGET_NR_futex_time64 >>> +#define TARGET_NR_rt_sigtimedwait TARGET_NR_rt_sigtimedwait_time64 >>> +#define TARGET_NR_ppoll TARGET_NR_ppoll_time64 >>> +#define TARGET_NR_utimensat TARGET_NR_utimensat_time64 >>> +#define TARGET_NR_pselect6 TARGET_NR_pselect6_time64 >>> +#define TARGET_NR_recvmmsg TARGET_NR_recvmmsg_time64 >>> +#define TARGET_NR_semtimedop TARGET_NR_semtimedop_time64 >>> +#define TARGET_NR_mq_timedreceive TARGET_NR_mq_timedreceive_time64 >>> +#define TARGET_NR_mq_timedsend TARGET_NR_mq_timedsend_time64 >>> +#define TARGET_NR_clock_getres TARGET_NR_clock_getres_time64 >>> +#define TARGET_NR_timerfd_settime TARGET_NR_timerfd_settime64 >>> +#define TARGET_NR_timerfd_gettime TARGET_NR_timerfd_gettime64 >>> +#define TARGET_NR_sched_rr_get_interval TARGET_NR_sched_rr_get_interval_time64 >>> +#define TARGET_NR_clock_adjtime TARGET_NR_clock_adjtime64 >>> + >>> +#endif >>> diff --git a/linux-user/riscv/syscall64_nr.h b/linux-user/riscv/syscall64_nr.h >>> new file mode 100644 >>> index 0000000000..b58364b570 >>> --- /dev/null >>> +++ b/linux-user/riscv/syscall64_nr.h >> >> syscall64_nr.h is correct. >> >> Thanks, >> Laurent >> >
next prev parent reply other threads:[~2020-02-27 0:03 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-24 23:21 [PATCH v2 0/2] linux-user: generate syscall_nr.sh for RISC-V Alistair Francis 2020-02-24 23:21 ` Alistair Francis 2020-02-24 23:21 ` [PATCH v2 1/2] linux-user: Protect more syscalls Alistair Francis 2020-02-24 23:21 ` Alistair Francis 2020-02-25 11:59 ` Laurent Vivier 2020-02-25 11:59 ` Laurent Vivier 2020-02-26 0:43 ` Alistair Francis 2020-02-26 0:43 ` Alistair Francis 2020-02-24 23:21 ` [PATCH v2 2/2] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel Alistair Francis 2020-02-24 23:21 ` Alistair Francis 2020-02-25 11:50 ` Laurent Vivier 2020-02-25 11:50 ` Laurent Vivier 2020-02-26 19:32 ` Alistair Francis 2020-02-26 19:32 ` Alistair Francis 2020-02-27 0:02 ` Laurent Vivier [this message] 2020-02-27 0:02 ` Laurent Vivier 2020-02-27 0:10 ` Alistair Francis 2020-02-27 0:10 ` Alistair Francis 2020-02-27 0:41 ` Laurent Vivier 2020-02-27 0:41 ` Laurent Vivier 2020-02-25 13:39 ` [PATCH v2 0/2] linux-user: generate syscall_nr.sh for RISC-V Laurent Vivier 2020-02-25 13:39 ` Laurent Vivier 2020-02-26 19:26 ` Alistair Francis 2020-02-26 19:26 ` Alistair Francis
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=fd0e0b49-b2c4-9adf-8cbe-9e160b89f9f2@vivier.eu \ --to=laurent@vivier.eu \ --cc=alistair.francis@wdc.com \ --cc=alistair23@gmail.com \ --cc=palmer@dabbelt.com \ --cc=qemu-devel@nongnu.org \ --cc=qemu-riscv@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.