All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Prevent possible PTE corruption with /dev/mem mmap
@ 2014-08-14 14:18 ` Frantisek Hrbata
  0 siblings, 0 replies; 30+ messages in thread
From: Frantisek Hrbata @ 2014-08-14 14:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, tglx, mingo, hpa, x86, oleg, kamaleshb, hechjie, akpm,
	dave.hansen, dvlasenk, prarit, lwoodman, hannsj_uhl

Hi all,

after some time this issue popped up again. Please note that the patch was send
to lkml two times.

https://lkml.org/lkml/2013/4/2/297
  lkml: <1364905733-23937-1-git-send-email-fhrbata@redhat.com>
https://lkml.org/lkml/2013/10/2/359
  lkml: <20131002160514.GA25471@localhost.localdomain>

It did not get much attention, except H. Peter Anvin's complain that having two
checks for mmap and read/write for /dev/mem access is ridiculous. I for sure do
not object to this, but AFAICT it's not that simple to unify them and it's not
"directly" related to the PTE corruption. Please note that there are other
archs(ia64, arm) using these check. But I for sure can be missing something.

What the patch does is using the existing interface to implement x86 specific
check in the least invasive way.

Peter: I by no means want to be pushy. Just that after I looked into this a
little bit more, I don't see a better and more straightforward way how to fix
this. I will be grateful for any suggestions and help. If we want/need to fix
this in a different way, I can for sure try, but I will need at least some
guidance.

So I'm posting this once more with a hope it will get more attention or at least
to start the discussion how/if this should be fixed.

The patch is the same except I added a check for phys addr overflow before
calling phys_addr_valid. Maybe this check should be in do_mmap_pgoff.

Many thanks

Frantisek Hrbata (1):
  x86: add phys addr validity check for /dev/mem mmap

 arch/x86/include/asm/io.h |  4 ++++
 arch/x86/mm/mmap.c        | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+)

-- 
1.9.3


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-08-20 15:26 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14 14:18 [PATCH 0/1] Prevent possible PTE corruption with /dev/mem mmap Frantisek Hrbata
2014-08-14 14:18 ` Frantisek Hrbata
2014-08-14 14:18 ` [PATCH 1/1] x86: add phys addr validity check for " Frantisek Hrbata
2014-08-14 14:18   ` Frantisek Hrbata
2014-08-14 16:36   ` Dave Hansen
2014-08-14 16:36     ` Dave Hansen
2014-08-14 17:20     ` H. Peter Anvin
2014-08-14 17:20       ` H. Peter Anvin
2014-08-14 17:53       ` Frantisek Hrbata
2014-08-14 17:53         ` Frantisek Hrbata
2014-08-14 17:40     ` Frantisek Hrbata
2014-08-14 17:40       ` Frantisek Hrbata
2014-08-15 10:17   ` Frantisek Hrbata
2014-08-15 10:17     ` Frantisek Hrbata
2014-08-15 11:44 ` [PATCH V2 0/2] Prevent possible PTE corruption with " Frantisek Hrbata
2014-08-15 11:44   ` Frantisek Hrbata
2014-08-15 11:44   ` [PATCH V2 1/2] x86: add arch_pfn_possible helper Frantisek Hrbata
2014-08-15 11:44     ` Frantisek Hrbata
2014-08-15 11:44   ` [PATCH V2 2/2] x86: add phys addr validity check for /dev/mem mmap Frantisek Hrbata
2014-08-15 11:44     ` Frantisek Hrbata
2014-08-15 18:10     ` Dave Hansen
2014-08-15 18:10       ` Dave Hansen
2014-08-18 11:26       ` Frantisek Hrbata
2014-08-18 11:26         ` Frantisek Hrbata
2014-08-20 15:25   ` [PATCH 0/2] x86: allow read/write /dev/mem to access non-system RAM above high_memory Frantisek Hrbata
2014-08-20 15:25     ` Frantisek Hrbata
2014-08-20 15:25     ` [PATCH 1/2] x86: add high_memory check to (xlate|unxlate)_dev_mem_ptr Frantisek Hrbata
2014-08-20 15:25       ` Frantisek Hrbata
2014-08-20 15:25     ` [PATCH 2/2] x86: remove high_memory check from valid_phys_addr_range Frantisek Hrbata
2014-08-20 15:25       ` Frantisek Hrbata

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.