All of lore.kernel.org
 help / color / mirror / Atom feed
* Access to non-RAM pages
@ 2018-08-29 12:10 Juergen Gross
  2018-08-31 21:18 ` Jiri Kosina
  0 siblings, 1 reply; 22+ messages in thread
From: Juergen Gross @ 2018-08-29 12:10 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Linus Torvalds, Michal Hocko

Running as a Xen guest a customer's system experienced problems due
to load_unaligned_zeropad() hitting a ballooned memory page. The
8 byte read was meant to read the last 4 bytes from a kernel page
and should have returned 4 zero bytes for the not allocated page
after that.

In order not to split huge direct map pages The Xen balloon driver
doesn't remove ballooned pages from the direct map. The memory page
is removed from the EPT, of course, but a bug in the hypervisor would
emulate the 8 byte read wrong by returning all bytes as 0xff, leading
to above mentioned problems.

While this bug can be repaired in Xen I'm rather sure it is dangerous
to rely on load_unaligned_zeropad() doing the right thing when crossing
page boundaries. Trying to access an invalid page is handled fine, but
what happens if the next page is a MMIO area? Reading from that might
have strange side effects.

While being very unlikely I still believe this is possible. Any
thoughts?

Michal asked me to bring this up for a wider audience.


Juergen

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

end of thread, other threads:[~2018-09-03 10:36 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 12:10 Access to non-RAM pages Juergen Gross
2018-08-31 21:18 ` Jiri Kosina
2018-09-01 10:47   ` Juergen Gross
2018-09-01 17:13     ` Al Viro
2018-09-01 21:48       ` Jiri Kosina
2018-09-01 17:27   ` Linus Torvalds
2018-09-01 18:06     ` Linus Torvalds
2018-09-03  0:48       ` Benjamin Herrenschmidt
2018-09-03  0:55         ` Benjamin Herrenschmidt
2018-09-03  1:38           ` Linus Torvalds
2018-09-03  1:42             ` Linus Torvalds
2018-09-03  2:00               ` Benjamin Herrenschmidt
2018-09-03  2:10                 ` Linus Torvalds
2018-09-03  2:25                   ` Benjamin Herrenschmidt
2018-09-03  2:47                     ` Linus Torvalds
2018-09-03  2:52                       ` Linus Torvalds
2018-09-03  3:44                         ` Benjamin Herrenschmidt
2018-09-03  5:08                   ` Juergen Gross
2018-09-03  6:05                   ` Jiri Kosina
2018-09-03 10:36                   ` Will Deacon
2018-09-03  1:44             ` Benjamin Herrenschmidt
2018-09-03  1:46             ` Benjamin Herrenschmidt

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.