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] [thread-next>] [day] [month] [year] [list]
Message-id: <20080605184941.GX2961@webber.adilger.int>
Date:	Thu, 05 Jun 2008 12:49:41 -0600
From:	Andreas Dilger <adilger@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Theodore Tso <tytso@....edu>,
	Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>,
	Jan Kara <jack@...e.cz>, sct@...hat.com,
	linux-kernel@...r.kernel.org, linux-ext4@...r.kernel.org,
	jbacik@...hat.com, cmm@...ibm.com, yumiko.sugita.yf@...achi.com,
	satoshi.oshima.fk@...achi.com
Subject: Re: [PATCH 1/5] jbd: strictly check for write errors on data	buffers

On Jun 05, 2008  09:20 -0700, Andrew Morton wrote:
> On Thu, 5 Jun 2008 10:29:48 -0400 Theodore Tso <tytso@....edu> wrote:
> > On Thu, Jun 05, 2008 at 08:33:27PM +0900, Hidehiro Kawai wrote:
> > > 
> > > My patch doesn't change the policy.  JBD aborts the journal when
> > > it detects I/O error in file data since 2.6.11.  Perhaps this patch:
> > > http://marc.info/?l=linux-kernel&m=110483888632225
> > > I just added missing error checkings.
> > 
> > Looking at the code paths touched by patch you referenced, you are
> > correct.  And Andrew even signed off on it.  :-)
> > 
> > But if someone was only examining the patch, it wasn't obvious that
> > the journal was getting aborted when the JBD layer was forcing buffers
> > from t_sync_datalist to disk.  So I suspect the change went in without
> > proper consideration of the net effect.  You just called it out
> > explicitly in the subject line, which caused Andrew to ask some good
> > questions; questions that weren't asked in 2005.
> 
> Sigh. An object lesson in the value of good changelogging :(

... and the value of "diff -p" so it is clear what function is being changed.

> I guess we need to undo this.  And yes, propagating errors into AS_EIO
> is the way.  I guess that's safe without holding lock_page(), as long
> as the bh is pinned.

Something like the following instead if -EIO and journal abort:

		if (!buffer_uptodate(bh)) {
			set_bit(AS_EIO, &bh->b_page->mapping->flags);
			SetPageError(bh->b_page);
		}

It seems end_buffer_async_write() does this already, but
journal_do_submit_data() uses end_buffer_write_sync() and it does not
do either of those operations.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

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