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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <E1JwYLp-0006Fw-ND@pomaz-ex.szeredi.hu>
Date:	Thu, 15 May 2008 09:58:09 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	viro@...IV.linux.org.uk
CC:	miklos@...redi.hu, akpm@...ux-foundation.org, hch@...radead.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 10/24] vfs: truncate: append-only checking cleanup

> > -	error = -EPERM;
> > -	if (IS_APPEND(inode))
> > -		goto mnt_drop_write_and_out;
> > -
> >  	error = get_write_access(inode);
> >  	if (error)
> >  		goto mnt_drop_write_and_out;
> 
> errno change and worse than that - we
> 	a) get different errno with append-only file mmaped shared
> 	b) break_lease() happening, despite the file being append-only
> 
> > @@ -321,10 +317,6 @@ static long do_sys_ftruncate(unsigned in
> >  	if (small && length > MAX_NON_LFS)
> >  		goto out_putf;
> >  
> > -	error = -EPERM;
> > -	if (IS_APPEND(inode))
> > -		goto out_putf;
> > -
> >  	error = locks_verify_truncate(inode, file, length);
> 
> Again, errno change...
> 
> > @@ -1639,8 +1639,6 @@ int may_open(struct nameidata *nd, int a
> >  	if (IS_APPEND(inode)) {
> >  		if  ((flag & FMODE_WRITE) && !(flag & O_APPEND))
> >  			return -EPERM;
> > -		if (flag & O_TRUNC)
> > -			return -EPERM;
> >  	}
> 
> Bogus break_lease() following that...
> 

OK, I'll drop this patch.  Truncate is weird, it should really have a
separate i_op/f_op.

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