diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2017-08-03 21:03:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-08 13:12:47 +0300 |
commit | a29152831bb2906f486501ff309a15a35e81a24f (patch) | |
tree | 214cbb26371bc11745cb7bac76832f82794f7cea /security/integrity/digsig_asymmetric.c | |
parent | e7f42b03fbfb8309a2169aa7c1917b366a886506 (diff) | |
download | linux-a29152831bb2906f486501ff309a15a35e81a24f.tar.xz |
arm64: avoid overflow in VA_START and PAGE_OFFSET
commit 82cd588052815eb4146f9f7c5347ca5e32c56360 upstream.
The bitmask used to define these values produces overflow, as seen by
this compiler warning:
arch/arm64/kernel/head.S:47:8: warning:
integer overflow in preprocessor expression
#elif (PAGE_OFFSET & 0x1fffff) != 0
^~~~~~~~~~~
arch/arm64/include/asm/memory.h:52:46: note:
expanded from macro 'PAGE_OFFSET'
#define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS -
1))
~~~~~~~~~~~~~~~~~~ ^
It would be preferrable to use GENMASK_ULL() instead, but it's not set
up to be used from assembly (the UL() macro token pastes UL suffixes
when not included in assembly sources).
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Yury Norov <ynorov@caviumnetworks.com>
Suggested-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/integrity/digsig_asymmetric.c')
0 files changed, 0 insertions, 0 deletions