qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 60f1c8: linux-user: Clean up arg_start/arg_en


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 60f1c8: linux-user: Clean up arg_start/arg_end confusion
Date: Wed, 25 May 2022 09:39:11 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 60f1c8017a2b137013a8ae83911d74700f692425
      
https://github.com/qemu/qemu/commit/60f1c8017a2b137013a8ae83911d74700f692425
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M linux-user/elfload.c
    M linux-user/linuxload.c
    M linux-user/main.c
    M linux-user/qemu.h
    M semihosting/arm-compat-semi.c

  Log Message:
  -----------
  linux-user: Clean up arg_start/arg_end confusion

We had two sets of variables: arg_start/arg_end, and
arg_strings/env_strings.  In linuxload.c, we set the
first pair to the bounds of the argv strings, but in
elfload.c, we set the first pair to the bounds of the
argv pointers and the second pair to the bounds of
the argv strings.

Remove arg_start/arg_end, replacing them with the standard
argc/argv/envc/envp values.  Retain arg_strings/env_strings
with the meaning we were using in elfload.c.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/714
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220427025129.160184-1-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: c3a28d71221d30b1f58bf5efc88add20635ce46d
      
https://github.com/qemu/qemu/commit/c3a28d71221d30b1f58bf5efc88add20635ce46d
  Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user/syscall.c: fix build without RLIMIT_RTTIME

RLIMIT_RTTIME is not provided by uclibc-ng or by musl prior to version
1.2.0 and
https://github.com/bminor/musl/commit/2507e7f5312e79620f6337935d0a6c9045ccba09
resulting in the following build failure since
https://git.qemu.org/?p=qemu.git;a=commit;h=244fd08323088db73590ff2317dfe86f810b51d7:

../linux-user/syscall.c: In function 'target_to_host_resource':
../linux-user/syscall.c:1057:16: error: 'RLIMIT_RTTIME' undeclared (first use 
in this function); did you mean 'RLIMIT_NOFILE'?
 1057 |         return RLIMIT_RTTIME;
      |                ^~~~~~~~~~~~~
      |                RLIMIT_NOFILE

Fixes:
 - 
http://autobuild.buildroot.org/results/22d3b584b704613d030e1ea9e6b709b713e4cc26

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220523105239.1499162-1-fontaine.fabrice@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 2f6f4290e0f0f3a8ea49a81afebd2d41c327477f
      
https://github.com/qemu/qemu/commit/2f6f4290e0f0f3a8ea49a81afebd2d41c327477f
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user/elfload: Remove pointless non-const CPUArchState cast

fill_thread_info() takes a pointer to const.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220509205728.51912-2-philippe.mathieu.daude@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: a0939b89161a756a7f58cab2bec0a2410c5d0b5f
      
https://github.com/qemu/qemu/commit/a0939b89161a756a7f58cab2bec0a2410c5d0b5f
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M linux-user/strace.c
    M linux-user/strace.h
    M linux-user/syscall.c
    M linux-user/uname.c
    M linux-user/uname.h
    M linux-user/user-internals.h

  Log Message:
  -----------
  linux-user: Have do_syscall() use CPUArchState* instead of void*

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220509205728.51912-3-philippe.mathieu.daude@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 0effdc29b53240b1b2f25e48a61a287558e8ad6f
      
https://github.com/qemu/qemu/commit/0effdc29b53240b1b2f25e48a61a287558e8ad6f
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M linux-user/syscall.c
    M linux-user/uname.c
    M linux-user/user-internals.h

  Log Message:
  -----------
  linux-user: Remove pointless CPU{ARCH}State casts

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220509205728.51912-4-philippe.mathieu.daude@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 9a12adc704f977b31d6cde6cb26e5424c128907b
      
https://github.com/qemu/qemu/commit/9a12adc704f977b31d6cde6cb26e5424c128907b
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M linux-user/s390x/signal.c

  Log Message:
  -----------
  linux-user/s390x: Fix unwinding from signal handlers

Commit 31330e6cecfd ("linux-user/s390x: Implement setup_sigtramp")
removed an unused field from rt_sigframe, disturbing offsets of other
fields and breaking unwinding from signal handlers (e.g. libgcc's
s390_fallback_frame() relies on this struct having a specific layout).
Restore the field and add a comment.

Reported-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Fixes: 31330e6cecfd ("linux-user/s390x: Implement setup_sigtramp")
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220503225157.1696774-2-iii@linux.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 1a75b14038bd77b0af7d2ddb0cf230b31f75623e
      
https://github.com/qemu/qemu/commit/1a75b14038bd77b0af7d2ddb0cf230b31f75623e
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M tests/tcg/s390x/signals-s390x.c

  Log Message:
  -----------
  tests/tcg/s390x: Test unwinding from signal handlers

Add a small test to prevent regressions.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20220503225157.1696774-3-iii@linux.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 565a84c1e61acb6e2bce03e5ca88b5ce400231ca
      
https://github.com/qemu/qemu/commit/565a84c1e61acb6e2bce03e5ca88b5ce400231ca
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M linux-user/include/host/s390/host-signal.h

  Log Message:
  -----------
  linux-user/host/s390: Treat EX and EXRL as writes

clang-built s390x branch-relative-long test fails on clang-built s390x
QEMU due to the following sequence of events:

- The test zeroes out a code page, clang generates exrl+xc for this.

- do_helper_xc() is called. Clang generates exrl+xc there as well.

- Since there already exists a TB for the code in question, its page is
  read-only and SIGSEGV is raised.

- host_signal_handler() calls host_signal_write() and the latter does
  not recognize exrl as a write. Therefore page_unprotect() is not
  called and the signal is forwarded to the test.

Fix by treating EXRL (and EX, just in case) as writes. There may be
false positives, but they will lead only to an extra page_unprotect()
call.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220504114819.1729737-1-iii@linux.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 6882d651617cfc8ba3efd1722854d2143401e332
      
https://github.com/qemu/qemu/commit/6882d651617cfc8ba3efd1722854d2143401e332
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M linux-user/elfload.c
    M linux-user/include/host/s390/host-signal.h
    M linux-user/linuxload.c
    M linux-user/main.c
    M linux-user/qemu.h
    M linux-user/s390x/signal.c
    M linux-user/strace.c
    M linux-user/strace.h
    M linux-user/syscall.c
    M linux-user/uname.c
    M linux-user/uname.h
    M linux-user/user-internals.h
    M semihosting/arm-compat-semi.c
    M tests/tcg/s390x/signals-s390x.c

  Log Message:
  -----------
  Merge tag 'linux-user-for-7.1-pull-request' of 
https://gitlab.com/laurent_vivier/qemu into staging

Pull request linux-user 20220525

s390x fixes
CPUArchState cleanup
elfload cleanup
fix for uclibc-ng and by musl

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmKOB6ISHGxhdXJlbnRA
# dml2aWVyLmV1AAoJEPMMOL0/L748UooP/38pbx20Zz1ZJcT5jkfJNOScg2mlHmeJ
# 2pr+8HRXyGXjkFsqNLKPSDB5/bEa9reCBIuVFR3kLxFdERE8G8PQqAH7tp8Sd3LT
# HFEGQ3nK6DGRNRnLQqpzSyG6ZpktpJrHmXpdh3HxGM2r/gPnWV/XKM87YvG+kOKe
# XU75Yx9F8VMYUjbDoAYuUOPOPvvrnTpLnFOedss6WXOJJFJvE7jzPMx4mwiYlXIj
# IrjHAd+rK3yUXziqM4gqZjrNvRw7+UhaNv1gDJGHFw+aSRrrDSl5OiNHZstAcRUD
# Kx4TVMCm2m8vYxtX2QKBz6DSonOVe0/w6aRKiqZmDfxPfxPvtjtfnREZGqyb211T
# 3uMbtWI/kkqL9Fw1nNVJyzdKCqf0YSDzmfWdgqhYq568IX1DUZgIMgDMPfBo3N5N
# euH4UVaFwy+s/pq5lW2EIZm6TAKllpseMyDPUrva8Wis9hAEV4CTMq6Z8XlnzxSd
# Jwwizxt0pItpmiPPGr4eGSM9uY1aFKgqiMFyCZATTrmHe4AQrssEV2cH5Wg6veaY
# cE7VaA5grwUlToYSQaRNRjqTqW64uDxhz8wTfsAe9hRT2dNFJdHibtBrOeepl35R
# 5cWQzHas3pTUx9D/gzUtkstoWIKlDSppxpIHcFKxcEKOLreUFEwYVLJuA9+IgLVl
# /vcZHcEAjz/k
# =B9Rm
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 25 May 2022 03:40:34 AM PDT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [undefined]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" 
[undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* tag 'linux-user-for-7.1-pull-request' of 
https://gitlab.com/laurent_vivier/qemu:
  linux-user/host/s390: Treat EX and EXRL as writes
  tests/tcg/s390x: Test unwinding from signal handlers
  linux-user/s390x: Fix unwinding from signal handlers
  linux-user: Remove pointless CPU{ARCH}State casts
  linux-user: Have do_syscall() use CPUArchState* instead of void*
  linux-user/elfload: Remove pointless non-const CPUArchState cast
  linux-user/syscall.c: fix build without RLIMIT_RTTIME
  linux-user: Clean up arg_start/arg_end confusion

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/ffae6d9585dc...6882d651617c



reply via email to

[Prev in Thread] Current Thread [Next in Thread]