]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory.c: prevent mapping typed pages to userspace
authorMatthew Wilcox <willy@infradead.org>
Tue, 5 Mar 2019 23:46:06 +0000 (15:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2019 05:07:17 +0000 (21:07 -0800)
commitfd3f1c18fe5f5c33b7d142370754c3d2284bc872
tree583057c2957c316cbb52378c8758c408b676d216
parent55a61923fe8f5c689c5734c65e60b0dc61ff448f
mm/memory.c: prevent mapping typed pages to userspace

Pages which use page_type must never be mapped to userspace as it would
destroy their page type.  Add an explicit check for this instead of
assuming that kernel drivers always get this right.

Link: http://lkml.kernel.org/r/20190129053830.3749-1-willy@infradead.org
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c