mbox series

[GIT,PULL] afs fixes

Message ID 1130576.1603980446@warthog.procyon.org.uk
State New
Headers show
Series [GIT,PULL] afs fixes | expand


git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/afs-fixes-20201029


David Howells Oct. 29, 2020, 2:07 p.m. UTC
Hi Linus,

Could you pull these afs fixes, please?  They include the following:

 (1) Fix copy_file_range() to an afs file now returning EINVAL if the
     splice_write file op isn't supplied.

 (2) Fix a deref-before-check in afs_unuse_cell().

 (3) Fix a use-after-free in afs_xattr_get_acl().

 (4) Fix afs to not try to clear PG_writeback when laundering a page.

 (5) Fix afs to take a ref on a page that it sets PG_private on and to drop
     that ref when clearing PG_private.  This is done through recently
     added helpers.

 (6) Fix a page leak if write_begin() fails.

 (7) Fix afs_write_begin() to not alter the dirty region info stored in
     page->private, but rather do this in afs_write_end() instead when we
     know what we actually changed.

 (8) Fix afs_invalidatepage() to alter the dirty region info on a page when
     partial page invalidation occurs so that we don't inadvertantly
     include a span of zeros that will get written back if a page gets
     laundered due to a remote 3rd-party induced invalidation.

     We mustn't, however, reduce the dirty region if the page has been seen
     to be mapped (ie. we got called through the page_mkwrite vector) as
     the page might still be mapped and we might lose data if the file is
     extended again.

 (9) Fix the dirty region info to have a lower resolution if the size of
     the page is too large for this to be encoded (e.g. powerpc32 with 64K

     Note that this might not be the ideal way to handle this, since it may
     allow some leakage of undirtied zero bytes to the server's copy in the
     case of a 3rd-party conflict.

To aid (8) and (9), two additional patches are included:

 (*) Wrap the manipulations of the dirty region info stored in
     page->private into helper functions.

 (*) Alter the encoding of the dirty region so that the region bounds can
     be stored with one fewer bit, making a bit available for the
     indication of mappedness.

The following changes since commit 3650b228f83adda7e5ee532e2b90429c03f7b9ec:

  Linux 5.10-rc1 (2020-10-25 15:14:11 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/afs-fixes-20201029

for you to fetch changes up to 2d9900f26ad61e63a34f239bc76c80d2f8a6ff41:

  afs: Fix dirty-region encoding on ppc32 with 64K pages (2020-10-29 13:53:04 +0000)

AFS fixes

Dan Carpenter (1):
      afs: Fix a use after free in afs_xattr_get_acl()

David Howells (10):
      afs: Fix copy_file_range()
      afs: Fix tracing deref-before-check
      afs: Fix afs_launder_page to not clear PG_writeback
      afs: Fix to take ref on page when PG_private is set
      afs: Fix page leak on afs_write_begin() failure
      afs: Fix where page->private is set during write
      afs: Wrap page->private manipulations in inline functions
      afs: Alter dirty range encoding in page->private
      afs: Fix afs_invalidatepage to adjust the dirty region
      afs: Fix dirty-region encoding on ppc32 with 64K pages

 fs/afs/cell.c              |   3 +-
 fs/afs/dir.c               |  12 ++----
 fs/afs/dir_edit.c          |   6 +--
 fs/afs/file.c              |  78 ++++++++++++++++++++++++++-------
 fs/afs/internal.h          |  57 ++++++++++++++++++++++++
 fs/afs/write.c             | 105 ++++++++++++++++++++++++---------------------
 fs/afs/xattr.c             |   2 +-
 include/trace/events/afs.h |  20 ++-------
 8 files changed, 188 insertions(+), 95 deletions(-)


pr-tracker-bot@kernel.org Oct. 29, 2020, 5:31 p.m. UTC | #1
The pull request you sent on Thu, 29 Oct 2020 14:07:26 +0000:

> git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/afs-fixes-20201029

has been merged into torvalds/linux.git:

Thank you!