All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J.A. Magallon" <jamagallon@able.es>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.4.22-pre7
Date: Sat, 19 Jul 2003 01:18:02 +0200	[thread overview]
Message-ID: <20030718231802.GG6166@werewolf.able.es> (raw)
In-Reply-To: <Pine.LNX.4.55L.0307181649290.29493@freak.distro.conectiva>; from marcelo@conectiva.com.br on Fri, Jul 18, 2003 at 21:53:25 +0200


On 07.18, Marcelo Tosatti wrote:
> 
> Hello,
> 
> Here goes -pre7.
> 
> This is a feature freeze, only bugfixes will be accepted from now on.
> 

HyperThreaded P4s will still fail to set AT_PLATFORM correctly.
Do you want to kill this bug from .22 ? ;)

--- linux/fs/binfmt_elf.c.orig	2002-12-28 00:12:32.000000000 +0100
+++ linux/fs/binfmt_elf.c	2002-12-28 00:32:37.000000000 +0100
@@ -116,11 +116,14 @@
 	elf_caddr_t *argv;
 	elf_caddr_t *envp;
 	elf_addr_t *sp, *csp;
+	char *stack_top;
 	char *k_platform, *u_platform;
 	long hwcap;
 	size_t platform_len = 0;
 	size_t len;
 
+	stack_top = p;
+
 	/*
 	 * Get hold of platform and hardware capabilities masks for
 	 * the machine we are running on.  In some cases (Sparc), 
@@ -135,8 +138,8 @@
 		platform_len = strlen(k_platform) + 1;
 		u_platform = p - platform_len;
 		__copy_to_user(u_platform, k_platform, platform_len);
-	} else
-		u_platform = p;
+		stack_top = u_platform;
+	}
 
 #if defined(__i386__) && defined(CONFIG_SMP)
 	/*
@@ -149,15 +152,14 @@
 	 * processors. This keeps Mr Marcelo Person happier but should be
 	 * removed for 2.5
 	 */
-	 
 	if(smp_num_siblings > 1)
-		u_platform = u_platform - ((current->pid % 64) << 7);
+		stack_top -= ((current->pid % NR_CPUS) << 7);
 #endif	
 
 	/*
 	 * Force 16 byte _final_ alignment here for generality.
 	 */
-	sp = (elf_addr_t *)(~15UL & (unsigned long)(u_platform));
+	sp = (elf_addr_t *)(~15UL & (unsigned long)(stack_top));
 	csp = sp;
 	csp -= (1+DLINFO_ITEMS)*2 + (k_platform ? 2 : 0);
 #ifdef DLINFO_ARCH_ITEMS


-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.22-pre6-jam1m (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-0.3mdk))

  parent reply	other threads:[~2003-07-18 23:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-18 19:53 Linux 2.4.22-pre7 Marcelo Tosatti
2003-07-18 23:06 ` Felipe Alfaro Solana
2003-07-19  0:38   ` Mike Fedyk
2003-07-19  0:53     ` Andre Tomt
2003-07-19  7:06       ` Lars Marowsky-Bree
2003-07-19  8:22     ` Christoph Hellwig
2003-07-19  8:21   ` Christoph Hellwig
2003-07-21 17:24     ` Mike Fedyk
2003-07-21 18:09       ` Christoph Hellwig
2003-07-18 23:12 ` J.A. Magallon
2003-07-18 23:18 ` J.A. Magallon [this message]
2003-07-19  0:21 ` Tom Vier
2003-07-19 16:27 ` Dick Streefland
     [not found] <aJyM.3dH.27@gated-at.bofh.it>
     [not found] ` <aNLX.6Go.5@gated-at.bofh.it>
2003-07-19 11:41   ` Arnd Bergmann
2003-07-19 12:25     ` Marc-Christian Petersen

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=20030718231802.GG6166@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.