Re: [Libguestfs] [libnbd PATCH v3 03/22] protocol: Add definitions for extended headers

2023-05-30 Thread Wouter Verhelst
On Tue, May 30, 2023 at 01:50:59PM +0200, Laszlo Ersek wrote: > On 5/25/23 15:00, Eric Blake wrote: > > Add the magic numbers and new structs necessary to implement the NBD > > protocol extension of extended headers providing 64-bit lengths. This > > corresponds to upstream nbd commits 36abf47d

Re: [Libguestfs] [PATCH v3 2/6] spec: Change maximum block size to maximum payload size

2023-04-18 Thread Wouter Verhelst
Yes, this will work. Thanks. (I think I already gave Reviewed-By for this one, but you can add it if I didn't ;-) Eric Blake schreef op 18 april 2023 17:24:48 CEST: >On Tue, Apr 18, 2023 at 11:26:40AM +0200, Wouter Verhelst wrote: >> On Thu, Apr 13, 2023 at 05:02:37PM -0500, Eric Bl

Re: [Libguestfs] [PATCH v3 6/6] RFC: spec: Introduce NBD_REPLY_TYPE_OFFSET_HOLE_EXT

2023-04-18 Thread Wouter Verhelst
Apologies; I somehow misread Eric's mail into thinking that the implementation wasn't ready yet. Not sure what happened there. If there is an implementation (and clearly there is a need) then I have no objection to merging this on master. Reviewed-By: Wouter Verhelst "Richard W.M.

Re: [Libguestfs] [PATCH v3 6/6] RFC: spec: Introduce NBD_REPLY_TYPE_OFFSET_HOLE_EXT

2023-04-18 Thread Wouter Verhelst
4-bit transactions, we can then see if the spec matches the need and merge it to master. Otherwise this feels too much like a solution in search of a problem to me. With that said, for the things I didn't reply to, you can add: Reviewed-By: Wouter Verhelst -- w@uter.{be,co.za} wouter@{gr

Re: [Libguestfs] [PATCH v3 5/6] spec: Introduce NBD_FLAG_BLOCK_STATUS_PAYLOAD

2023-04-18 Thread Wouter Verhelst
context ids the client is interested in (as > +implied by the payload length), laid out as: > + > +64 bits, effect length > +n * 32 bits, list of metacontext ids to use This doesn't follow our usual format: C: 64 bits, effect length C: n * 32 bits, list of metacontext i

Re: [Libguestfs] [PATCH v3 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS

2023-04-18 Thread Wouter Verhelst
On Thu, Apr 13, 2023 at 05:02:38PM -0500, Eric Blake wrote: > Add a new negotiation feature where the client and server agree to use > larger packet headers on every packet sent during transmission phase. > This has two purposes: first, it makes it possible to perform > operations like trim, write

Re: [Libguestfs] [PATCH v3 2/6] spec: Change maximum block size to maximum payload size

2023-04-18 Thread Wouter Verhelst
E` or `NBD_OPT_GO`, > -as well as by three block size constraints defined here (minimum, > -preferred, and maximum). > +as well as by three block size constraints defined here (minimum > +block, preferred block, and maximum payload). I think this may be reworded as: "as well as by th

Re: [Libguestfs] [PATCH] docs: Prefer 'cookie' over 'handle'

2023-03-05 Thread Wouter Verhelst
On Sat, Mar 04, 2023 at 10:03:46PM +0200, Nir Soffer wrote: > On Sat, Mar 4, 2023 at 12:15 AM Eric Blake wrote: > > Makes no difference to implementations (other than older code > > still using 'handle' may be slightly harder to tie back to the spec). > > To avoid confusion with older code that

Re: [Libguestfs] [PATCH v2 5/6] spec: Introduce NBD_FLAG_BLOCK_STATUS_PAYLOAD

2023-03-05 Thread Wouter Verhelst
On Fri, Mar 03, 2023 at 04:40:38PM -0600, Eric Blake wrote: > On Wed, Feb 22, 2023 at 12:05:44PM +0200, Wouter Verhelst wrote: > > On Mon, Nov 14, 2022 at 04:46:54PM -0600, Eric Blake wrote: > > > Simple reply message > > > > > > @@ -1232,6 +1235,19 @

Re: [Libguestfs] [PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS

2023-03-05 Thread Wouter Verhelst
On Fri, Mar 03, 2023 at 04:36:41PM -0600, Eric Blake wrote: > On Wed, Feb 22, 2023 at 11:49:18AM +0200, Wouter Verhelst wrote: > > On Mon, Nov 14, 2022 at 04:46:52PM -0600, Eric Blake wrote: [...] > > > + Note that even when extended headers are in use, the client MUST be

Re: [Libguestfs] [PATCH v2 2/6] spec: Tweak description of maximum block size

2023-03-05 Thread Wouter Verhelst
On Fri, Mar 03, 2023 at 04:26:53PM -0600, Eric Blake wrote: > On Tue, Feb 21, 2023 at 05:21:37PM +0200, Wouter Verhelst wrote: > > Hi Eric, > > > > Busy days, busy times. Sorry about the insane delays here. > > No problem; I've been tackling other things in the meanti

Re: [Libguestfs] [PATCH v2 1/6] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2023-03-05 Thread Wouter Verhelst
On Fri, Mar 03, 2023 at 04:17:40PM -0600, Eric Blake wrote: > On Fri, Dec 16, 2022 at 10:32:01PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > s-o-b line missed. > > I'm not sure if the NBD project has a strict policy on including one, > but I don't mind adding it. I've never required it,

Re: [Libguestfs] [PATCH v2 5/6] spec: Introduce NBD_FLAG_BLOCK_STATUS_PAYLOAD

2023-02-22 Thread Wouter Verhelst
On Mon, Nov 14, 2022 at 04:46:54PM -0600, Eric Blake wrote: > Simple reply message > > @@ -1232,6 +1235,19 @@ The field has the following format: >will be faster than a regular write). Clients MUST NOT set the >`NBD_CMD_FLAG_FAST_ZERO` request flag unless this transmission flag >

Re: [Libguestfs] [PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS

2023-02-22 Thread Wouter Verhelst
On Mon, Nov 14, 2022 at 04:46:52PM -0600, Eric Blake wrote: [...] > @@ -1370,9 +1475,10 @@ of the newstyle negotiation. > Return a list of `NBD_REP_META_CONTEXT` replies, one per context, > followed by an `NBD_REP_ACK` or an error. > > -This option SHOULD NOT be requested unless

Re: [Libguestfs] [PATCH v2 2/6] spec: Tweak description of maximum block size

2023-02-21 Thread Wouter Verhelst
Hi Eric, Busy days, busy times. Sorry about the insane delays here. On Mon, Nov 14, 2022 at 04:46:51PM -0600, Eric Blake wrote: > Commit 9f30fedb improved the spec to allow non-payload requests that > exceed any advertised maximum block size. Take this one step further > by permitting the

Re: [Libguestfs] nbdkit error: "write reply: NBD_CMD_WRITE: Broken pipe"

2022-06-24 Thread Wouter Verhelst
Same story. On Fri, Jun 17, 2022 at 01:09:25PM +0200, Wouter Verhelst wrote: > Hi, and sorry for the delay (I was overseas for a month in May to visit family > etc) > > On Tue, May 03, 2022 at 09:07:17AM +0100, Richard W.M. Jones wrote: > > On Mon, May 02, 2022 at 03:36:33PM +0

Re: [Libguestfs] Kernel driver I/O block size hinting

2022-06-24 Thread Wouter Verhelst
Sorry for the late reply. I just noticed that my mail config was borked; I was happily sending out emails, but none of them reached anyone :-/ Fixed now. On Fri, Jun 17, 2022 at 12:59:04PM +0200, Wouter Verhelst wrote: > Hi, > > On Tue, Jun 14, 2022 at 03:38:19PM +0100, Richard W

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Wouter Verhelst
Hi Eric, On Thu, Apr 07, 2022 at 04:37:19PM -0500, Eric Blake wrote: > The spec was silent on how many extents a server could reply with. > However, both qemu and nbdkit (the two server implementations known to > have implemented the NBD_CMD_BLOCK_STATUS extension) implement a hard > cap, and

Re: [Libguestfs] [PATCH] spec: Add NBD_OPT_EXTENDED_HEADERS

2022-03-24 Thread Wouter Verhelst
Hi Eric, Thanks for the ping; it had slipped my mind. On Fri, Dec 03, 2021 at 05:14:34PM -0600, Eric Blake wrote: > Request message > > -The request message, sent by the client, looks as follows: > +The compact request message, sent by the client when extended > +transactions are not

Re: [Libguestfs] [PATCH] spec: Add NBD_OPT_EXTENDED_HEADERS

2021-12-07 Thread Wouter Verhelst
On Mon, Dec 06, 2021 at 05:00:47PM -0600, Eric Blake wrote: > On Mon, Dec 06, 2021 at 02:40:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > Simple reply message > > > > > > The simple reply message MUST be sent by the server in response to all > > > requests if structured replies

Re: [Libguestfs] [PATCH] spec: Relax NBD_OPT_LIST_META_CONTEXTS

2021-09-06 Thread Wouter Verhelst
Hi Eric, On Fri, Sep 03, 2021 at 07:39:38AM -0500, Eric Blake wrote: > Ping. > > On Mon, Aug 16, 2021 at 01:40:59PM -0500, Eric Blake wrote: > > Using OPT_SET_META_CONTEXTS is stateful (it is documented to wipe out > > any previously-requested contexts, and we just tightened the spec to > >

Re: [Libguestfs] [PATCH] client: Don't confuse Unix socket with TLS hostname

2021-09-03 Thread Wouter Verhelst
Ack, thanks -- please commit. On Thu, Sep 02, 2021 at 05:07:29PM -0500, Eric Blake wrote: > When using -u but not -H, we were ending up calling > gnutls_session_set_verify_cert() with the Unix socket's path name, > which is bound to fail (hostnames don't start with /). Saner is to > only default

Re: [Libguestfs] [PATCH] docs: Link to protocol security considerations in uri docs

2021-08-19 Thread Wouter Verhelst
Hi Eric, On Wed, Aug 18, 2021 at 11:02:48AM -0500, Eric Blake wrote: > Dan Berrangé and I thought about some more potential future problems: > right now, even with FORCEDTLS mode (in both client and server), we > have NO way to validate that the initial NBD_FLAG_[C_] bits advertised > between

Re: [Libguestfs] [PATCH] spec: Clarify STARTTLS vs. SET_META_CONTEXT interaction

2021-08-16 Thread Wouter Verhelst
On Mon, Aug 16, 2021 at 01:02:55PM -0500, Eric Blake wrote: > On Mon, Aug 16, 2021 at 05:31:10PM +0200, Wouter Verhelst wrote: > > > > +++ b/doc/proto.md > > > @@ -1165,6 +1165,14 @@ of the newstyle negotiation. > > > permitted by this document (

Re: [Libguestfs] [PATCH] docs: Link to protocol security considerations in uri docs

2021-08-16 Thread Wouter Verhelst
On Thu, Aug 12, 2021 at 09:39:24AM -0500, Eric Blake wrote: > On Tue, Aug 10, 2021 at 01:08:59PM -0500, Eric Blake wrote: > > Especially useful in light of the recent publishing of > > https://nostarttls.secvuln.info/, which documents a variety of > > implementations vulnerable to downgrade

Re: [Libguestfs] [PATCH] spec: Clarify STARTTLS vs. SET_META_CONTEXT interaction

2021-08-16 Thread Wouter Verhelst
On Thu, Aug 12, 2021 at 10:20:40AM -0500, Eric Blake wrote: > Consider a SELECTIVETLS server and a MitM attacker, under the > following NBD_OPT_ handshake scenario: > > client: mitm:server: > > _STARTTLS > > _SET_META_CONTEXT("A") >

Re: [Libguestfs] Cross-project NBD extension proposal: NBD_INFO_INIT_STATE

2020-02-11 Thread Wouter Verhelst
Hi, On Mon, Feb 10, 2020 at 10:52:55PM +, Richard W.M. Jones wrote: > But anyway ... could a flag indicating that the whole image is sparse > be useful, either as well as NBD_INIT_SPARSE or instead of it? You > could use it to avoid an initial disk trim, which is something that > mke2fs

Re: [Libguestfs] [PATCH 1/1] protocol: Add NBD_CMD_FLAG_FAST_ZERO

2019-08-26 Thread Wouter Verhelst
On Fri, Aug 23, 2019 at 01:58:44PM -0500, Eric Blake wrote: > On 8/23/19 1:48 PM, Wouter Verhelst wrote: > > On Fri, Aug 23, 2019 at 09:34:26AM -0500, Eric Blake wrote: > >> +- bit 4, `NBD_CMD_FLAG_FAST_ZERO`; valid during > >> + `NBD_CMD_WRITE_ZEROES`. If set, bu

Re: [Libguestfs] [PATCH 1/1] protocol: Add NBD_CMD_FLAG_FAST_ZERO

2019-08-23 Thread Wouter Verhelst
On Fri, Aug 23, 2019 at 09:34:26AM -0500, Eric Blake wrote: > +- bit 4, `NBD_CMD_FLAG_FAST_ZERO`; valid during > + `NBD_CMD_WRITE_ZEROES`. If set, but the server cannot perform the > + write zeroes any faster than it would for an equivalent > + `NBD_CMD_WRITE`, One way of fulfilling the letter

Re: [Libguestfs] [nbdkit PATCH 3/7] RFC: protocol: Only send EOVERFLOW when valid

2019-05-11 Thread Wouter Verhelst
On Tue, Apr 23, 2019 at 07:38:41AM -0500, Eric Blake wrote: > [adding NBD list] > > On 4/23/19 2:36 AM, Richard W.M. Jones wrote: > > On Mon, Apr 22, 2019 at 07:50:22PM -0500, Eric Blake wrote: > >> Previously, we were squashing EOVERFLOW into EINVAL; continue to do so > >> at points in the

Re: [Libguestfs] [RFC PATCH] protocol: Add NBD_CMD_FLAG_FAST_ZERO

2019-04-11 Thread Wouter Verhelst
Proposal looks good to me in principle. On Fri, Mar 22, 2019 at 10:06:29PM +, Richard W.M. Jones wrote: > However the original proposal you put here seems reasonable. I have > only one comment about it: Should the new error (ENOTSUP) be submitted > as a separate patch to the spec? I don't

Re: [Libguestfs] [Nbd] Testing NBD server implementations for correctness

2016-09-26 Thread Wouter Verhelst
On Mon, Sep 26, 2016 at 11:43:42AM +0100, Alex Bligh wrote: > > > On 26 Sep 2016, at 10:21, Carl-Daniel Hailfinger > > wrote: > > > > Wow, that was quick! Thank you. > > > > I stumbled upon another problem: Apparently nbd-tester-client and nbdkit > >