aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts
diff options
context:
space:
mode:
authorDave Hansen <dave.hansen@linux.intel.com>2015-11-11 10:19:34 -0800
committerIngo Molnar <mingo@kernel.org>2015-11-12 09:20:37 +0100
commitf3119b830264d89d216bfb378ab65065dffa02d9 (patch)
tree7f2be5200427719335b0549c319ecc73728c61af /tools/perf/scripts
parentx86/mpx: Do proper get_user() when running 32-bit binaries on 64-bit kernels (diff)
downloadlinux-f3119b830264d89d216bfb378ab65065dffa02d9.tar.gz
linux-f3119b830264d89d216bfb378ab65065dffa02d9.zip
x86/mpx: Fix 32-bit address space calculation
I received a bug report that running 32-bit MPX binaries on 64-bit kernels was broken. I traced it down to this little code snippet. We were switching our "number of bounds directory entries" calculation correctly. But, we didn't switch the other side of the calculation: the virtual space size. This meant that we were calculating an absurd size for bd_entry_virt_space() on 32-bit because we used the 64-bit virt_space. This was _also_ broken for 32-bit kernels running on 64-bit hardware since boot_cpu_data.x86_virt_bits=48 even when running in 32-bit mode. Correct that and properly handle all 3 possible cases: 1. 32-bit binary on 64-bit kernel 2. 64-bit binary on 64-bit kernel 3. 32-bit binary on 32-bit kernel This manifested in having bounds tables not properly unmapped. It "leaked" memory but had no functional impact otherwise. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: <stable@vger.kernel.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave@sr71.net> 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> Link: http://lkml.kernel.org/r/20151111181934.FA7FAC34@viggo.jf.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions
he bypass clock source for dpll_iva and othersRavikumar Kattekola1-9/+81 2015-03-03Linux 4.0-rc2v4.0-rc2Linus Torvalds1-1/+1 2015-03-03drm/i915: Fix modeset state confusion in the load detect codeDaniel Vetter1-0/+1 2015-03-01ARM: OMAP4+: PRM: fix omap4 version of prm_save_and_clear_irqenTero Kristo1-2/+2 2015-03-01ARM: OMAP2+: hwmod: fix deassert hardreset clkdm usecountingTero Kristo1-5/+4 2015-03-01locking/rtmutex: Set state back to running on errorSebastian Andrzej Siewior1-0/+1 2015-02-28mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED definesKirill A. Shutemov6-0/+10 2015-02-28mm: page_alloc: revert inadvertent !__GFP_FS retry behavior changeJohannes Weiner1-1/+8 2015-02-28kernel/sys.c: fix UNAME26 for 4.0Jon DeVree1-1/+2 2015-02-28mm: memcontrol: use "max" instead of "infinity" in control knobsJohannes Weiner2-8/+8 2015-02-28zram: use proper type to update max_used_pagesJoonsoo Kim1-1/+1 2015-02-28drivers/rtc/rtc-ds1685.c: fix conditional in ds1685_rtc_sysfs_time_regs_{show...Joshua Kinard1-2/+2 2015-02-28nilfs2: fix potential memory overrun on inodeRyusuke Konishi1-3/+44