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] [day] [month] [year] [list]
Date:	Thu, 17 Mar 2011 15:15:43 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	Robert Richter <robert.richter@....com>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	oprofile-list <oprofile-list@...ts.sourceforge.net>,
	Heinz Graalfs <graalfs@...ux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] oprofile: Add __exit attibute to oprofile_arch_exit() functions

On Thu, Mar 17, 2011 at 07:41, Robert Richter wrote:
> On 16.03.11 16:15:49, Mike Frysinger wrote:
>> On Wed, Mar 16, 2011 at 13:58, Robert Richter wrote:
>> >  979048e oprofile: don't call arch exit code from init code on failure
>> >
>> > we may add __exit attibutes to oprofile_arch_exit() functions.
>>
>> i dont think this the way to go.  how about updating one place
>> (include/linux/oprofile.h:oprofile_arch_exit) and making sure all arch
>> files are including that header if they arent already ?  after all, if
>> they arent including that header, the arch code could break without
>> noticing.
>
> do you mean we specify the __exit attribute in the function
> declaration of the header file and make sure it is included
> everythere? I was looking at current implementations in the kernel and
> this is not common. Mostly the attributes are set in the function
> definition.

i think that's because for most functions, there is no matching
prototype in common code.  drivers themselves have no reason to create
such prototypes.

> So I was not sure if that would work. If so, may we skip
> then the __exit attribute in the definition?
>
> GCC doc states: "The keyword __attribute__ allows you to specify
> special attributes when making a declaration."
>
>  http://gcc.gnu.org/onlinedocs/gcc-4.5.1/gcc/Function-Attributes.html#Function%20Attributes
>
> but nothing about that happens if it is in the function definition and
> this is different from the declaration.

if the function prototype is seen in the same file as the function
definition, attributes are carried over.  if it isnt (because the
oprofile header isnt being included), then the attribute will be
ignored for the function definition.
-mike
--
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