qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 892669: configure: Remove unused CONFIG_ZERO_


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 892669: configure: Remove unused CONFIG_ZERO_MALLOC settin...
Date: Thu, 16 Jun 2016 11:00:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 89266923df71e51f406184d3e8b55d2a3aaa4c4d
      
https://github.com/qemu/qemu/commit/89266923df71e51f406184d3e8b55d2a3aaa4c4d
  Author: Thomas Huth <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Remove unused CONFIG_ZERO_MALLOC setting

CONFIG_ZERO_MALLOC was only used in qemu-malloc.c and
this file has been removed with the following commit:

        41a748265f4879b52b0e87ff9c93bed975163886
        Remove qemu_malloc/qemu_free

So we don't need this configuration setting anymore.
This patch also removes the z_version variable, since
this is now also not needed anymore.

Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 02d0e095031b7fda77de8b558465a57659ea79cb
      
https://github.com/qemu/qemu/commit/02d0e095031b7fda77de8b558465a57659ea79cb
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M audio/ossaudio.c
    M block/qcow2-cache.c
    M bsd-user/elfload.c
    M bsd-user/main.c
    M bsd-user/mmap.c
    M bsd-user/syscall.c
    M contrib/ivshmem-server/ivshmem-server.c
    M exec.c
    M hw/block/xen_disk.c
    M hw/char/xen_console.c
    M hw/display/xenfb.c
    M hw/i386/kvm/pci-assign.c
    M hw/misc/ivshmem.c
    M hw/misc/pc-testdev.c
    M hw/net/xen_nic.c
    M hw/usb/xen-usb.c
    M hw/vfio/common.c
    M hw/vfio/pci.c
    M hw/virtio/virtio-balloon.c
    M hw/xen/xen_backend.c
    M hw/xen/xen_pt_msi.c
    M include/qemu/osdep.h
    M include/sysemu/os-posix.h
    M kvm-all.c
    M linux-user/elfload.c
    M linux-user/flatload.c
    M linux-user/main.c
    M linux-user/mmap.c
    M linux-user/strace.c
    M linux-user/syscall.c
    M migration/postcopy-ram.c
    M net/netmap.c
    M os-posix.c
    M qemu-char.c
    M scripts/clean-includes
    M target-arm/kvm.c
    M target-arm/kvm32.c
    M target-arm/kvm64.c
    M target-i386/kvm.c
    M target-mips/kvm.c
    M target-ppc/kvm.c
    M target-s390x/kvm.c
    M tests/i440fx-test.c
    M tests/ivshmem-test.c
    M tests/postcopy-test.c
    M tests/vhost-user-bridge.c
    M tests/vhost-user-test.c
    M translate-all.c
    M util/memfd.c
    M util/mmap-alloc.c
    M util/osdep.c
    M util/oslib-posix.c
    M xen-hvm.c
    M xen-mapcache.c

  Log Message:
  -----------
  os-posix: include sys/mman.h

qemu/osdep.h checks whether MAP_ANONYMOUS is defined, but this check
is bogus without a previous inclusion of sys/mman.h.  Include it in
sysemu/os-posix.h and remove it from everywhere else.

Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e9abfcb57fd222d58a0c3c71917f9e40d09e9d35
      
https://github.com/qemu/qemu/commit/e9abfcb57fd222d58a0c3c71917f9e40d09e9d35
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M hw/net/net_tx_pkt.c
    M hw/net/net_tx_pkt.h
    M include/qemu/qdist.h
    M include/qemu/qht.h
    M tests/e1000e-test.c
    M tests/postcopy-test.c
    M tests/qht-bench.c
    M tests/test-qdist.c
    M tests/test-qht-par.c
    M tests/test-qht.c
    M util/qdist.c
    M util/qht.c

  Log Message:
  -----------
  clean-includes: run it once more

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e4650c81b3d15ba67236815defbb475c4bdf8690
      
https://github.com/qemu/qemu/commit/e4650c81b3d15ba67236815defbb475c4bdf8690
  Author: Thomas Huth <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Enable -Werror for MinGW builds, too

MinGW seems to compile currently without warnings, so it should
be safe to enable -Werror now for this environment, too.

Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Tested-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ac99c624c6015c264ff9997d6965bccfae0f818f
      
https://github.com/qemu/qemu/commit/ac99c624c6015c264ff9997d6965bccfae0f818f
  Author: Sergey Fedorov <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M Makefile

  Log Message:
  -----------
  Makefile: Fix tag file generation targets

"ctags" produces a file named "tags", not "ctags". It doesn't look
reasonable to use phony target name as a file name to remove. Just use
exact file names to remove in "ctags" and "TAGS" target receipts.

Signed-off-by: Sergey Fedorov <address@hidden>
Signed-off-by: Sergey Fedorov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fc6e1de9d885377e1e68e50e25ed5425540b9b81
      
https://github.com/qemu/qemu/commit/fc6e1de9d885377e1e68e50e25ed5425540b9b81
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M configure

  Log Message:
  -----------
  Make avx2 configure test work with -O2

When configured with --extra-cflags=-O2 gcc optimised out the test
and the readelf failed the check leaving avx2 disabled.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4fb8320a2efb2216c7ddcc929ad0362f4e285681
      
https://github.com/qemu/qemu/commit/4fb8320a2efb2216c7ddcc929ad0362f4e285681
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M configure
    M util/cutils.c

  Log Message:
  -----------
  avx2 configure: Use primitives in test

Use the avx2 primitives during the test, thus making sure that the
compiler and assembler could actually use avx2.

This also detects the failure case on gcc 4.8.x with -save-temps
and avoids the need for the gcc version check in cutils.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0fb233125471b0c001b04df9e1b38c752ba002ee
      
https://github.com/qemu/qemu/commit/0fb233125471b0c001b04df9e1b38c752ba002ee
  Author: Thomas Huth <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Remove unused CONFIG_SIGEV_THREAD_ID switch

The CONFIG_SIGEV_THREAD_ID switch is unused since the related code
has been removed by commit 6d327171551a12b937c5718073b9848d0274c74d
("aio / timers: Remove alarm timers"), so it can safely be removed
nowadays.

Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 773dce3c7286a66c37f7b07994177faf7046bfa8
      
https://github.com/qemu/qemu/commit/773dce3c7286a66c37f7b07994177faf7046bfa8
  Author: Peter Maydell <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/client.c
    M nbd/server.c
    M qemu-nbd.c

  Log Message:
  -----------
  nbd: Don't use *_to_cpup() functions

The *_to_cpup() functions are not very useful, as they simply do
a pointer dereference and then a *_to_cpu(). Instead use either:
 * ld*_*_p(), if the data is at an address that might not be
   correctly aligned for the load
 * a local dereference and *_to_cpu(), if the pointer is
   the correct type and known to be correctly aligned

Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f6be6720847f370000312808e6fed5d4e9730934
      
https://github.com/qemu/qemu/commit/f6be6720847f370000312808e6fed5d4e9730934
  Author: Peter Maydell <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/client.c

  Log Message:
  -----------
  nbd: Don't use cpu_to_*w() functions

The cpu_to_*w() functions just compose a pointer dereference
with a byteswap. Instead use st*_p(), which handles potential
pointer misalignment and avoids the need to cast the pointer.

Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 56af2dda98c5d71feb7ff7fcac7269a1071aec62
      
https://github.com/qemu/qemu/commit/56af2dda98c5d71feb7ff7fcac7269a1071aec62
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M include/block/nbd.h

  Log Message:
  -----------
  nbd: simplify the nbd_request and nbd_reply structs

These structs are never used to represent the bytes that go over the
network.  The big-endian network data is built into a uint8_t array
in nbd_{receive,send}_{request,reply}.  Remove the unused magic field,
reorder the struct to avoid holes, and remove the packed attribute.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 494e95e910c0073705dc5dbcdb17c9b8709d59ec
      
https://github.com/qemu/qemu/commit/494e95e910c0073705dc5dbcdb17c9b8709d59ec
  Author: Chao Peng <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data

KVM_GET_SUPPORTED_CPUID ioctl is called frequently when initializing
CPU. Depends on CPU features and CPU count, the number of calls can be
extremely high which slows down QEMU booting significantly. In our
testing, we saw 5922 calls with switches:

    -cpu SandyBridge -smp 6,sockets=6,cores=1,threads=1

This ioctl takes more than 100ms, which is almost half of the total
QEMU startup time.

While for most cases the data returned from two different invocations
are not changed, that means, we can cache the data to avoid trapping
into kernel for the second time. To make sure the cache safe one
assumption is desirable: the ioctl is stateless. This is not true for
CPUID leaves in general (such as CPUID leaf 0xD, whose value depends
on guest XCR0 and IA32_XSS) but it is true of KVM_GET_SUPPORTED_CPUID,
which runs before there is a value for XCR0 and IA32_XSS.

Signed-off-by: Chao Peng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 142c21455bb2416b37f71b22cb251a4effc8619c
      
https://github.com/qemu/qemu/commit/142c21455bb2416b37f71b22cb251a4effc8619c
  Author: Thomas Huth <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: Use (unsigned long) typecasts when using "%lu" format string

Some source code analyzers like cppcheck spill out a warning if
the sign of the argument does not match the format string.

Ticket: https://bugs.launchpad.net/qemu/+bug/1589564
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f31e3266375652a31a3586315913e1ff8e609b52
      
https://github.com/qemu/qemu/commit/f31e3266375652a31a3586315913e1ff8e609b52
  Author: Greg Kurz <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M kvm-all.c

  Log Message:
  -----------
  KVM: use KVM_CAP_MAX_VCPU_ID

As stated in linux/Documentation/virtual/kvm/api.txt:

The maximum possible value for max_vcpu_id can be retrieved using the
KVM_CAP_MAX_VCPU_ID of the KVM_CHECK_EXTENSION ioctl() at run-time.

If the KVM_CAP_MAX_VCPU_ID does not exist, you should assume that
max_vcpu_id is the same as the value returned from KVM_CAP_MAX_VCPUS.

Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 37146e7eafafd121d80d68455b8f4bc9043a9f4f
      
https://github.com/qemu/qemu/commit/37146e7eafafd121d80d68455b8f4bc9043a9f4f
  Author: Richard W.M. Jones <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M qemu-options.hx
    M vl.c

  Log Message:
  -----------
  vl.c: Add '-L help' which lists data dirs.

QEMU compiles a list of data directories from various sources.  When
consuming a QEMU binary it's useful to be able to get this list of
data directories: a primary reason is so you can list what BIOSes or
keymaps ship with this version of QEMU.  However without reproducing
the method that QEMU uses internally, it's not possible to get the
list of data directories.

This commit adds a simple '-L help' option that just lists out the
data directories as qemu calculates them:

$ ./x86_64-softmmu/qemu-system-x86_64 -L help
/home/rjones/d/qemu/pc-bios
/usr/local/share/qemu

$ ./x86_64-softmmu/qemu-system-x86_64 -L /tmp -L help
/tmp
/home/rjones/d/qemu/pc-bios
/usr/local/share/qemu

Signed-off-by: Richard W.M. Jones <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a0c303693ead8236a55a59097d75bd521f8212e2
      
https://github.com/qemu/qemu/commit/a0c303693ead8236a55a59097d75bd521f8212e2
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd: Use BDRV_REQ_FUA for better FUA where supported

Rather than always flushing ourselves, let the block layer
forward the FUA on to the underlying device - where all
underlying layers also understand FUA, we are now more
efficient; and where any underlying layer doesn't understand
it, now the block layer takes care of the full flush fallback
on our behalf.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2cb347493c5a0c3634dc13942ba65fdcefbcd34b
      
https://github.com/qemu/qemu/commit/2cb347493c5a0c3634dc13942ba65fdcefbcd34b
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/client.c
    M nbd/server.c

  Log Message:
  -----------
  nbd: More debug typo fixes, use correct formats

Clean up some debug message oddities missed earlier; this includes
some typos, and recognizing that %d is not necessarily compatible
with uint32_t. Also add a couple messages that I found useful
while debugging things.

Signed-off-by: Eric Blake <address@hidden>

Message-Id: <address@hidden>
[Do not use PRIx16, clang complains. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 63d5ef869e5e57de4875cd64b6f197cbb5763adf
      
https://github.com/qemu/qemu/commit/63d5ef869e5e57de4875cd64b6f197cbb5763adf
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd: Quit server after any write error

We should never ignore failure from nbd_negotiate_send_rep(); if
we are unable to write to the client, then it is not worth trying
to continue the negotiation.  Fortunately, the problem is not
too severe - chances are that the errors being ignored here (mainly
inability to write the reply to the client) are indications of
a closed connection or something similar, which will also affect
the next attempt to interact with the client and eventually reach
a point where the errors are detected to end the loop.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 29b6c3b319acb85b2f025bffebb8ed9b3a83602a
      
https://github.com/qemu/qemu/commit/29b6c3b319acb85b2f025bffebb8ed9b3a83602a
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd: Improve server handling of bogus commands

We have a few bugs in how we handle invalid client commands:

- A client can send an NBD_CMD_DISC where from + len overflows,
convincing us to reply with an error and stay connected, even
though the protocol requires us to silently disconnect. Fix by
hoisting the special case sooner.

- A client can send an NBD_CMD_WRITE where from + len overflows,
where we reply to the client with EINVAL without consuming the
payload; this will normally cause us to fail if the next thing
read is not the right magic, but in rare cases, could cause us
to interpret the data payload as valid commands and do things
not requested by the client. Fix by adding a complete flag to
track whether we are in sync or must disconnect.

Furthermore, we have split the checks for bogus from/len across
two functions, when it is easier to do it all at once.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ab7c548e266a6324db0994cea58c35b3dc87bade
      
https://github.com/qemu/qemu/commit/ab7c548e266a6324db0994cea58c35b3dc87bade
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd: Reject unknown request flags

The NBD protocol says that clients should not send a command flag
that has not been negotiated (whether by the client requesting an
option during a handshake, or because we advertise support for the
flag in response to NBD_OPT_EXPORT_NAME), and that servers should
reject invalid flags with EINVAL.  We were silently ignoring the
flags instead.  The client can't rely on our behavior, since it is
their fault for passing the bad flag in the first place, but it's
better to be robust up front than to possibly behave differently
than the client was expecting with the attempted flag.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Alex Bligh <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 98494e3b926ad62c5644fd84a37f04b5e7abb7a6
      
https://github.com/qemu/qemu/commit/98494e3b926ad62c5644fd84a37f04b5e7abb7a6
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/client.c
    M nbd/server.c

  Log Message:
  -----------
  nbd: Group all Linux-specific ioctl code in one place

NBD ioctl()s are used to manage an NBD client session where
initial handshake is done in userspace, but then the transmission
phase is handed off to the kernel through a /dev/nbdX device.
As such, all ioctls sent to the kernel on the /dev/nbdX fd belong
in client.c; nbd_disconnect() was out-of-place in server.c.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f57e2416aaeb39c32946d282768ece7ff619b423
      
https://github.com/qemu/qemu/commit/f57e2416aaeb39c32946d282768ece7ff619b423
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/client.c

  Log Message:
  -----------
  nbd: Clean up ioctl handling of qemu-nbd -c

The kernel ioctl() interface into NBD is limited to 'unsigned long';
we MUST pass in input with that type (and not int or size_t, as
there may be platform ABIs where the wrong types promote incorrectly
through var-args).  Furthermore, on 32-bit platforms, the kernel
is limited to a maximum export size of 2T (our BLKSIZE of 512 times
a SIZE_BLOCKS constrained by 32 bit unsigned long).

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f3c32fce3688fe1f13ceb0777faa1fc19d66d1fc
      
https://github.com/qemu/qemu/commit/f3c32fce3688fe1f13ceb0777faa1fc19d66d1fc
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M nbd/client.c

  Log Message:
  -----------
  nbd: Detect servers that send unexpected error values

Add some debugging to flag servers that are not compliant to
the NBD protocol.  This would have flagged the server bug
fixed in commit c0301fcc.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Alex Bligh <address@hidden>

Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 943cec86d0864464ab29b42940c49d1ccbe8d268
      
https://github.com/qemu/qemu/commit/943cec86d0864464ab29b42940c49d1ccbe8d268
  Author: Eric Blake <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M include/block/nbd.h
    M nbd/client.c
    M nbd/server.c

  Log Message:
  -----------
  nbd: Avoid magic number for NBD max name size

Declare a constant and use that when determining if an export
name fits within the constraints we are willing to support.

Note that upstream NBD recently documented that clients MUST
support export names of 256 bytes (not including trailing NUL),
and SHOULD support names up to 4096 bytes.  4096 is a bit big
(we would lose benefits of stack-allocation of a name array),
and we already have other limits in place (for example, qcow2
snapshot names are clamped around 1024).  So for now, just
stick to the required minimum, as that's easier to audit than
a full-scale support for larger names.

Signed-off-by: Eric Blake <address@hidden>

Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d3cdc49138c30be1d3c2f83d18f85d9fdee95f1a
      
https://github.com/qemu/qemu/commit/d3cdc49138c30be1d3c2f83d18f85d9fdee95f1a
  Author: Prasad J Pandit <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  scsi: esp: check buffer length before reading scsi command

The 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte
FIFO buffer. It is used to handle command and data transfer.
Routine get_cmd() in non-DMA mode, uses 'ti_size' to read scsi
command into a buffer. Add check to validate command length against
buffer size to avoid any overrun.

Reported-by: Li Qiang <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d020aa504cec8f525b55ba2ef982c09dc847c72e
      
https://github.com/qemu/qemu/commit/d020aa504cec8f525b55ba2ef982c09dc847c72e
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  scsi: esp: respect FIFO invariant after message phase

The FIFO contains two bytes; hence the write ptr should be two bytes ahead
of the read pointer.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7f0b6e114ae4e142e2b3dfc9fac138f4a30edc4f
      
https://github.com/qemu/qemu/commit/7f0b6e114ae4e142e2b3dfc9fac138f4a30edc4f
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

Avoid duplicated code between esp_do_dma and handle_ti.  esp_do_dma
has the same code that handle_ti contains after the call to esp_do_dma;
but the code in handle_ti is never reached because it is in an "else if".
Remove the else and also the pointless return.

esp_do_dma also has a partially dead assignment of the to_device
variable.  Sink it to the point where it's actually used.

Finally, assert that the other caller of esp_do_dma (esp_transfer_data)
only transfers data and not a command.  This is true because get_cmd
cancels the old request synchronously before its caller handle_satn_stop
sets do_cmd to 1.

Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 926cde5f3e4d2504ed161ed0cb771ac7cad6fd11
      
https://github.com/qemu/qemu/commit/926cde5f3e4d2504ed161ed0cb771ac7cad6fd11
  Author: Prasad J Pandit <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  scsi: esp: make cmdbuf big enough for maximum CDB size

While doing DMA read into ESP command buffer 's->cmdbuf', it could
write past the 's->cmdbuf' area, if it was transferring more than 16
bytes.  Increase the command buffer size to 32, which is maximum when
's->do_cmd' is set, and add a check on 'len' to avoid OOB access.

Reported-by: Li Qiang <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0544edd88a6acea81aefe22fd0cd9a85d1eef093
      
https://github.com/qemu/qemu/commit/0544edd88a6acea81aefe22fd0cd9a85d1eef093
  Author: Andrew Jones <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: smp_parse: cleanups

No functional changes; only some code movement and removal of
dead code (impossible conditions). Also, max_cpus can be
initialized to 1, like smp_cpus, because it's either set by the
user or set to smp_cpus, when smp_cpus is set by the user, or
set to 1, when nothing is set.

Signed-off-by: Andrew Jones <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 585fcd4b11070b3220685fc54ecca1991cdeb161
      
https://github.com/qemu/qemu/commit/585fcd4b11070b3220685fc54ecca1991cdeb161
  Author: Peter Maydell <address@hidden>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M Makefile
    M audio/ossaudio.c
    M block/qcow2-cache.c
    M bsd-user/elfload.c
    M bsd-user/main.c
    M bsd-user/mmap.c
    M bsd-user/syscall.c
    M configure
    M contrib/ivshmem-server/ivshmem-server.c
    M exec.c
    M hw/block/xen_disk.c
    M hw/char/xen_console.c
    M hw/display/xenfb.c
    M hw/i386/kvm/pci-assign.c
    M hw/misc/ivshmem.c
    M hw/misc/pc-testdev.c
    M hw/net/net_tx_pkt.c
    M hw/net/net_tx_pkt.h
    M hw/net/xen_nic.c
    M hw/scsi/esp.c
    M hw/scsi/scsi-disk.c
    M hw/usb/xen-usb.c
    M hw/vfio/common.c
    M hw/vfio/pci.c
    M hw/virtio/virtio-balloon.c
    M hw/xen/xen_backend.c
    M hw/xen/xen_pt_msi.c
    M include/block/nbd.h
    M include/hw/scsi/esp.h
    M include/qemu/osdep.h
    M include/qemu/qdist.h
    M include/qemu/qht.h
    M include/sysemu/os-posix.h
    M kvm-all.c
    M linux-user/elfload.c
    M linux-user/flatload.c
    M linux-user/main.c
    M linux-user/mmap.c
    M linux-user/strace.c
    M linux-user/syscall.c
    M migration/postcopy-ram.c
    M nbd/client.c
    M nbd/server.c
    M net/netmap.c
    M os-posix.c
    M qemu-char.c
    M qemu-nbd.c
    M qemu-options.hx
    M scripts/clean-includes
    M target-arm/kvm.c
    M target-arm/kvm32.c
    M target-arm/kvm64.c
    M target-i386/kvm.c
    M target-mips/kvm.c
    M target-ppc/kvm.c
    M target-s390x/kvm.c
    M tests/e1000e-test.c
    M tests/i440fx-test.c
    M tests/ivshmem-test.c
    M tests/postcopy-test.c
    M tests/qht-bench.c
    M tests/test-qdist.c
    M tests/test-qht-par.c
    M tests/test-qht.c
    M tests/vhost-user-bridge.c
    M tests/vhost-user-test.c
    M translate-all.c
    M util/cutils.c
    M util/memfd.c
    M util/mmap-alloc.c
    M util/osdep.c
    M util/oslib-posix.c
    M util/qdist.c
    M util/qht.c
    M vl.c
    M xen-hvm.c
    M xen-mapcache.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* KVM startup speedup (Chao Peng)
* configure fixes and cleanups (David, Thomas)
* ctags fix (Sergey)
* NBD cleanups (Peter, Eric)
* "-L help" command line option (Richard)
* More esp.c bugfixes (me, Prasad)
* KVM_CAP_MAX_VCPU_ID support (Greg)

# gpg: Signature made Thu 16 Jun 2016 17:39:10 BST
# gpg:                using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream: (29 commits)
  vl: smp_parse: cleanups
  scsi: esp: make cmdbuf big enough for maximum CDB size
  scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd
  scsi: esp: respect FIFO invariant after message phase
  scsi: esp: check buffer length before reading scsi command
  nbd: Avoid magic number for NBD max name size
  nbd: Detect servers that send unexpected error values
  nbd: Clean up ioctl handling of qemu-nbd -c
  nbd: Group all Linux-specific ioctl code in one place
  nbd: Reject unknown request flags
  nbd: Improve server handling of bogus commands
  nbd: Quit server after any write error
  nbd: More debug typo fixes, use correct formats
  nbd: Use BDRV_REQ_FUA for better FUA where supported
  vl.c: Add '-L help' which lists data dirs.
  KVM: use KVM_CAP_MAX_VCPU_ID
  scsi-disk: Use (unsigned long) typecasts when using "%lu" format string
  target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data
  nbd: simplify the nbd_request and nbd_reply structs
  nbd: Don't use cpu_to_*w() functions
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/dc278c58fa02...585fcd4b1107

reply via email to

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