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:	Mon, 9 Sep 2013 16:12:55 +0200
From:	Jan Kara <jack@...e.cz>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Jan Kara <jack@...e.cz>, LKML <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: [GIT PULL] Ext3, reiserfs, udf & isofs fixes

On Fri 06-09-13 09:11:18, Linus Torvalds wrote:
> On Thu, Sep 5, 2013 at 12:58 PM, Jan Kara <jack@...e.cz> wrote:
> >
> > udf/isofs changes to refuse mounting fs rw instead of mounting it
> > ro automatically which makes eject button work as expected for all media (see
> > the changelog for why userspace should be ok with this change).
> 
> Pulled. However, these are kind of odd.
> 
> For trying _remount_ something read-only, isofs returns the logical
> EROFS error code.
> 
> But for trying to mount it in the first place, it returns EACCES,
> which sounds insane. It's not a permission problem - no amount of
> permissions will ever make it work.
> 
> UDF always does EACCES, regardless of mount/remount.
> 
> Is there some fundamental reason for the insane error code? Does user
> space do the wrong thing if we were to just always return "EROFS"
> which makes much more sense?
  So I personally like EROFS more as well. However blkdev_get_by_path()
(which is what mount(2) uses) returns EACCES if the device is read-only and
FMODE_WRITE was requested. Also the manpage for mount(2) talks about
EACCES when RW mount of read-only device was requested and doesn't mention
EROFS at all.

Now mount(8) handles both EROFS and EACCES the same way but I wanted to
stay on the safer side in case someone uses mount(2) directly so I used
more common EACCES.

I can create a separate patch changing all EACCES return values in this
area to EROFS but I'm not sure it is worth the possible hassle with
userspace...

								Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ