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: <49A69E3B.9070802@linux.vnet.ibm.com>
Date:	Thu, 26 Feb 2009 14:50:51 +0100
From:	Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>
To:	linux-kernel@...r.kernel.org
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>,
	Huang Ying <ying.huang@...el.com>, Li Wei <W.Li@....COM>,
	Jeff Dike <jdike@...toit.com>
Subject: [PATCH 0/4] gcov kernel support

This is a resend of the gcov kernel support patchset (see further
below for an in-depth introduction). Patch base is 2.6.29-rc6.

This version fixes a few problems identified by Li Wei <W.Li@....COM>:
* node->parent is always NULL, causing NULL-pointer dereference in
  remove_node()
* unsafe list traversing in reset_write() since remove_node may
  affect multiple list_heads
* . and .. in .gcda path strings are not handled correctly

Thanks to Li Wei for reporting these problems and proposing fixes!


Patchset overview:

[PATCH 1/4] kernel: constructor support
[PATCH 2/4] seq_file: add function to write binary data
[PATCH 3/4] gcov: add gcov profiling infrastructure
[PATCH 4/4] gcov: enable GCOV_PROFILE_ALL for x86_64

===

Introduction:

This patch set enables the use of GCC's coverage testing tool gcov [1]
with the Linux kernel. Coverage data of a running kernel is exported
in gcov-compatible format via the "gcov" debugfs directory. To get
coverage data for a specific file, change to the kernel build
directory and use gcov with the -o option as follows (requires root):

# cd /tmp/linux-out
# gcov -o /sys/kernel/debug/gcov/tmp/linux-out/kernel spinlock.c

This will create source code files annotated with execution counts
in the current directory. In addition, graphical gcov front-ends such
as lcov [2] can be used to automate the process of collecting data
for the entire kernel and provide coverage overviews in HTML format.


Known issues:

* some architecture specific problems: the patch has been tested
  successfully on s390 and x86, the use of gcov profiling flags
  for the entire kernel needs to be tested per architecture before
  it can be enabled
* GCC's profiling mechanism together with optimization sometimes
  produces skewed data (see [1])
* GCC's profiling code assumes single-threaded execution
* gcov assumes that a program has finished when coverage data is
  analyzed

Despite these issues, the data which can be obtained has been proven
to be sufficiently accurate for most practical uses.


History:

Hubertus Franke <frankeh@...ibm.com> wrote the first version of this
patch around 2002. Since then it has been adapted to new versions of
the kernel and GCC with contributions by several people (see file
kernel/gcov/fs.c, write me if I missed anyone). Due to regular
requests, I rewrote the gcov-kernel patch from scratch so that it
would (hopefully) be fit for inclusion into the upstream kernel.

--
[1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
[2] http://ltp.sourceforge.net/coverage/lcov.php



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ