public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH v4] mmc: sdio: check the buffer address for sdio API
Date: Tue, 14 Feb 2017 11:45:31 -0800	[thread overview]
Message-ID: <20170214194531.GA21773@infradead.org> (raw)
In-Reply-To: <1486428890-28187-1-git-send-email-shawn.lin@rock-chips.com>

On Tue, Feb 07, 2017 at 08:54:50AM +0800, Shawn Lin wrote:
> It's fine if the host driver use PIO mode to transfer the
> vmalloc area buffer but not for DMA mode. The sdio APIs haven't
> provide the capability to tell the caller whether it will use DMA
> to finish the IO transfer or not,

Wether you dma or pio does not matter.  Addressability requirements
are slightly different, but it's nothing your patch is going to help
with.

> so don't give the randomly
> insmoded sdio function driver the possibility to break the kernel.
> Also the APIs shouldn't take the liberty to do a copy for these
> cases and just kick out these requests should be enough.
> 
> This issue is observed by doing insmod a downloaded wifi module
> driver and the kernel panic right away. Unfortunately we don't have
> the source code but adding this patch that it proves that the module
> driver was passing on a vmalloc area buffer for sdio APIs.

So don't use that illegally redistributed driver.  Working around it
is certainly nothing the upstream kernel cares about at all.

      parent reply	other threads:[~2017-02-14 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07  0:54 [PATCH v4] mmc: sdio: check the buffer address for sdio API Shawn Lin
2017-02-14  9:17 ` Ulf Hansson
2017-02-14 16:18   ` Jens Axboe
2017-02-14 19:34     ` Russell King - ARM Linux
2017-02-15  4:12       ` Shawn Lin
2017-02-15  9:55         ` Russell King - ARM Linux
2017-02-14 19:45 ` Christoph Hellwig [this message]

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=20170214194531.GA21773@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.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