linux-kernel-test/arch/parisc
James Bottomley 949a05d034 [PARISC] fix virtual aliasing issue in get_shared_area()
On Thu, 2012-11-01 at 16:45 -0700, Michel Lespinasse wrote:
> Looking at the arch/parisc/kernel/sys_parisc.c implementation of
> get_shared_area(), I do have a concern though. The function basically
> ignores the pgoff argument, so that if one creates a shared mapping of
> pages 0-N of a file, and then a separate shared mapping of pages 1-N
> of that same file, both will have the same cache offset for their
> starting address.
>
> This looks like this would create obvious aliasing issues. Am I
> misreading this ? I can't understand how this could work good enough
> to be undetected, so there must be something I'm missing here ???

This turns out to be correct and we need to pay attention to the pgoff as
well as the address when creating the virtual address for the area.
Fortunately, the bug is rarely triggered as most applications which use pgoff
tend to use large values (git being the primary one, and it uses pgoff in
multiples of 16MB) which are larger than our cache coherency modulus, so the
problem isn't often seen in practise.

Reported-by: Michel Lespinasse <walken@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-15 05:49:34 -08:00
..
configs kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
hpux vfs: define struct filename and have getname() return it 2012-10-12 20:14:55 -04:00
include UAPI: (Scripted) Disintegrate arch/parisc/include/asm 2012-10-16 21:28:05 +01:00
kernel [PARISC] fix virtual aliasing issue in get_shared_area() 2012-11-15 05:49:34 -08:00
lib [PARISC] update parisc to use generic strncpy_from_user() 2012-05-31 11:14:37 +01:00
math-emu bug.h: add include of it to various implicit C users 2012-02-29 17:15:08 -05:00
mm parisc: Use generic init_task 2012-05-05 13:00:24 +02:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
defpalo.conf
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
Kconfig Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
Kconfig.debug parisc: add strict copy size checks (v2) 2010-03-06 22:54:09 +00:00
Makefile [PARISC] fix code to find libgcc 2012-06-05 14:10:23 +09:00
nm