<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs/sysv, branch v6.5.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.5.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.5.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2023-06-26T18:52:12Z</updated>
<entry>
<title>Merge tag 'for-6.5/splice-2023-06-23' of git://git.kernel.dk/linux</title>
<updated>2023-06-26T18:52:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-06-26T18:52:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3eccc0c886b1796f95a289c9d127c8ca1a254bd5'/>
<id>urn:sha1:3eccc0c886b1796f95a289c9d127c8ca1a254bd5</id>
<content type='text'>
Pull splice updates from Jens Axboe:
 "This kills off ITER_PIPE to avoid a race between truncate,
  iov_iter_revert() on the pipe and an as-yet incomplete DMA to a bio
  with unpinned/unref'ed pages from an O_DIRECT splice read. This causes
  memory corruption.

  Instead, we either use (a) filemap_splice_read(), which invokes the
  buffered file reading code and splices from the pagecache into the
  pipe; (b) copy_splice_read(), which bulk-allocates a buffer, reads
  into it and then pushes the filled pages into the pipe; or (c) handle
  it in filesystem-specific code.

  Summary:

   - Rename direct_splice_read() to copy_splice_read()

   - Simplify the calculations for the number of pages to be reclaimed
     in copy_splice_read()

   - Turn do_splice_to() into a helper, vfs_splice_read(), so that it
     can be used by overlayfs and coda to perform the checks on the
     lower fs

   - Make vfs_splice_read() jump to copy_splice_read() to handle
     direct-I/O and DAX

   - Provide shmem with its own splice_read to handle non-existent pages
     in the pagecache. We don't want a -&gt;read_folio() as we don't want
     to populate holes, but filemap_get_pages() requires it

   - Provide overlayfs with its own splice_read to call down to a lower
     layer as overlayfs doesn't provide -&gt;read_folio()

   - Provide coda with its own splice_read to call down to a lower layer
     as coda doesn't provide -&gt;read_folio()

   - Direct -&gt;splice_read to copy_splice_read() in tty, procfs, kernfs
     and random files as they just copy to the output buffer and don't
     splice pages

   - Provide wrappers for afs, ceph, ecryptfs, ext4, f2fs, nfs, ntfs3,
     ocfs2, orangefs, xfs and zonefs to do locking and/or revalidation

   - Make cifs use filemap_splice_read()

   - Replace pointers to generic_file_splice_read() with pointers to
     filemap_splice_read() as DIO and DAX are handled in the caller;
     filesystems can still provide their own alternate -&gt;splice_read()
     op

   - Remove generic_file_splice_read()

   - Remove ITER_PIPE and its paraphernalia as generic_file_splice_read
     was the only user"

* tag 'for-6.5/splice-2023-06-23' of git://git.kernel.dk/linux: (31 commits)
  splice: kdoc for filemap_splice_read() and copy_splice_read()
  iov_iter: Kill ITER_PIPE
  splice: Remove generic_file_splice_read()
  splice: Use filemap_splice_read() instead of generic_file_splice_read()
  cifs: Use filemap_splice_read()
  trace: Convert trace/seq to use copy_splice_read()
  zonefs: Provide a splice-read wrapper
  xfs: Provide a splice-read wrapper
  orangefs: Provide a splice-read wrapper
  ocfs2: Provide a splice-read wrapper
  ntfs3: Provide a splice-read wrapper
  nfs: Provide a splice-read wrapper
  f2fs: Provide a splice-read wrapper
  ext4: Provide a splice-read wrapper
  ecryptfs: Provide a splice-read wrapper
  ceph: Provide a splice-read wrapper
  afs: Provide a splice-read wrapper
  9p: Add splice_read wrapper
  net: Make sock_splice_read() use copy_splice_read() by default
  tty, proc, kernfs, random: Use copy_splice_read()
  ...
</content>
</entry>
<entry>
<title>highmem: Rename put_and_unmap_page() to unmap_and_put_page()</title>
<updated>2023-06-05T11:51:00Z</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fmdefrancesco@gmail.com</email>
</author>
<published>2023-06-02T10:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d0e135408e196921da2c85ee424235382c9ed614'/>
<id>urn:sha1:d0e135408e196921da2c85ee424235382c9ed614</id>
<content type='text'>
With commit 849ad04cf562a ("new helper: put_and_unmap_page()"), Al Viro
introduced the put_and_unmap_page() to use in those many places where we
have a common pattern consisting of calls to kunmap_local() +
put_page().

Obviously, first we unmap and then we put pages. Instead, the original
name of this helper seems to imply that we first put and then unmap.

Therefore, rename the helper and change the only known upstreamed user
(i.e., fs/sysv) before this helper enters common use and might become
difficult to find all call sites and instead easy to break the builds.

Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Fabio M. De Francesco &lt;fmdefrancesco@gmail.com&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
Message-Id: &lt;20230602103307.5637-1-fmdefrancesco@gmail.com&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/sysv: Null check to prevent null-ptr-deref bug</title>
<updated>2023-06-01T07:51:06Z</updated>
<author>
<name>Prince Kumar Maurya</name>
<email>princekumarmaurya06@gmail.com</email>
</author>
<published>2023-05-31T01:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea2b62f305893992156a798f665847e0663c9f41'/>
<id>urn:sha1:ea2b62f305893992156a798f665847e0663c9f41</id>
<content type='text'>
sb_getblk(inode-&gt;i_sb, parent) return a null ptr and taking lock on
that leads to the null-ptr-deref bug.

Reported-by: syzbot+aad58150cbc64ba41bdc@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=aad58150cbc64ba41bdc
Signed-off-by: Prince Kumar Maurya &lt;princekumarmaurya06@gmail.com&gt;
Message-Id: &lt;20230531013141.19487-1-princekumarmaurya06@gmail.com&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>splice: Use filemap_splice_read() instead of generic_file_splice_read()</title>
<updated>2023-05-24T14:42:17Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2023-05-22T13:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2cb1e08985e3dc59d0a4ebf770a87e3e2410d985'/>
<id>urn:sha1:2cb1e08985e3dc59d0a4ebf770a87e3e2410d985</id>
<content type='text'>
Replace pointers to generic_file_splice_read() with calls to
filemap_splice_read().

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
cc: Jens Axboe &lt;axboe@kernel.dk&gt;
cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
cc: David Hildenbrand &lt;david@redhat.com&gt;
cc: John Hubbard &lt;jhubbard@nvidia.com&gt;
cc: linux-mm@kvack.org
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20230522135018.2742245-29-dhowells@redhat.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>sysv: switch to put_and_unmap_page()</title>
<updated>2023-03-13T00:03:41Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2023-03-07T06:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ede3ef5c1e0766b309a1bf087e4c50ea02d3f26f'/>
<id>urn:sha1:ede3ef5c1e0766b309a1bf087e4c50ea02d3f26f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs/sysv: Don't round down address for kunmap_flush_on_unmap()</title>
<updated>2023-03-13T00:03:34Z</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fmdefrancesco@gmail.com</email>
</author>
<published>2023-03-06T12:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8ad77c576721bd7f7b24bfd7fcb0a61bcfa1a1a2'/>
<id>urn:sha1:8ad77c576721bd7f7b24bfd7fcb0a61bcfa1a1a2</id>
<content type='text'>
The kernel virtual address passed to kunmap_flush_on_unmap() has no more
any need to be rounded down.

Therefore, delete the rounding down of "page_addr" when passed to
kunmap_local() in dir_put_page().

Don't backport without commit 88d7b12068b9 ("highmem: round down the
address passed to kunmap_flush_on_unmap()").

Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Suggested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Fabio M. De Francesco &lt;fmdefrancesco@gmail.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'work.sysv' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2023-02-25T03:03:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-25T03:03:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6b9cf417c62601f26fa47f97d6c0681704bf0e3'/>
<id>urn:sha1:d6b9cf417c62601f26fa47f97d6c0681704bf0e3</id>
<content type='text'>
Pull sysv updates from Al Viro:
 "Fabio's 'switch to kmap_local_page()' patchset (originally after the
  ext2 counterpart, with a lot of cleaning up done to it; as the matter
  of fact, ext2 side is in need of similar cleanups - calling
  conventions there are bloody awful).

  Plus the equivalents of minix stuff..."

* 'work.sysv' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  sysv: fix handling of delete_entry and set_link failures
  fs/sysv: Replace kmap() with kmap_local_page()
  fs/sysv: Use dir_put_page() in sysv_rename()
  fs/sysv: Change the signature of dir_get_page()
  fs/sysv: Use the offset_in_page() helper
  sysv: don't flush page immediately for DIRSYNC directories
</content>
</entry>
<entry>
<title>sysv: fix handling of delete_entry and set_link failures</title>
<updated>2023-01-20T04:24:42Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2023-01-20T01:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=abb7c742397324f8676c5b622effdce911cd52e3'/>
<id>urn:sha1:abb7c742397324f8676c5b622effdce911cd52e3</id>
<content type='text'>
similar to minixfs series - make sysv_set_link() report failures,
lift dir_put_page() into the callers of sysv_set_link() and
sysv_delete_entry(), make sysv_rename() handle failures in both.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs/sysv: Replace kmap() with kmap_local_page()</title>
<updated>2023-01-20T04:24:35Z</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fmdefrancesco@gmail.com</email>
</author>
<published>2023-01-19T15:32:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=83005276d383387fec7e18c7a36daade579a23a7'/>
<id>urn:sha1:83005276d383387fec7e18c7a36daade579a23a7</id>
<content type='text'>
kmap() is being deprecated in favor of kmap_local_page().

There are two main problems with kmap(): (1) It comes with an overhead as
the mapping space is restricted and protected by a global lock for
synchronization and (2) it also requires global TLB invalidation when the
kmap’s pool wraps and it might block when the mapping space is fully
utilized until a slot becomes available.

With kmap_local_page() the mappings are per thread, CPU local, can take
page faults, and can be called from any context (including interrupts).
It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore,
the tasks can be preempted and, when they are scheduled to run again, the
kernel virtual addresses are restored and still valid.

Since kmap_local_page() would not break the strict rules of local mappings
(i.e., the thread locality and the stack based nesting), this function can
be easily and safely replace the deprecated API.

Therefore, replace kmap() with kmap_local_page() in fs/sysv. kunmap_local()
requires the mapping address, so return that address from dir_get_page()
to be used in dir_put_page().

Suggested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Suggested-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Fabio M. De Francesco &lt;fmdefrancesco@gmail.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs/sysv: Use dir_put_page() in sysv_rename()</title>
<updated>2023-01-20T00:45:43Z</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fmdefrancesco@gmail.com</email>
</author>
<published>2023-01-19T15:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c26ddc49c9080975cc03cf3bd6917c3fb37d808b'/>
<id>urn:sha1:c26ddc49c9080975cc03cf3bd6917c3fb37d808b</id>
<content type='text'>
Use the dir_put_page() helper in sysv_rename() instead of open-coding two
kunmap() + put_page().

Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Suggested-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Fabio M. De Francesco &lt;fmdefrancesco@gmail.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
