mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
kgdb: don't needlessly skip PAGE_USER test for Fsl booke
commit 56151e7534 upstream.
The bypassing of this test is a leftover from 2.4 vintage
kernels, and is no longer appropriate, or even used by KGDB.
Currently KGDB uses probe_kernel_write() for all access to
memory via the KGDB core, so it can simply be deleted.
This fixes CVE-2010-1446.
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Paul Mackerras <paulus@samba.org>
CC: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wufei <fei.wu@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a2fe6ea222
commit
150d8a1fe2
@@ -131,15 +131,10 @@ void settlbcam(int index, unsigned long virt, phys_addr_t phys,
|
||||
TLBCAM[index].MAS3 = (phys & PAGE_MASK) | MAS3_SX | MAS3_SR;
|
||||
TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0);
|
||||
|
||||
#ifndef CONFIG_KGDB /* want user access for breakpoints */
|
||||
if (flags & _PAGE_USER) {
|
||||
TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
|
||||
TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
|
||||
}
|
||||
#else
|
||||
TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
|
||||
TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
|
||||
#endif
|
||||
|
||||
tlbcam_addrs[index].start = virt;
|
||||
tlbcam_addrs[index].limit = virt + size - 1;
|
||||
|
||||
Reference in New Issue
Block a user