* Oops on 'cat /dev/kmem'
@ 2013-07-04 11:33 Enrico Scholz
2013-07-04 13:16 ` Russell King - ARM Linux
0 siblings, 1 reply; 2+ messages in thread
From: Enrico Scholz @ 2013-07-04 11:33 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
read access on /dev/kmem oopses here on pxa168 and omap3 platforms
(kernel 3.4 and 3.2):
~ # cat /dev/kmem
[ 2925.599453] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 2925.649173] pgd = c7a7c000
[ 2925.657282] [00000000] *pgd=071a0831, *pte=00000000, *ppte=00000000
[ 2925.697821] Internal error: Oops: 17 [#1] PREEMPT ARM
[ 2925.712938] Modules linked in: ...
[ 2925.825207] CPU: 0 Not tainted (3.4.52.ipan7 #1)
[ 2925.840083] PC is at __copy_to_user_std+0x4c/0x3a8
[ 2925.854431] LR is at read_kmem+0xa0/0x1d4
[ 2925.866438] pc : [<c01e768c>] lr : [<c02304bc>] psr: 20000013
What would be the correct fix? Defining '__ARCH_HAS_NO_PAGE_ZERO_MAPPED'
also for ARM?
Enrico
^ permalink raw reply [flat|nested] 2+ messages in thread
* Oops on 'cat /dev/kmem'
2013-07-04 11:33 Oops on 'cat /dev/kmem' Enrico Scholz
@ 2013-07-04 13:16 ` Russell King - ARM Linux
0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2013-07-04 13:16 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jul 04, 2013 at 01:33:38PM +0200, Enrico Scholz wrote:
> Hi,
>
> read access on /dev/kmem oopses here on pxa168 and omap3 platforms
> (kernel 3.4 and 3.2):
>
> ~ # cat /dev/kmem
> [ 2925.599453] Unable to handle kernel NULL pointer dereference at virtual address 00000000
> [ 2925.649173] pgd = c7a7c000
> [ 2925.657282] [00000000] *pgd=071a0831, *pte=00000000, *ppte=00000000
> [ 2925.697821] Internal error: Oops: 17 [#1] PREEMPT ARM
> [ 2925.712938] Modules linked in: ...
> [ 2925.825207] CPU: 0 Not tainted (3.4.52.ipan7 #1)
> [ 2925.840083] PC is at __copy_to_user_std+0x4c/0x3a8
> [ 2925.854431] LR is at read_kmem+0xa0/0x1d4
> [ 2925.866438] pc : [<c01e768c>] lr : [<c02304bc>] psr: 20000013
>
>
> What would be the correct fix? Defining '__ARCH_HAS_NO_PAGE_ZERO_MAPPED'
> also for ARM?
That will just solve the "problem" for the first page.
It looks to me that cat'ing /dev/kmem on x86 will also lead to similar
effects, as it will end up trying to read from the virtual address
given by the file position.
I think this is a case of "don't do that then" - in much the same way
that on x86, if you configure a serial port at an address where another
device may be, you can end up killing the machine.
You have to be root to access /dev/kmem, and root is expected to know
what they're doing.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-04 13:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-04 11:33 Oops on 'cat /dev/kmem' Enrico Scholz
2013-07-04 13:16 ` Russell King - ARM Linux
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.