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: <20141006185534.GA7567@thunk.org>
Date:	Mon, 6 Oct 2014 14:55:34 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Jan Kara <jack@...e.cz>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 2/2] ext4: add ext4_iget_normal() which is to be used for
 dir tree lookups

On Mon, Oct 06, 2014 at 05:09:03PM +0200, Jan Kara wrote:
> > +	if (ret_inode && !IS_ERR(ret_inode) &&
> > +	    ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)
> > +		make_bad_inode(ret_inode);
> > +	return ret_inode;
>   Hum, why don't we just return an error (like EIO) when invalid inode
> number is passed?

Yeah, I guess we can do that.  We need to support the make_bad_inode()
for the sake of EXT4_IOC_SWAP_BOOT.  But that code path doesn't need
to use ext4_iget_normal().  So yeah, in the case of
ext4_iget_normal(), we should be able to just return -EIO and let the
userspace fail fast with the open(2) instead of later on with the
read(2) or write(2) or truncate(2) call.

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