lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.1109261103590.12195@lnxricardw.se.axis.com>
Date:	Mon, 26 Sep 2011 11:17:22 +0200 (CEST)
From:	Ricard Wanderlof <ricard.wanderlof@...s.com>
To:	David Wagner <david.wagner@...e-electrons.com>
cc:	linux-mtd <linux-mtd@...ts.infradead.org>,
	Arnd Bergmann <arnd@...db.de>,
	linux-embedded <linux-embedded@...r.kernel.org>,
	Artem Bityutskiy <dedekind1@...il.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Tim Bird <tim.bird@...sony.com>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCHv6] UBI: new module ubiblk: block layer on top of UBI


On Thu, 22 Sep 2011, David Wagner wrote:

> ubiblk is a read-only block layer on top of UBI.  It presents UBI volumes as
> ...

I decided to try this out, as I've been looking for a flexible 
block-device-on-ubi scheme for using a cramfs or squashfs root file system 
over UBI without having to resort to gluebi (which in its current 
implementation is too inflexible for my needs).

This can't be considered a complete test, as I basically just booted the 
system a couple of times, using a cramfs file system residing in an UBI 
volume. I compiled ubiblk built in to the kernel, not as a module; 
furthermore, I'm running 2.6.35 for various reasons, so had to backport 
kstrtoul from 2.6.39 in order to get it to build.

But for what it's worth, it does confirm that it in fact works to set up a 
ubiblk device at boot time for the root filesystem.

There doesn't seem to be a userspace application for attaching/detaching 
ubiblk devices. I hacked together something based on ubinfo, I could post 
it, but perhaps something more thorough is forthcoming?

A couple of comments below:

> +/**
> + * ubiblk_ctrl_ioctl - ioctl handling for proxying/unproxying a UBI volume
> + *
> + * @file: the file on which the ioctl was invoked (usunsed)
                                                     ^^^^^^^ typo: unused
> + * @cmd: the ioctl type
> + * @arg: additional command informations
> + */
> +static long ubiblk_ctrl_ioctl(struct file *file, unsigned int cmd,
> +                             unsigned long arg)


> +/**
> + * ubiblk_parse_volume_param - parse the "volume" module parameter
> + *
> + * @ubi_num: where to store the UBI device number
> + * @vol_id: where to store the volume ID
> + */
> +static int __init ubiblk_parse_volume_param(int *ubi_num, int *vol_id)
> +{
> +       char *tokens[2] = {NULL, NULL};
> +       char buf[VOL_PARAM_MAXLEN];
> +       char *pbuf = buf;
> +       int len = strlen(buf);
                            ^^^  this needs to be volume, not buf.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ