qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 00d699: nbd: Avoid off-by-one in long export


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 00d699: nbd: Avoid off-by-one in long export name truncation
Date: Tue, 14 Jul 2020 06:45:29 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 00d69986da83a74f6f5731c80f8dd09fde95d19a
      
https://github.com/qemu/qemu/commit/00d69986da83a74f6f5731c80f8dd09fde95d19a
  Author: Eric Blake <eblake@redhat.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  nbd: Avoid off-by-one in long export name truncation

When snprintf returns the same value as the buffer size, the final
byte was truncated to ensure a NUL terminator.  Fortunately, such long
export names are unusual enough, with no real impact other than what
is displayed to the user.

Fixes: 5c86bdf12089
Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200622210355.414941-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 8cf58a49f883f089e7d4b6e19acc987085d024fd
      
https://github.com/qemu/qemu/commit/8cf58a49f883f089e7d4b6e19acc987085d024fd
  Author: Eric Blake <eblake@redhat.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M target/i386/hax-posix.c

  Log Message:
  -----------
  hax: Fix setting of FD_CLOEXEC

Blindly setting FD_CLOEXEC without a read-modify-write will
inadvertently clear any other intentionally-set bits, such as a
proposed new bit for designating a fd that must behave in 32-bit mode.
Use our wrapper function instead of an incorrect hand-rolled version.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200420175309.75894-2-eblake@redhat.com>
Reviewed-by: Colin Xu <colin.xu@intel.com>


  Commit: a1a7f56cdd1ddc99fcd1078c9285849aaaaaeca9
      
https://github.com/qemu/qemu/commit/a1a7f56cdd1ddc99fcd1078c9285849aaaaaeca9
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: QemuIoInteractive: use qemu_io_args_no_fmt

The only user (iotest 205) of QemuIoInteractive provides -f argument,
so it's a bit inefficient to use qemu_io_args, which contains -f too.
And we are going to add one more test, which wants to specify -f by
hand. Let's use qemu_io_args_no_fmt.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200701105331.121670-2-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>


  Commit: 1f4b774a6444575b86f27b17d3d01e4f41df6581
      
https://github.com/qemu/qemu/commit/1f4b774a6444575b86f27b17d3d01e4f41df6581
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests.py: QemuIoInteractive: print output on failure

Make it simpler to debug when qemu-io fails due to wrong arguments or
environment.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200701105331.121670-3-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>


  Commit: df0e032b6196934b2b12180a6a05aa8b7e6553fc
      
https://github.com/qemu/qemu/commit/df0e032b6196934b2b12180a6a05aa8b7e6553fc
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests.py: filter_testfiles(): filter SOCK_DIR too

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200701105331.121670-5-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>


  Commit: 1a53dfee92284d3016a579ef31d53367e84d9dd8
      
https://github.com/qemu/qemu/commit/1a53dfee92284d3016a579ef31d53367e84d9dd8
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M block/nbd.c
    M target/i386/hax-posix.c
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-07-13' into 
staging

NBD patches for 2020-07-13

- fix off-by-one truncation in corner-case name display
- use fcntl correctly
- iotest cleanups that enable testing an upcoming fix for NBD close

# gpg: Signature made Mon 13 Jul 2020 15:11:35 BST
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg:                 aka "Eric Blake (Free Software Programmer) 
<ebb9@byu.net>" [full]
# gpg:                 aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2020-07-13:
  iotests.py: filter_testfiles(): filter SOCK_DIR too
  iotests.py: QemuIoInteractive: print output on failure
  iotests: QemuIoInteractive: use qemu_io_args_no_fmt
  hax: Fix setting of FD_CLOEXEC
  nbd: Avoid off-by-one in long export name truncation

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


Compare: https://github.com/qemu/qemu/compare/20c1df5476e1...1a53dfee9228



reply via email to

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