linux/arch/arm64
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
..
boot arm64: vexpress: Add CLCD support to the ARMv8 model platform 2014-10-22 15:33:16 +01:00
configs arm64: vexpress: Add CLCD support to the ARMv8 model platform 2014-10-22 15:33:16 +01:00
crypto arm64/crypto: use crypto instructions to generate AES key schedule 2014-11-06 17:25:28 +00:00
include arm64: add module support for alternatives fixups 2014-12-04 10:28:24 +00:00
kernel arm64: psci: Fix build breakage without PM_SLEEP 2014-12-11 12:08:06 +00:00
kvm arm64: kvm: eliminate literal pool entries 2014-11-07 15:04:54 +00:00
lib arm64: lib: Implement optimized string length routines 2014-05-23 15:17:12 +01:00
mm arm64: mm: dump: fix shift warning 2014-12-11 12:08:07 +00:00
net arm64: bpf: lift restriction on last instruction 2014-12-03 18:04:09 +00:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: add seccomp support 2014-11-28 10:24:59 +00:00
Kconfig.debug arm64: add support to dump the kernel page tables 2014-11-26 17:19:18 +00:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-10-14 09:22:26 +02:00