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.21-rc1
Date: Wed, 23 Apr 2003 00:59:31 +0200 [thread overview]
Message-ID: <20030422225931.GA9066@werewolf.able.es> (raw)
In-Reply-To: <Pine.LNX.4.53L.0304211545580.12940@freak.distro.conectiva>; from marcelo@conectiva.com.br on Mon, Apr 21, 2003 at 20:47:32 +0200
On 04.21, Marcelo Tosatti wrote:
>
> Here goes the first candidate for 2.4.21.
>
> Please test it extensively.
>
binfmt_elf.c is still buggy wrt HT cpus when setting AT_PLATFORM.
This patch corrects it and also optimizes stack usage changing from
fixed 64 cpus to NR_CPUS (unless I misunderstood what the '64' stands for...)
--- 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.21-rc1-jam1 (gcc 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk))
next prev parent reply other threads:[~2003-04-22 22:47 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-21 18:47 Linux 2.4.21-rc1 Marcelo Tosatti
2003-04-21 19:58 ` Stephan von Krawczynski
2003-04-21 22:49 ` Ben Greear
2003-04-21 23:24 ` Willy Tarreau
2003-04-21 23:10 ` J.A. Magallon
2003-04-21 23:39 ` Linux 2.4.21-rc1 - unresolved Eyal Lebedinsky
2003-04-22 7:15 ` Marc-Christian Petersen
2003-04-23 19:44 ` Bill Davidsen
2003-04-23 19:51 ` Marcelo Tosatti
2003-04-24 11:27 ` Marc-Christian Petersen
2003-04-24 11:32 ` Marc-Christian Petersen
2003-04-24 11:37 ` Christoph Hellwig
2003-05-06 2:48 ` Mike Fedyk
2003-04-22 3:00 ` Linux 2.4.21-rc1 Corey Minyard
2003-04-22 21:49 ` Marcelo Tosatti
2003-04-22 22:54 ` Corey Minyard
2003-04-22 13:42 ` Geert Uytterhoeven
2003-04-22 17:09 ` Rene Rebe
2003-04-22 19:15 ` Lukasz Trabinski
2003-04-22 22:59 ` J.A. Magallon [this message]
2003-04-23 7:59 ` IEEE-1394 problem on init [ was Re: Linux 2.4.21-rc1 ] Stelian Pop
2003-04-23 8:08 ` Linux 2.4.21-rc1 Jerome Chantelauze
2003-04-23 15:09 ` Athanasius
2003-04-23 20:46 ` Olaf Hering
2003-04-30 21:30 ` Carl-Daniel Hailfinger
2003-04-25 3:06 ` Lucas Correia Villa Real
2003-06-07 19:35 ` Adrian Bunk
2003-06-11 4:27 ` Lucas Correia Villa Real
2003-04-25 3:13 ` Lucas Correia Villa Real
2003-04-25 14:15 ` Andreas Metzler
2003-04-25 14:27 ` Martin Josefsson
2003-04-25 14:46 ` Andreas Metzler
2003-04-25 16:19 ` Zed Pobre
2003-04-25 16:24 ` Marc-Christian Petersen
2003-05-06 2:57 ` Mike Fedyk
[not found] <cistron.Pine.LNX.4.53L.0304211545580.12940@freak.distro.conectiva>
[not found] ` <E198M48-0000tC-00@ncc1701.cistron.net>
2003-04-23 15:36 ` Athanasius
2003-04-23 16:40 ` Athanasius
2003-04-25 16:17 ` Bill Davidsen
2003-04-25 20:30 ` Athanasius
2003-05-06 4:30 ` Mike Fedyk
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=20030422225931.GA9066@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).