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]
Date:	Fri, 21 Sep 2007 16:43:52 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	trond.myklebust@....uio.no
CC:	hch@...radead.org, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [patch 3/5] VFS: pass open file to ->xattr()

> > > ftruncate is a special case due to O_TRUNC.
> > 
> > No, it's special, because it does not do permission checking, while
> > truncate() does.
> 
> So why not just add file->f_op->ftruncate() and file->f_op->fstat()?

Sure, we could add those.

I'm not sure it's worth adding new file operations, instead of just
adding a parameter to ->getattr(), and ->*xattr(), but if that's more
acceptable. it's fine for me.

> Most filesystems can trivially redirect these to do_truncate() and their
> existing getattr() method. Those, like FUSE, that care can use the hook.
> In fact, I think that NFSv4 could also benefit from an ftruncate():
> currently we have to hunt around for an open file context for that
> particular case.

For ftruncate you can already access the open file from iattr->ia_file.

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