Re: [PATCH v5] fs: clear file privilege bits when mmap writing

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

 



On Thu, Dec 10, 2015 at 11:47:18AM -0800, Kees Cook wrote:

> In open, sure, but what about under mm/memory.c where we're trying to
> twiddle it from vma->file->f_flags as in my patch? That seemed like it
> would want atomic safety.

Sigh...  Again, I'm not at all convinced that this is the right approach,
but generally you need ->f_lock.  And in situations where the bit can
go only off->on, check it lockless, skip the whole thing entirely if it's
already set and grab the spinlock otherwise.
--
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