linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
	hch@infradead.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
	linux-mm@kvack.org, Theodore Ts'o <tytso@mit.edu>
Subject: [GIT PULL] vfs: prohibit writes to active swap devices
Date: Tue, 17 Sep 2019 08:06:09 -0700	[thread overview]
Message-ID: <20190917150608.GT2229799@magnolia> (raw)

Hi Linus,

Please pull this short series that prevents writes to active swap files
and swap devices.  There's no non-malicious use case for allowing
userspace to scribble on storage that the kernel thinks it owns.

The branch merges cleanly against this morning's HEAD and survived an
overnight run of xfstests.  The merge was completely straightforward, so
please let me know if you run into anything weird.

--D

The following changes since commit 609488bc979f99f805f34e9a32c1e3b71179d10b:

  Linux 5.3-rc2 (2019-07-28 12:47:02 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/vfs-5.4-merge-1

for you to fetch changes up to dc617f29dbe5ef0c8ced65ce62c464af1daaab3d:

  vfs: don't allow writes to swap files (2019-08-20 07:55:16 -0700)

----------------------------------------------------------------
Changes for 5.4:
- Prohibit writing to active swap files and swap partitions.

----------------------------------------------------------------
Darrick J. Wong (2):
      mm: set S_SWAPFILE on blockdev swap devices
      vfs: don't allow writes to swap files

 fs/block_dev.c     |  3 +++
 include/linux/fs.h | 11 +++++++++++
 mm/filemap.c       |  3 +++
 mm/memory.c        |  4 ++++
 mm/mmap.c          |  8 ++++++--
 mm/swapfile.c      | 41 +++++++++++++++++++++++++----------------
 6 files changed, 52 insertions(+), 18 deletions(-)

             reply	other threads:[~2019-09-17 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 15:06 Darrick J. Wong [this message]
2019-09-19  1:55 ` [GIT PULL] vfs: prohibit writes to active swap devices pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190917150608.GT2229799@magnolia \
    --to=djwong@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).