Re: Weird writev() behaviour on EFAULT - also successfully modifying the file

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

 



On Thu, Aug 11, 2016 at 4:03 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> Again, it's about as tame case as they come - no NULLs, no EFAULT, no
> buffers mmapped from the file we are writing to; just a normal write()
> replacing the data in the very beginning of file from a buffer that isn't
> page-aligned...

Side note: this whole "partial copy from user space" is a case that we
have definitely gotten wrong in the past.

That whole iov_iter_fault_in_readable() is an ugly hack, and basically
avoids the whole situation of a partial user copy by just faulting
things in early. Exactly because we have gotten things wrong in the
past.

And yes, it's not a proper fix - it's racy, but it means you'll never
see the partial user access in practice.

                Linus
--
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