linux/arch/powerpc
sukadev@linux.vnet.ibm.com 8a3e3d31d1 powerpc: Punch a hole in /dev/mem for librtas
With CONFIG_STRICT_DEVMEM=y, user space cannot read any part of /dev/mem.
Since this breaks librtas, punch a hole in /dev/mem to allow access to the
rmo_buffer that librtas needs.

Anton Blanchard reported the problem and helped with the fix.

A quick test for this patch:

       # cat /proc/rtas/rmo_buffer
       000000000f190000 10000

       # python -c "print 0x000000000f190000 / 0x10000"
       3865

       # dd if=/dev/mem of=/tmp/foo count=1 bs=64k skip=3865
       1+0 records in
       1+0 records out
       65536 bytes (66 kB) copied, 0.000205235 s, 319 MB/s

       # dd if=/dev/mem of=/tmp/foo
       dd: reading `/dev/mem': Operation not permitted
       0+0 records in
       0+0 records out
       0 bytes (0 B) copied, 0.00022519 s, 0.0 kB/s

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-12-08 14:22:52 +11:00
..
boot powerpc: Add support for OpenBlockS 600 2011-12-08 14:22:52 +11:00
configs powerpc: Add support for OpenBlockS 600 2011-12-08 14:22:52 +11:00
include/asm powerpc: Punch a hole in /dev/mem for librtas 2011-12-08 14:22:52 +11:00
kernel Merge branch 'booke-hugetlb' into next 2011-12-08 13:20:34 +11:00
kvm Merge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2011-11-20 14:57:43 -08:00
lib powerpc: Copy down exception vectors after feature fixups 2011-11-16 14:47:54 +11:00
math-emu powerpc/math_emu/efp: Look for errata handler when type mismatches 2011-10-06 23:36:47 -05:00
mm powerpc: Punch a hole in /dev/mem for librtas 2011-12-08 14:22:52 +11:00
net net: filter: BPF 'JIT' compiler for PPC64 2011-07-21 12:38:32 -07:00
oprofile powerpc/oprofile: Handle events that raise an exception without overflowing 2011-05-26 13:38:57 +10:00
platforms powerpc: Add support for OpenBlockS 600 2011-12-08 14:22:52 +11:00
sysdev powerpc/mpic: Add in-core support for cascaded MPICs 2011-12-07 13:43:09 +11:00
xmon powerpc/xmon: Fix #if typo for systems without MSR[RI] 2011-11-25 14:11:28 +11:00
Kconfig powerpc: Allow irq threading 2011-11-25 14:14:38 +11:00
Kconfig.debug powerpc: Implement CONFIG_STRICT_DEVMEM 2011-11-28 11:42:08 +11:00
Makefile powerpc: Add support for OpenBlockS 600 2011-12-08 14:22:52 +11:00
relocs_check.pl