Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Kees Cook <keescook@chromium.org>
Cc: Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	Christoph Hellwig <hch@lst.de>,
	WeiXiong Liao <gmpy.liaowx@gmail.com>
Subject: Re: use case for register_pstore_blk?
Date: Wed, 7 Oct 2020 20:42:58 +0200
Message-ID: <20201007184258.GA6157@lst.de> (raw)
In-Reply-To: <202010071130.7EA00291@keescook>

The problem with the block code is that it is completely broken.
It uses on-stack structures where it can't, it pokes into internals
of the block device read/write path for absolutely not reason, and
it uses name_to_dev_t which must not be used in new code.

Or in other words: it is a complete piece of crap full of layering
violations that should never have been merged in that form.

It also does not happen to share code with the mtd case.

On Wed, Oct 07, 2020 at 11:40:36AM -0700, Kees Cook wrote:
> On Wed, Oct 07, 2020 at 10:37:15AM +0200, Christoph Hellwig wrote:
> > Looking at this more:  in addition to the block code being totally
> > broken, there is really no point in mtdpstore even using this code.
> > It does nothing but minimal parameter validation to just pass it
> > on to the pstore zone interface.  IMHO writing the mtd code directly
> > to the zone interface makes a whole lot more sense even if we grow
> > a non-broken block backend at some point.  Something like this:
> 
> I really don't like this, sorry. I'm using the pstore/blk bits myself
> already, and I don't want that removed. Additionally I really don't want
> the structures open-coded in the MTD driver. The whole point was to
> encapsulate it. I've spent a lot of time clawing pstore back from the
> brink of open-coded argument and member explosion. :)
> 
> I'm fine to drop the exported register_pstore_blk() API until someone
> actually uses it, but I want to keep pstore/blk itself and the existing
> separation between pstore backing devices and pstore storage logic so
> that configuration happens at the storage level, not the backing device
> level. My intent, for example, is to migrate ramoops to pstore/zone,
> etc, and remove all the ramoops-specific configuration which is common
> to pstore/zone.
> 
> -- 
> Kees Cook
---end quoted text---

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201006155220.GA11668@lst.de>
     [not found] ` <202010070007.8FF59EC42@keescook>
     [not found]   ` <20201007075537.GA12531@lst.de>
2020-10-07  8:37     ` Christoph Hellwig
2020-10-07 18:40       ` Kees Cook
2020-10-07 18:42         ` Christoph Hellwig [this message]
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=20201007184258.GA6157@lst.de \
    --to=hch@lst.de \
    --cc=gmpy.liaowx@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

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

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


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