Thread (1 message) 1 message, 1 author, 2015-01-29

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

From: Jason Gunthorpe <hidden>
Date: 2015-01-29 19:18:01
Also in: linux-rdma

On Thu, Jan 29, 2015 at 07:43:29PM +0100, Yann Droneaud wrote:
The write() syscall must return the size buffer passed to it, or
less, but in such case it would ask for trouble as userspace would
be allowed to write() the remaining bytes.  Returning a size bigger
than the one passed to write() is not acceptable and would break any
expectation.
By that logic the 0 return is still wrong, and it should be ucore->in_len

But I think we can return less without risking anything breaking, it
already violates the invariant associated with write() - it mutates
the buffer passed in!

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help