From: tip-bot for Andrew Morton <akpm@linux-foundation.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
arjan@linux.intel.com, akpm@linux-foundation.org,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/asm] include/linux/compiler-gcc4.h: Fix build bug - gcc-4.0.2 doesn't understand __builtin_object_size
Date: Thu, 3 Dec 2009 13:21:45 GMT [thread overview]
Message-ID: <tip-7cff7ce94a7df2ccf5ac76b48ee0995fee2060df@git.kernel.org> (raw)
In-Reply-To: <200910090724.n997OQl6013538@imap1.linux-foundation.org>
Commit-ID: 7cff7ce94a7df2ccf5ac76b48ee0995fee2060df
Gitweb: http://git.kernel.org/tip/7cff7ce94a7df2ccf5ac76b48ee0995fee2060df
Author: Andrew Morton <akpm@linux-foundation.org>
AuthorDate: Fri, 9 Oct 2009 00:01:39 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 3 Dec 2009 07:29:17 +0100
include/linux/compiler-gcc4.h: Fix build bug - gcc-4.0.2 doesn't understand __builtin_object_size
Maybe 4.1.0 doesn't too, but this fixed it for me.
Caused by:
4a31276: x86: Turn the copy_from_user check into an (optional) compile time warning
9f0cf4a: x86: Use __builtin_object_size() to validate the buffer size for copy_from_user()
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <200910090724.n997OQl6013538@imap1.linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/compiler-gcc4.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index 77542c5..e6ef279 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -38,7 +38,9 @@
#endif
+#if __GNUC_MINOR__ > 0
#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
+#endif
#if __GNUC_MINOR__ >= 4
#define __compiletime_warning(message) __attribute__((warning(message)))
#define __compiletime_error(message) __attribute__((error(message)))
parent reply other threads:[~2009-12-03 13:22 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <200910090724.n997OQl6013538@imap1.linux-foundation.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-7cff7ce94a7df2ccf5ac76b48ee0995fee2060df@git.kernel.org \
--to=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox