[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a0m2WhWKZgMnJuarh5Y3uF-A3Ou228in-0wLg=9bTpMKA@mail.gmail.com>
Date: Fri, 28 Sep 2018 11:15:16 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Doug Ledford <dledford@...hat.com>,
Leon Romanovsky <leon@...nel.org>,
Matan Barak <matanb@...lanox.com>,
Parav Pandit <parav@...lanox.com>, xavier.huwei@...wei.com,
huyn@...lanox.com, linux-rdma <linux-rdma@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] RDMA/ucontext: fix building with CONFIG_MMU=n
On Thu, Sep 27, 2018 at 6:26 PM Jason Gunthorpe <jgg@...pe.ca> wrote:
>
> 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 ??
I think I just never hit those in my randconfig builds. Out of the three
drivers, one is 64-bit only, and the others depend on PCI. The nommu
configurations I'm testing in randconfig are all 32-bit without PCI.
> > 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?
Works for me. Can you just commit that yourself with 'Reported-by:
Arnd Bergmann <arnd@...db.de>' then?
Arnd
Powered by blists - more mailing lists