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]
Date:	Fri, 18 Jan 2008 12:31:05 -0700
From:	Zan Lynx <zlynx@....org>
To:	Vadim Lobanov <vlobanov@...akeasy.net>
Cc:	Andy Lutomirski <luto@...ealbox.com>, linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Schwartz <davids@...master.com>,
	Johannes Weiner <hannes@...urebad.de>, clameter@....com,
	penberg@...helsinki.fi
Subject: Re: Why is the kfree() argument const?


On Fri, 2008-01-18 at 11:14 -0800, Vadim Lobanov wrote:
[cut]
> Second, even if const did have stronger semantics that forbade the value of x 
> from being modified during execution of foo, the compiler still could not 
> reorder the two function calls, before it cannot assume that the two 
> functions (in their internal implementations) do not touch some other, 
> unknown to this code, global variable.

This is why GCC has the pure and const function attributes.  These
attributes are more powerful than the "const" keyword, and do allow
optimizations with assumptions about global state.
-- 
Zan Lynx <zlynx@....org>

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ