Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590218

[PATCH 0/5] fs genetic refcounter conversions

From Elena Reshetova <elena.reshetova@intel.com>
Newsgroups linux.kernel
Subject [PATCH 0/5] fs genetic refcounter conversions
Date 2017-03-01 11:50 +0100
Message-ID <tg9Zv-1Pu-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Now when new refcount_t type and API are finally merged
(see include/linux/refcount.h), the following
patches convert various refcounters in the generic fs code from atomic_t
to refcount_t. By doing this we prevent intentional or accidental
underflows or overflows that can led to use-after-free vulnerabilities.

The below patches are fully independent and can be cherry-picked separately.
Since we convert all kernel subsystems in the same fashion, resulting
in about 300 patches, we have to group them for sending at least in some
fashion to be manageable. Please excuse the long cc list.

Run-time tested using xfstests with xfs and ext4 filesystems.
refcount WARNs were on and no issues related to changes were encounted
during running the tests.

Elena Reshetova (5):
  fs: convert mb_cache_entry.e_refcnt from atomic_t to refcount_t
  fs: convert posix_acl.a_refcount from atomic_t to refcount_t
  fs: convert mnt_namespace.count from atomic_t to refcount_t
  fs: convert super_block.s_active from atomic_t to refcount_t
  fs: convert userfaultfd_ctx.refcount from atomic_t to refcount_t

 drivers/staging/lustre/lustre/llite/llite_lib.c |  2 +-
 fs/cifs/cifsfs.c                                |  2 +-
 fs/devpts/inode.c                               |  2 +-
 fs/f2fs/acl.c                                   |  2 +-
 fs/gfs2/super.c                                 |  2 +-
 fs/kernfs/mount.c                               |  2 +-
 fs/mbcache.c                                    | 16 ++++++++--------
 fs/mount.h                                      |  5 +++--
 fs/namespace.c                                  |  8 ++++----
 fs/nfs/super.c                                  |  4 ++--
 fs/posix_acl.c                                  |  6 +++---
 fs/super.c                                      | 10 +++++-----
 fs/userfaultfd.c                                | 11 ++++++-----
 include/linux/fs.h                              |  3 ++-
 include/linux/mbcache.h                         |  6 +++---
 include/linux/posix_acl.h                       |  7 ++++---
 16 files changed, 46 insertions(+), 42 deletions(-)

-- 
2.7.4

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] fs genetic refcounter conversions Elena Reshetova <elena.reshetova@intel.com> - 2017-03-01 11:50 +0100
  [PATCH 5/5] fs: convert userfaultfd_ctx.refcount from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-01 11:50 +0100
  [PATCH 3/5] fs: convert mnt_namespace.count from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-01 11:50 +0100
  [PATCH 4/5] fs: convert super_block.s_active from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-01 11:50 +0100

csiph-web