1. 10 5月, 2019 1 次提交
  2. 09 5月, 2019 1 次提交
    • A
      linux-user/elfload: Fix GCC 9 build warnings · d7eb2b92
      Alistair Francis 提交于
      Fix this warning when building with GCC9 on Fedora 30:
      In function ‘strncpy’,
          inlined from ‘fill_psinfo’ at /home/alistair/qemu/linux-user/elfload.c:3208:12,
          inlined from ‘fill_note_info’ at /home/alistair/qemu/linux-user/elfload.c:3390:5,
          inlined from ‘elf_core_dump’ at /home/alistair/qemu/linux-user/elfload.c:3539:9:
      /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
        106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: NAlistair Francis <alistair.francis@wdc.com>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <c4d2b1de9efadcf1c900b91361af9302823a72a9.1556666645.git.alistair.francis@wdc.com>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      d7eb2b92
  3. 07 3月, 2019 2 次提交
  4. 05 3月, 2019 2 次提交
  5. 28 2月, 2019 1 次提交
  6. 15 2月, 2019 1 次提交
  7. 01 2月, 2019 2 次提交
  8. 11 1月, 2019 1 次提交
    • P
      qemu/queue.h: leave head structs anonymous unless necessary · b58deb34
      Paolo Bonzini 提交于
      Most list head structs need not be given a name.  In most cases the
      name is given just in case one is going to use QTAILQ_LAST, QTAILQ_PREV
      or reverse iteration, but this does not apply to lists of other kinds,
      and even for QTAILQ in practice this is only rarely needed.  In addition,
      we will soon reimplement those macros completely so that they do not
      need a name for the head struct.  So clean up everything, not giving a
      name except in the rare case where it is necessary.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b58deb34
  9. 29 10月, 2018 2 次提交
  10. 24 10月, 2018 4 次提交
  11. 26 9月, 2018 1 次提交
    • S
      linux-user: elf: mmap all the target-pages of hostpage for data segment · 94894ff2
      Shivaprasad G Bhat 提交于
      If the hostpage size is greater than the TARGET_PAGESIZE, the
      target-pages of size TARGET_PAGESIZE are marked valid only till the
      length requested during the elfload. The glibc attempts to consume unused
      space in the last page of data segment(__libc_memalign() in
      elf/dl-minimal.c). If PT_LOAD p_align is greater than or
      equal to hostpage size, the GLRO(dl_pagesize) is actually the host pagesize
      as set in the auxillary vectors. So, there is no explicit mmap request for
      the remaining target-pages on the last hostpage. The glibc assumes that
      particular space as available and subsequent attempts to use
      those addresses lead to crash as the target_mmap has not marked them valid
      for those target-pages.
      
      The issue is seen when trying to chroot to 16.04-x86_64 ubuntu on a PPC64
      host where the fork fails to access the thread_id as it is allocated on a
      page not marked valid. The recent glibc doesn't have checks for thread-id in
      fork, but the issue can manifest somewhere else, none the less.
      
      The fix here is to map all the target-pages of the hostpage during the
      elfload if the p_align is greater than or equal to hostpage size, for
      data segment to allow the glibc for proper consumption.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Message-Id: <153553435604.51992.5640085189104207249.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      94894ff2
  12. 07 9月, 2018 1 次提交
  13. 24 8月, 2018 1 次提交
  14. 23 7月, 2018 1 次提交
    • L
      linux-user: fix ELF load alignment error · 33143c44
      Laurent Vivier 提交于
      When we try to use some targets on ppc64, it can happen the target
      doesn't support the host page size to align ELF load sections and
      fails with:
      
        ELF load command alignment not page-aligned
      
      Since commit a70daba3 ("linux-user: Tell guest about big host
      page sizes") the host page size is used to align ELF sections, but
      this doesn't work if the alignment required by the load section is
      smaller than the host one.  For these cases, we continue to use the
      TARGET_PAGE_SIZE instead of the host one.
      
      I have tested this change on ppc64, and it fixes qemu linux-user for:
        s390x, m68k, i386, arm, aarch64, hppa
      and I have tested it doesn't break the following targets:
        x86_64, mips64el, sh4
      mips and mipsel abort, but I think for another reason.
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      [lv: fixed "info->alignment = 0"]
      Message-Id: <20180716195349.29959-1-laurent@vivier.eu>
      33143c44
  15. 29 6月, 2018 2 次提交
  16. 11 5月, 2018 1 次提交
  17. 04 5月, 2018 3 次提交
  18. 11 4月, 2018 1 次提交
  19. 21 3月, 2018 1 次提交
    • L
      linux-user: init_guest_space: Try to make ARM space+commpage continuous · 2a53535a
      Luke Shumaker 提交于
      At a fixed distance after the usable memory that init_guest_space maps, for
      32-bit ARM targets we also need to map a commpage.  The normal
      init_guest_space logic doesn't keep this in mind when searching for an
      address range.
      
      If !host_start, then try to find a big continuous segment where we can put
      both the usable memory and the commpage; we then munmap that segment and
      set current_start to that address; and let the normal code mmap the usable
      memory and the commpage separately.  That is: if we don't have hint of
      where to start looking for memory, come up with one that is better than
      NULL.  Depending on host_size and guest_start, there may or may not be a
      gap between the usable memory and the commpage, so this is slightly more
      restrictive than it needs to be; but it's only a hint, so that's OK.
      
      We only do that for !host start, because if host_start, then either:
       - we got an address passed in with -B, in which case we don't want to
         interfere with what the user said;
       - or host_start is based off of the ELF image's loaddr.  The check "if
         (host_start && real_start != current_start)" suggests that we really
         want lowest available address that is >= loaddr.  I don't know why that
         is, but I'm trusting that Paul Brook knew what he was doing when he
         wrote the original version of that check in
         c581deda way back in 2010.
      Signed-off-by: NLuke Shumaker <lukeshu@parabola.nu>
      Message-Id: <20171228180814.9749-11-lukeshu@lukeshu.com>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      2a53535a
  20. 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
  21. 13 3月, 2018 3 次提交
  22. 10 3月, 2018 7 次提交