lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Dec 2016 15:02:37 +0530
From:   Maninder Singh <maninder1.s@...sung.com>
To:     mmarek@...e.com, aryabinin@...tuozzo.com, glider@...gle.com,
        dvyukov@...gle.com, akpm@...ux-foundation.org
Cc:     linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
        kasan-dev@...glegroups.com, pankaj.m@...sung.com,
        ajeet.y@...sung.com, Maninder Singh <maninder1.s@...sung.com>,
        Vaneet narang <v.narang@...sung.com>
Subject: [PATCH 1/1] kasan: Support for r/w instrumentation control

This provide option to control sanity of read and write operations
Both read and write instrumentation increase size of uImage, So using
this option read or write instrumentation can be avoided if not required.
Useful in case of module sanity, using this uImage sanity can be avoided.

Also user space ASAN provides this support for read/write instrumentation
control.

Signed-off-by: Vaneet narang <v.narang@...sung.com>
Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
Reviewed-by: Ajeet Yadav <ajeet.y@...sung.com>
---
 lib/Kconfig.kasan      | 16 ++++++++++++++++
 scripts/Makefile.kasan |  4 ++++
 2 files changed, 20 insertions(+)

diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index bd38aab..6f0f774 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -45,6 +45,22 @@ config KASAN_INLINE
 
 endchoice
 
+config KASAN_READS
+		prompt "Read instrumentation"
+		bool
+		default y
+		depends on KASAN
+		help
+			This configuration controls the sanity of  memory read.
+
+config KASAN_WRITES
+		prompt "Write instrumentation"
+		bool
+		default y
+		depends on KASAN
+		help
+			This configuration controls the sanity of memory write.
+
 config TEST_KASAN
 	tristate "Module for testing kasan for bug detection"
 	depends on m && KASAN
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
index 37323b0..a61b18e 100644
--- a/scripts/Makefile.kasan
+++ b/scripts/Makefile.kasan
@@ -29,3 +29,7 @@ else
     endif
 endif
 endif
+
+CFLAGS_KASAN += $(call cc-option, \
+		$(if $(CONFIG_KASAN_READS),, --param asan-instrument-reads=0) \
+		$(if $(CONFIG_KASAN_WRITES),, --param asan-instrument-writes=0))
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ