hulk inclusion category: bugfix bugzilla: NA CVE: NA
MAP_PA32BIT was defined in uapi/asm-generic/mman.h, that was not automatically included by mm/mmap.c when building on mips platform, and result in following compiling error:
mm/mmap.c: In function ‘do_mmap’: mm/mmap.c:1450:14: error: ‘MAP_PA32BIT’ undeclared (first use in this function); did you mean ‘MAP_32BIT’? if (flags & MAP_PA32BIT) ^~~~~~~~~~~ MAP_32BIT mm/mmap.c:1450:14: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [scripts/Makefile.build:303: mm/mmap.o] Error 1
Fixes: e138253f2b82 ("svm: add support for allocing memory which is within 4G physical address in svm_mmap") Signed-off-by: Zhengyuan Liu liuzhengyuan@tj.kylinos.cn --- arch/mips/include/uapi/asm/mman.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/mips/include/uapi/asm/mman.h b/arch/mips/include/uapi/asm/mman.h index 3035ca499cd8..0247a3c705af 100644 --- a/arch/mips/include/uapi/asm/mman.h +++ b/arch/mips/include/uapi/asm/mman.h @@ -51,6 +51,7 @@ #define MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */ #define MAP_HUGETLB 0x80000 /* create a huge page mapping */ #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ +#define MAP_PA32BIT 0x400000
/* * Flags for msync
On 2020/12/23 15:33, Zhengyuan Liu wrote:
MAP_PA32BIT was defined in uapi/asm-generic/mman.h, that was not automatically included by mm/mmap.c when building on mips platform, and result in following compiling error:
mm/mmap.c: In function ‘do_mmap’: mm/mmap.c:1450:14: error: ‘MAP_PA32BIT’ undeclared (first use in this function); did you mean ‘MAP_32BIT’? if (flags & MAP_PA32BIT) ^~~~~~~~~~~ MAP_32BIT mm/mmap.c:1450:14: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [scripts/Makefile.build:303: mm/mmap.o] Error 1
hello, The compile error also occurs on the xtensa/alpha/powerpc/parisc/sparc platform. can you fix it?
Thanks
On 2020/12/30 15:02, Bixuan Cui wrote:
On 2020/12/23 15:33, Zhengyuan Liu wrote:
MAP_PA32BIT was defined in uapi/asm-generic/mman.h, that was not automatically included by mm/mmap.c when building on mips platform, and result in following compiling error:
mm/mmap.c: In function ‘do_mmap’: mm/mmap.c:1450:14: error: ‘MAP_PA32BIT’ undeclared (first use in this function); did you mean ‘MAP_32BIT’? if (flags & MAP_PA32BIT) ^~~~~~~~~~~ MAP_32BIT mm/mmap.c:1450:14: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [scripts/Makefile.build:303: mm/mmap.o] Error 1
hello, The compile error also occurs on the xtensa/alpha/powerpc/parisc/sparc platform. can you fix it?
Can we just use MAP_PA32BIT for ARM64 and x86 only? then we don't need to update multi platforms.
Thanks Hanjun
On 2020/12/30 15:17, Hanjun Guo wrote:
On 2020/12/30 15:02, Bixuan Cui wrote:
On 2020/12/23 15:33, Zhengyuan Liu wrote:
MAP_PA32BIT was defined in uapi/asm-generic/mman.h, that was not automatically included by mm/mmap.c when building on mips platform, and result in following compiling error:
mm/mmap.c: In function ‘do_mmap’: mm/mmap.c:1450:14: error: ‘MAP_PA32BIT’ undeclared (first use in this function); did you mean ‘MAP_32BIT’? if (flags & MAP_PA32BIT) ^~~~~~~~~~~ MAP_32BIT mm/mmap.c:1450:14: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [scripts/Makefile.build:303: mm/mmap.o] Error 1
hello, The compile error also occurs on the xtensa/alpha/powerpc/parisc/sparc platform. can you fix it?
Can we just use MAP_PA32BIT for ARM64 and x86 only? then we don't need to update multi platforms.
I think we need fix this issue as Zhengyuan did, withdraw my comments above.
Thanks Hanjun
On 2020/12/31 9:45, Hanjun Guo wrote:
On 2020/12/30 15:17, Hanjun Guo wrote:
On 2020/12/30 15:02, Bixuan Cui wrote:
On 2020/12/23 15:33, Zhengyuan Liu wrote:
MAP_PA32BIT was defined in uapi/asm-generic/mman.h, that was not automatically included by mm/mmap.c when building on mips platform, and result in following compiling error:
mm/mmap.c: In function ‘do_mmap’: mm/mmap.c:1450:14: error: ‘MAP_PA32BIT’ undeclared (first use in this function); did you mean ‘MAP_32BIT’? if (flags & MAP_PA32BIT) ^~~~~~~~~~~ MAP_32BIT mm/mmap.c:1450:14: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [scripts/Makefile.build:303: mm/mmap.o] Error 1
hello, The compile error also occurs on the xtensa/alpha/powerpc/parisc/sparc platform. can you fix it?
Can we just use MAP_PA32BIT for ARM64 and x86 only? then we don't need to update multi platforms.
I think we need fix this issue as Zhengyuan did, withdraw my comments above.
I agree, we just apply this patch for mips. And, could Bixuan give a fix for other archs?
Thanks Hanjun .