linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Assorted improvements to usercopy
@ 2021-12-16 21:53 Matthew Wilcox (Oracle)
  2021-12-16 21:53 ` [PATCH v4 1/4] mm/usercopy: Check kmap addresses properly Matthew Wilcox (Oracle)
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Matthew Wilcox (Oracle) @ 2021-12-16 21:53 UTC (permalink / raw)
  To: Kees Cook; +Cc: Matthew Wilcox (Oracle), linux-mm, linux-hardening

The HARDENED_USERCOPY_PAGESPAN config option is hard to turn on because
much of the kernel uses non-compound high-order page allocations.
This patchset extracts the valuable parts of HARDENED_USERCOPY_PAGESPAN
and then removes the remainder.

v4:
 - Add the fourth patch to remove HARDENED_USERCOPY_PAGESPAN
v3:
 - Remove a now-unused variable
v2:
 - Prevent a NULL pointer dereference when a vmalloc-range pointer
   doesn't have an associated allocation (me)
 - Report better offsets than "0" (Kees)

Matthew Wilcox (Oracle) (4):
  mm/usercopy: Check kmap addresses properly
  mm/usercopy: Detect vmalloc overruns
  mm/usercopy: Detect compound page overruns
  usercopy: Remove HARDENED_USERCOPY_PAGESPAN

 arch/x86/include/asm/highmem.h   |  1 +
 include/linux/highmem-internal.h | 10 ++++
 mm/usercopy.c                    | 98 +++++++++-----------------------
 security/Kconfig                 | 13 +----
 4 files changed, 40 insertions(+), 82 deletions(-)

-- 
2.33.0



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

end of thread, other threads:[~2021-12-17 13:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-16 21:53 [PATCH v4 0/4] Assorted improvements to usercopy Matthew Wilcox (Oracle)
2021-12-16 21:53 ` [PATCH v4 1/4] mm/usercopy: Check kmap addresses properly Matthew Wilcox (Oracle)
2021-12-16 21:53 ` [PATCH v4 2/4] mm/usercopy: Detect vmalloc overruns Matthew Wilcox (Oracle)
2021-12-17 13:07   ` Mark Hemment
2021-12-16 21:53 ` [PATCH v4 3/4] mm/usercopy: Detect compound page overruns Matthew Wilcox (Oracle)
2021-12-16 21:53 ` [PATCH v4 4/4] usercopy: Remove HARDENED_USERCOPY_PAGESPAN Matthew Wilcox (Oracle)

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).