[PATCH v2 0/2] linux-user: generate syscall_nr.sh for RISC-V

Alistair Francis posted 2 patches 5 years, 8 months ago
Test docker-quick@centos7 passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1582586444.git.alistair.francis@wdc.com
Maintainers: Laurent Vivier <laurent@vivier.eu>, Riku Voipio <riku.voipio@iki.fi>
There is a newer version of this series
linux-user/riscv/syscall32_nr.h | 314 ++++++++++++++++++++++++++++++++
linux-user/riscv/syscall64_nr.h | 303 ++++++++++++++++++++++++++++++
linux-user/riscv/syscall_nr.h   | 294 +-----------------------------
linux-user/strace.c             |   2 +
linux-user/syscall.c            |  20 ++
5 files changed, 641 insertions(+), 292 deletions(-)
create mode 100644 linux-user/riscv/syscall32_nr.h
create mode 100644 linux-user/riscv/syscall64_nr.h
[PATCH v2 0/2] linux-user: generate syscall_nr.sh for RISC-V
Posted by Alistair Francis 5 years, 8 months ago
This series updates the RISC-V syscall_nr.sh based on the 5.5 kernel.

There are two parts to this. One is just adding the new syscalls, the
other part is updating the RV32 syscalls to match the fact that RV32 is
a 64-bit time_t architectures (y2038) safe.

we need to make some changes to syscall.c to avoid warnings/errors
during compliling with the new syscall.

I did some RV32 user space testing after applying these patches. I ran the
glibc testsuite in userspace and I don't see any regressions.

Alistair Francis (2):
  linux-user: Protect more syscalls
  linux-user/riscv: Update the syscall_nr's to the 5.5 kernel

 linux-user/riscv/syscall32_nr.h | 314 ++++++++++++++++++++++++++++++++
 linux-user/riscv/syscall64_nr.h | 303 ++++++++++++++++++++++++++++++
 linux-user/riscv/syscall_nr.h   | 294 +-----------------------------
 linux-user/strace.c             |   2 +
 linux-user/syscall.c            |  20 ++
 5 files changed, 641 insertions(+), 292 deletions(-)
 create mode 100644 linux-user/riscv/syscall32_nr.h
 create mode 100644 linux-user/riscv/syscall64_nr.h

-- 
2.25.0


Re: [PATCH v2 0/2] linux-user: generate syscall_nr.sh for RISC-V
Posted by Laurent Vivier 5 years, 8 months ago
Le 25/02/2020 à 00:21, Alistair Francis a écrit :
> This series updates the RISC-V syscall_nr.sh based on the 5.5 kernel.
> 
> There are two parts to this. One is just adding the new syscalls, the
> other part is updating the RV32 syscalls to match the fact that RV32 is
> a 64-bit time_t architectures (y2038) safe.
> 
> we need to make some changes to syscall.c to avoid warnings/errors
> during compliling with the new syscall.
> 
> I did some RV32 user space testing after applying these patches. I ran the
> glibc testsuite in userspace and I don't see any regressions.
> 
> Alistair Francis (2):
>   linux-user: Protect more syscalls
>   linux-user/riscv: Update the syscall_nr's to the 5.5 kernel
> 
>  linux-user/riscv/syscall32_nr.h | 314 ++++++++++++++++++++++++++++++++
>  linux-user/riscv/syscall64_nr.h | 303 ++++++++++++++++++++++++++++++
>  linux-user/riscv/syscall_nr.h   | 294 +-----------------------------
>  linux-user/strace.c             |   2 +
>  linux-user/syscall.c            |  20 ++
>  5 files changed, 641 insertions(+), 292 deletions(-)
>  create mode 100644 linux-user/riscv/syscall32_nr.h
>  create mode 100644 linux-user/riscv/syscall64_nr.h
> 

I have written a shell script to generate the syscall_nr.h from the
asm-generic, but as it uses a lot of cpp, tr, sed and grep, the result
needs to be checked.

If it can help, it is in attachment.

Put it in scripts, and run it as:

scripts/gensyscalls.sh /path/to/linux

then check the result with something like "git diff -w"

Thanks,
Laurent
Re: [PATCH v2 0/2] linux-user: generate syscall_nr.sh for RISC-V
Posted by Alistair Francis 5 years, 8 months ago
On Tue, Feb 25, 2020 at 5:39 AM Laurent Vivier <laurent@vivier.eu> wrote:
>
> Le 25/02/2020 à 00:21, Alistair Francis a écrit :
> > This series updates the RISC-V syscall_nr.sh based on the 5.5 kernel.
> >
> > There are two parts to this. One is just adding the new syscalls, the
> > other part is updating the RV32 syscalls to match the fact that RV32 is
> > a 64-bit time_t architectures (y2038) safe.
> >
> > we need to make some changes to syscall.c to avoid warnings/errors
> > during compliling with the new syscall.
> >
> > I did some RV32 user space testing after applying these patches. I ran the
> > glibc testsuite in userspace and I don't see any regressions.
> >
> > Alistair Francis (2):
> >   linux-user: Protect more syscalls
> >   linux-user/riscv: Update the syscall_nr's to the 5.5 kernel
> >
> >  linux-user/riscv/syscall32_nr.h | 314 ++++++++++++++++++++++++++++++++
> >  linux-user/riscv/syscall64_nr.h | 303 ++++++++++++++++++++++++++++++
> >  linux-user/riscv/syscall_nr.h   | 294 +-----------------------------
> >  linux-user/strace.c             |   2 +
> >  linux-user/syscall.c            |  20 ++
> >  5 files changed, 641 insertions(+), 292 deletions(-)
> >  create mode 100644 linux-user/riscv/syscall32_nr.h
> >  create mode 100644 linux-user/riscv/syscall64_nr.h
> >
>
> I have written a shell script to generate the syscall_nr.h from the
> asm-generic, but as it uses a lot of cpp, tr, sed and grep, the result
> needs to be checked.
>
> If it can help, it is in attachment.
>
> Put it in scripts, and run it as:
>
> scripts/gensyscalls.sh /path/to/linux
>
> then check the result with something like "git diff -w"

Thanks! That seems to be pretty correct :)

Alistair

>
> Thanks,
> Laurent