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:	Mon, 22 Feb 2010 11:35:17 +0100
From:	Jan Kara <jack@...e.cz>
To:	Dmitry Monakhov <dmonakhov@...nvz.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	npiggin@...e.de
Subject: Re: [PATCH 0/7] vfs: notify_changes() error handling

  Hi Dmitry,

> Current inode attr setting path looks like follows
> 
>  ret = inode_change_ok()
>  if(ret)
>      goto out;
>  /*
>   perform private-fs specific logic here
>   */
>  if(ia_valid & ATTR_UID || ...)
>     ret = vfs_dq_transfer()
> 
>  /*
>    more private-fs specific logic
>    for example update on_disk data structures.
>    */
> 
>   ret = inode_setattr()
> 
> In fact inode_setattr() call vmtruncate() which may fail in number
> of reasons IS_SWAPFILE, RLIMIT_FSIZE. After this many filesystem is
> unable to rollback changes. And just live inode in inconsistent
> state. We may check IS_SWAPFILE at the very beginning(currently it
> is not checked), but RLIMIT_FSIZE may changed under our feet.
> In order make things straight. Let's divide vmtruncate() in to
> two parts which perform all checks, and second which can not fail.
> After this notify_change() perform all necessary checks inside
> inode_change_ok() and simply call nofail version of vmtruncate().
  Actually, there are more problems than these in the truncate path.  Some
filesystems can decide to fail truncate only in their .truncate method but that
is called only after i_size is set which is too late.  Nick Piggin has a patch
set which was addressing this problem and should be basically a superset of
your changes. But I'm not sure whether the patch series is available somewhere
or what it's current status. Nick?

									Honza
-- 
Jan Kara <jack@...e.cz>
SuSE CR Labs
--
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