linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [uml-devel] [PATCH] um: support kcov
@ 2016-05-21 14:03 Vegard Nossum
       [not found] ` <CACT4Y+ZprkvUgxy7tx2OpAOi636=VN=88dMAMuBrv_ZQ0YPeyw@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Vegard Nossum @ 2016-05-21 14:03 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Quentin Casasnovas, Vegard Nossum, Dmitry Vyukov,
	user-mode-linux-devel, Thomas Meyer

This adds support for kcov to UML.

There is a small problem where UML will randomly segfault during boot;
this is because current_thread_info() occasionally returns an invalid
(non-NULL) pointer and we try to dereference it in
__sanitizer_cov_trace_pc(). I consider this a bug in UML itself and this
patch merely exposes it.

Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Thomas Meyer <thomas@m3y3r.de>
Cc: user-mode-linux-devel <user-mode-linux-devel@lists.sourceforge.net>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
 arch/um/Kconfig.common    | 1 +
 arch/x86/um/vdso/Makefile | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index cc00134..64c1d46 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -1,6 +1,7 @@
 config UML
 	bool
 	default y
+	select ARCH_HAS_KCOV
 	select HAVE_ARCH_AUDITSYSCALL
 	select HAVE_ARCH_SECCOMP_FILTER
 	select HAVE_UID16
diff --git a/arch/x86/um/vdso/Makefile b/arch/x86/um/vdso/Makefile
index 6c803ca..d72dec4 100644
--- a/arch/x86/um/vdso/Makefile
+++ b/arch/x86/um/vdso/Makefile
@@ -2,6 +2,9 @@
 # Building vDSO images for x86.
 #
 
+# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
+KCOV_INSTRUMENT                := n
+
 VDSO64-y		:= y
 
 vdso-install-$(VDSO64-y)	+= vdso.so
-- 
1.9.1


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


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

* Re: [uml-devel] [PATCH] um: support kcov
       [not found] ` <CACT4Y+ZprkvUgxy7tx2OpAOi636=VN=88dMAMuBrv_ZQ0YPeyw@mail.gmail.com>
@ 2016-05-21 14:12   ` Vegard Nossum
  0 siblings, 0 replies; 2+ messages in thread
From: Vegard Nossum @ 2016-05-21 14:12 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: Quentin Casasnovas, Richard Weinberger, user-mode-linux-devel,
	Thomas Meyer

On 05/21/2016 04:05 PM, Dmitry Vyukov wrote:
> On Sat, May 21, 2016 at 4:03 PM, Vegard Nossum <vegard.nossum@oracle.com
> <mailto:vegard.nossum@oracle.com>> wrote:
>
>     This adds support for kcov to UML.
>
[...]
> Acked-by: Dmitry Vyukov <dvyukov@google.com <mailto:dvyukov@google.com>>
>
> Cool! How do you plan to use it?

We have a patch for kcov itself adding the AFL mode coming up very soon
:-) We've been doing almost all our filesystem (and other) AFL fuzzing
in UML instances as we found it gave a really big performance boost over
KVM.


Vegard

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


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

end of thread, other threads:[~2016-05-21 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-21 14:03 [uml-devel] [PATCH] um: support kcov Vegard Nossum
     [not found] ` <CACT4Y+ZprkvUgxy7tx2OpAOi636=VN=88dMAMuBrv_ZQ0YPeyw@mail.gmail.com>
2016-05-21 14:12   ` Vegard Nossum

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