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: <20140619141950.18b9026d7d06694291eea311@linux-foundation.org>
Date:	Thu, 19 Jun 2014 14:19:50 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Philippe De Muyter <phdm@...qel.be>
Cc:	linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] init/do_mounts.c: treat EROFS like EACCES

On Wed, 18 Jun 2014 18:12:44 +0200 Philippe De Muyter <phdm@...qel.be> wrote:

> some combinations of filesystem and block device (at least vfat on mmc)
> yield -EROFS instead of -EACCES when the device is read-only.  Retry
> mounting with MS_RDONLY set, just like for the EACCES case, instead of
> failing directly.
> 
> ...
>
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -394,6 +394,7 @@ retry:
>  			case 0:
>  				goto out;
>  			case -EACCES:
> +			case -EROFS:
>  				flags |= MS_RDONLY;
>  				goto retry;
>  			case -EINVAL:

hm, what's going on here.  I'd have thought it to be very logical that
file_system_type.mount() would return EROFS if the device is read-only!
But I'm suspecting that there is some convention that the fs is
supposed to return EACCES in this case.  So *perhaps* it is vfat-on-mmc
which needs fixing.  Dunno.

Al, are you able to shed light?

--
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