1. 30 4月, 2018 12 次提交
  2. 17 4月, 2018 1 次提交
    • P
      linux-user: check that all of AArch64 SVE extended sigframe is writable · bb3ba35f
      Peter Maydell 提交于
      In commit 8c5931de we added support for SVE extended
      sigframe records.  These mean that the signal frame might now be
      larger than the size of the target_rt_sigframe record, so make sure
      we call lock_user on the entire frame size when we're creating it.
      (The code for restoring the signal frame already correctly handles
      the extended records by locking the 'extra' section separately to the
      main section.)
      
      In particular, this fixes a bug even for non-SVE signal frames,
      because it extends the locked section to cover the
      target_rt_frame_record. Previously this was part of 'struct
      target_rt_sigframe', but in commit e1eecd1d we pulled
      it out into its own struct, and so locking the target_rt_sigframe
      alone doesn't cover it. This bug would mean that we would fail
      to correctly handle the case where a signal was taken with
      SP pointing 16 bytes into an unwritable page, with the page
      immediately below it in memory being writable.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      bb3ba35f
  3. 16 4月, 2018 1 次提交
    • P
      linux-user/signal.c: Put AArch64 frame record in the right place · aac8f556
      Peter Maydell 提交于
      AArch64 stack frames include a 'frame record' which holds a pointer
      to the next frame record in the chain and the LR on entry to the
      function. The procedure calling standard doesn't mandate where
      exactly this frame record is in the stack frame, but for signal
      frames the kernel puts it right at the top. We used to put it
      there too, but in commit 7f0f4208 we accidentally put
      the "enlarge to the 4K reserved space minimum" check after the
      "allow for the frame record" code, rather than before it, with
      the effect that the frame record would be inside the reserved
      space and immediately after the last used part of it.
      
      Move the frame record back out of the reserved space to where
      we used to put it.
      
      This bug shouldn't break any sensible guest code, but test
      programs that deliberately look at the internal details
      of the signal frame layout will not find what they are
      expecting to see.
      
      Fixes: 7f0f4208Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Message-id: 20180412140222.2096-1-peter.maydell@linaro.org
      aac8f556
  4. 10 4月, 2018 1 次提交
  5. 03 4月, 2018 2 次提交
  6. 01 4月, 2018 1 次提交
    • M
      target/xtensa: fix flush_window_regs · 20ef6670
      Max Filippov 提交于
      flush_window_regs uses wrong stack frame to save overflow registers in
      call8 and call12 frames, which results in wrong register values in
      callers of a function that received a signal.
      Reimplement flush_window_regs closely following window overflow
      sequence.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      20ef6670
  7. 17 3月, 2018 1 次提交
    • M
      target/xtensa: add linux-user support · ba7651fb
      Max Filippov 提交于
      Import list of syscalls from the kernel source. Conditionalize code/data
      that is only used with softmmu. Implement exception handlers. Implement
      signal hander (only the core registers for now, no coprocessors or TIE).
      
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Cc: Laurent Vivier <laurent@vivier.eu>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      ba7651fb
  8. 10 3月, 2018 6 次提交
  9. 07 3月, 2018 1 次提交
  10. 31 1月, 2018 1 次提交
  11. 30 1月, 2018 1 次提交
    • P
      linux-user/signal.c: Rename MC_* defines · 8ebb314b
      Peter Maydell 提交于
      The SPARC code in linux-user/signal.c defines a set of
      MC_* constants. On some SPARC hosts these are also defined
      by sys/ucontext.h, resulting in build failures:
      
      linux-user/signal.c:2786:0: error: "MC_NGREG" redefined [-Werror]
       #define MC_NGREG 19
      
      In file included from /usr/include/signal.h:302:0,
                       from include/qemu/osdep.h:86,
                       from linux-user/signal.c:19:
      /usr/include/sparc64-linux-gnu/sys/ucontext.h:59:0: note: this is the location of the previous definition
       # define MC_NGREG __MC_NGREG
      
      Rename all these constants to SPARC_MC_* to avoid the clash.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1517318239-15764-1-git-send-email-peter.maydell@linaro.org
      8ebb314b
  12. 25 1月, 2018 1 次提交
  13. 11 1月, 2018 1 次提交
  14. 04 1月, 2018 1 次提交
  15. 18 12月, 2017 1 次提交
  16. 08 11月, 2017 1 次提交
  17. 16 10月, 2017 1 次提交
  18. 20 7月, 2017 1 次提交
  19. 19 7月, 2017 2 次提交
  20. 04 5月, 2017 1 次提交
    • S
      target/openrisc: implement shadow registers · d89e71e8
      Stafford Horne 提交于
      Shadow registers are part of the openrisc spec along with sr[cid], as
      part of the fast context switching feature.  When exceptions occur,
      instead of having to save registers to the stack if enabled the CID will
      increment and a new set of registers will be available.
      
      This patch only implements shadow registers which can be used as extra
      scratch registers via the mfspr and mtspr if required.  This is
      implemented in a way where it would be easy to add on the fast context
      switching, currently cid is hardcoded to 0.
      
      This is need for openrisc linux smp kernels to boot correctly.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      d89e71e8
  21. 28 2月, 2017 2 次提交