alistair23-linux/arch/arm64/mm
Mark Rutland 35545f0ccb arm64: mm: dump: fix shift warning
When building with 48-bit VAs, it's possible to get the following
warning when building the arm64 page table dumping code:

arch/arm64/mm/dump.c: In function ‘walk_pgd’:
arch/arm64/mm/dump.c:266:2: warning: right shift count >= width of type
  pgd_t *pgd = pgd_offset(mm, 0);
  ^

As pgd_offset is a macro and the second argument is not cast to any
particular type, the zero will be given integer type by the compiler.
As pgd_offset passes the pargument to pgd_index, we then try to shift
the 32-bit integer by at least 39 bits (for 4k pages).

Elsewhere the pgd_offset is passed a second argument of unsigned long
type, so let's do the same here by passing '0UL' rather than '0'.

Cc: Kees Cook <keescook@chromium.org>
Acked-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-12-11 12:08:07 +00:00
..
cache.S arm64: compat: align cacheflush syscall with arch/arm 2014-12-01 13:31:12 +00:00
context.c
copypage.c arm64: export __cpu_{clear,copy}_user_page functions 2014-07-08 17:30:51 +01:00
dma-mapping.c arm64: add atomic pool for non-coherent and CMA allocations 2014-10-09 22:25:52 -04:00
dump.c arm64: mm: dump: fix shift warning 2014-12-11 12:08:07 +00:00
extable.c
fault.c arm64: mm: report unhandled level-0 translation faults correctly 2014-11-21 14:22:22 +00:00
flush.c arm64: mm: enable RCU fast_gup 2014-10-09 22:26:01 -04:00
hugetlbpage.c hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
init.c arm64: add alternative runtime patching 2014-11-25 13:46:36 +00:00
ioremap.c arm64: Factor out fixmap initialization from ioremap 2014-11-25 15:56:45 +00:00
Makefile arm64: add support to dump the kernel page tables 2014-11-26 17:19:18 +00:00
mm.h arm64: remove the unnecessary arm64_swiotlb_init() 2014-12-05 12:19:52 +00:00
mmap.c arm64/mm: Remove hack in mmap randomize layout 2014-11-18 16:58:15 +00:00
mmu.c arm64: Factor out fixmap initialization from ioremap 2014-11-25 15:56:45 +00:00
pageattr.c arm64: pageattr: Correctly adjust unaligned start addresses 2014-09-12 16:34:50 +01:00
pgd.c arm64: pgalloc: consistently use PGALLOC_GFP 2014-11-20 12:05:18 +00:00
proc-macros.S arm64: mm: use ubfm for dcache_line_size 2014-01-22 16:23:58 +00:00
proc.S arm64: convert part of soft_restart() to assembly 2014-09-08 14:39:18 +01:00