summaryrefslogtreecommitdiffstats
path: root/arch/m32r
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2016-04-28 17:09:08 -0700
committerIngo Molnar <mingo@kernel.org>2016-04-29 11:03:30 +0200
commit4abf061bf87bbd856c8d60199b2fba8b8f9b9fd6 (patch)
treed7e276656737cc3aa430da52a2791c1104b474d0 /arch/m32r
parent4d2d542482205d3df1a0852751f5b004cc6390cc (diff)
downloadlinux-4abf061bf87bbd856c8d60199b2fba8b8f9b9fd6.tar.bz2
x86/boot: Correctly bounds-check relocations
Relocation handling performs bounds checking on the resulting calculated addresses. The existing code uses output_len (VO size plus relocs size) as the max address. This is not right since the max_addr check should stop at the end of VO and exclude bss, brk, etc, which follows. The valid range should be VO [_text, __bss_start] in the loaded physical address space. This patch adds an export for __bss_start in voffset.h and uses it to set the correct limit for max_addr. Signed-off-by: Yinghai Lu <yinghai@kernel.org> [ Rewrote the changelog. ] Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Young <dyoung@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: lasse.collin@tukaani.org Link: http://lkml.kernel.org/r/1461888548-32439-7-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/m32r')
0 files changed, 0 insertions, 0 deletions