[PATCH V2] ARM: mm: make UACCESS_WITH_MEMCPY huge page aware
Steve Capper
steve.capper at linaro.org
Fri Oct 11 06:11:32 EDT 2013
On Fri, Oct 11, 2013 at 10:57:51AM +0100, Russell King - ARM Linux wrote:
> On Wed, Sep 25, 2013 at 01:31:29PM +0100, Steve Capper wrote:
> > The memory pinning code in uaccess_with_memcpy.c does not check
> > for HugeTLB or THP pmds, and will enter an infinite loop should
> > a __copy_to_user or __clear_user occur against a huge page.
>
> This patch causes a build error with certain configuration options:
>
> arch/arm/lib/uaccess_with_memcpy.c: In function 'pin_page_for_write':
> arch/arm/lib/uaccess_with_memcpy.c:57:2: error: implicit declaration of function 'pmd_thp_or_huge'
> arch/arm/lib/uaccess_with_memcpy.c:60:3: error: implicit declaration of function 'pmd_hugewillfault'
>
> found via a randconfig build, configuration:
>
> http://www.arm.linux.org.uk/developer/build/file.php?type=config&idx=6265
>
> > ---
> > arch/arm/include/asm/pgtable-3level.h | 3 +++
> > arch/arm/lib/uaccess_with_memcpy.c | 41 ++++++++++++++++++++++++++++++++---
> > 2 files changed, 41 insertions(+), 3 deletions(-)
>
> As the macros are in pgtable-3level.h, this won't work with any configuration
> using the 2level header file.
Hi Russell,
Apologies, that was careless rebasing on my part.
Would you like a fix for this, or should I send a new patch?
Thanks,
--
Steve
More information about the linux-arm-kernel
mailing list