qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c0cb75: osdep.h: Remove <sys/signal.h> includ


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] c0cb75: osdep.h: Remove <sys/signal.h> include
Date: Thu, 21 Jan 2021 01:40:56 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c0cb758eec848dcbc779bf75a26b49727218e380
      
https://github.com/qemu/qemu/commit/c0cb758eec848dcbc779bf75a26b49727218e380
  Author: Michael Forney <mforney@mforney.org>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M include/qemu/osdep.h
    M meson.build

  Log Message:
  -----------
  osdep.h: Remove <sys/signal.h> include

Prior to 2a4b472c3c, sys/signal.h was only included on OpenBSD
(apart from two .c files). The POSIX standard location for this
header is just <signal.h> and in fact, OpenBSD's signal.h includes
sys/signal.h itself.

Unconditionally including <sys/signal.h> on musl causes warnings
for just about every source file:

  /usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect 
#include <sys/signal.h> to <signal.h> [-Wcpp]
      1 | #warning redirecting incorrect #include <sys/signal.h> to <signal.h>
        |  ^~~~~~~

Since there don't seem to be any platforms which require including
<sys/signal.h> in addition to <signal.h>, and some platforms like
Haiku lack it completely, just remove it.

Tested building on OpenBSD after removing this include.

Signed-off-by: Michael Forney <mforney@mforney.org>
Tested-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210113215600.16100-1-mforney@mforney.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: cd5d20efa919fdeb06f4f2ce32e614db07d4ca39
      
https://github.com/qemu/qemu/commit/cd5d20efa919fdeb06f4f2ce32e614db07d4ca39
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Add sys/timex.h to probe clock_adjtime

It is not a part of standard time.h. Glibc put it under
time.h however musl treat it as a sys timex extension.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210118063808.12471-2-jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 29ce0d35e1b779afb3a34ee53e03f87f7028b376
      
https://github.com/qemu/qemu/commit/29ce0d35e1b779afb3a34ee53e03f87f7028b376
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.h

  Log Message:
  -----------
  libvhost-user: Include poll.h instead of sys/poll.h

Musl libc complains about it's wrong usage.

In file included from ../subprojects/libvhost-user/libvhost-user.h:20,
                 from ../subprojects/libvhost-user/libvhost-user-glib.h:19,
                 from ../subprojects/libvhost-user/libvhost-user-glib.c:15:
/usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include 
<sys/poll.h> to <poll.h> [-Werror=cpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^~~~~~~

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210118063808.12471-3-jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 9c57272507a95cde3c9c2c90af2312f92cb55422
      
https://github.com/qemu/qemu/commit/9c57272507a95cde3c9c2c90af2312f92cb55422
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M hw/block/nand.c

  Log Message:
  -----------
  hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE

As per POSIX specification of limits.h [1], OS libc may define
PAGE_SIZE in limits.h.

To prevent collosion of definition, we rename PAGE_SIZE here.

[1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210118063808.12471-5-jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 2d0fc797faaa73fbc1d30f5f9e90407bf3dd93f0
      
https://github.com/qemu/qemu/commit/2d0fc797faaa73fbc1d30f5f9e90407bf3dd93f0
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M contrib/elf2dmp/addrspace.c
    M contrib/elf2dmp/addrspace.h
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE

As per POSIX specification of limits.h [1], OS libc may define
PAGE_SIZE in limits.h.

To prevent collosion of definition, we rename PAGE_SIZE here.

[1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210118063808.12471-6-jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: d2c4f3841d1cba17c99f76812ffcb75a6c402202
      
https://github.com/qemu/qemu/commit/d2c4f3841d1cba17c99f76812ffcb75a6c402202
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M tests/migration/stress.c
    M tests/qtest/libqos/malloc-pc.c
    M tests/qtest/libqos/malloc-spapr.c
    M tests/qtest/m25p80-test.c
    M tests/tcg/multiarch/system/memory.c
    M tests/test-xbzrle.c

  Log Message:
  -----------
  tests: Rename PAGE_SIZE definitions

As per POSIX specification of limits.h [1], OS libc may define
PAGE_SIZE in limits.h.

Self defined PAGE_SIZE is frequently used in tests, to prevent
collosion of definition, we give PAGE_SIZE definitons reasonable
prefixs.

[1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210118063808.12471-7-jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: eb8b1a797a86d72b0eddc6cfd5cc018849417e7a
      
https://github.com/qemu/qemu/commit/eb8b1a797a86d72b0eddc6cfd5cc018849417e7a
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  accel/kvm: avoid using predefined PAGE_SIZE

As per POSIX specification of limits.h [1], OS libc may define
PAGE_SIZE in limits.h.

PAGE_SIZE is used in included kernel uapi headers.

To prevent collosion of definition, we discard PAGE_SIZE from
defined by libc and take QEMU's variable.

[1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <20210118063808.12471-8-jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 8df04b04ed1ea0e61b2c11129a8e73132a20c35c
      
https://github.com/qemu/qemu/commit/8df04b04ed1ea0e61b2c11129a8e73132a20c35c
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    A tests/docker/dockerfiles/alpine.docker

  Log Message:
  -----------
  tests/docker: Add dockerfile for Alpine Linux

Alpine Linux[1] is a security-oriented, lightweight Linux distribution
based on musl libc and busybox.

It it popular among Docker guests and embedded applications.

Adding it to test against different libc.

[1]: https://alpinelinux.org/

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <20210118063808.12471-9-jiaxun.yang@flygoat.com>
[thuth: Dropped some unnecessary packages, replaced build-base with its deps]
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 872cda9c5e81e10e5e9c364a1a062c1ac536ec2a
      
https://github.com/qemu/qemu/commit/872cda9c5e81e10e5e9c364a1a062c1ac536ec2a
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M tests/check-block.sh

  Log Message:
  -----------
  tests/check-block.sh: Refuse to run the iotests with BusyBox' sed

BusyBox' sed reports itself as "This is not GNU sed version 4.0"
when being run with the --version parameter. However, the iotests
really need GNU sed, they do not work with the BusyBox version.
So let's make sure that we really have GNU sed and refuse to run
the tests with BusyBox' sed.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210119134749.401311-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: b22786eab0f070a1981201ecbd952bafc371c615
      
https://github.com/qemu/qemu/commit/b22786eab0f070a1981201ecbd952bafc371c615
  Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M .gitlab-ci.d/containers.yml
    M .gitlab-ci.yml

  Log Message:
  -----------
  gitlab-ci: Add alpine to pipeline

[thuth: Enable "make check" tests, too, after tests/check-block.sh got fixed]

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <20210118063808.12471-10-jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 3e829c0468969274d53bba4cdab3b3fd68a38b45
      
https://github.com/qemu/qemu/commit/3e829c0468969274d53bba4cdab3b3fd68a38b45
  Author: Gan Qixin <ganqixin@huawei.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M tests/qtest/npcm7xx_pwm-test.c

  Log Message:
  -----------
  qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get

The pwm_qom_get function didn't free "response", which caused an indirect
memory leak. So use qobject_unref() to fix it.

ASAN shows memory leak stack:

Indirect leak of 74160000 byte(s) in 18000 object(s) allocated from:
    #0 0x7f96e2f79d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e)
    #1 0x7f96e2d98a50 in g_malloc0 (/lib64/libglib-2.0.so.0+0x55a50)
    #2 0x556313112180 in qdict_new ../qobject/qdict.c:30
    #3 0x556313115bca in parse_object ../qobject/json-parser.c:318
    #4 0x556313117810 in parse_value ../qobject/json-parser.c:546
    #5 0x556313117bda in json_parser_parse ../qobject/json-parser.c:580
    #6 0x55631310fe67 in json_message_process_token 
../qobject/json-streamer.c:92
    #7 0x5563131210b7 in json_lexer_feed_char ../qobject/json-lexer.c:313
    #8 0x556313121662 in json_lexer_feed ../qobject/json-lexer.c:350
    #9 0x5563131101e9 in json_message_parser_feed ../qobject/json-streamer.c:121
    #10 0x5563130cb81e in qmp_fd_receive ../tests/qtest/libqtest.c:614
    #11 0x5563130cba2b in qtest_qmp_receive_dict ../tests/qtest/libqtest.c:636
    #12 0x5563130cb939 in qtest_qmp_receive ../tests/qtest/libqtest.c:624
    #13 0x5563130cbe0d in qtest_vqmp ../tests/qtest/libqtest.c:715
    #14 0x5563130cc40f in qtest_qmp ../tests/qtest/libqtest.c:756
    #15 0x5563130c5623 in pwm_qom_get ../tests/qtest/npcm7xx_pwm-test.c:180
    #16 0x5563130c595e in pwm_get_duty ../tests/qtest/npcm7xx_pwm-test.c:210
    #17 0x5563130c7529 in test_toggle ../tests/qtest/npcm7xx_pwm-test.c:447

Reported-by: Euler Robot <euler.robot@huawei.com>
Message-Id: <20210115075634.717909-1-ganqixin@huawei.com>
Signed-off-by: Gan Qixin <ganqixin@huawei.com>
Reviewed-by: Havard Skinnemoen <hskinnemoen@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: f8e3df09d2a13e9919edba4b4d54efd6369ae548
      
https://github.com/qemu/qemu/commit/f8e3df09d2a13e9919edba4b4d54efd6369ae548
  Author: Stefan Berger <stefanb@linux.vnet.ibm.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M tests/qtest/tpm-util.c

  Log Message:
  -----------
  tests: Fix memory leak in tpm-util.c

This patch fixes the following memory leak detected by asan:

Indirect leak of 560320 byte(s) in 136 object(s) allocated from:
    #0 0x556b3b3f9b57 in calloc 
(/home/stefanb/tmp/qemu-tip/build/tests/qtest/tpm-crb-swtpm-test+0x23fb57)
    #1 0x152b0e96b9b0 in g_malloc0 (/lib64/libglib-2.0.so.0+0x589b0)
    #2 0x556b3b588f61 in parse_object 
/home/stefanb/tmp/qemu-tip/build/../qobject/json-parser.c:318:12
    #3 0x556b3b588f61 in parse_value 
/home/stefanb/tmp/qemu-tip/build/../qobject/json-parser.c:546:16
    #4 0x556b3b5886e8 in json_parser_parse 
/home/stefanb/tmp/qemu-tip/build/../qobject/json-parser.c:580:14
    #5 0x556b3b52ff4a in json_message_process_token 
/home/stefanb/tmp/qemu-tip/build/../qobject/json-streamer.c:92:12
    #6 0x556b3b59896f in json_lexer_feed_char 
/home/stefanb/tmp/qemu-tip/build/../qobject/json-lexer.c:313:13
    #7 0x556b3b598443 in json_lexer_feed 
/home/stefanb/tmp/qemu-tip/build/../qobject/json-lexer.c:350:9
    #8 0x556b3b436c70 in qmp_fd_receive 
/home/stefanb/tmp/qemu-tip/build/../tests/qtest/libqtest.c:614:9
    #9 0x556b3b435871 in qtest_qmp_receive_dict 
/home/stefanb/tmp/qemu-tip/build/../tests/qtest/libqtest.c:636:12
    #10 0x556b3b435871 in qtest_qmp_receive 
/home/stefanb/tmp/qemu-tip/build/../tests/qtest/libqtest.c:624:27
    #11 0x556b3b435c59 in qtest_vqmp 
/home/stefanb/tmp/qemu-tip/build/../tests/qtest/libqtest.c:715:12
    #12 0x556b3b435c59 in qtest_qmp 
/home/stefanb/tmp/qemu-tip/build/../tests/qtest/libqtest.c:756:16
    #13 0x556b3b4328c7 in tpm_util_wait_for_migration_complete 
/home/stefanb/tmp/qemu-tip/build/../tests/qtest/tpm-util.c:245:15
    #14 0x556b3b4333be in tpm_test_swtpm_migration_test 
/home/stefanb/tmp/qemu-tip/build/../tests/qtest/tpm-tests.c:117:5
    #15 0x152b0e98e29d  (/lib64/libglib-2.0.so.0+0x7b29d)

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210115204637.3332555-1-stefanb@linux.vnet.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 2b42989c04172c6bb6f990a9c6ac224b52faab53
      
https://github.com/qemu/qemu/commit/2b42989c04172c6bb6f990a9c6ac224b52faab53
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Remove Ben Warren

Ben's email bounces and he no longer works for Skyport Systems. I was
unable to reach Ben, so mark this section as Orphaned for now.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20201030153416.429791-2-jsnow@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 4251dfb082f6b81c382e69ccd2700fcfa7d7aa82
      
https://github.com/qemu/qemu/commit/4251dfb082f6b81c382e69ccd2700fcfa7d7aa82
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Make status spellings consistent

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201030153416.429791-3-jsnow@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 954b83f13236d21b4116b93a726ea36b5dc2d303
      
https://github.com/qemu/qemu/commit/954b83f13236d21b4116b93a726ea36b5dc2d303
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M .gitlab-ci.d/containers.yml
    M .gitlab-ci.yml
    M MAINTAINERS
    M accel/kvm/kvm-all.c
    M configure
    M contrib/elf2dmp/addrspace.c
    M contrib/elf2dmp/addrspace.h
    M contrib/elf2dmp/main.c
    M hw/block/nand.c
    M include/qemu/osdep.h
    M meson.build
    M subprojects/libvhost-user/libvhost-user.h
    M tests/check-block.sh
    A tests/docker/dockerfiles/alpine.docker
    M tests/migration/stress.c
    M tests/qtest/libqos/malloc-pc.c
    M tests/qtest/libqos/malloc-spapr.c
    M tests/qtest/m25p80-test.c
    M tests/qtest/npcm7xx_pwm-test.c
    M tests/qtest/tpm-util.c
    M tests/tcg/multiarch/system/memory.c
    M tests/test-xbzrle.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/huth-gitlab/tags/pull-request-2021-01-20' into staging

* Fixes for compiling QEMU on Alpine Linux
* Add Alpine Linux to the gitlab-CI
* Some small fixes for qtests
* Updates to the MAINTAINERS file

# gpg: Signature made Wed 20 Jan 2021 12:56:14 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2021-01-20:
  MAINTAINERS: Make status spellings consistent
  MAINTAINERS: Remove Ben Warren
  tests: Fix memory leak in tpm-util.c
  qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get
  gitlab-ci: Add alpine to pipeline
  tests/check-block.sh: Refuse to run the iotests with BusyBox' sed
  tests/docker: Add dockerfile for Alpine Linux
  accel/kvm: avoid using predefined PAGE_SIZE
  tests: Rename PAGE_SIZE definitions
  elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE
  hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE
  libvhost-user: Include poll.h instead of sys/poll.h
  configure: Add sys/timex.h to probe clock_adjtime
  osdep.h: Remove <sys/signal.h> include

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


Compare: https://github.com/qemu/qemu/compare/48202c712412...954b83f13236



reply via email to

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