[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1EB31694-2C49-415B-8394-A91724665D71@gentoo.org>
Date: Thu, 30 Jan 2014 20:02:23 -0500
From: Richard Yao <ryao@...too.org>
To: David Miller <davem@...emloft.net>
Cc: "ericvh@...il.com" <ericvh@...il.com>,
"rminnich@...dia.gov" <rminnich@...dia.gov>,
"lucho@...kov.net" <lucho@...kov.net>,
"v9fs-developer@...ts.sourceforge.net"
<v9fs-developer@...ts.sourceforge.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel@...too.org" <kernel@...too.org>,
"aneesh.kumar@...ux.vnet.ibm.com" <aneesh.kumar@...ux.vnet.ibm.com>,
"will.deacon@....com" <will.deacon@....com>,
"cov@...eaurora.org" <cov@...eaurora.org>,
"behlendorf1@...l.gov" <behlendorf1@...l.gov>,
"mthode@...ode.org" <mthode@...ode.org>
Subject: Re: [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
On Jan 30, 2014, at 7:44 PM, David Miller <davem@...emloft.net> wrote:
> From: David Miller <davem@...emloft.net>
> Date: Thu, 30 Jan 2014 16:29:26 -0800 (PST)
>
>> From: Richard Yao <ryao@...too.org>
>> Date: Thu, 30 Jan 2014 13:02:48 -0500
>>
>>> The 9p-virtio transport does zero copy on things larger than 1024 bytes
>>> in size. It accomplishes this by returning the physical addresses of
>>> pages to the virtio-pci device. At present, the translation is usually a
>>> bit shift.
>>>
>>> However, that approach produces an invalid page address when we
>>> read/write to vmalloc buffers, such as those used for Linux kernle
>>> modules. This causes QEMU to die printing:
>>>
>>> qemu-system-x86_64: virtio: trying to map MMIO memory
>>>
>>> This patch enables 9p-virtio to correctly handle this case. This not
>>> only enables us to load Linux kernel modules off virtfs, but also
>>> enables ZFS file-based vdevs on virtfs to be used without killing QEMU.
>>>
>>> Also, special thanks to both Avi Kivity and Alexander Graf for their
>>> interpretation of QEMU backtraces. Without their guidence, tracking down
>>> this bug would have taken much longer.
>>>
>>> Signed-off-by: Richard Yao <ryao@...too.org>
>>> Acked-by: Alexander Graf <agraf@...e.de>
>>> Reviewed-by: Will Deacon <will.deacon@....com>
>>
>> Applied, thanks.
>
> Actually I had to revert, is_vmalloc_or_malloc_addr() is not exported to
> modules, so this change breaks the build.
Thanks for catching that. I had originally used is_vmalloc_addr() instead of is_vmalloc_or_malloc_addr(), but changed it after realizing this did not correct the problem on all architectures. The is_vmalloc_addr() lives in headers. I will send out a patch to get that symbol exported and resubmit this after it is merged.--
To unsubscribe from this list: send the line "unsubscribe netdev" 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