If I understand correctly we can add one single "dummy_read" implementation
> for all drivers that do not supply the read method. This will ensure that
> O_RDOK is always supported if file permissions allow it.
>

There aren't any file permissions.  The entire access is controlled by NULL
and non-NULL read/write methods.

That is the way that it has worked.  if you check, I think you will find
that all of the existing IOCTL drivers already have dummy read and
sometimes write methods.  Being consistent is important to the integrity of
the OS.  Whatever you all decide to do, make sure that is is consistent
across all drivers.

The semantics are:  NULL read -> write only, NULL write -> read only.  Both
NULL -> the driver is broken.

I don't understand how checking if the pointer is NULL would support
read-only, or write-only behavior.  I think we would be losing
functionality and this is important in other drivers where read and write
actually matter.

Reply via email to