Re: [PATCH 1/1] fs: strncmp() for user space buffers

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

 



On Sun, Feb 28, 2016 at 11:03:03PM +0000, Al Viro wrote:
> On Sun, Feb 28, 2016 at 02:50:22PM -0800, Amber Thrall wrote:
> > The simple_strncmp_to_buffer() function provides an easier method for
> > developers to compare a kernel space buffer against user space data. This
> > process is done in a few drivers and may be simplified to a single function.
> 
> *blink*
> 
> The name is rather confusing and I would say that semantics is unexpected
> as well.  I would like to see proposed users of that primitive...

BTW, such calling conventions are going to breed bugs - it's "0 if equal,
something positive if greater, something negative if less, except when
returned negative happens to be -EFAULT or -ENOMEM, in which cases it's
an error".  It would be _very_ easy to get wrong in callers.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux