LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Kees Cook <keescook@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	Luis Henriques <lhenriques@suse.com>
Subject: [PATCH 00/10] pstore: Remove filesystem records when backend is unregistered
Date: Wed,  6 May 2020 08:21:04 -0700
Message-ID: <20200506152114.50375-1-keescook@chromium.org> (raw)

Hi,

This fixes a long-standing problem[1] with pstore where the filesystem
view of backend records was not updated when the backend was unloaded
(in a modular build) through pstore_unregister(). This series is
mostly refactoring and improvements to the various locking semantics
around management of the active backend and the filesystem mount before
ultimately providing the routine to walk the filesystem to remove the
records associated with a given backend.

I'm still doing more build and runtime testing, but I just wanted to get
this posted so I can let other people look at it if they want while the
testing finishes.

Thanks!

-Kees

[1] https://lore.kernel.org/lkml/87o8yrmv69.fsf@suse.com

Kees Cook (10):
  pstore: Drop useless try_module_get() for backend
  pstore: Rename "pstore_lock" to "psinfo_lock"
  pstore: Convert "psinfo" locking to mutex
  pstore: Rename "allpstore" to "records_list"
  pstore: Convert "records_list" locking to mutex
  pstore: Add proper unregister lock checking
  pstore: Refactor pstorefs record list removal
  pstore: Add locking around superblock changes
  pstore: Do not leave timer disabled for next backend
  pstore: Remove filesystem records when backend is unregistered

 fs/pstore/inode.c    | 127 +++++++++++++++++++++++++++++++------------
 fs/pstore/internal.h |   2 +-
 fs/pstore/platform.c |  72 ++++++++++++++----------
 3 files changed, 134 insertions(+), 67 deletions(-)

-- 
2.20.1


             reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 15:21 Kees Cook [this message]
2020-05-06 15:21 ` [PATCH 01/10] pstore: Drop useless try_module_get() for backend Kees Cook
2020-05-06 15:21 ` [PATCH 02/10] pstore: Rename "pstore_lock" to "psinfo_lock" Kees Cook
2020-05-06 15:21 ` [PATCH 03/10] pstore: Convert "psinfo" locking to mutex Kees Cook
2020-05-06 15:21 ` [PATCH 04/10] pstore: Rename "allpstore" to "records_list" Kees Cook
2020-05-06 15:21 ` [PATCH 05/10] pstore: Convert "records_list" locking to mutex Kees Cook
2020-05-06 15:21 ` [PATCH 06/10] pstore: Add proper unregister lock checking Kees Cook
2020-05-06 15:21 ` [PATCH 07/10] pstore: Refactor pstorefs record list removal Kees Cook
2020-05-06 15:21 ` [PATCH 08/10] pstore: Add locking around superblock changes Kees Cook
2020-05-06 15:21 ` [PATCH 09/10] pstore: Do not leave timer disabled for next backend Kees Cook
2020-05-06 15:21 ` [PATCH 10/10] pstore: Remove filesystem records when backend is unregistered Kees Cook

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=20200506152114.50375-1-keescook@chromium.org \
    --to=keescook@chromium.org \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=lhenriques@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git