From: Mike Snitzer <snitzer@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: Alasdair Kergon <agk@redhat.com>,
dm-devel@redhat.com, Jonathan Corbet <corbet@lwn.net>,
Shaohua Li <shli@kernel.org>,
Dan Ehrenberg <dehrenberg@chromium.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Chen Yu <yu.c.chen@intel.com>,
Vishnu Pratap Singh <vishnu.ps@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>,
Yaowei Bai <baiyaowei@cmss.chinamobile.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-raid@vger.kernel.org, Will Drewry <wad@chromium.org>,
David Zeuthen <zeuthen@google.com>
Subject: Re: [PATCH v5 0/3] init: add support to directly boot to a mapped device
Date: Fri, 26 Feb 2016 11:53:58 -0500 [thread overview]
Message-ID: <20160226165358.GA26728@redhat.com> (raw)
In-Reply-To: <CAGXu5jJ9nUdE8u8a3EYR5uS_zOLEkmQn3M0Nsm9bkxBmMxpC9Q@mail.gmail.com>
On Mon, Feb 22 2016 at 1:55pm -0500,
Kees Cook <keescook@chromium.org> wrote:
> On Sun, Feb 21, 2016 at 2:08 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> > On Sat, Feb 20, 2016 at 10:13:49AM -0800, Kees Cook wrote:
> >> This is a resurrection of a patch series from a few years back, first
> >> brought to the dm maintainers in 2010. It creates a way to define dm
> >> devices on the kernel command line for systems that do not use an
> >> initramfs, or otherwise need a dm running before init starts.
> >>
> >> This has been used by Chrome OS for several years, and now by Brillo
> >> (and likely Android soon).
> >>
> >> The last version was v4:
> >> https://patchwork.kernel.org/patch/104860/
> >> https://patchwork.kernel.org/patch/104861/
> >
> > Inconsistencies in the terminology here can be sorted out during review,
> > and I see that you've taken on board some of my review comments from
> > 2010, but what are your responses to the rest of them?
>
> Ah, sorry, the threads I could find were incomplete, so I wasn't able
> to find those comments that were made to Will's 2010 submission. In
> some of the cleanups I did I was very confused about "target" vs
> "table", and tried to fix that. Regardless, I'm open to fixing
> whatever is needed. :)
>
> Thanks for looking at this again!
This work isn't going to fly as is. I appreciate the effort and the
goal (without understanding _why_) but: you're open-coding, duplicating
and/or reinventing way too much in do_mounts_dm.c
1) You first need to answer: _why_ is using a proper initramfs not
viable? A very simple initramfs that issues dmsetup commands, etc,
isn't so daunting is it? Why is it so important for the kernel to
natively provide a dmsetup interface? Chrome, Android, etc cannot use
initramfs?
2) If you are able to adequately justify the need for dm=:
I'd much rather the dm= kernel commandline be a simple series of
comma-delimited dmsetup-like commands.
You'd handle each command with extremely basic parsing:
<dm_ioctl_cmd> <args> [, <dm_ioctl_cmd> <args>]
(inventing a special token to denote <newline>, to support tables with
multiple entries, rather than relying on commas and counts, etc)
and you'd then have do_mounts_dm.c open /dev/mapper/control directly and
issue proper DM ioctls rather than adding all your shim code. This last
bit of opening /dev/mapper/control from init needs more research -- not
sure if doing such a thing from kernel is viable/safe/acceptable.
Mike
next prev parent reply other threads:[~2016-02-26 16:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-20 18:13 [PATCH v5 0/3] init: add support to directly boot to a mapped device Kees Cook
2016-02-20 18:13 ` [PATCH v5 1/3] dm: export a table+mapped device to the ioctl interface Kees Cook
2016-02-20 18:13 ` [PATCH v5 2/3] dm: make mapped_device locking functions available Kees Cook
2016-02-20 18:13 ` [PATCH v5 3/3] init: add support to directly boot to a mapped device Kees Cook
2016-02-21 22:08 ` [PATCH v5 0/3] " Alasdair G Kergon
2016-02-22 18:55 ` Kees Cook
2016-02-26 16:53 ` Mike Snitzer [this message]
2016-02-26 18:52 ` Kees Cook
2016-02-26 19:21 ` Mike Snitzer
2016-02-26 19:59 ` Kees Cook
2016-02-26 20:47 ` Mike Snitzer
-- strict thread matches above, loose matches on Subject: below --
2016-11-17 6:55 Barry Kauler
2016-11-17 23:04 ` Barry Kauler
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=20160226165358.GA26728@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=baiyaowei@cmss.chinamobile.com \
--cc=corbet@lwn.net \
--cc=dehrenberg@chromium.org \
--cc=dm-devel@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=shli@kernel.org \
--cc=vishnu.ps@samsung.com \
--cc=wad@chromium.org \
--cc=yu.c.chen@intel.com \
--cc=zeuthen@google.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.