qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 00d96a: nbd: Fix 32-bit compilation on BLOCK_


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 00d96a: nbd: Fix 32-bit compilation on BLOCK_STATUS
Date: Tue, 03 Apr 2018 11:02:14 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 00d96a4612f81e82c181fe821d527e98abcbac07
      
https://github.com/qemu/qemu/commit/00d96a4612f81e82c181fe821d527e98abcbac07
  Author: Eric Blake <address@hidden>
  Date:   2018-04-02 (Mon, 02 Apr 2018)

  Changed paths:
    M block/nbd-client.c

  Log Message:
  -----------
  nbd: Fix 32-bit compilation on BLOCK_STATUS

iotests 123 and 209 fail on 32-bit platforms.  The culprit:
sizeof(extent) is wrong; we want sizeof(*extent).  But since
the struct is 8 bytes, it happened to work on 64-bit platforms
where the pointer is also 8 bytes (nasty).

Fixes: 78a33ab58
Reported-by: Max Reitz <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>


  Commit: 260e34dbb7646b23d6f93bb5f2b208acf60f1088
      
https://github.com/qemu/qemu/commit/260e34dbb7646b23d6f93bb5f2b208acf60f1088
  Author: Eric Blake <address@hidden>
  Date:   2018-04-02 (Mon, 02 Apr 2018)

  Changed paths:
    M nbd/client.c

  Log Message:
  -----------
  nbd/client: Correctly handle bad server REP_META_CONTEXT

It's never a good idea to blindly read for size bytes as
returned by the server without first validating that the size
is within bounds; a malicious or buggy server could cause us
to hang or get out of sync from reading further messages.

It may be smarter to try and teach the client to cope with
unexpected context ids by silently ignoring them instead of
hanging up on the server, but for now, if the server doesn't
reply with exactly the one context we expect, it's easier to
just give up - however, if we give up for any reason other
than an I/O failure, we might as well try to politely tell
the server we are quitting rather than continuing.

Fix some typos in the process.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>


  Commit: 2b53af2523f6a3387f71372f59d3717f1f7d5fd9
      
https://github.com/qemu/qemu/commit/2b53af2523f6a3387f71372f59d3717f1f7d5fd9
  Author: Eric Blake <address@hidden>
  Date:   2018-04-02 (Mon, 02 Apr 2018)

  Changed paths:
    M nbd/client.c
    M nbd/server.c
    M nbd/trace-events

  Log Message:
  -----------
  nbd: trace meta context negotiation

Having a more detailed log of the interaction between client and
server is invaluable in debugging how meta context negotiation
actually works.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>


  Commit: 13b65ec54dbf524cb62331281a98b432f78d4e3a
      
https://github.com/qemu/qemu/commit/13b65ec54dbf524cb62331281a98b432f78d4e3a
  Author: Peter Maydell <address@hidden>
  Date:   2018-04-03 (Tue, 03 Apr 2018)

  Changed paths:
    M block/nbd-client.c
    M nbd/client.c
    M nbd/server.c
    M nbd/trace-events

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-04-02' into 
staging

nbd patches for 2018-04-02

- Eric Blake: nbd: Fix 32-bit compilation on BLOCK_STATUS
- Eric Blake: nbd/client: Correctly handle bad server REP_META_CONTEXT
- Eric Blake: nbd: trace meta context negotiation

# gpg: Signature made Mon 02 Apr 2018 15:15:01 BST
# gpg:                using RSA key A7A16B4A2527436A
# gpg: Good signature from "Eric Blake <address@hidden>"
# gpg:                 aka "Eric Blake (Free Software Programmer) 
<address@hidden>"
# gpg:                 aka "[jpeg image of size 6874]"
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2018-04-02:
  nbd: trace meta context negotiation
  nbd/client: Correctly handle bad server REP_META_CONTEXT
  nbd: Fix 32-bit compilation on BLOCK_STATUS

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


Compare: https://github.com/qemu/qemu/compare/f184de755327...13b65ec54dbf

reply via email to

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