mbox

[PULL,v3,00/16] Linux user for 5.0 patches

Message ID 20200319092627.51487-1-laurent@vivier.eu
State New
Headers show

Pull-request

git://github.com/vivier/qemu.git tags/linux-user-for-5.0-pull-request

Message

Laurent Vivier March 19, 2020, 9:26 a.m. UTC
The following changes since commit 373c7068dd610e97f0b551b5a6d0a27cd6da4506:

  qemu.nsi: Install Sphinx documentation (2020-03-09 16:45:00 +0000)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/linux-user-for-5.0-pull-request

for you to fetch changes up to c91518bb0649f09e2c636790603907ef93ea95d4:

  linux-user, openrisc: sync syscall numbers with kernel v5.5 (2020-03-19 09:22:21 +0100)

----------------------------------------------------------------
update syscall numbers to linux 5.5 (with scripts)
add futex_time64/clock_gettime64/clock_settime64
add AT_EXECFN
Emulate x86_64 vsyscalls

v3: remove syscall.tbl series
v2: guard copy_to_user_timezone() with TARGET_NR_gettimeofday
    remove "Support futex_time64" patch
    guard sys_futex with TARGET_NR_exit

----------------------------------------------------------------

Alistair Francis (3):
  linux-user: Protect more syscalls
  linux-user/syscall: Add support for clock_gettime64/clock_settime64
  linux-user/riscv: Update the syscall_nr's to the 5.5 kernel

Laurent Vivier (5):
  linux-user: fix socket() strace
  scripts: add a script to generate syscall_nr.h
  linux-user, aarch64: sync syscall numbers with kernel v5.5
  linux-user, nios2: sync syscall numbers with kernel v5.5
  linux-user, openrisc: sync syscall numbers with kernel v5.5

Lirong Yuan (2):
  linux-user: Add AT_EXECFN auxval
  linux-user: Update TASK_UNMAPPED_BASE for aarch64

Richard Henderson (5):
  target/i386: Renumber EXCP_SYSCALL
  linux-user/i386: Split out gen_signal
  linux-user/i386: Emulate x86_64 vsyscalls
  linux-user: Add x86_64 vsyscall page to /proc/self/maps
  linux-user: Flush out implementation of gettimeofday

Tobias Koch (1):
  linux-user: do prlimit selectively

 MAINTAINERS                      |   1 +
 linux-user/aarch64/syscall_nr.h  |  34 +-
 linux-user/elfload.c             |   3 +-
 linux-user/i386/cpu_loop.c       | 201 +++++++---
 linux-user/mmap.c                |   4 +
 linux-user/nios2/syscall_nr.h    | 650 +++++++++++++++----------------
 linux-user/openrisc/syscall_nr.h | 309 +++------------
 linux-user/riscv/syscall32_nr.h  | 295 ++++++++++++++
 linux-user/riscv/syscall64_nr.h  | 301 ++++++++++++++
 linux-user/riscv/syscall_nr.h    | 294 +-------------
 linux-user/strace.c              |  10 +-
 linux-user/syscall.c             | 153 +++++++-
 scripts/gensyscalls.sh           | 102 +++++
 target/i386/cpu.h                |  12 +-
 target/i386/translate.c          |  14 +-
 15 files changed, 1437 insertions(+), 946 deletions(-)
 create mode 100644 linux-user/riscv/syscall32_nr.h
 create mode 100644 linux-user/riscv/syscall64_nr.h
 create mode 100755 scripts/gensyscalls.sh

Comments

Peter Maydell March 19, 2020, 8:45 p.m. UTC | #1
On Thu, 19 Mar 2020 at 09:29, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit 373c7068dd610e97f0b551b5a6d0a27cd6da4506:
>
>   qemu.nsi: Install Sphinx documentation (2020-03-09 16:45:00 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu.git tags/linux-user-for-5.0-pull-request
>
> for you to fetch changes up to c91518bb0649f09e2c636790603907ef93ea95d4:
>
>   linux-user, openrisc: sync syscall numbers with kernel v5.5 (2020-03-19 09:22:21 +0100)
>
> ----------------------------------------------------------------
> update syscall numbers to linux 5.5 (with scripts)
> add futex_time64/clock_gettime64/clock_settime64
> add AT_EXECFN
> Emulate x86_64 vsyscalls
>
> v3: remove syscall.tbl series
> v2: guard copy_to_user_timezone() with TARGET_NR_gettimeofday
>     remove "Support futex_time64" patch
>     guard sys_futex with TARGET_NR_exit
>
> ----------------------------------------------------------------

Still fails:

/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/x86_64-linux-user/qemu-x86_64
-L ./gnemul/qemu-x86_64 x86_64/ls -l dummyfile
qemu: 0x40008117e9: unhandled CPU exception 0x101 - aborting
RAX=000000000000003f RBX=000000006ffffe34 RCX=0000004000800b18
RDX=0000004000813180
RSI=0000000000000064 RDI=0000004000800670 RBP=000000006fffff40
RSP=0000004000800668
R8 =0000000000000000 R9 =0000004000800b45 R10=0000004000801a18
R11=0000004000801260
R12=00000040008008c0 R13=0000000000000008 R14=0000000000400040
R15=00000040008032d0
RIP=00000040008117e9 RFL=00000246 [---Z-P-] CPL=3 II=0 A20=1 SMM=0 HLT=0
ES =0000 0000000000000000 00000000 00000000
CS =0033 0000000000000000 ffffffff 00effb00 DPL=3 CS64 [-RA]
SS =002b 0000000000000000 ffffffff 00cff300 DPL=3 DS   [-WA]
DS =0000 0000000000000000 00000000 00000000
FS =0000 0000000000000000 00000000 00000000
GS =0000 0000000000000000 00000000 00000000
LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
TR =0000 0000000000000000 0000ffff 00008b00 DPL=0 TSS64-busy
GDT=     000000400091a000 0000007f
IDT=     0000004000919000 000001ff
CR0=80010001 CR2=0000000000000000 CR3=0000000000000000 CR4=00000220
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000
DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000500
Makefile:6: recipe for target 'test' failed
make: *** [test] Error 127

thanks
-- PMM
Laurent Vivier March 20, 2020, 8:21 a.m. UTC | #2
Le 19/03/2020 à 21:45, Peter Maydell a écrit :
> On Thu, 19 Mar 2020 at 09:29, Laurent Vivier <laurent@vivier.eu> wrote:
>>
>> The following changes since commit 373c7068dd610e97f0b551b5a6d0a27cd6da4506:
>>
>>   qemu.nsi: Install Sphinx documentation (2020-03-09 16:45:00 +0000)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/vivier/qemu.git tags/linux-user-for-5.0-pull-request
>>
>> for you to fetch changes up to c91518bb0649f09e2c636790603907ef93ea95d4:
>>
>>   linux-user, openrisc: sync syscall numbers with kernel v5.5 (2020-03-19 09:22:21 +0100)
>>
>> ----------------------------------------------------------------
>> update syscall numbers to linux 5.5 (with scripts)
>> add futex_time64/clock_gettime64/clock_settime64
>> add AT_EXECFN
>> Emulate x86_64 vsyscalls
>>
>> v3: remove syscall.tbl series
>> v2: guard copy_to_user_timezone() with TARGET_NR_gettimeofday
>>     remove "Support futex_time64" patch
>>     guard sys_futex with TARGET_NR_exit
>>
>> ----------------------------------------------------------------
> 
> Still fails:
> 
> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/x86_64-linux-user/qemu-x86_64
> -L ./gnemul/qemu-x86_64 x86_64/ls -l dummyfile
> qemu: 0x40008117e9: unhandled CPU exception 0x101 - aborting
> RAX=000000000000003f RBX=000000006ffffe34 RCX=0000004000800b18
> RDX=0000004000813180
> RSI=0000000000000064 RDI=0000004000800670 RBP=000000006fffff40
> RSP=0000004000800668
> R8 =0000000000000000 R9 =0000004000800b45 R10=0000004000801a18
> R11=0000004000801260
> R12=00000040008008c0 R13=0000000000000008 R14=0000000000400040
> R15=00000040008032d0
> RIP=00000040008117e9 RFL=00000246 [---Z-P-] CPL=3 II=0 A20=1 SMM=0 HLT=0
> ES =0000 0000000000000000 00000000 00000000
> CS =0033 0000000000000000 ffffffff 00effb00 DPL=3 CS64 [-RA]
> SS =002b 0000000000000000 ffffffff 00cff300 DPL=3 DS   [-WA]
> DS =0000 0000000000000000 00000000 00000000
> FS =0000 0000000000000000 00000000 00000000
> GS =0000 0000000000000000 00000000 00000000
> LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
> TR =0000 0000000000000000 0000ffff 00008b00 DPL=0 TSS64-busy
> GDT=     000000400091a000 0000007f
> IDT=     0000004000919000 000001ff
> CR0=80010001 CR2=0000000000000000 CR3=0000000000000000 CR4=00000220
> DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000
> DR3=0000000000000000
> DR6=00000000ffff0ff0 DR7=0000000000000400
> EFER=0000000000000500
> Makefile:6: recipe for target 'test' failed
> make: *** [test] Error 127
> 

As the patches remaining in the series don't play anymore with the
dependencies, I think the problem is already existing in master and
adding the vsyscalls series that modifies a value in cpu.h only triggers it.

So, what can I do?

1- I can send my v2 without the vsyscalls series, the problem would not
be triggered anymore,

2- I can send my v3 without the vsyscalls series, the problem would not
be triggered anymore too (but some fixes will be missing in syscall_nr.h)

3- I can resend the v2 and doesn't care of the problem as a make clean
should make it disapear (moreover I didn't reproduce it and it seems it
only happens on a merge, according to Richard),

4- I can search what happens in master and fix it (but I don't really
have the time for that...)

Personnaly, I would prefer solution 3...

Thanks,
Laurent