Skip to content
Snippets Groups Projects
  1. Jul 20, 2022
  2. May 17, 2022
  3. May 16, 2022
  4. May 12, 2022
  5. May 07, 2022
  6. May 03, 2022
  7. Apr 20, 2022
  8. Apr 06, 2022
  9. Mar 22, 2022
  10. Mar 07, 2022
  11. Feb 22, 2022
  12. Feb 21, 2022
  13. Feb 14, 2022
    • Thomas Jansen's avatar
      net/eth: Don't consider ESP to be an IPv6 option header · 9d6267b2
      Thomas Jansen authored
      The IPv6 option headers all have in common that they start with some
      common fields, in particular the type of the next header followed by the
      extention header length. This is used to traverse the list of the
      options. The ESP header does not follow that format, which can break the
      IPv6 option header traversal code in eth_parse_ipv6_hdr().
      
      The effect of that is that network interfaces such as vmxnet3 that use
      the following call chain
        eth_is_ip6_extension_header_type
        eth_parse_ipv6_hdr
        net_tx_pkt_parse_headers
        net_tx_pkt_parse
        vmxnet3_process_tx_queue
      to send packets from the VM out to the host will drop packets of the
      following structure:
        Ethernet-Header(IPv6-Header(ESP(encrypted data)))
      
      Note that not all types of network interfaces use the net_tx_pkt_parse
      function though, leading to inconsistent behavior regarding sending
      those packets. The e1000 network interface for example does not suffer
      from this limitation.
      
      By not considering ESP to be an IPv6 header we can allow sending those
      packets out to the host on all types of network interfaces.
      
      Fixes: 75020a70 ("Common definitions for VMWARE devices")
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/149
      Buglink: https://bugs.launchpad.net/qemu/+bug/1758091
      
      
      Signed-off-by: default avatarThomas Jansen <mithi@mithi.net>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      9d6267b2
    • Rao Lei's avatar
      net/filter: Optimize filter_send to coroutine · 61138296
      Rao Lei authored
      
      This patch is to improve the logic of QEMU main thread sleep code in
      qemu_chr_write_buffer() where it can be blocked and can't run other
      coroutines during COLO IO stress test.
      
      Our approach is to put filter_send() in a coroutine. In this way,
      filter_send() will call qemu_coroutine_yield() in qemu_co_sleep_ns(),
      so that it can be scheduled out and QEMU main thread has opportunity to
      run other tasks.
      
      Signed-off-by: default avatarLei Rao <lei.rao@intel.com>
      Signed-off-by: default avatarZhang Chen <chen.zhang@intel.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarZhang Chen <chen.zhang@intel.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      61138296
    • Zhang Chen's avatar
      net/colo-compare.c: Update the default value comments · 09313cdb
      Zhang Chen authored
      
      Make the comments consistent with the REGULAR_PACKET_CHECK_MS.
      
      Signed-off-by: default avatarZhang Chen <chen.zhang@intel.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      09313cdb
    • Zhang Chen's avatar
      net/colo-compare.c: Optimize compare order for performance · a5f038e2
      Zhang Chen authored
      
      COLO-compare use the glib function g_queue_find_custom to dump
      another VM's networking packet to compare. But this function always
      start find from the queue->head(here is the newest packet), It will
      reduce the success rate of comparison. So this patch reversed
      the order of the queues for performance.
      
      Signed-off-by: default avatarZhang Chen <chen.zhang@intel.com>
      Reported-by: default avatarleirao <lei.rao@intel.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      a5f038e2
    • Peter Foley's avatar
      net: Fix uninitialized data usage · e29919c9
      Peter Foley authored
      
      e.g.
      1109 15:16:20.151506 Uninitialized bytes in ioctl_common_pre at offset 0 inside [0x7ffc516af9b8, 4)
       1109 15:16:20.151659 ==588974==WARNING: MemorySanitizer: use-of-uninitialized-value
       1109 15:16:20.312923     #0 0x5639b88acb21 in tap_probe_vnet_hdr_len third_party/qemu/net/tap-linux.c:183:9
       1109 15:16:20.312952     #1 0x5639b88afd66 in net_tap_fd_init third_party/qemu/net/tap.c:409:9
       1109 15:16:20.312954     #2 0x5639b88b2d1b in net_init_tap_one third_party/qemu/net/tap.c:681:19
       1109 15:16:20.312956     #3 0x5639b88b16a8 in net_init_tap third_party/qemu/net/tap.c:912:13
       1109 15:16:20.312957     #4 0x5639b8890175 in net_client_init1 third_party/qemu/net/net.c:1110:9
       1109 15:16:20.312958     #5 0x5639b888f912 in net_client_init third_party/qemu/net/net.c:1208:15
       1109 15:16:20.312960     #6 0x5639b8894aa5 in net_param_nic third_party/qemu/net/net.c:1588:11
       1109 15:16:20.312961     #7 0x5639b900cd18 in qemu_opts_foreach third_party/qemu/util/qemu-option.c:1135:14
       1109 15:16:20.312962     #8 0x5639b889393c in net_init_clients third_party/qemu/net/net.c:1612:9
       1109 15:16:20.312964     #9 0x5639b717aaf3 in qemu_create_late_backends third_party/qemu/softmmu/vl.c:1962:5
       1109 15:16:20.312965     #10 0x5639b717aaf3 in qemu_init third_party/qemu/softmmu/vl.c:3694:5
       1109 15:16:20.312967     #11 0x5639b71083b8 in main third_party/qemu/softmmu/main.c:49:5
       1109 15:16:20.312968     #12 0x7f464de1d8d2 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x628d2)
       1109 15:16:20.312969     #13 0x5639b6bbd389 in _start /usr/grte/v5/debug-src/src/csu/../sysdeps/x86_64/start.S:120
       1109 15:16:20.312970
       1109 15:16:20.312975   Uninitialized value was stored to memory at
       1109 15:16:20.313393     #0 0x5639b88acbee in tap_probe_vnet_hdr_len third_party/qemu/net/tap-linux.c
       1109 15:16:20.313396     #1 0x5639b88afd66 in net_tap_fd_init third_party/qemu/net/tap.c:409:9
       1109 15:16:20.313398     #2 0x5639b88b2d1b in net_init_tap_one third_party/qemu/net/tap.c:681:19
       1109 15:16:20.313399     #3 0x5639b88b16a8 in net_init_tap third_party/qemu/net/tap.c:912:13
       1109 15:16:20.313400     #4 0x5639b8890175 in net_client_init1 third_party/qemu/net/net.c:1110:9
       1109 15:16:20.313401     #5 0x5639b888f912 in net_client_init third_party/qemu/net/net.c:1208:15
       1109 15:16:20.313403     #6 0x5639b8894aa5 in net_param_nic third_party/qemu/net/net.c:1588:11
       1109 15:16:20.313404     #7 0x5639b900cd18 in qemu_opts_foreach third_party/qemu/util/qemu-option.c:1135:14
       1109 15:16:20.313405     #8 0x5639b889393c in net_init_clients third_party/qemu/net/net.c:1612:9
       1109 15:16:20.313407     #9 0x5639b717aaf3 in qemu_create_late_backends third_party/qemu/softmmu/vl.c:1962:5
       1109 15:16:20.313408     #10 0x5639b717aaf3 in qemu_init third_party/qemu/softmmu/vl.c:3694:5
       1109 15:16:20.313409     #11 0x5639b71083b8 in main third_party/qemu/softmmu/main.c:49:5
       1109 15:16:20.313410     #12 0x7f464de1d8d2 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x628d2)
       1109 15:16:20.313412     #13 0x5639b6bbd389 in _start /usr/grte/v5/debug-src/src/csu/../sysdeps/x86_64/start.S:120
       1109 15:16:20.313413
       1109 15:16:20.313417   Uninitialized value was stored to memory at
       1109 15:16:20.313791     #0 0x5639b88affbd in net_tap_fd_init third_party/qemu/net/tap.c:400:26
       1109 15:16:20.313826     #1 0x5639b88b2d1b in net_init_tap_one third_party/qemu/net/tap.c:681:19
       1109 15:16:20.313829     #2 0x5639b88b16a8 in net_init_tap third_party/qemu/net/tap.c:912:13
       1109 15:16:20.313831     #3 0x5639b8890175 in net_client_init1 third_party/qemu/net/net.c:1110:9
       1109 15:16:20.313836     #4 0x5639b888f912 in net_client_init third_party/qemu/net/net.c:1208:15
       1109 15:16:20.313838     #5 0x5639b8894aa5 in net_param_nic third_party/qemu/net/net.c:1588:11
       1109 15:16:20.313839     #6 0x5639b900cd18 in qemu_opts_foreach third_party/qemu/util/qemu-option.c:1135:14
       1109 15:16:20.313841     #7 0x5639b889393c in net_init_clients third_party/qemu/net/net.c:1612:9
       1109 15:16:20.313843     #8 0x5639b717aaf3 in qemu_create_late_backends third_party/qemu/softmmu/vl.c:1962:5
       1109 15:16:20.313844     #9 0x5639b717aaf3 in qemu_init third_party/qemu/softmmu/vl.c:3694:5
       1109 15:16:20.313845     #10 0x5639b71083b8 in main third_party/qemu/softmmu/main.c:49:5
       1109 15:16:20.313846     #11 0x7f464de1d8d2 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x628d2)
       1109 15:16:20.313847     #12 0x5639b6bbd389 in _start /usr/grte/v5/debug-src/src/csu/../sysdeps/x86_64/start.S:120
       1109 15:16:20.313849
       1109 15:16:20.313851   Uninitialized value was created by an allocation of 'ifr' in the stack frame of function 'tap_probe_vnet_hdr'
       1109 15:16:20.313855     #0 0x5639b88ac680 in tap_probe_vnet_hdr third_party/qemu/net/tap-linux.c:151
       1109 15:16:20.313856
       1109 15:16:20.313878 SUMMARY: MemorySanitizer: use-of-uninitialized-value third_party/qemu/net/tap-linux.c:183:9 in tap_probe_vnet_hdr_len
      
      Fixes: dc69004c ("net: move tap_probe_vnet_hdr() to tap-linux.c")
      Reviewed-by: default avatarHao Wu <wuhaotsh@google.com>
      Reviewed-by: default avatarPatrick Venture <venture@google.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarPeter Foley <pefoley@google.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      e29919c9
    • Peter Foley's avatar
      net/tap: Set return code on failure · 41bcea7b
      Peter Foley authored
      
      Match the other error handling in this function.
      
      Fixes: e7b347d0 ("net: detect errors from probing vnet hdr flag for TAP devices")
      
      Reviewed-by: default avatarPatrick Venture <venture@google.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarPeter Foley <pefoley@google.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      41bcea7b
  14. Jan 28, 2022
    • Peter Maydell's avatar
      rtc: Move RTC function prototypes to their own header · 2f93d8b0
      Peter Maydell authored
      
      softmmu/rtc.c defines two public functions: qemu_get_timedate() and
      qemu_timedate_diff().  Currently we keep the prototypes for these in
      qemu-common.h, but most files don't need them.  Move them to their
      own header, a new include/sysemu/rtc.h.
      
      Since the C files using these two functions did not need to include
      qemu-common.h for any other reason, we can remove those include lines
      when we add the include of the new rtc.h.
      
      The license for the .h file follows that of the softmmu/rtc.c
      where both the functions are defined.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      2f93d8b0
  15. Nov 28, 2021
  16. Nov 19, 2021
Loading