[Qemu-devel] [PULL 0/7] Usb 20190502 patches

Gerd Hoffmann posted 7 patches 4 years, 12 months ago
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test asan failed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190502073543.4391-1-kraxel@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>
hw/usb/hcd-ohci.h     | 104 ++++++++++++++++++++
hw/usb/dev-mtp.c      |  10 +-
hw/usb/hcd-ohci-pci.c | 163 +++++++++++++++++++++++++++++++
hw/usb/hcd-ohci.c     | 219 ++++--------------------------------------
hw/usb/hcd-xhci.c     |   4 +-
hw/sh4/Kconfig        |   2 +-
hw/usb/Kconfig        |   6 +-
hw/usb/Makefile.objs  |   1 +
8 files changed, 301 insertions(+), 208 deletions(-)
create mode 100644 hw/usb/hcd-ohci.h
create mode 100644 hw/usb/hcd-ohci-pci.c
[Qemu-devel] [PULL 0/7] Usb 20190502 patches
Posted by Gerd Hoffmann 4 years, 12 months ago
The following changes since commit f75d15231e56cb0f2bafe19faf1229c459a60731:

  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-04-30 17:06:57 +0100)

are available in the Git repository at:

  git://git.kraxel.org/qemu tags/usb-20190502-pull-request

for you to fetch changes up to f3ea801df82991e852862bcaede23a4607859dd8:

  hw/usb: avoid format truncation warning when formatting port name (2019-05-02 09:34:13 +0200)

----------------------------------------------------------------
usb: bugfixes for mtp and xhci, split ohci-pci.

----------------------------------------------------------------

Bandan Das (1):
  usb-mtp: change default to success for usb_mtp_update_object

Daniel P. Berrangé (3):
  usb-mtp: fix string length for filename when writing metadata
  usb-mtp: fix alignment of access of ObjectInfo filename field
  hw/usb: avoid format truncation warning when formatting port name

Longpeng (1):
  usb/xhci: avoid trigger assertion if guest write wrong epid

Thomas Huth (2):
  hw/usb/hcd-ohci: Do not use PCI functions with sysbus devices in
    ohci_die()
  hw/usb/hcd-ohci: Move PCI-related code into a separate file

 hw/usb/hcd-ohci.h     | 104 ++++++++++++++++++++
 hw/usb/dev-mtp.c      |  10 +-
 hw/usb/hcd-ohci-pci.c | 163 +++++++++++++++++++++++++++++++
 hw/usb/hcd-ohci.c     | 219 ++++--------------------------------------
 hw/usb/hcd-xhci.c     |   4 +-
 hw/sh4/Kconfig        |   2 +-
 hw/usb/Kconfig        |   6 +-
 hw/usb/Makefile.objs  |   1 +
 8 files changed, 301 insertions(+), 208 deletions(-)
 create mode 100644 hw/usb/hcd-ohci.h
 create mode 100644 hw/usb/hcd-ohci-pci.c

-- 
2.18.1


Re: [Qemu-devel] [PULL 0/7] Usb 20190502 patches
Posted by Peter Maydell 4 years, 12 months ago
On Thu, 2 May 2019 at 08:54, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> The following changes since commit f75d15231e56cb0f2bafe19faf1229c459a60731:
>
>   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-04-30 17:06:57 +0100)
>
> are available in the Git repository at:
>
>   git://git.kraxel.org/qemu tags/usb-20190502-pull-request
>
> for you to fetch changes up to f3ea801df82991e852862bcaede23a4607859dd8:
>
>   hw/usb: avoid format truncation warning when formatting port name (2019-05-02 09:34:13 +0200)
>
> ----------------------------------------------------------------
> usb: bugfixes for mtp and xhci, split ohci-pci.
>
> ----------------------------------------------------------------


Hi -- I'm afraid this failed to compile on one of my systems:

  CC      hw/usb/hcd-xhci.o
/home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c: In function
‘usb_xhci_realize’:
/home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3340:66:
error: ‘%d’ directive output may be truncated writing between 1 and 11
bytes into a region of size 5 [-Werror=format-truncation=]
             snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1);
                                                                  ^~
/home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3340:54: note:
directive argument in the range [-2147483647, 30]
             snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1);
                                                      ^~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from
/home/petmay01/linaro/qemu-for-merges/include/qemu/osdep.h:99,
                 from
/home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:21:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note:
‘__builtin___snprintf_chk’ output between 13 and 23 bytes into a
destination of size 16
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3354:66:
error: ‘%d’ directive output may be truncated writing between 1 and 11
bytes into a region of size 5 [-Werror=format-truncation=]
             snprintf(port->name, sizeof(port->name), "usb3 port #%d", i+1);
                                                                  ^~
/home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3354:54: note:
directive argument in the range [-2147483647, 30]
             snprintf(port->name, sizeof(port->name), "usb3 port #%d", i+1);
                                                      ^~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from
/home/petmay01/linaro/qemu-for-merges/include/qemu/osdep.h:99,
                 from
/home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:21:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note:
‘__builtin___snprintf_chk’ output between 13 and 23 bytes into a
destination of size 16
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

It looks like this compiler isn't able to decide that i is definitely not
negative, so it thinks the resulting string might not fit.

thanks
-- PMM

Re: [Qemu-devel] [PULL 0/7] Usb 20190502 patches
Posted by Gerd Hoffmann 4 years, 12 months ago
> Hi -- I'm afraid this failed to compile on one of my systems:
> 
>   CC      hw/usb/hcd-xhci.o
> /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c: In function
> ‘usb_xhci_realize’:
> /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3340:66:
> error: ‘%d’ directive output may be truncated writing between 1 and 11
> bytes into a region of size 5 [-Werror=format-truncation=]
>              snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1);

Which system/compiler is this?

cheers,
  Gerd


Re: [Qemu-devel] [PULL 0/7] Usb 20190502 patches
Posted by Peter Maydell 4 years, 12 months ago
On Thu, 2 May 2019 at 14:21, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> > Hi -- I'm afraid this failed to compile on one of my systems:
> >
> >   CC      hw/usb/hcd-xhci.o
> > /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c: In function
> > ‘usb_xhci_realize’:
> > /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3340:66:
> > error: ‘%d’ directive output may be truncated writing between 1 and 11
> > bytes into a region of size 5 [-Werror=format-truncation=]
> >              snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1);
>
> Which system/compiler is this?

x86-64 Linux, gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0,
non-debug build.

thanks
-- PMM