mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Cc: "Michael Kerrisk" <mtk-lkml@gmx.net>, linux-kernel@vger.kernel.org
Subject: [PATCH] i386: fix prevent_tail_call
Date: Thu, 26 May 2005 15:21:13 -0700	[thread overview]
Message-ID: <200505262221.j4QMLDgF010735@magilla.sf.frob.com> (raw)
In-Reply-To: Michael Kerrisk's message of  Wednesday, 18 May 2005 10:20:47 +0200 <24601.1116404447@www71.gmx.net>


We fixed this bug before, but it didn't take.  It may have been the case
that the problem was first noticed to occur in a CONFIG_REGPARM compile.
But it's not regparm functions that need not to make tail calls, it's
asmlinkage functions called with a user pt_regs frame on the stack
supplying their arguments.  prevent_tail_call probably doesn't do anything
at all in regparm functions (your argument registers are going to be
clobbered, period).  It was a braino to conditionalize that definition in
the first place.

Signed-off-by: Roland McGrath <roland@redhat.com>

---
commit 20da6762d8c1921800686ce31b1563e3ac24880d
tree cffaf6d5044bb44f13bb540d750f1e44562901e4
parent 3b54f47d661b933498f0709e5ce215d0f285e928
author Roland McGrath <roland@redhat.com> Thu, 26 May 2005 15:19:26 -0700
committer Roland McGrath <roland@redhat.com> Thu, 26 May 2005 15:19:26 -0700

 asm-i386/linkage.h |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

Index: include/asm-i386/linkage.h
===================================================================
--- a2dc8eec0e30ffa0f39d2f835e018ee86387ff61/include/asm-i386/linkage.h  (mode:100644)
+++ cffaf6d5044bb44f13bb540d750f1e44562901e4/include/asm-i386/linkage.h  (mode:100644)
@@ -5,9 +5,7 @@
 #define FASTCALL(x)	x __attribute__((regparm(3)))
 #define fastcall	__attribute__((regparm(3)))
 
-#ifdef CONFIG_REGPARM
-# define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
-#endif
+#define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
 
 #ifdef CONFIG_X86_ALIGNMENT_16
 #define __ALIGN .align 16,0x90

  parent reply	other threads:[~2005-05-26 22:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18  8:20 waitid() fails with EINVAL for SA_RESTART signals Michael Kerrisk
2005-05-26 21:17 ` Roland McGrath
2005-05-26 22:21 ` Roland McGrath [this message]
2005-05-26 22:22 ` Roland McGrath
2005-05-26 22:37   ` David S. Miller
2005-05-26 23:19     ` Linus Torvalds
2005-05-26 23:22       ` Roland McGrath
2005-05-27  0:03         ` Parag Warudkar
2005-05-27  0:11           ` Roland McGrath
2005-05-27  0:37             ` Parag Warudkar
2005-05-27  1:05               ` Parag Warudkar
2005-05-27  2:01                 ` Parag Warudkar
2005-05-30 16:55       ` Michael Kerrisk

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=200505262221.j4QMLDgF010735@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk-lkml@gmx.net \
    --cc=torvalds@osdl.org \
    /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®