From: Andrew Morton <akpm@linux-foundation.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org,
Markus Lidel <Markus.Lidel@shadowconnect.com>,
Vasily Averin <vvs@sw.ru>
Subject: Re: [PATCH]: Proposed fix to the I2O problems with > 4GB space
Date: Tue, 29 Jul 2008 00:47:56 -0700 [thread overview]
Message-ID: <20080729004756.113d85a0.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080725131637.48072ef3@lxorguk.ukuu.org.uk>
On Fri, 25 Jul 2008 13:16:37 +0100 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> From: Alan Cox <alan@redhat.com>
>
> The I2O ioctls assume 32bits. In itself that is fine as they are old cards
> and nobody uses 64bit. However on LKML it was noted this assumption is also
> made for some ioctl allocated memory and is unsafe on 64bit systems.
>
> Fixing this is a mess. It turns out there is tons of crap buried in a header
> file that does racy 32/64bit filtering on the masks.
>
> So we:
> - Verify all callers of the racy code can sleep (i2o_dma_[re]alloc)
> - Move the code into a new i2o/memory.c file
> - Remove the gfp_mask argument so nobody can try and misuse the function
> - Wrap a mutex around the problem area (a single mutex is easy to do and
> none of this is performance relevant)
> - Switch the remaining problem kmalloc holdout to use i2o_dma_alloc
>
> There is a remaining race but that causes 32bit allocations to occur very
> rarely during block I/O when 64bit could be used. I don't think that is worth
> the cost of fixing as the impact is just a negligible performance loss.
>
> Signed-off-by: Alan Cox <alan@redhat.com>
>
I think you sent the wrong version of this patch - i2o_dma_alloc() is
all mucked up. Sometimes takes three args, sometimes four. When it's
four the fourth arg is sometimes a gfp_t, sometimes a PCI_DMA_foo.
It fell afoul of the dma_mapping_error() interface change too.
> (but could do with more testing, especially on 64bit > 4GB boxes with 64bit
> capable I2O cards)
A bit of git-trolling indicates that Vasily might be able to help out
with a bit of testing?
next prev parent reply other threads:[~2008-07-29 7:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 12:16 Alan Cox
2008-07-29 7:47 ` Andrew Morton [this message]
2008-07-29 8:29 ` Vasily Averin
2008-07-29 8:51 ` Alan Cox
2008-07-29 9:23 ` Vasily Averin
2008-07-29 9:12 ` Alan Cox
2008-07-29 9:06 ` Alan Cox
2008-07-30 16:48 ` Alan Cox
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=20080729004756.113d85a0.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Markus.Lidel@shadowconnect.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=vvs@sw.ru \
/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
all inboxes | Powered by JetHome®