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>] [day] [month] [year] [list]
Message-ID: <7300.1458333684@turing-police.cc.vt.edu>
Date:	Fri, 18 Mar 2016 16:41:24 -0400
From:	Valdis Kletnieks <Valdis.Kletnieks@...edu>
To:	Andrey Ryabinin <aryabinin@...tuozzo.com>,
	Alexander Potapenko <glider@...gle.com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: KASAN overhead?

So I built linux-next next-20160417 with KASAN enabled:

CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
CONFIG_HAVE_ARCH_KASAN=y        
CONFIG_KASAN=y                  
# CONFIG_KASAN_OUTLINE is not set
CONFIG_KASAN_INLINE=y           
CONFIG_TEST_KASAN=m

and saw an *amazing* slowdown.  For comparison, here is the time taken
to reach various points in the dmesg:

% grep -i free dmesg.0317*
dmesg.0317:[    1.560907] Freeing SMP alternatives memory: 28K (ffffffff93d3e000 - ffffffff93d45000)
dmesg.0317:[   12.041550] Freeing initrd memory: 10432K (ffff88003f5cb000 - ffff88003fffb000)
dmesg.0317:[   16.458451] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
dmesg.0317:[   16.545603] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
dmesg.0317:[   17.818934] Freeing unused kernel memory: 1628K (ffffffff93ba7000 - ffffffff93d3e000)
dmesg.0317:[   17.820234] Freeing unused kernel memory: 1584K (ffff880012c74000 - ffff880012e00000)
dmesg.0317:[   17.828426] Freeing unused kernel memory: 1524K (ffff880013483000 - ffff880013600000)
dmesg.0317-nokasan:[    0.028821] Freeing SMP alternatives memory: 28K (ffffffffaf104000 - ffffffffaf10b000)
dmesg.0317-nokasan:[    1.587232] Freeing initrd memory: 10432K (ffff88003f5cb000 - ffff88003fffb000)
dmesg.0317-nokasan:[    2.433557] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
dmesg.0317-nokasan:[    2.439411] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
dmesg.0317-nokasan:[    2.488113] Freeing unused kernel memory: 1324K (ffffffffaefb9000 - ffffffffaf104000)
dmesg.0317-nokasan:[    2.488518] Freeing unused kernel memory: 88K (ffff88002e9ea000 - ffff88002ea00000)
dmesg.0317-nokasan:[    2.489490] Freeing unused kernel memory: 388K (ffff88002ed9f000 - ffff88002ee00000)

Only config difference was changing to CONFIG_KASAN=n.

Is this level of slowdown expected? Or is my kernel unexpectedly off in the weeds?

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ