mbox series

[0/6] linux-user: prctl improvements

Message ID 20211220214135.189157-1-richard.henderson@linaro.org
Headers show
Series linux-user: prctl improvements | expand

Message

Richard Henderson Dec. 20, 2021, 9:41 p.m. UTC
This is split out from a larger patch set for unaligned accesses.
The changes in target/ have no effect without the changes in tcg/,
but this allows the syscall to be handled separately.


r~


Richard Henderson (6):
  linux-user: Split out do_prctl and subroutines
  linux-user: Disable more prctl subcodes
  linux-user: Add code for PR_GET/SET_UNALIGN
  target/alpha: Implement prctl_unalign_sigbus
  target/hppa: Implement prctl_unalign_sigbus
  target/sh4: Implement prctl_unalign_sigbus

 include/hw/core/cpu.h                     |   3 +
 linux-user/aarch64/target_prctl.h         | 160 +++++++
 linux-user/aarch64/target_syscall.h       |  23 -
 linux-user/alpha/target_prctl.h           |   1 +
 linux-user/arm/target_prctl.h             |   1 +
 linux-user/cris/target_prctl.h            |   1 +
 linux-user/generic/target_prctl_unalign.h |  27 ++
 linux-user/hexagon/target_prctl.h         |   1 +
 linux-user/hppa/target_prctl.h            |   1 +
 linux-user/i386/target_prctl.h            |   1 +
 linux-user/m68k/target_prctl.h            |   1 +
 linux-user/microblaze/target_prctl.h      |   1 +
 linux-user/mips/target_prctl.h            |  88 ++++
 linux-user/mips/target_syscall.h          |   6 -
 linux-user/mips64/target_prctl.h          |   1 +
 linux-user/mips64/target_syscall.h        |   6 -
 linux-user/nios2/target_prctl.h           |   1 +
 linux-user/openrisc/target_prctl.h        |   1 +
 linux-user/ppc/target_prctl.h             |   1 +
 linux-user/riscv/target_prctl.h           |   1 +
 linux-user/s390x/target_prctl.h           |   1 +
 linux-user/sh4/target_prctl.h             |   1 +
 linux-user/sparc/target_prctl.h           |   1 +
 linux-user/x86_64/target_prctl.h          |   1 +
 linux-user/xtensa/target_prctl.h          |   1 +
 target/alpha/cpu.h                        |   5 +
 target/hppa/cpu.h                         |   5 +-
 target/sh4/cpu.h                          |   4 +
 cpu.c                                     |  20 +-
 linux-user/syscall.c                      | 490 +++++++++-------------
 target/alpha/translate.c                  |  31 +-
 target/hppa/translate.c                   |  19 +-
 target/sh4/translate.c                    |  50 ++-
 33 files changed, 600 insertions(+), 355 deletions(-)
 create mode 100644 linux-user/aarch64/target_prctl.h
 create mode 100644 linux-user/alpha/target_prctl.h
 create mode 100644 linux-user/arm/target_prctl.h
 create mode 100644 linux-user/cris/target_prctl.h
 create mode 100644 linux-user/generic/target_prctl_unalign.h
 create mode 100644 linux-user/hexagon/target_prctl.h
 create mode 100644 linux-user/hppa/target_prctl.h
 create mode 100644 linux-user/i386/target_prctl.h
 create mode 100644 linux-user/m68k/target_prctl.h
 create mode 100644 linux-user/microblaze/target_prctl.h
 create mode 100644 linux-user/mips/target_prctl.h
 create mode 100644 linux-user/mips64/target_prctl.h
 create mode 100644 linux-user/nios2/target_prctl.h
 create mode 100644 linux-user/openrisc/target_prctl.h
 create mode 100644 linux-user/ppc/target_prctl.h
 create mode 100644 linux-user/riscv/target_prctl.h
 create mode 100644 linux-user/s390x/target_prctl.h
 create mode 100644 linux-user/sh4/target_prctl.h
 create mode 100644 linux-user/sparc/target_prctl.h
 create mode 100644 linux-user/x86_64/target_prctl.h
 create mode 100644 linux-user/xtensa/target_prctl.h

Comments

Laurent Vivier Jan. 6, 2022, 10:46 a.m. UTC | #1
Le 20/12/2021 à 22:41, Richard Henderson a écrit :
> This is split out from a larger patch set for unaligned accesses.
> The changes in target/ have no effect without the changes in tcg/,
> but this allows the syscall to be handled separately.
> 
> 
> r~

Hi Richard,

while I was testing the series for the pull request I found some regressions on commands that were 
passing on before and are not now.

Could you send a follow up patch to add at least PR_CAPBSET_DROP and PR_SET_PDEATHSIG to make the 
LTP testsuite (20200930) happy again (capset02, prctl01, prctl02, prctl03)?

Thanks,
Laurent
Song Gao Jan. 7, 2022, 8:46 a.m. UTC | #2
Hi Laurent,

On 2022/1/6 下午6:46, Laurent Vivier wrote:
> make the LTP testsuite (20200930) happy again (capset02, prctl01, 
> prctl02, prctl03)? 

Do we have LTP test documents?   or What test methods do we have for linux-user?

As for far, I konw 'make check ' ,'make check-tcg'.  and some testcases on tests/tcg/$Arch.

Thanks
Song
Laurent Vivier Jan. 7, 2022, 9:27 a.m. UTC | #3
Hi Gaosong,

Le 07/01/2022 à 09:46, gaosong a écrit :
> Hi Laurent,
> 
> On 2022/1/6 下午6:46, Laurent Vivier wrote:
>> make the LTP testsuite (20200930) happy again (capset02, prctl01, prctl02, prctl03)? 
> 
> Do we have LTP test documents?   or What test methods do we have for linux-user?

I run the Linux Test Project test suite in a container (unshare command) using binfmt_misc:

https://linux-test-project.github.io/

I have some scripts to automatically create debian chroots and build/run the suite inside:

https://github.com/vivier/linux-user-test-scrips

My top script is "run_all.sh" that creates the chroots and run the ltp_test.

The list of the targets I test is in targets.conf:

etch="m68k"
stretch="s390x ppc64le mipsel mips64el mips arm aarch64"
jessie="ppc"
wheezy="sparc32plus"
lenny="hppa alpha"
sid="m68k ppc64 sh4 riscv64 alpha aarch64 s390x hppa sparc64"
trusty="aarch64 ppc ppc64le"
bionic="aarch64 arm ppc64le s390x"

Than I compare the results with the previous run using diff_ltp.sh

This means I don't test architectures that don't have debian support, and only test on x86_64 host.

Thanks,
Laurent