Displaying 5 results from an estimated 5 matches for "nbdkit_extents_add".
Did you mean:
nbdkit_extent_add
2019 Mar 29
2
Re: [PATCH nbdkit v5 FINAL 01/19] server: Implement extents/can_extents calls for plugins and filters.
...with a
> + * previously added extent so we can't check for API usage errors.
Nice comment...
> + */
> + if (offset >= exts->end)
> + return 0;
Is returning 0 always right, or should we also check whether the user
tried to pass in offset > end as their very first nbdkit_extents_add
(where we know that because nr_extents is 0 that it is an API usage error).
> +
> + /* Shorten extents that overlap the end of the range. */
> + if (offset + length >= exts->end) {
> + overlap = offset + length - exts->end;
> + length -= overlap;
> + }
> +
&g...
2019 Mar 20
2
Re: [PATCH nbdkit 1/9] server: Implement extents/can_extents calls for plugins and filters.
...ages memory poorly, that's not really
the end of the world; we're more worried about a client triggering bad
behavior, not a plugin).
Hmm, what if we had the signature nbdkit_extents_new(offset, length) to
bound the extents we bother to track from the user - we still allow the
user to call nbdkit_extents_add() with information outside of the bounds
we care about, but merely return 0 on those cases without allocating any
memory? Then we are guaranteed that the guest cannot allocate more
memory than proportional to the size of the client's request (which is
currently capped at 32 bits by the protoco...
2019 Mar 20
0
Re: [PATCH nbdkit 1/9] server: Implement extents/can_extents calls for plugins and filters.
...not really
> the end of the world; we're more worried about a client triggering bad
> behavior, not a plugin).
>
> Hmm, what if we had the signature nbdkit_extents_new(offset, length) to
> bound the extents we bother to track from the user - we still allow the
> user to call nbdkit_extents_add() with information outside of the bounds
> we care about, but merely return 0 on those cases without allocating any
> memory? Then we are guaranteed that the guest cannot allocate more
> memory than proportional to the size of the client's request (which is
> currently capped at 32...
2019 Mar 19
15
[PATCH nbdkit 0/9] [mainly for discussion and early review] Implement extents.
I want to post this but mainly for discussion and early review. It's
not safe for these patches to all go upstream yet (because not all
filters have been checked/adjusted), but if any patches were to go
upstream then probably 1 & 2 only are safe.
File, VDDK, memory and data plugins all work, although I have only
done minimal testing on them.
The current tests, such as they are, all
2019 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here
so we have a reference in the mailing list in case we find bugs later
(as I'm sure we will - it's a complex patch series).
Great thanks to Eric Blake for tireless review on this one. It also
seems to have identified a few minor bugs in qemu along the way.
Rich.