linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dave Chinner <david@fromorbit.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Dave Chinner <dchinner@redhat.com>,
	Brian Foster <bfoster@redhat.com>, CAI Qian <caiqian@redhat.com>,
	xfs@oss.sgi.com
Subject: Re: [ 68/89] xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end
Date: Thu, 14 Feb 2013 14:35:33 -0600	[thread overview]
Message-ID: <20130214203533.GB16566@sgi.com> (raw)
In-Reply-To: <20130214200501.GA23036@kroah.com>

Hey Greg,

On Thu, Feb 14, 2013 at 12:05:01PM -0800, Greg Kroah-Hartman wrote:
> On Thu, Feb 14, 2013 at 01:55:12PM -0600, Ben Myers wrote:
> > Greg,
> > 
> > On Thu, Feb 14, 2013 at 11:26:14AM -0800, Greg Kroah-Hartman wrote:
> > > On Thu, Feb 14, 2013 at 11:07:30AM +1100, Dave Chinner wrote:
> > > > [cc xfs@oss.sgi.com]
> > > > 
> > > > On Wed, Feb 13, 2013 at 08:18:45AM -0800, Greg Kroah-Hartman wrote:
> > > > > On Wed, Feb 13, 2013 at 04:30:32PM +0100, Paolo Bonzini wrote:
> > > > > > Il 01/02/2013 14:08, Greg Kroah-Hartman ha scritto:
> > > > > > > 3.7-stable review patch.  If anyone has any objections, please let me know.
> > > > > > > 
> > > > > > > ------------------
> > > > > > > 
> > > > > > > From: Dave Chinner <dchinner@redhat.com>
> > > > > > > 
> > > > > > > commit eb178619f930fa2ba2348de332a1ff1c66a31424 upstream.
> > > > > > > 
> > > > > > > When _xfs_buf_find is passed an out of range address, it will fail
> > > > > > > to find a relevant struct xfs_perag and oops with a null
> > > > > > > dereference. This can happen when trying to walk a filesystem with a
> > > > > > > metadata inode that has a partially corrupted extent map (i.e. the
> > > > > > > block number returned is corrupt, but is otherwise intact) and we
> > > > > > > try to read from the corrupted block address.
> > > > > > > 
> > > > > > > In this case, just fail the lookup. If it is readahead being issued,
> > > > > > > it will simply not be done, but if it is real read that fails we
> > > > > > > will get an error being reported.  Ideally this case should result
> > > > > > > in an EFSCORRUPTED error being reported, but we cannot return an
> > > > > > > error through xfs_buf_read() or xfs_buf_get() so this lookup failure
> > > > > > > may result in ENOMEM or EIO errors being reported instead.
> > > > > > 
> > > > > > It looks like this breaks xfs_growfs.  See
> > > > > > http://bugzilla.redhat.com/show_bug.cgi?id=909602.
> > > > 
> > > > Entirely possible, as the filesystem size is not updated until after
> > > > all the new metadata is written to disk. in 3.8, there's this commit:
> > > > 
> > > > commit fd23683c3b1ab905cba61ea2981c156f4bf52845
> > > > Author: Dave Chinner <dchinner@redhat.com>
> > > > Date:   Mon Nov 12 22:53:59 2012 +1100
> > > > 
> > > >     xfs: growfs: use uncached buffers for new headers
> > > >     
> > > >     When writing the new AG headers to disk, we can't attach write
> > > >     verifiers because they have a dependency on the struct xfs-perag
> > > >     being attached to the buffer to be fully initialised and growfs
> > > >     can't fully initialise them until later in the process.
> > > >     
> > > >     The simplest way to avoid this problem is to use uncached buffers
> > > >     for writing the new headers. These buffers don't have the xfs-perag
> > > >     attached to them, so it's simple to detect in the write verifier and
> > > >     be able to skip the checks that need the xfs-perag.
> > > >     
> > > >     This enables us to attach the appropriate buffer ops to the buffer
> > > >     and henc calculate CRCs on the way to disk. IT also means that the
> > > >     buffer is torn down immediately, and so the first access to the AG
> > > >     headers will re-read the header from disk and perform full
> > > >     verification of the buffer. This way we also can catch corruptions
> > > >     due to problems that went undetected in growfs.
> > > >     
> > > >     Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > > >     Reviewed-by Rich Johnston <rjohnston@sgi.com>
> > > >     Signed-off-by: Ben Myers <bpm@sgi.com>
> > > > 
> > > > As part of the metadata verifier feature. It means that growfs no
> > > > longer uses cached buffers, and hence does not pass through
> > > > _xfs_buf_find() and hence will not trigger the beyond-EOFS that the
> > > > above commit adds.
> > > > 
> > > > > Ick, not good.
> > > > > 
> > > > > Dave, any thoughts here?  Should I drop this from the 3.7-stable queue?
> > > > 
> > > > Yeah, drop it.
> > > > 
> > > > But what I'm now wondering is how this patch got proposed for
> > > > 3.7-stable. I don't recall seeing anything about this being
> > > > proposed.
> > > > 
> > > > <trolls email archives>
> > > > 
> > > > Oh, it happened while I was at LCA and didn't have any access to Red
> > > > Hat email and there was a private thread about it. By the time I
> > > > read it the stable kernel was already released and so it immediately
> > > > dropped from my attention.
> > > > 
> > > > XFS Maintainers: Major process fail. Patches that are being proposed
> > > > for backports need to be posted to the XFS list, reviewed and tested
> > > > before saying they are OK to go.  We have several growfs tests in
> > > > xfstests would have failed if this was actually tested.
> > > > 
> > > > Stable folk: This is the reason why I, quite frankly, don't want to
> > > > support stable kernels *at all*. The overhead of backporting and
> > > > testing a patch to a single kernel target to ensure there are no
> > > > unintended regressions is significant, and there are so many stable
> > > > kernels no it's just a waste of developer time to try to support
> > > > them. And in this case, the process simply wasn't executed and an
> > > > unintended regression that is >this close< to causing filesystem
> > > > corruption slipped through to the stable series.....
> > > 
> > > Ok, how about I never apply any xfs stable kernel patch, unless you send
> > > it to stable@vger.kernel.org?
> > 
> > Dave has made it clear that he doesn't want to be involved in maintaining
> > -stable kernels.  However, my team at SGI is interested in maintaining -stable
> > kernels.  We're not going to use the fact that there is a risk of regression as
> > an excuse to starve -stable of relevant fixes, just as we do not use it as an
> > excuse to starve the upstream branch of feature content.
> > 
> > > I have that rule in place for some other subsystems that don't want me
> > > applying stuff that they aren't aware of, and have no problem doing the same
> > > thing here.
> > > 
> > > Just let me know.
> > 
> > Here are the usual suspects:
> > 
> > Ben Myers <bpm@sgi.com>
> > Mark Tinguely <tinguely@sgi.com>
> > Dave Chinner <dchinner@redhat.com>
> > Eric Sandeen <sandeen@redhat.com>
> 
> Ok, but for this specific patch, did I do something wrong in taking it?

No, not in my opinion.  I was on the CC and had the opportunity to NACK it and
failed to do so.  So today I'm eating crow.

> I guess I'll just let you send me xfs patches, is that ok with everyone
> else?

For my part, I trust any of the gentlemen I listed above to do adequate testing
before proposing xfs patches for -stable.  There are more xfs geeks who fit
into that category (and I prefer not to exclude), but that's my suggestion for
now.

> Dave can just ignore them, especially given redhat's horrible
> email system :)

Lol.  I think RH will be purchasing a smart phone soon.

Thanks,
	Ben

  reply	other threads:[~2013-02-14 20:35 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 13:07 [ 00/89] 3.7.6-stable review Greg Kroah-Hartman
2013-02-01 13:07 ` [ 01/89] can: c_can: fix invalid error codes Greg Kroah-Hartman
2013-02-01 13:07 ` [ 02/89] can: ti_hecc: " Greg Kroah-Hartman
2013-02-01 13:07 ` [ 03/89] can: pch_can: " Greg Kroah-Hartman
2013-02-01 13:07 ` [ 04/89] fs/cifs/cifs_dfs_ref.c: fix potential memory leakage Greg Kroah-Hartman
2013-02-01 13:07 ` [ 05/89] KVM: PPC: Emulate dcbf Greg Kroah-Hartman
2013-02-01 13:07 ` [ 06/89] powerpc/book3e: Disable interrupt after preempt_schedule_irq Greg Kroah-Hartman
2013-02-03 13:01   ` Ben Hutchings
2013-02-01 13:07 ` [ 07/89] ARM: DMA: Fix struct page iterator in dma_cache_maint() to work with sparsemem Greg Kroah-Hartman
2013-02-01 13:07 ` [ 08/89] ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport Greg Kroah-Hartman
2013-02-01 13:07 ` [ 09/89] ARM: at91: rm9200: remake the BGA as default version Greg Kroah-Hartman
2013-02-01 13:07 ` [ 10/89] ARM: S3C64XX: Fix up IRQ mapping for balblair on Cragganmore Greg Kroah-Hartman
2013-02-01 13:07 ` [ 11/89] ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone Greg Kroah-Hartman
2013-02-01 13:07 ` [ 12/89] ARM: 7628/1: head.S: map one extra section for the ATAG/DTB area Greg Kroah-Hartman
2013-02-01 13:07 ` [ 13/89] ARM: virt: Avoid bx instruction for compatibility with <=ARMv4 Greg Kroah-Hartman
2013-02-01 13:07 ` [ 14/89] ARM: virt: boot secondary CPUs through the right entry point Greg Kroah-Hartman
2013-02-01 13:07 ` [ 15/89] ARM: virt: simplify __hyp_stub_install epilog Greg Kroah-Hartman
2013-02-01 13:07 ` [ 16/89] mfd: tc3589x: Use simple irqdomain Greg Kroah-Hartman
2013-02-01 13:07 ` [ 17/89] Bluetooth: Fix sending HCI commands after reset Greg Kroah-Hartman
2013-02-01 13:07 ` [ 18/89] drm/radeon: fix cursor corruption on DCE6 and newer Greg Kroah-Hartman
2013-02-01 13:07 ` [ 19/89] radeon_display: Use pointer return error codes Greg Kroah-Hartman
2013-02-01 13:07 ` [ 20/89] IOMMU, AMD Family15h Model10-1Fh erratum 746 Workaround Greg Kroah-Hartman
2013-02-01 13:07 ` [ 21/89] xfs: Fix possible use-after-free with AIO Greg Kroah-Hartman
2013-02-01 13:07 ` [ 22/89] s390/thp: implement pmdp_set_wrprotect() Greg Kroah-Hartman
2013-02-01 13:07 ` [ 23/89] drm/i915: Disable AsyncFlip performance optimisations Greg Kroah-Hartman
2013-02-01 13:07 ` [ 24/89] drm/i915: GFX_MODE Flush TLB Invalidate Mode must be 1 for scanline waits Greg Kroah-Hartman
2013-02-01 13:07 ` [ 25/89] drm/i915: dump UTS_RELEASE into the error_state Greg Kroah-Hartman
2013-02-01 13:07 ` [ 26/89] mwifiex: update config_bands during infra association Greg Kroah-Hartman
2013-02-03 13:09   ` Ben Hutchings
2013-02-04 19:37     ` Bing Zhao
2013-02-01 13:07 ` [ 27/89] mwifiex: fix typo in PCIe adapter NULL check Greg Kroah-Hartman
2013-02-01 13:07 ` [ 28/89] iwlegacy: fix IBSS cleanup Greg Kroah-Hartman
2013-02-01 13:07 ` [ 29/89] brcmsmac: increase timer reference count for new timers only Greg Kroah-Hartman
2013-02-01 13:07 ` [ 30/89] brcmsmac: handle packet drop during transmit correctly Greg Kroah-Hartman
2013-02-01 13:07 ` [ 31/89] DM-RAID: Fix RAID10s check for sufficient redundancy Greg Kroah-Hartman
2013-02-01 13:07 ` [ 32/89] mac80211: synchronize scan off/on-channel and PS states Greg Kroah-Hartman
2013-02-01 13:07 ` [ 33/89] mac80211: fix FT roaming Greg Kroah-Hartman
2013-02-01 13:07 ` [ 34/89] ath9k_htc: Fix memory leak Greg Kroah-Hartman
2013-02-01 13:07 ` [ 35/89] ath9k: do not link receive buffers during flush Greg Kroah-Hartman
2013-02-01 13:07 ` [ 36/89] ath9k: fix double-free bug on beacon generate failure Greg Kroah-Hartman
2013-02-01 13:07 ` [ 37/89] ath9k: remove the WARN_ON that triggers if generating a beacon fails Greg Kroah-Hartman
2013-02-01 13:07 ` [ 38/89] ath9k: add a better fix for the rx tasklet vs rx flush race Greg Kroah-Hartman
2013-02-03 13:15   ` Ben Hutchings
2013-02-01 13:07 ` [ 39/89] ath9k: fix rx flush handling Greg Kroah-Hartman
2013-02-01 13:07 ` [ 40/89] ath9k: remove sc->rx.rxbuflock to fix a deadlock Greg Kroah-Hartman
2013-02-01 13:07 ` [ 41/89] ath9k: disable the tasklet before taking the PCU lock Greg Kroah-Hartman
2013-02-01 13:07 ` [ 42/89] ath9k_hw: fix chain swap setting when setting rx chainmask to 5 Greg Kroah-Hartman
2013-02-01 13:07 ` [ 43/89] ath9k: allow setting arbitrary antenna masks on AR9003+ Greg Kroah-Hartman
2013-02-01 13:07 ` [ 44/89] ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices Greg Kroah-Hartman
2013-02-01 13:08 ` [ 45/89] ALSA: hda - Add a fixup for Packard-Bell desktop with ALC880 Greg Kroah-Hartman
2013-02-01 13:08 ` [ 46/89] ALSA: hda - fix inverted internal mic on Acer AOA150/ZG5 Greg Kroah-Hartman
2013-02-01 13:08 ` [ 47/89] ALSA: hda - Fix non-snoop page handling Greg Kroah-Hartman
2013-02-01 13:08 ` [ 48/89] EDAC: Test correct variable in ->store function Greg Kroah-Hartman
2013-02-01 13:08 ` [ 49/89] ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLK Greg Kroah-Hartman
2013-02-01 13:08 ` [ 50/89] ASoC: wm2200: correct mixer values and text Greg Kroah-Hartman
2013-02-01 13:08 ` [ 51/89] Bluetooth: Fix incorrect strncpy() in hidp_setup_hid() Greg Kroah-Hartman
2013-02-01 13:08 ` [ 52/89] iommu/intel: disable DMAR for g4x integrated gfx Greg Kroah-Hartman
2013-02-01 13:08 ` [ 53/89] NFS: Fix error reporting in nfs_xdev_mount Greg Kroah-Hartman
2013-02-01 13:08 ` [ 54/89] NFS: Dont silently fail setattr() requests on mountpoints Greg Kroah-Hartman
2013-02-01 13:08 ` [ 55/89] NFSv4: Fix NFSv4 reference counting for trunked sessions Greg Kroah-Hartman
2013-02-01 13:08 ` [ 56/89] NFSv4: Fix NFSv4 trunking discovery Greg Kroah-Hartman
2013-02-01 13:08 ` [ 57/89] NFSv4.1: Ensure that nfs41_walk_client_list() does start lease recovery Greg Kroah-Hartman
2013-02-01 13:08 ` [ 58/89] NFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session Greg Kroah-Hartman
2013-02-01 13:08 ` [ 59/89] HID: usbhid: quirk for Formosa IR receiver Greg Kroah-Hartman
2013-02-01 13:08 ` [ 60/89] smp: Fix SMP function call empty cpu mask race Greg Kroah-Hartman
2013-02-01 13:08 ` [ 61/89] x86/msr: Add capabilities check Greg Kroah-Hartman
2013-02-01 13:08 ` [ 62/89] efi: Make efi_enabled a function to query EFI facilities Greg Kroah-Hartman
2013-02-01 13:08 ` [ 63/89] samsung-laptop: Disable on EFI hardware Greg Kroah-Hartman
2013-02-01 13:08 ` [ 64/89] x86, efi: Fix display detection in EFI boot stub Greg Kroah-Hartman
2013-02-01 13:08 ` [ 65/89] x86, efi: Fix 32-bit EFI handover protocol entry point Greg Kroah-Hartman
2013-02-01 13:08 ` [ 66/89] efi, x86: Pass a proper identity mapping in efi_call_phys_prelog Greg Kroah-Hartman
2013-02-01 13:08 ` [ 67/89] x86, efi: Set runtime_version to the EFI spec revision Greg Kroah-Hartman
2013-02-01 13:08 ` [ 68/89] xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end Greg Kroah-Hartman
2013-02-13 15:30   ` Paolo Bonzini
2013-02-13 16:18     ` Greg Kroah-Hartman
2013-02-14  0:07       ` Dave Chinner
2013-02-14 19:26         ` Greg Kroah-Hartman
2013-02-14 19:55           ` Ben Myers
2013-02-14 20:05             ` Greg Kroah-Hartman
2013-02-14 20:35               ` Ben Myers [this message]
2013-02-15  1:47               ` Dave Chinner
2013-02-15 15:07                 ` Ben Myers
2013-02-01 13:08 ` [ 69/89] drm/radeon: fix error path in kpage allocation Greg Kroah-Hartman
2013-02-01 13:08 ` [ 70/89] drm/radeon: fix a rare case of double kfree Greg Kroah-Hartman
2013-02-01 13:08 ` [ 71/89] kvm: Fix irqfd resampler list walk Greg Kroah-Hartman
2013-02-01 13:08 ` [ 72/89] netfilter: ip[6]t_REJECT: fix wrong transport header pointer in TCP reset Greg Kroah-Hartman
2013-02-01 13:08 ` [ 73/89] netfilter: nf_ct_reasm: fix conntrack reassembly expire code Greg Kroah-Hartman
2013-02-01 13:08 ` [ 74/89] x86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI Greg Kroah-Hartman
2013-02-01 13:08 ` [ 75/89] xfs: fix periodic log flushing Greg Kroah-Hartman
2013-02-01 13:08 ` [ 76/89] target: fix regression with dev_link_magic in target_fabric_port_link Greg Kroah-Hartman
2013-02-01 13:08 ` [ 77/89] netfilter: nfnetlink_log: fix mac address for 6in4 tunnels Greg Kroah-Hartman
2013-02-01 13:08 ` [ 78/89] netfilter: nfnetlink_log: fix possible compilation issue due to missing include Greg Kroah-Hartman
2013-02-01 13:08 ` [ 79/89] netfilter: xt_CT: recover NOTRACK target support Greg Kroah-Hartman
2013-02-01 13:08 ` [ 80/89] netfilter: fix missing dependencies for the NOTRACK target Greg Kroah-Hartman
2013-02-01 13:08 ` [ 81/89] netfilter: xt_hashlimit: fix namespace destroy path Greg Kroah-Hartman
2013-02-01 13:08 ` [ 82/89] netfilter: xt_hashlimit: fix race that results in duplicated entries Greg Kroah-Hartman
     [not found]   ` <CA+6hz4qjj3wGgo-m50=qRxAN+OGUXKfUfgRp7Pys7NixgwQ3vQ@mail.gmail.com>
2013-02-01 15:32     ` Greg Kroah-Hartman
     [not found]       ` <CA+6hz4qjJpaH4HeoQ_NWT5ZX0+1PG-O87kxPK0rKEBG9go37DQ@mail.gmail.com>
2013-02-01 16:36         ` Greg Kroah-Hartman
2013-02-01 16:34     ` Pablo Neira Ayuso
2013-02-01 16:56       ` Feng Gao
2013-02-01 17:47         ` Pablo Neira Ayuso
2013-02-01 13:08 ` [ 83/89] netfilter: xt_recent: fix namespace destroy path Greg Kroah-Hartman
2013-02-01 13:08 ` [ 84/89] netfilter: xt_recent: avoid high order page allocations Greg Kroah-Hartman
2013-02-01 13:08 ` [ 85/89] netfilter: nf_conntrack: fix BUG_ON while removing nf_conntrack with netns Greg Kroah-Hartman
2013-02-01 13:08 ` [ 86/89] netfilter: x_tables: print correct hook names for ARP Greg Kroah-Hartman
2013-02-01 13:08 ` [ 87/89] netfilter: ctnetlink: fix leak in error path of ctnetlink_create_expect Greg Kroah-Hartman
2013-02-01 13:08 ` [ 88/89] drm/i915: fix FORCEWAKE posting reads Greg Kroah-Hartman
2013-02-01 13:08 ` [ 89/89] slub: assign refcount for kmalloc_caches Greg Kroah-Hartman
2013-02-01 23:24 ` [ 00/89] 3.7.6-stable review Shuah Khan
2013-02-02 21:39 ` Satoru Takeuchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130214203533.GB16566@sgi.com \
    --to=bpm@sgi.com \
    --cc=bfoster@redhat.com \
    --cc=caiqian@redhat.com \
    --cc=david@fromorbit.com \
    --cc=dchinner@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).