<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/md/dm-init.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-07-03T11:13:38Z</updated>
<entry>
<title>dm init: fix incorrect uses of kstrndup()</title>
<updated>2019-07-03T11:13:38Z</updated>
<author>
<name>Gen Zhang</name>
<email>blackgod016574@gmail.com</email>
</author>
<published>2019-05-29T01:33:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6e17b11ffedd6e935c507c39b92e9c8ddb88c3c9'/>
<id>urn:sha1:6e17b11ffedd6e935c507c39b92e9c8ddb88c3c9</id>
<content type='text'>
commit dec7e6494e1aea6bf676223da3429cd17ce0af79 upstream.

Fix 2 kstrndup() calls with incorrect argument order.

Fixes: 6bbc923dfcf5 ("dm: add support to directly boot to a mapped device")
Cc: stable@vger.kernel.org # v5.1
Signed-off-by: Gen Zhang &lt;blackgod016574@gmail.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm init: fix max devices/targets checks</title>
<updated>2019-05-25T16:16:45Z</updated>
<author>
<name>Helen Koike</name>
<email>helen.koike@collabora.com</email>
</author>
<published>2019-04-26T20:09:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7ea065d60114380f2c04c5e301198144d0bee603'/>
<id>urn:sha1:7ea065d60114380f2c04c5e301198144d0bee603</id>
<content type='text'>
commit 8e890c1ab1b1e0f765cd8da82c4dee011698a5e8 upstream.

dm-init should allow up to DM_MAX_{DEVICES,TARGETS} for devices/targets,
and not DM_MAX_{DEVICES,TARGETS} - 1.

Fix the checks and also fix the error message when the number of devices
is surpassed.

Fixes: 6bbc923dfcf57d ("dm: add support to directly boot to a mapped device")
Cc: stable@vger.kernel.org
Signed-off-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm init: fix const confusion for dm_allowed_targets array</title>
<updated>2019-04-01T20:16:37Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2019-03-21T22:00:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=93fc91675a6c84d6ab355188aea398bda2cc51f8'/>
<id>urn:sha1:93fc91675a6c84d6ab355188aea398bda2cc51f8</id>
<content type='text'>
A non const pointer to const cannot be marked initconst.
Mark the array actually const.

Fixes: 6bbc923dfcf5 dm: add support to directly boot to a mapped device
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: add support to directly boot to a mapped device</title>
<updated>2019-03-05T19:53:50Z</updated>
<author>
<name>Helen Koike</name>
<email>helen.koike@collabora.com</email>
</author>
<published>2019-02-21T20:33:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6bbc923dfcf57d6b97388819a7393835664c7a8e'/>
<id>urn:sha1:6bbc923dfcf57d6b97388819a7393835664c7a8e</id>
<content type='text'>
Add a "create" module parameter, which allows device-mapper targets to
be configured at boot time. This enables early use of DM targets in the
boot process (as the root device or otherwise) without the need of an
initramfs.

The syntax used in the boot param is based on the concise format from
the dmsetup tool to follow the rule of least surprise:

	dmsetup table --concise /dev/mapper/lroot

Which is:
	dm-mod.create=&lt;name&gt;,&lt;uuid&gt;,&lt;minor&gt;,&lt;flags&gt;,&lt;table&gt;[,&lt;table&gt;+][;&lt;name&gt;,&lt;uuid&gt;,&lt;minor&gt;,&lt;flags&gt;,&lt;table&gt;[,&lt;table&gt;+]+]

Where,
	&lt;name&gt;		::= The device name.
	&lt;uuid&gt;		::= xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ""
	&lt;minor&gt;		::= The device minor number | ""
	&lt;flags&gt;		::= "ro" | "rw"
	&lt;table&gt;		::= &lt;start_sector&gt; &lt;num_sectors&gt; &lt;target_type&gt; &lt;target_args&gt;
	&lt;target_type&gt;	::= "verity" | "linear" | ...

For example, the following could be added in the boot parameters:
dm-mod.create="lroot,,,rw, 0 4096 linear 98:16 0, 4096 4096 linear 98:32 0" root=/dev/dm-0

Only the targets that were tested are allowed and the ones that don't
change any block device when the device is create as read-only. For
example, mirror and cache targets are not allowed. The rationale behind
this is that if the user makes a mistake, choosing the wrong device to
be the mirror or the cache can corrupt data.

The only targets initially allowed are:
* crypt
* delay
* linear
* snapshot-origin
* striped
* verity

Co-developed-by: Will Drewry &lt;wad@chromium.org&gt;
Co-developed-by: Kees Cook &lt;keescook@chromium.org&gt;
Co-developed-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Signed-off-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
</feed>
