[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 10 Oct 2019 07:09:50 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Omer Shpigelman <oshpigelman@...ana.ai>
Cc: "oded.gabbay@...il.com" <oded.gabbay@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] habanalabs: support vmalloc memory mapping
On Thu, Oct 10, 2019 at 02:06:22PM +0000, Omer Shpigelman wrote:
> This patch adds support in mapping of vmalloc memory.
> In contrary to user memory, vmalloc memory is already pinned and has no
> vm_area structure. Therefore a new capability was needed in order to map
> this memory.
Unless I am missing something you mix user and kernel pointers in
your is_vmalloc_addr checks. That will break on those architectures
that have separate kernel and user address spaces.
> Mapping vmalloc memory is needed for Gaudi ASIC.
How does that ASIC pass in the vmalloc memory? I don't fully understand
the code, but it seems like the addresses are fed from ioctl, which
means they only come from userspace.
Powered by blists - more mailing lists