[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 00/14] linux-user: brk fixes
From: |
Joel Stanley |
Subject: |
Re: [PATCH v7 00/14] linux-user: brk fixes |
Date: |
Thu, 3 Aug 2023 13:11:03 +0000 |
Hi Richard,
On Thu, 3 Aug 2023 at 01:53, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Builds on Helge's v6, incorporating my feedback plus
> some other minor cleanup.
This succeeds for the armhf static binary on ppc64le host that was
previously segfaulting.
However, the arm static binary on ppc64le host now segfaults:
$ gdb -q -ex r --args ./build/qemu-arm -d guest_errors,page,strace ~/hello
Reading symbols from ./build/qemu-arm...
Starting program: /scratch/joel/qemu/build/qemu-arm -d
guest_errors,page,strace /home/joel/hello
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff762ece0 (LWP 143553)]
host mmap_min_addr=0x10000
pgb_find_hole: base @ 140420000 for 4294967296 bytes
pgb_static: base @ 140420000 for 4294967295 bytes
pgb_reserved_va: base @ 0x140420000 for 4294967296 bytes
Locating guest address space @ 0x140420000
page layout changed following mmap
start end size prot
00010000-00090000 00080000 ---
00090000-0009b000 0000b000 ---
ffff0000-00000000 00010000 r-x
page layout changed following mmap
start end size prot
00010000-00090000 00080000 r-x
00090000-0009b000 0000b000 ---
ffff0000-00000000 00010000 r-x
page layout changed following mmap
start end size prot
00010000-00090000 00080000 r-x
00090000-000a0000 00010000 rw-
ffff0000-00000000 00010000 r-x
page layout changed following mmap
start end size prot
00010000-00090000 00080000 r-x
00090000-000a0000 00010000 rw-
40000000-40810000 00810000 rw-
ffff0000-00000000 00010000 r-x
page layout changed following mmap
start end size prot
00010000-00090000 00080000 r-x
00090000-000a0000 00010000 rw-
40000000-40010000 00010000 ---
40010000-40811000 00801000 rw-
ffff0000-00000000 00010000 r-x
guest_base 0x140420000
page layout changed following binary load
start end size prot
00010000-00090000 00080000 r-x
00090000-000a0000 00010000 rw-
40000000-40010000 00010000 ---
40010000-40810000 00800000 rw-
40810000-40811000 00001000 r-x
ffff0000-00000000 00010000 r-x
end_code 0x00084f7c
start_code 0x00010000
start_data 0x00095098
end_data 0x00098394
start_stack 0x4080f410
brk 0x0009b000
entry 0x00010418
argv_start 0x4080f414
env_start 0x4080f41c
auxv_start 0x4080f4a0
143551 brk(NULL) = 0x0009b000
143551 brk(0x0009b8fc) = 0x0009b000
Thread 1 "qemu-arm" received signal SIGSEGV, Segmentation fault.
0x00007fffeed9bb74 in code_gen_buffer ()
(gdb) bt
#0 0x00007fffeed9bb74 in code_gen_buffer ()
#1 0x0000000100169fdc in cpu_tb_exec (cpu=cpu@entry=0x1003d4a90,
itb=itb@entry=0x7fffeed9ba60 <code_gen_buffer+47512>,
tb_exit=tb_exit@entry=0x7fffffffe51c)
at ../accel/tcg/cpu-exec.c:457
#2 0x000000010016a704 in cpu_loop_exec_tb (tb_exit=0x7fffffffe51c,
last_tb=<synthetic pointer>,
pc=<optimised out>, tb=0x7fffeed9ba60 <code_gen_buffer+47512>,
cpu=<optimised out>)
at ../accel/tcg/cpu-exec.c:919
#3 cpu_exec_loop (cpu=cpu@entry=0x1003d4a90, sc=<optimised out>) at
../accel/tcg/cpu-exec.c:1040
#4 0x000000010016abac in cpu_exec_setjmp (cpu=cpu@entry=0x1003d4a90,
sc=<optimised out>)
at ../accel/tcg/cpu-exec.c:1057
#5 0x000000010016b270 in cpu_exec (cpu=0x1003d4a90) at
../accel/tcg/cpu-exec.c:1083
#6 0x000000010004d7b0 in cpu_loop (env=0x1003d4fa0) at
../linux-user/arm/cpu_loop.c:328
#7 0x0000000100047548 in main (argc=<optimised out>,
argv=0x7ffffffff188, envp=<optimised out>)
at ../linux-user/main.c:1012
(gdb)
>
>
> r~
>
>
> Akihiko Odaki (6):
> linux-user: Unset MAP_FIXED_NOREPLACE for host
> linux-user: Fix MAP_FIXED_NOREPLACE on old kernels
> linux-user: Do not call get_errno() in do_brk()
> linux-user: Use MAP_FIXED_NOREPLACE for do_brk()
> linux-user: Do nothing if too small brk is specified
> linux-user: Do not align brk with host page size
>
> Helge Deller (1):
> linux-user: Adjust initial brk when interpreter is close to executable
>
> Richard Henderson (7):
> linux-user: Remove last_brk
> bsd-user: Remove last_brk
> linux-user: Adjust task_unmapped_base for reserved_va
> linux-user: Define TASK_UNMAPPED_BASE in $guest/target_mman.h
> linux-user: Add ELF_ET_DYN_BASE
> linux-user: Use elf_et_dyn_base for ET_DYN with interpreter
> linux-user: Properly set image_info.brk in flatload
>
> bsd-user/qemu.h | 1 -
> linux-user/aarch64/target_mman.h | 13 ++++
> linux-user/alpha/target_mman.h | 11 ++++
> linux-user/arm/target_mman.h | 11 ++++
> linux-user/cris/target_mman.h | 12 ++++
> linux-user/hexagon/target_mman.h | 13 ++++
> linux-user/hppa/target_mman.h | 6 ++
> linux-user/i386/target_mman.h | 16 +++++
> linux-user/loongarch64/target_mman.h | 11 ++++
> linux-user/m68k/target_mman.h | 5 ++
> linux-user/microblaze/target_mman.h | 11 ++++
> linux-user/mips/target_mman.h | 10 +++
> linux-user/nios2/target_mman.h | 10 +++
> linux-user/openrisc/target_mman.h | 10 +++
> linux-user/ppc/target_mman.h | 20 ++++++
> linux-user/qemu.h | 2 -
> linux-user/riscv/target_mman.h | 10 +++
> linux-user/s390x/target_mman.h | 20 ++++++
> linux-user/sh4/target_mman.h | 7 +++
> linux-user/sparc/target_mman.h | 25 ++++++++
> linux-user/user-mmap.h | 6 +-
> linux-user/x86_64/target_mman.h | 15 +++++
> linux-user/xtensa/target_mman.h | 10 +++
> bsd-user/mmap.c | 2 -
> linux-user/elfload.c | 94 ++++++++++++++++------------
> linux-user/flatload.c | 2 +-
> linux-user/main.c | 43 ++++++++++++-
> linux-user/mmap.c | 68 ++++++++++++--------
> linux-user/syscall.c | 69 +++++---------------
> 29 files changed, 401 insertions(+), 132 deletions(-)
>
> --
> 2.34.1
>
- [PATCH v7 07/14] linux-user: Remove last_brk, (continued)
- [PATCH v7 07/14] linux-user: Remove last_brk, Richard Henderson, 2023/08/02
- [PATCH v7 08/14] bsd-user: Remove last_brk, Richard Henderson, 2023/08/02
- [PATCH v7 09/14] linux-user: Adjust task_unmapped_base for reserved_va, Richard Henderson, 2023/08/02
- [PATCH v7 06/14] linux-user: Do not align brk with host page size, Richard Henderson, 2023/08/02
- [PATCH v7 10/14] linux-user: Define TASK_UNMAPPED_BASE in $guest/target_mman.h, Richard Henderson, 2023/08/02
- [PATCH v7 11/14] linux-user: Add ELF_ET_DYN_BASE, Richard Henderson, 2023/08/02
- [PATCH v7 13/14] linux-user: Adjust initial brk when interpreter is close to executable, Richard Henderson, 2023/08/02
- [PATCH v7 12/14] linux-user: Use elf_et_dyn_base for ET_DYN with interpreter, Richard Henderson, 2023/08/02
- [PATCH v7 14/14] linux-user: Properly set image_info.brk in flatload, Richard Henderson, 2023/08/02
- Re: [PATCH v7 00/14] linux-user: brk fixes,
Joel Stanley <=