1. 12 7月, 2016 1 次提交
  2. 26 6月, 2016 2 次提交
  3. 08 6月, 2016 1 次提交
    • P
      linux-user: Correct signedness of target_flock l_start and l_len fields · 8efb2ed5
      Peter Maydell 提交于
      The l_start and l_len fields in the various target_flock structures are
      supposed to be '__kernel_off_t' or '__kernel_loff_t', which means they
      should be signed, not unsigned. Correcting the structure definitions means
      that __get_user() and __put_user() will correctly sign extend them if
      the guest is using 32 bit offsets and the host is using 64 bit offsets.
      
      This fixes failures in the LTP 'fcntl14' tests where it checks that
      negative seek offsets work correctly.
      
      We reindent the structures to drop hard tabs since we're touching 40%
      of the fields anyway.
      
      RV: long long -> abi_llong as suggested by Laurent Vivier <laurent@vivier.eu>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      8efb2ed5
  4. 07 6月, 2016 1 次提交
    • P
      linux-user: Use both si_code and si_signo when converting siginfo_t · a70dadc7
      Peter Maydell 提交于
      The siginfo_t struct includes a union. The correct way to identify
      which fields of the union are relevant is complicated, because we
      have to use a combination of the si_code and si_signo to figure out
      which of the union's members are valid.  (Within the host kernel it
      is always possible to tell, but the kernel carefully avoids giving
      userspace the high 16 bits of si_code, so we don't have the
      information to do this the easy way...) We therefore make our best
      guess, bearing in mind that a guest can spoof most of the si_codes
      via rt_sigqueueinfo() if it likes.  Once we have made our guess, we
      record it in the top 16 bits of the si_code, so that tswap_siginfo()
      later can use it.  tswap_siginfo() then strips these top bits out
      before writing si_code to the guest (sign-extending the lower bits).
      
      This fixes a bug where fields were sometimes wrong; in particular
      the LTP kill10 test went into an infinite loop because its signal
      handler got a si_pid value of 0 rather than the pid of the sending
      process.
      
      As part of this change, we switch to using __put_user() in the
      tswap_siginfo code which writes out the byteswapped values to
      the target memory, in case the target memory pointer is not
      sufficiently aligned for the host CPU's requirements.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      a70dadc7
  5. 27 5月, 2016 1 次提交
  6. 11 1月, 2016 1 次提交
  7. 08 1月, 2016 1 次提交
    • L
      linux-user: correctly align target_epoll_event · 928bed6a
      Laurent Vivier 提交于
      According to comments in /usr/include/linux/eventpoll.h,
      poll_event is packed only on x86_64.
      
      And to be sure fields are correctly aligned in epoll_data,
      use abi_XXX types for all of them.
      
      Moreover, fd type is wrong: fd is int, not ulong.
      
      This has been tested with a ppc guest on an x86_64 host:
      without this patch, systemd crashes (core).
      
      CC: Alexander Graf <agraf@suse.de>
      CC: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      928bed6a
  8. 07 10月, 2015 1 次提交
  9. 28 9月, 2015 1 次提交
  10. 15 9月, 2015 1 次提交
  11. 11 9月, 2015 1 次提交
  12. 13 2月, 2015 1 次提交
  13. 10 2月, 2015 1 次提交
  14. 11 11月, 2014 1 次提交
  15. 15 7月, 2014 1 次提交
  16. 29 6月, 2014 4 次提交
  17. 03 5月, 2014 1 次提交
  18. 17 3月, 2014 2 次提交
  19. 04 3月, 2014 2 次提交
  20. 19 2月, 2014 1 次提交
  21. 10 1月, 2014 1 次提交
  22. 29 11月, 2013 1 次提交
  23. 07 11月, 2013 1 次提交
  24. 24 9月, 2013 1 次提交
  25. 11 9月, 2013 1 次提交
  26. 23 7月, 2013 2 次提交
  27. 17 1月, 2013 1 次提交
  28. 12 1月, 2013 1 次提交
  29. 19 12月, 2012 1 次提交
  30. 27 8月, 2012 1 次提交
  31. 13 8月, 2012 2 次提交
  32. 05 8月, 2012 1 次提交