linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Doug Ledford <dledford@redhat.com>,
	Leon Romanovsky <leon@kernel.org>,
	Matan Barak <matanb@mellanox.com>,
	Parav Pandit <parav@mellanox.com>,
	"Wei Hu(Xavier)" <xavier.huwei@huawei.com>,
	Huy Nguyen <huyn@mellanox.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/ucontext: fix building with CONFIG_MMU=n
Date: Thu, 27 Sep 2018 10:26:05 -0600	[thread overview]
Message-ID: <20180927162605.GB28301@ziepe.ca> (raw)
In-Reply-To: <20180927101017.990471-1-arnd@arndb.de>

On Thu, Sep 27, 2018 at 12:10:03PM +0200, Arnd Bergmann wrote:
> The zap_vma_ptes() is declared but not defined on NOMMU kernels,
> causing a link error for the newly added uverbs code:
> 
> drivers/infiniband/core/uverbs_main.o: In function `uverbs_user_mmap_disassociate':
> uverbs_main.c:(.text+0x114c): undefined reference to `zap_vma_ptes'
> drivers/infiniband/core/uverbs_main.o: In function `rdma_umap_open':
> uverbs_main.c:(.text+0x53c): undefined reference to `zap_vma_ptes'

I'm a bit surprised by this - the code is not new, it just got moved
out of the drivers, and I don't see any protections there against
CONFIG_MMU ??
 
> To fix this, we can either make uverbs depend on CONFIG_MMU, or try
> to build it anyway. Since this is the only compile-time dependency,
> I decided to allow building it with an extra compile-time check for
> CONFIG_MMU before calling the one function.

Hrm. So this code doesn't work at all on NOMMU, it relies on
remap_pfn_range, which always fails on those kernels, 

Due to this of this the entirety of INFINIBAND_USER_ACCESS is broken.

I think a kconfig change is the better way to go?

Jason

  reply	other threads:[~2018-09-27 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27 10:10 [PATCH] RDMA/ucontext: fix building with CONFIG_MMU=n Arnd Bergmann
2018-09-27 16:26 ` Jason Gunthorpe [this message]
2018-09-28  9:15   ` Arnd Bergmann

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=20180927162605.GB28301@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=arnd@arndb.de \
    --cc=dledford@redhat.com \
    --cc=huyn@mellanox.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matanb@mellanox.com \
    --cc=parav@mellanox.com \
    --cc=xavier.huwei@huawei.com \
    /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).