<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/autofs, branch v5.11-rc3</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v5.11-rc3</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v5.11-rc3'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2020-12-10T18:42:59Z</updated>
<entry>
<title>file: Replace ksys_close with close_fd</title>
<updated>2020-12-10T18:42:59Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2020-11-20T23:14:39Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=1572bfdf21d4d50e51941498ffe0b56c2289f783'/>
<id>urn:sha1:1572bfdf21d4d50e51941498ffe0b56c2289f783</id>
<content type='text'>
Now that ksys_close is exactly identical to close_fd replace
the one caller of ksys_close with close_fd.

[1] https://lkml.kernel.org/r/20200818112020.GA17080@infradead.org
Suggested-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Link: https://lkml.kernel.org/r/20201120231441.29911-22-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>autofs: harden ioctl table</title>
<updated>2020-10-16T18:11:22Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2020-10-16T03:13:08Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=589f6b52682542c1b230c435e1de679755f3332a'/>
<id>urn:sha1:589f6b52682542c1b230c435e1de679755f3332a</id>
<content type='text'>
The table of ioctl functions should be marked const in order to put them
in read-only memory, and we should use array_index_nospec() to avoid
speculation disclosing the contents of kernel memory to userspace.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Ian Kent &lt;raven@themaw.net&gt;
Link: https://lkml.kernel.org/r/20200818122203.GO17456@casper.infradead.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>autofs: use __kernel_write() for the autofs pipe writing</title>
<updated>2020-09-30T00:18:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-09-30T00:18:34Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=90fb702791bf99b959006972e8ee7bb4609f441b'/>
<id>urn:sha1:90fb702791bf99b959006972e8ee7bb4609f441b</id>
<content type='text'>
autofs got broken in some configurations by commit 13c164b1a186
("autofs: switch to kernel_write") because there is now an extra LSM
permission check done by security_file_permission() in rw_verify_area().

autofs is one if the few places that really does want the much more
limited __kernel_write(), because the write is an internal kernel one
that shouldn't do any user permission checks (it also doesn't need the
file_start_write/file_end_write logic, since it's just a pipe).

There are a couple of other cases like that - accounting, core dumping,
and splice - but autofs stands out because it can be built as a module.

As a result, we need to export this internal __kernel_write() function
again.

We really don't want any other module to use this, but we don't have a
"EXPORT_SYMBOL_FOR_AUTOFS_ONLY()".  But we can mark it GPL-only to at
least approximate that "internal use only" for licensing.

While in this area, make autofs pass in NULL for the file position
pointer, since it's always a pipe, and we now use a NULL file pointer
for streaming file descriptors (see file_ppos() and commit 438ab720c675:
"vfs: pass ppos=NULL to .read()/.write() of FMODE_STREAM files")

This effectively reverts commits 9db977522449 ("fs: unexport
__kernel_write") and 13c164b1a186 ("autofs: switch to kernel_write").

Fixes: 13c164b1a186 ("autofs: switch to kernel_write")
Reported-by: Ondrej Mosnacek &lt;omosnace@redhat.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Acked-by: Ian Kent &lt;raven@themaw.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fs: autofs: delete repeated words in comments</title>
<updated>2020-08-15T02:56:56Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2020-08-15T00:30:46Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=c734124c5c824511f553f794a514a185dfc0e3e7'/>
<id>urn:sha1:c734124c5c824511f553f794a514a185dfc0e3e7</id>
<content type='text'>
Drop duplicated words {the, at} in comments.

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Ian Kent &lt;raven@themaw.net&gt;
Link: http://lkml.kernel.org/r/20200811021817.24982-1-rdunlap@infradead.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>autofs: switch to kernel_write</title>
<updated>2020-07-08T06:27:56Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-05-13T06:45:59Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=13c164b1a186dfe17d104d9638b86a06be1e40bf'/>
<id>urn:sha1:13c164b1a186dfe17d104d9638b86a06be1e40bf</id>
<content type='text'>
While pipes don't really need sb_writers projection, __kernel_write is an
interface better kept private, and the additional rw_verify_area does not
hurt here.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Ian Kent &lt;raven@themaw.net&gt;
</content>
</entry>
<entry>
<title>LOOKUP_MOUNTPOINT: fold path_mountpointat() into path_lookupat()</title>
<updated>2020-03-14T01:08:17Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2020-01-12T03:52:26Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=161aff1d93abf0e5b5e9dbca88928998c155f677'/>
<id>urn:sha1:161aff1d93abf0e5b5e9dbca88928998c155f677</id>
<content type='text'>
New LOOKUP flag, telling path_lookupat() to act as path_mountpointat().
IOW, traverse mounts at the final point and skip revalidation of the
location where it ends up.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2019-12-06T01:11:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-12-06T01:11:48Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=b0d4beaa5a4b7d31070c41c2e50740304a3f1138'/>
<id>urn:sha1:b0d4beaa5a4b7d31070c41c2e50740304a3f1138</id>
<content type='text'>
Pull autofs updates from Al Viro:
 "autofs misuses checks for -&gt;d_subdirs emptiness; the cursors are in
  the same lists, resulting in false negatives. It's not needed anyway,
  since autofs maintains counter in struct autofs_info, containing 0 for
  removed ones, 1 for live symlinks and 1 + number of children for live
  directories, which is precisely what we need for those checks.

  This series switches to use of that counter and untangles the crap
  around its uses (it needs not be atomic and there's a bunch of
  completely pointless "defensive" checks).

  This fell out of dcache_readdir work; the main point is to get rid of
  -&gt;d_subdirs abuses in there. I've more followup cleanups, but I hadn't
  run those by Ian yet, so they can go next cycle"

* 'next.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  autofs: don't bother with atomics for ino-&gt;count
  autofs_dir_rmdir(): check ino-&gt;count for deciding whether it's empty...
  autofs: get rid of pointless checks around -&gt;count handling
  autofs_clear_leaf_automount_flags(): use ino-&gt;count instead of -&gt;d_subdirs
</content>
</entry>
<entry>
<title>autofs: fix a leak in autofs_expire_indirect()</title>
<updated>2019-10-25T04:03:11Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-10-25T04:03:11Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=03ad0d703df75c43f78bd72e16124b5b94a95188'/>
<id>urn:sha1:03ad0d703df75c43f78bd72e16124b5b94a95188</id>
<content type='text'>
if the second call of should_expire() in there ends up
grabbing and returning a new reference to dentry, we need
to drop it before continuing.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>autofs: don't bother with atomics for ino-&gt;count</title>
<updated>2019-09-18T03:31:27Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-09-18T03:31:27Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=850d71acd52cd331474116fbd60cf8b3f3ded93e'/>
<id>urn:sha1:850d71acd52cd331474116fbd60cf8b3f3ded93e</id>
<content type='text'>
All writers are serialized on inode-&gt;i_rwsem.  So are the readers
outside of expire.c.  And the readers in expire.c are in the
code that really doesn't care about narrow races - it's looking
for expiry candidates and its callers have to cope with the
possibility of a good candidate becoming busy right under them.

No point bothering with atomic operations - just use int and
mark the non-serialized readers with READ_ONCE().

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>autofs_dir_rmdir(): check ino-&gt;count for deciding whether it's empty...</title>
<updated>2019-09-18T03:28:08Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-09-18T03:28:08Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=c3aed16680cd0c0e5abf1bfc0dc1338e6a41b29f'/>
<id>urn:sha1:c3aed16680cd0c0e5abf1bfc0dc1338e6a41b29f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
