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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Jun 2016 18:21:03 +0200
From:	Michal Marek <mmarek@...e.com>
To:	Mark Rutland <mark.rutland@....com>
Cc:	linux-kernel@...r.kernel.org,
	Alexander Potapenko <glider@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dmitry Vyukov <dvyukov@...gle.com>,
	James Morse <james.morse@....com>,
	Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] kcov: reject open when kernel not instrumented

Dne 15.6.2016 v 17:49 Mark Rutland napsal(a):
> If the toolchain does not support -fsanitize-coverage=trace-pc, we blat
> this option from CFLAGS_KCOV, and build the kernel without
> instrumentation, even if CONFIG_KCOV was selected. However, we still
> build the rest of the kcov infrastructure, and expose a kcov file under
> debugfs. This can be confusing, as the kernel will appear to support
> kcov, yet will never manage to sample any trace PC values. While we do
> note this fact at build time, this may be missed, and a user may not
> have access to build logs.
> 
> This patch adds an artificial CONFIG symbol, CONFIG_KCOV_CC, that is
> only set when the toolchain supports -fsanitize-coverage=trace-pc, and
> hence the kernel is built with instrumentation. When this is not the
> case, the kernel will return -ENOTSUPP if userspace attempts to open the
> kcov debugfs file, indicating that kcov functionality is unavailable.

Hi Mark,

please use a define outside the CONFIG_ namespace, because it is not a
config option that one can find in .config or a Kconfig file. We already
have CC_HAVE_ASM_GOTO, CC_USING_FENTRY and similar in the kernel.

Thanks,
Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ