Re: [PATCH RFC 1/3] Drivers: hv: kvp: convert userspace/kernel communication to using char device

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

 



Radim Krčmář <rkrcmar@xxxxxxxxxx> writes:

> 2015-02-27 17:14+0100, Vitaly Kuznetsov:
>> Re-implement the communication using misc char device. Use ioctl to do
>> kernel/userspace version negotiation (doesn't make much sense at this moment
>> as we're breaking backwards compatibility but can be used in future).
>
> The main question is whether we want to abolish backward compatibility;
> kernel rules are usually against breakages and it's hard to prove that
> the bundled daemon is a sole user and gets updated at the same time.
> (Note: I'd gladly break anything.)
>
> The ioctl is used too creatively for my liking: as an out-of-band
> communication that is required after the main channel has been opened.
> It would be simpler to inject the version into first x bytes of the
> stream, making a read() after open() mandatory.

We need to perform a handshake - kernel part sends its version and
receives daemon's version. We can definitelly pack everything in the
data stream but why do we need to avoid ioctls? It seems to me the
handshake we're performing here belongs to a 'control' stream, not
'data' stream.

>
> (I've only done a high level overview so far.)

Thanks!

-- 
  Vitaly
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux