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] [day] [month] [year] [list]
Date:   Fri, 02 Mar 2018 13:21:27 +0100
From:   Richard Weinberger <richard@....at>
To:     Romain Izard <romain.izard.pro@...il.com>
Cc:     Artem Bityutskiy <dedekind1@...il.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        linux-mtd@...ts.infradead.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] mtd: ubi: block: Fix error for write access

Am Freitag, 2. März 2018, 12:16:18 CET schrieb Romain Izard:
> When opening a device with write access, ubiblock_open returns an error
> code. Currently, this error code is -EPERM, but this is not the right
> value.
> 
> The open function for other block devices returns -EROFS when opening
> read-only devices with FMODE_WRITE set. When used with dm-verity, the
> veritysetup userspace tool is expecting EROFS, and refuses to use the
> ubiblock device.
> 
> Use -EROFS for ubiblock as well. As a result, veritysetup accepts the
> ubiblock device as valid.
> 
> Fixes: 9d54c8a33eec (UBI: R/O block driver on top of UBI volumes)
> Signed-off-by: Romain Izard <romain.izard.pro@...il.com>
> ---
>  drivers/mtd/ubi/block.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
> index b210fdb31c98..4533423cf2aa 100644
> --- a/drivers/mtd/ubi/block.c
> +++ b/drivers/mtd/ubi/block.c
> @@ -242,7 +242,7 @@ static int ubiblock_open(struct block_device *bdev,
> fmode_t mode) * in any case.
>  	 */
>  	if (mode & FMODE_WRITE) {
> -		ret = -EPERM;
> +		ret = -EROFS;

Queued for -next.

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ