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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <484FCC4A.1010605@de.ibm.com>
Date:	Wed, 11 Jun 2008 14:59:54 +0200
From:	Peter Oberparleiter <peter.oberparleiter@...ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Peter Oberparleiter <oberparleiter@...glemail.com>,
	linux-kernel@...r.kernel.org, ltp-coverage@...ts.sourceforge.net,
	Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH 0/6] gcov kernel support

Andrew Morton wrote:
> On Mon, 09 Jun 2008 15:49:16 +0200 Peter Oberparleiter <peter.oberparleiter@...ibm.com> wrote:
> 
>> Andrew Morton wrote:
>> > On Mon, 02 Jun 2008 15:33:51 +0200 Peter Oberparleiter <peter.oberparleiter@...ibm.com> wrote:
>> > 
>> >> This is version #3 of the gcov kernel support patch set 
>> > 
>> > My build tree is now filled with dead symlinks, like
>> > 
>> > lrwxrwxrwx 1 akpm akpm 64 Jun  9 00:06 security/selinux/nlmsgtab.gcda -> /sys/kernel/debug/gcov/usr/src/25/security/selinux/nlmsgtab.gcda
>> 
>> Unfortunately a necessary evil of this approach: symlinks are created
>> for all compiled source files while link targets are only available when
>> the corresponding code is executed. In other words: those links will be
>> dead for source files which don't compile to actual code and for modules
>> as long as they are not loaded.
> 
> It doesn't seem awfully useful.  I don't run kernels on my build
> machines and I'm sure many are in the same situation.  So gcov is going
> to need a way of locating these files on the *target* machine.  And
> once that is available, there is no need to add all these symlinks into
> the build directory.

I don't see any other feasibly way to do it if we want the kernel to
work out-of-the-box with gcov. If the kernel was a user-space
application, gcc/libgcov would create the .gcda files in exactly the
same place where the symbolic links are now.

If we removed those symlinks, users would have to manually copy files
from /sys on the test machine to the correct position in /objtree on the
build machine before being able to get any kind of result. This would
IMO reduce the usefulness of the gcov kernel infrastructure noticeably
(though gcov-wrappers such as lcov could be modified to hide the
additional effort).

How about a CONFIG_GCOV_PROFILE_SYMLINKS configuration option?

>> > Which causes (at least)
>> > 
>> > ctags: Warning: cannot open source file "security/selinux/ss/conditional.gcda" : No such file or directory
>> > ctags: Warning: cannot open source file "security/selinux/netlink.gcda" : No such file or directory
>> > ctags: Warning: cannot open source file "security/selinux/netlabel.gcda" : No such file or directory
>> 
>> > and probably other thing which I haven't discovered yet.

I would argue that any mechanism that tries to access all files in
/objtree regardless of filename extension is brave at best, if not
broken.

>> I'm sure there's some kind of 'find' magic that can be used to work
>> around dead links. I'll see how this can be applied to the ctags case -
>> though neither 'make tags' nor 'make TAGS' seem to produce any warnings
>> on my system..
> 
> I use
> 
> 	ctags -R --excmd=pattern --format=1

ctags -R --excmd=pattern --format=1 --exclude=\*.gcda

:)


Regards,
  Peter
--
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