linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] add fault injection to user memory access
@ 2020-08-28 14:13 albert.linde
  2020-08-28 14:13 ` [PATCH v2 1/3] lib, include/linux: add usercopy failure capability albert.linde
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: albert.linde @ 2020-08-28 14:13 UTC (permalink / raw)
  To: akpm, bp, mingo, corbet, tglx, arnd
  Cc: akinobu.mita, hpa, viro, glider, andreyknvl, dvyukov, elver,
	linux-doc, linux-kernel, linux-arch, x86, albert.linde,
	Albert van der Linde

From: Albert van der Linde <alinde@google.com>

The goal of this series is to improve testing of fault-tolerance in
usages of user memory access functions, by adding support for fault
injection.

The first patch adds failure injection capability for usercopy
functions. The second changes usercopy functions to use this new failure
capability (copy_from_user, ...). The third patch adds
get/put/clear_user failures to x86.

Changes in v2:
 - simplified overall failure capability by either failing or not, without
   having functions fail partially by copying/clearing only some bytes

Albert van der Linde (3):
  lib, include/linux: add usercopy failure capability
  lib, uaccess: add failure injection to usercopy functions
  x86: add failure injection to get/put/clear_user

 .../admin-guide/kernel-parameters.txt         |  1 +
 .../fault-injection/fault-injection.rst       |  7 +-
 arch/x86/include/asm/uaccess.h                | 68 +++++++++++--------
 arch/x86/lib/usercopy_64.c                    |  3 +
 include/linux/fault-inject-usercopy.h         | 22 ++++++
 include/linux/uaccess.h                       | 11 ++-
 lib/Kconfig.debug                             |  7 ++
 lib/Makefile                                  |  1 +
 lib/fault-inject-usercopy.c                   | 39 +++++++++++
 lib/iov_iter.c                                |  5 ++
 lib/strncpy_from_user.c                       |  3 +
 lib/usercopy.c                                |  5 +-
 12 files changed, 140 insertions(+), 32 deletions(-)
 create mode 100644 include/linux/fault-inject-usercopy.h
 create mode 100644 lib/fault-inject-usercopy.c

-- 
2.28.0.402.g5ffc5be6b7-goog


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

end of thread, other threads:[~2020-08-31 18:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 14:13 [PATCH v2 0/3] add fault injection to user memory access albert.linde
2020-08-28 14:13 ` [PATCH v2 1/3] lib, include/linux: add usercopy failure capability albert.linde
2020-08-28 14:13 ` [PATCH v2 2/3] lib, uaccess: add failure injection to usercopy functions albert.linde
2020-08-31 16:21   ` peterz
2020-08-28 14:13 ` [PATCH v2 3/3] x86: add failure injection to get/put/clear_user albert.linde
2020-08-31 14:29 ` [PATCH v2 0/3] add fault injection to user memory access Akinobu Mita
2020-08-31 15:49   ` Alexander Potapenko
2020-08-31 16:27     ` Akinobu Mita
2020-08-31 18:31       ` Alexander Potapenko

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