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: <20090511131708.GB32693@elte.hu>
Date:	Mon, 11 May 2009 15:17:08 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>,
	Huang Ying <ying.huang@...el.com>, Li Wei <W.Li@....COM>,
	Michael Ellerman <michaele@....ibm.com>
Subject: Re: [PATCH 3/4] gcov: add gcov profiling infrastructure


* Peter Oberparleiter <oberpar@...ux.vnet.ibm.com> wrote:

>>> +/* __gcov_init is called by gcc-generated constructor code for each object
>>> + * file compiled with -fprofile-arcs. */
>>
>> Please use standard multi-line comments like specified in  
>> Documentation/CodingStyle. This observation holds for basically all  
>> the comment blocks in this file - dozens of them.
>
> None of the __gcov functions are ever called by the kernel 
> directly - only by gcc generated code. I can add comments for 
> __gcov_init as that one is actually implemented. The other 
> functions are required to prevent linking errors but are never 
> actually called in kernel context, therefore in my opinion it 
> wouldn't make much sense to provide full-blown comments for them.

It isnt about the amount of comments, it is about the plain (and 
simple to rectify) fact that the above two-lines comment is 
inconsistent with other kernel code.

>>>                   $(asflags-y) $(AFLAGS_$(basetarget).o)
>>>  _cpp_flags     = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
>>>  +# Enable gcov profiling flags for a file, directory or for all 
>>> files depending
>>> +# on variables GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL
>>> +# (in this order)
>>> +ifeq ($(CONFIG_GCOV_KERNEL),y)
>>
>> Please try to use winged comments in makefiles too.
>
> What do you mean by winged comments?

This:

  /*
   * Comment .....
   * ...... goes here:
   */

Is called a winged comment. Its makefile equivalent is:

   #
   # Comment .........
   # ....... goes here
   #

        Ingo
--
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