<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/compiler-gcc.h, branch v3.18.104</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.104</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.104'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-04-20T13:40:50Z</updated>
<entry>
<title>compiler-gcc: disable -ftracer for __noclone functions</title>
<updated>2016-04-20T13:40:50Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2016-03-31T07:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7c134b078cb5738f10d1d1533ab1895864b958f9'/>
<id>urn:sha1:7c134b078cb5738f10d1d1533ab1895864b958f9</id>
<content type='text'>
[ Upstream commit 95272c29378ee7dc15f43fa2758cb28a5913a06d ]

-ftracer can duplicate asm blocks causing compilation to fail in
noclone functions.  For example, KVM declares a global variable
in an asm like

    asm("2: ... \n
         .pushsection data \n
         .global vmx_return \n
         vmx_return: .long 2b");

and -ftracer causes a double declaration.

Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: stable@vger.kernel.org
Cc: kvm@vger.kernel.org
Reported-by: Linda Walsh &lt;lkml@tlinx.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>compiler-gcc: integrate the various compiler-gcc[345].h files</title>
<updated>2016-04-20T13:40:49Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-06-25T22:01:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=677fa15cd6d5b0843e7b9c58409f67d656b1ec2f'/>
<id>urn:sha1:677fa15cd6d5b0843e7b9c58409f67d656b1ec2f</id>
<content type='text'>
[ Upstream commit f320793e52aee78f0fbb8bcaf10e6614d2e67bfc ]

[ Upstream commit cb984d101b30eb7478d32df56a0023e4603cba7f ]

As gcc major version numbers are going to advance rather rapidly in the
future, there's no real value in separate files for each compiler
version.

Deduplicate some of the macros #defined in each file too.

Neaten comments using normal kernel commenting style.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Segher Boessenkool &lt;segher@kernel.crashing.org&gt;
Cc: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Cc: Anton Blanchard &lt;anton@samba.org&gt;
Cc: Alan Modra &lt;amodra@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>crypto: more robust crypto_memneq</title>
<updated>2013-12-05T13:28:41Z</updated>
<author>
<name>Cesar Eduardo Barros</name>
<email>cesarb@cesarb.eti.br</email>
</author>
<published>2013-11-26T00:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe8c8a126806fea4465c43d62a1f9d273a572bf5'/>
<id>urn:sha1:fe8c8a126806fea4465c43d62a1f9d273a572bf5</id>
<content type='text'>
Disabling compiler optimizations can be fragile, since a new
optimization could be added to -O0 or -Os that breaks the assumptions
the code is making.

Instead of disabling compiler optimizations, use a dummy inline assembly
(based on RELOC_HIDE) to block the problematic kinds of optimization,
while still allowing other optimizations to be applied to the code.

The dummy inline assembly is added after every OR, and has the
accumulator variable as its input and output. The compiler is forced to
assume that the dummy inline assembly could both depend on the
accumulator variable and change the accumulator variable, so it is
forced to compute the value correctly before the inline assembly, and
cannot assume anything about its value after the inline assembly.

This change should be enough to make crypto_memneq work correctly (with
data-independent timing) even if it is inlined at its call sites. That
can be done later in a followup patch.

Compile-tested on x86_64.

Signed-off-by: Cesar Eduardo Barros &lt;cesarb@cesarb.eti.br&gt;
Acked-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>compiler-gcc.h: Add gcc-recommended GCC_VERSION macro</title>
<updated>2013-02-22T01:22:15Z</updated>
<author>
<name>Daniel Santos</name>
<email>daniel.santos@pobox.com</email>
</author>
<published>2013-02-22T00:41:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16'/>
<id>urn:sha1:3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16</id>
<content type='text'>
Throughout compiler*.h, many version checks are made.  These can be
simplified by using the macro that gcc's documentation recommends.
However, my primary reason for adding this is that I need bug-check
macros that are enabled at certain gcc versions and it's cleaner to use
this macro than the tradition method:

  #if __GNUC__ &gt; 4 || (__GNUC__ == 4 &amp;&amp; __GNUC_MINOR__ =&gt; 2)

If you add patch level, it gets this ugly:

  #if __GNUC__ &gt; 4 || (__GNUC__ == 4 &amp;&amp; (__GNUC_MINOR__ &gt; 2 || \
      __GNUC_MINOR__ == 2 __GNUC_PATCHLEVEL__ &gt;= 1))

As opposed to:

  #if GCC_VERSION &gt;= 40201

While having separate headers for gcc 3 &amp; 4 eliminates some of this
verbosity, they can still be cleaned up by this.

See also:

  http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

Signed-off-by: Daniel Santos &lt;daniel.santos@pobox.com&gt;
Acked-by: Borislav Petkov &lt;bp@alien8.de&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Make all inline tags also include notrace</title>
<updated>2012-06-18T13:47:00Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2012-06-14T14:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=93b3cca1ccd30b1ad290951a3fc7c10c73db7313'/>
<id>urn:sha1:93b3cca1ccd30b1ad290951a3fc7c10c73db7313</id>
<content type='text'>
Commit 5963e317b1e9d2a ("ftrace/x86: Do not change stacks in DEBUG when
calling lockdep") prevented lockdep calls from the int3 breakpoint handler
from reseting the stack if a function that was called was in the process
of being converted for tracing and had a breakpoint on it. The idea is,
before calling the lockdep code, do a load_idt() to the special IDT that
kept the breakpoint stack from reseting. This worked well as a quick fix
for this kernel release, until a certain config caused a lockup in the
function tracer start up tests.

Investigating it, I found that the load_idt that was used to prevent
the int3 from changing stacks was itself being traced!

Even though the config had CONFIG_OPTIMIZE_INLINING disabled, and
all 'inline' tags were set to always inline, there were still cases that
it did not inline! This was caused by CONFIG_PARAVIRT_GUEST, where it
would add a pointer to the native_load_idt() which made that function
to be traced.

Commit 45959ee7aa645815a ("ftrace: Do not function trace inlined functions")
only touched the 'inline' tags when CONFIG_OPMITIZE_INLINING was enabled.
PARAVIRT_GUEST shows that this was not enough and we need to also
mark always_inline with notrace as well.

Reported-by: Fengguang Wu &lt;wfg@linux.intel.com&gt;
Tested-by: Fengguang Wu &lt;wfg@linux.intel.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>include/ and checkpatch: prefer __scanf to __attribute__((format(scanf,...)</title>
<updated>2012-03-23T23:58:36Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2012-03-23T22:02:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6061d949dd984c762ee272a88e77699fa675d1c8'/>
<id>urn:sha1:6061d949dd984c762ee272a88e77699fa675d1c8</id>
<content type='text'>
It's equivalent to __printf, so prefer __scanf.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Do not function trace inlined functions</title>
<updated>2011-12-21T12:14:34Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-12-12T20:22:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=45959ee7aa645815a5ce303a0ea1e48a21e67c6a'/>
<id>urn:sha1:45959ee7aa645815a5ce303a0ea1e48a21e67c6a</id>
<content type='text'>
When gcc inlines a function, it does not mark it with the mcount
prologue, which in turn means that inlined functions are not traced
by the function tracer. But if CONFIG_OPTIMIZE_INLINING is set, then
gcc is allowed not to inline a function that is marked inline.

Depending on the options and the compiler, a function may or may
not be traced by the function tracer, depending on whether gcc
decides to inline a function or not. This has caused several
problems in the pass becaues gcc is not always consistent with
what it decides to inline between different gcc versions.

Some places should not be traced (like paravirt native_* functions)
and these are mostly marked as inline. When gcc decides not to
inline the function, and if that function should not be traced, then
the ftrace function tracer will suddenly break when it use to work
fine. This becomes even harder to debug when different versions of
gcc will not inline that function, making the same kernel and config
work for some gcc versions and not work for others.

By making all functions marked inline to not be traced will remove
the ambiguity that gcc adds when it comes to tracing functions marked
inline. All gcc versions will be consistent with what functions are
traced and having volatile working code will be removed.

Note, only the inline macro when CONFIG_OPTIMIZE_INLINING is set needs
to have notrace added, as the attribute __always_inline will force
the function to be inlined and then not traced.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>sparse: define __must_be_array() for __CHECKER__</title>
<updated>2011-05-25T15:39:46Z</updated>
<author>
<name>KOSAKI Motohiro</name>
<email>kosaki.motohiro@jp.fujitsu.com</email>
</author>
<published>2011-05-25T00:13:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5bd7e6a30e1eb38f58f0046c0cd42dfc38e90d64'/>
<id>urn:sha1:5bd7e6a30e1eb38f58f0046c0cd42dfc38e90d64</id>
<content type='text'>
commit c5e631cf65f ("ARRAY_SIZE: check for type") added __must_be_array().
But sparse can't parse this gcc extention.

Now make C=2 makes following sparse errors a lot.

  kernel/futex.c:2699:25: error: No right hand side of '+'-expression

Because __must_be_array() is used for ARRAY_SIZE() macro and it is
used very widely.

This patch fixes it.

Signed-off-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>include/linux/compiler-gcc*.h: unify macro definitions</title>
<updated>2011-03-23T00:44:10Z</updated>
<author>
<name>Borislav Petkov</name>
<email>borislav.petkov@amd.com</email>
</author>
<published>2011-03-22T23:33:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c837fb37a60aa642b9ad423462e32b851a03020a'/>
<id>urn:sha1:c837fb37a60aa642b9ad423462e32b851a03020a</id>
<content type='text'>
Unify identical gcc3.x and gcc4.x macros.

Signed-off-by: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>include/linux/compiler-gcc.h: use __same_type() in __must_be_array()</title>
<updated>2010-08-10T03:45:04Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2010-08-10T00:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea6b101d8a3ea4e1dec29df31188c2f9852296fe'/>
<id>urn:sha1:ea6b101d8a3ea4e1dec29df31188c2f9852296fe</id>
<content type='text'>
We should use the __same_type() helper in __must_be_array().

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Reported-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
