linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Kees Cook <keescook@chromium.org>
Cc: Christoph Hellwig <hch@lst.de>,
	WeiXiong Liao <gmpy.liaowx@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: use case for register_pstore_blk?
Date: Wed, 7 Oct 2020 09:37:39 +0200	[thread overview]
Message-ID: <20201007073739.GA11745@lst.de> (raw)
In-Reply-To: <202010070007.8FF59EC42@keescook>

On Wed, Oct 07, 2020 at 12:13:27AM -0700, Kees Cook wrote:
> On Tue, Oct 06, 2020 at 05:52:20PM +0200, Christoph Hellwig wrote:
> > Hi WeiXiong, hi Kees,
> > 
> > what is the use case for the code added in commit 17639f67c1d6 
> > ("pstore/blk: Introduce backend for block devices").
> > 
> > This still doesn't have a user, and the API looks really odd to me.
> 
> pstore is a beast. :) The API is there so that a blk device can declare
> its direct support of pstore (specifically, to provide a panic_write
> handler).
> 
> The MTD device does this, but yes, that's a good point, there isn't a
> blk device user of that entry point yet.
> 
> > By our normal kernel rules we should not add new exports without
> > users and this should probably be reverted for the 5.9 release.
> 
> I don't want to revert the entire patch (I'm still using
> __register_pstore_blk by way of pstore/blk's "best_effort" option), but
> I wouldn't object to something like this:

That is a minimum.  But the MTD support is also completely and
utterly broken as well, by declaring on-stack struct file and
struct file_operations instances instead of actually reusing the
block layer code.  This kind of stuff really needs more coordination
with the block layer and maintainers instead of the crap that ended
up being merged.

  reply	other threads:[~2020-10-07  7:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 15:52 use case for register_pstore_blk? Christoph Hellwig
2020-10-07  7:13 ` Kees Cook
2020-10-07  7:37   ` Christoph Hellwig [this message]
2020-10-07  7:55   ` Christoph Hellwig
2020-10-07  8:37     ` Christoph Hellwig
2020-10-07 18:40       ` Kees Cook
2020-10-07 18:42         ` Christoph Hellwig
2020-10-07 19:17           ` Kees Cook
2020-10-12  7:02             ` Christoph Hellwig

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=20201007073739.GA11745@lst.de \
    --to=hch@lst.de \
    --cc=gmpy.liaowx@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).