lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Dec 2019 17:05:20 +0900
From:   Naoto Kobayashi <naoto.kobayashi4c@...il.com>
To:     Theodore Ts'o <tytso@....edu>,
        Andreas Dilger <adilger.kernel@...ger.ca>
Cc:     Naoto Kobayashi <naoto.kobayashi4c@...il.com>,
        linux-ext4@...r.kernel.org
Subject: [PATCH v2 0/3] ext4: Prevent memory reclaim from re-entering the filesystem and deadlocking

This series aims to prevent ext4_kvmalloc() from re-entering
the filesystem and deadlocking. Although __vmalloc() doesn't
support GFP_NOFS[1], all of the user of ext4_kvmalloc are using
GFP_NOFS (e.g. fs/ext4/resize.c::add_new_gdb), causing the memory
reclaim to re-enter the filesystem.

To fix this issue, use memalloc_nfs_save/restore() that get
__vmalloc() to drop __GFP_FS.

[1] linux-tree/Documentation/core-api/gfp-mask-fs-io.rst

Changes since v1:
  - Add Patch 1 to delete ext4_kvzvalloc() that is not used anywhere.
  - Add Patch 2 to rename ext4_kvmalloc() to ext4_kvmalloc_nofs() and
    drop its flags argument since all the users of ext4_kvmalloc() are
    using GFP_NOFS

Thanks,


Naoto Kobayashi (3):
  ext4: Delete ext4_kvzvalloc()
  ext4: Rename ext4_kvmalloc() to ext4_kvmalloc_nofs() and drop its
    flags argument
  ext4: Prevent ext4_kvmalloc_nofs() from re-entering the filesystem and
    deadlocking

 fs/ext4/ext4.h   |  3 +--
 fs/ext4/resize.c | 10 ++++------
 fs/ext4/super.c  | 21 +++++++--------------
 fs/ext4/xattr.c  |  2 +-
 4 files changed, 13 insertions(+), 23 deletions(-)


--
2.16.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ