All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] sysfs: Unconditionally use vmalloc for buffer
@ 2021-04-01 22:13 Kees Cook
  2021-04-01 22:13 ` [PATCH v4 1/3] lkdtm/heap: Add vmalloc linear overflow test Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kees Cook @ 2021-04-01 22:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Kees Cook, Christoph Hellwig, Nathan Chancellor, Arnd Bergmann,
	Tejun Heo, Alexander Viro, Rafael J. Wysocki, Shuah Khan,
	Nathan Chancellor, Nick Desaulniers, Andrew Morton, Kefeng Wang,
	Matthew Wilcox (Oracle),
	linux-kernel, linux-fsdevel, linux-kselftest, clang-built-linux,
	Michal Hocko, Alexey Dobriyan, Lee Duncan, Chris Leech,
	Adam Nichols, linux-hardening

This series improves the defensive posture of sysfs's use of seq_file
to gain the vmap guard pages at the end of vmalloc buffers to stop a
class of recurring flaw[1]. The long-term goal is to switch sysfs from
a buffer to using seq_file directly, but this will take time to refactor.

Included is also a Clang fix for NULL arithmetic and an LKDTM test to
validate vmalloc guard pages.

v4:
- fix NULL arithmetic (Arnd)
- add lkdtm test
- reword commit message
v3: https://lore.kernel.org/lkml/20210401022145.2019422-1-keescook@chromium.org/
v2: https://lore.kernel.org/lkml/20210315174851.622228-1-keescook@chromium.org/
v1: https://lore.kernel.org/lkml/20210312205558.2947488-1-keescook@chromium.org/

Thanks!

-Kees

Arnd Bergmann (1):
  seq_file: Fix clang warning for NULL pointer arithmetic

Kees Cook (2):
  lkdtm/heap: Add vmalloc linear overflow test
  sysfs: Unconditionally use vmalloc for buffer

 drivers/misc/lkdtm/core.c               |  3 ++-
 drivers/misc/lkdtm/heap.c               | 21 +++++++++++++++++-
 drivers/misc/lkdtm/lkdtm.h              |  3 ++-
 fs/kernfs/file.c                        |  9 +++++---
 fs/seq_file.c                           |  5 ++++-
 fs/sysfs/file.c                         | 29 +++++++++++++++++++++++++
 include/linux/seq_file.h                |  6 +++++
 tools/testing/selftests/lkdtm/tests.txt |  3 ++-
 8 files changed, 71 insertions(+), 8 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-04-05 14:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 22:13 [PATCH v4 0/3] sysfs: Unconditionally use vmalloc for buffer Kees Cook
2021-04-01 22:13 ` [PATCH v4 1/3] lkdtm/heap: Add vmalloc linear overflow test Kees Cook
2021-04-01 22:13 ` [PATCH v4 2/3] seq_file: Fix clang warning for NULL pointer arithmetic Kees Cook
2021-04-01 22:13 ` [PATCH v4 3/3] sysfs: Unconditionally use vmalloc for buffer Kees Cook
2021-04-02  6:32   ` Christoph Hellwig
2021-04-02 21:23     ` Kees Cook
2021-04-05 14:05   ` [sysfs] 5f65c1f63b: WARNING:at_fs/sysfs/file.c:#sysfs_kf_seq_start kernel test robot
2021-04-05 14:05     ` kernel test robot

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.