mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Anderson <anderson@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, andi@firstfloor.org, jstancek@redhat.com,
	anderson@redhat.com
Subject: [PATCH] x86-64: Prevent gcc from optimizing away venosys_1()
Date: Fri, 3 Jun 2011 11:20:23 -0400 (EDT)	[thread overview]
Message-ID: <2060873692.1232.1307114423575.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> (raw)
In-Reply-To: <313387488.1201.1307114323524.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>

One of the changes in commit a4928cffe6435caf427ae673131a633c1329dbf3 
made the venosys_1() system call static, which causes it to be 
optimized out of the kernel:

  Author: Ingo Molnar <mingo@elte.hu>
  Date:   Wed Apr 23 13:20:56 2008 +0200

  "make namespacecheck" fixes

  Signed-off-by: Ingo Molnar <mingo@elte.hu>

Commit 2e8ad43ec07545780ce7992cb18e2d82c7abd24c had originally
changed all vsyscalls from being static for the same reason:

  Author: Andi Kleen <ak@suse.de>
  Date:   Mon Sep 12 18:49:24 2005 +0200

  [PATCH] x86-64: Prevent gcc 4 from optimizing away vsyscalls
    
  They were previously static.
    
  Signed-off-by: Andi Kleen <ak@suse.de>
  Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Reported-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Dave Anderson <anderson@redhat.com>

---

diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index 3e68218..60a34af 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -222,7 +222,7 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
 	return 0;
 }
 
-static long __vsyscall(3) venosys_1(void)
+long __vsyscall(3) venosys_1(void)
 {
 	return -ENOSYS;
 }

       reply	other threads:[~2011-06-03 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <313387488.1201.1307114323524.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2011-06-03 15:20 ` Dave Anderson [this message]
2011-06-03 20:48   ` Andi Kleen
2011-06-03 21:32     ` Dave Anderson
2011-06-03 21:37       ` Andi Kleen
2011-06-06 17:22   ` Ingo Molnar

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=2060873692.1232.1307114423575.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com \
    --to=anderson@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=jstancek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®