linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* security: restricting access to swap
@ 2013-03-11 23:57 Luigi Semenzato
  2013-03-12 13:06 ` Konrad Rzeszutek Wilk
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Luigi Semenzato @ 2013-03-11 23:57 UTC (permalink / raw)
  To: linux-mm

Greetings linux-mmers,

before we can fully deploy zram, we must ensure it conforms to the
Chrome OS security requirements.  In particular, we do not want to
allow user space to read/write the swap device---not even root-owned
processes.

A similar restriction is available for /dev/mem under CONFIG_STRICT_DEVMEM.

There are a few possible approaches to this, but before we go ahead
I'd like to ask if anything has happened or is planned in this
direction.

Otherwise, one idea I am playing with is to add a CONFIG_STRICT_SWAP
option that would do this for any swap device (i.e. not specific to
zram) and possibly also when swapping to a file.  We would add an
"internal" open flag, O_KERN_SWAP, as well as clean up a little bit
the FMODE_NONOTIFY confusion by adding the kernel flag O_KERN_NONOTIFY
and formalizing the sets of external (O_*) and internal (O_KERN_*)
open flags.

Swapon() and swapoff() would use O_KERN_SWAP internally, and a device
opened with that flag would reject user-level opens.

Thank you in advance for any input/suggestion!
Luigi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2013-03-26  1:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 23:57 security: restricting access to swap Luigi Semenzato
2013-03-12 13:06 ` Konrad Rzeszutek Wilk
2013-03-12 15:46   ` Luigi Semenzato
2013-03-12 23:32 ` Simon Jeons
2013-03-15  9:04 ` Ric Mason
2013-03-15 15:48   ` Luigi Semenzato
2013-03-15 16:55     ` Johannes Weiner
2013-03-15 17:27       ` Luigi Semenzato
2013-03-15 22:19         ` Luigi Semenzato
2013-03-18  3:58 ` Hugh Dickins
2013-03-18 16:05   ` Luigi Semenzato
2013-03-18 23:43 ` KOSAKI Motohiro
2013-03-19 17:39   ` Will Drewry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).