mm-commits Archive on
 help / color / Atom feed
From: Andrew Morton <>
Subject: [alternative-merged] add-kernel-config-option-for-twisting-kernel-behavior.patch removed from -mm tree
Date: Thu, 28 May 2020 12:11:52 -0700
Message-ID: <> (raw)
In-Reply-To: <>

The patch titled
     Subject: add kernel config option for twisting kernel behavior.
has been removed from the -mm tree.  Its filename was

This patch was dropped because an alternative patch was merged

From: Tetsuo Handa <>
Subject: add kernel config option for twisting kernel behavior.

Existing kernel config options are defined based on "whether you want to
enable this module/feature or not". And such granularity is sometimes
too rough-grained for fuzzing tools which try to find bugs inside each

While syzkaller (one of fuzzing tools) is finding many bugs, sometimes
syzkaller examines stupid operations. Some examples of such operations
are: changing console loglevel which in turn makes it impossible to get
kernel messages when a crash happens, freezing filesystems which in turn
causes khungtaskd to needlessly complain, programmatically sending
Ctrl-Alt-Del which in turn causes the system to needlessly reboot.
Currently we prevent syzkaller from examining stupid operations by
blacklisting syscall arguments and/or disabling whole functionality
using existing kernel config options. But such approach is difficult to
maintain and needlessly prevents fuzzers from testing kernel code. [1]

We want fuzzers to test as much coverage as possible while we want
fuzzers not to try stupid operations. To achieve this goal, we want
cooperation from kernel side, and build-time branching (i.e. kernel
config options) will be the simplest and the most reliable.

Therefore, this patch introduces a kernel config option which allows
selecting fine-grained kernel config options for twisting kernel's
behavior. Each fine-grained kernel config option will be added by future
patches. For ease of management, grouping kernel config options for
allowing e.g. syzkaller to select all fine-grained kernel config options
which e.g. syzkaller wants would be added by future patches.


Signed-off-by: Tetsuo Handa <>
Cc: Greg Kroah-Hartman <>
Cc: Steven Rostedt <>
Cc: Dmitry Vyukov <>
Cc: Matthew Garrett <>
Cc: Andi Kleen <>
Cc: "Theodore Y . Ts'o" <>
Cc: Alexander Viro <>
Cc: Petr Mladek <>
Cc: Sergey Senozhatsky <>
Cc: Arnd Bergmann <>
Cc: Jiri Slaby <>
Cc: Peter Zijlstra <>
Signed-off-by: Andrew Morton <>

 lib/Kconfig.debug |    2 ++
 lib/Kconfig.twist |   13 +++++++++++++
 2 files changed, 15 insertions(+)

--- a/lib/Kconfig.debug~add-kernel-config-option-for-twisting-kernel-behavior
+++ a/lib/Kconfig.debug
@@ -2287,4 +2287,6 @@ config HYPERV_TESTING
 endmenu # "Kernel Testing and Coverage"
+source "lib/Kconfig.twist"
 endmenu # Kernel hacking
--- /dev/null
+++ a/lib/Kconfig.twist
@@ -0,0 +1,13 @@
+	bool "Twist kernel behavior"
+	help
+	  Saying Y here allows modifying kernel behavior via kernel
+	  config options which will become visible by selecting this
+	  config option. Since these kernel config options are intended
+	  for helping e.g. fuzz testing, behavior twisted by this kernel
+	  option might be unstable. Userspace applications should not
+	  count on this option being selected.

Patches currently in -mm which might be from are


  parent reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  5:20 incoming Andrew Morton
2020-05-28  5:20 ` [patch 1/5] mm/z3fold: silence kmemleak false positives of slots Andrew Morton
2020-05-28  5:20 ` [patch 2/5] mm,thp: stop leaking unreleased file pages Andrew Morton
2020-05-28  5:20 ` [patch 3/5] mm: remove VM_BUG_ON(PageSlab()) from page_mapcount() Andrew Morton
2020-05-28  5:20 ` [patch 4/5] fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info() Andrew Morton
2020-05-28  5:20 ` [patch 5/5] include/asm-generic/topology.h: guard cpumask_of_node() macro argument Andrew Morton
2020-05-28 19:11 ` Andrew Morton [this message]
2020-05-28 19:11 ` [alternative-merged] twist-allow-disabling-k_spec-function-in-drivers-tty-vt-keyboardc.patch removed from -mm tree Andrew Morton
2020-05-28 19:11 ` [alternative-merged] twist-add-option-for-selecting-twist-options-for-syzkallers-testing.patch " Andrew Morton
     [not found] ` <>
2020-05-29 20:31   ` incoming Andrew Morton
     [not found]     ` <>
2020-05-29 21:12       ` incoming Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

mm-commits Archive on

Archives are clonable:
	git clone --mirror mm-commits/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 mm-commits mm-commits/ \
	public-inbox-index mm-commits

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone