Re: [PATCH v2 04/32] mm/pgtable: allow pte_offset_map[_lock]() to fail

Matthew Wilcox
2023-08-05T17:08:07Z

On Sun, Aug 06, 2023 at 12:06:28AM +0800, Yongqin Liu wrote:
> On Sat, 29 Jul 2023 at 00:58, Hugh Dickins <hughd@google.com> wrote:
> >
> > On Fri, 28 Jul 2023, Matthew Wilcox wrote:
> > > On Fri, Jul 28, 2023 at 09:53:29PM +0800, Yongqin Liu wrote:
> > > > Hi, Hugh
> > > >
> > > > It seems this change makes pte_offset_map_lock not possible to be
> > > > called in out of tree modules,
> > > > otherwise it will report error like this:
> > > > ERROR: modpost: "__pte_offset_map_lock"
> > > > [../omap-modules/android-mainline/pvr/pvrsrvkm.ko] undefined!
> > > >
> > > > Not sure if you have any idea about it, and any suggestions on how to
> > > > resolve it?
> > >
> > > Please explain why this module needs to map page tables
> >
> > +1
> Sorry, I am not able to give any explanation here,
> I am not familiar with the pvrsrvkm source, I just use it to have one
> working AOSP build.
>
> here is the source file where pte_offset_map_lock is called,
> https://android-git.linaro.org/kernel/omap-modules.git/tree/pvr/services4/srvkm/env/linux/osfunc.c?h=android-mainline#n3508
> in case you could know something with a quick look.

Isn't this just get_user_pages()?