linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "David Müller" <dave.mueller@gmx.ch>,
	jgarzik@pobox.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: fix out-of-bounds access in pata_oldpiix.c
Date: Fri, 18 Jul 2008 16:15:25 +0200	[thread overview]
Message-ID: <200807181615.26272.bzolnier@gmail.com> (raw)
In-Reply-To: <20080718095541.6bf01fff@the-village.bc.nu>

On Friday 18 July 2008, Alan Cox wrote:
> On Fri, 18 Jul 2008 09:06:12 +0200
> David Müller <dave.mueller@gmx.ch> wrote:
> 
> > The "pata_oldpiix" driver in linux-2.6.26 is calling its "set_dmamode" 
> > routine also locally, but under different preconditions as the 
> > corresponding call in libata-core.c. This may cause an "out-of-array 
> > bounds" access in "oldpiix_set_dmamode".
> 
> This looks wrong adev->dma_mode should never be invalid at this point.
> Are you not confusing dma_mask and dma_mode. Can you provide the
> backtraces of the failing case and the actual chip variant you are using ?
> 
> Either way the fix is not in oldpiix if this is appearing as 0xFF but in
> the core code so NAK

->dma_mode == 0xff means that DMA is unsupported by a given device
and according to the core code it is a valid ->dma_mode setting.

This may want to be changed in the future but as the things are right
now David's patch is correct and fixes a real bug.  Please UNNAK.

Thanks,
Bart

  reply	other threads:[~2008-07-18 14:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18  7:06 [PATCH] libata: fix out-of-bounds access in pata_oldpiix.c David Müller
2008-07-18  8:55 ` Alan Cox
2008-07-18 14:15   ` Bartlomiej Zolnierkiewicz [this message]
2008-08-01  4:35     ` Tejun Heo
2008-08-01 22:29       ` Alan Cox
2008-08-03  5:22         ` Tejun Heo

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=200807181615.26272.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dave.mueller@gmx.ch \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /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).