qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 4ff17c: linux-user: Remove stale "not threads


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 4ff17c: linux-user: Remove stale "not threadsafe" comments
Date: Wed, 09 Mar 2022 12:02:45 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 4ff17cf0aa8854941dc0538c74d4f1677a570575
      
https://github.com/qemu/qemu/commit/4ff17cf0aa8854941dc0538c74d4f1677a570575
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-03-08 (Tue, 08 Mar 2022)

  Changed paths:
    M linux-user/signal.c

  Log Message:
  -----------
  linux-user: Remove stale "not threadsafe" comments

In linux-user/signal.c we have two FIXME comments claiming that
parts of the signal-handling code are not threadsafe. These are
very old, as they were first introduced in commit 624f7979058
in 2008. Since then we've radically overhauled the signal-handling
logic, while carefully preserving these FIXME comments.

It's unclear exactly what thread-safety issue the original
author was trying to point out -- the relevant data structures
are in the TaskStruct, which makes them per-thread and only
operated on by that thread. The old code at the time of that
commit did have various races involving signal handlers being
invoked at awkward times; possibly this was what was meant.

Delete these FIXME comments:
 * they were written at a time when the way we handled
   signals was completely different
 * the code today appears to us to not have thread-safety issues
 * nobody knows what the problem the comments were trying to
   point out was
so they are serving no useful purpose for us today.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20220114155032.3767771-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 083fe9a12d2025bb719ce8fb8cef86266f9bdddd
      
https://github.com/qemu/qemu/commit/083fe9a12d2025bb719ce8fb8cef86266f9bdddd
  Author: Matheus Ferst <matheus.ferst@eldorado.org.br>
  Date:   2022-03-08 (Tue, 08 Mar 2022)

  Changed paths:
    M linux-user/ppc/cpu_loop.c

  Log Message:
  -----------
  linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i].
The si_code comes from do_program_check in the kernel source file
arch/powerpc/kernel/traps.c

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220113170456.1796911-2-matheus.ferst@eldorado.org.br>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 62089c849d49f92823c68624720cdac8fa4b43e0
      
https://github.com/qemu/qemu/commit/62089c849d49f92823c68624720cdac8fa4b43e0
  Author: Matheus Ferst <matheus.ferst@eldorado.org.br>
  Date:   2022-03-08 (Tue, 08 Mar 2022)

  Changed paths:
    M tests/tcg/ppc64le/signal_save_restore_xer.c

  Log Message:
  -----------
  tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP

Now that linux-user delivers the signal on tw, we can change
signal_save_restore_xer to use SIGTRAP instead of SIGILL.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220113170456.1796911-3-matheus.ferst@eldorado.org.br>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: d9ccf33f9479201e5add8db0af68ca9ca8da358b
      
https://github.com/qemu/qemu/commit/d9ccf33f9479201e5add8db0af68ca9ca8da358b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-03-09 (Wed, 09 Mar 2022)

  Changed paths:
    M linux-user/ppc/cpu_loop.c
    M linux-user/signal.c
    M tests/tcg/ppc64le/signal_save_restore_xer.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/lvivier-gitlab/tags/linux-user-for-7.0-pull-request' into staging

linux-user pull request 20220308

deliver SIGTRAP on POWERPC_EXCP_TRAP
remove stale "not threadsafe" comments

# gpg: Signature made Tue 08 Mar 2022 15:02:14 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" 
[full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/lvivier-gitlab/tags/linux-user-for-7.0-pull-request:
  tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP
  linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP
  linux-user: Remove stale "not threadsafe" comments

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/8098417d117a...d9ccf33f9479



reply via email to

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