linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Jens Axboe <jens.axboe@oracle.com>,
	Andy Whitcroft <apw@shadowen.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [BUILD-FAILURE] linux-next: Tree for June 30
Date: Mon, 30 Jun 2008 13:42:09 -0700	[thread overview]
Message-ID: <48694521.2000802@zytor.com> (raw)
In-Reply-To: <486943F1.80606@zytor.com>

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

H. Peter Anvin wrote:
> Sam Ravnborg wrote:
>>> ah, ok. So the patch below should solve this for now?
>>>
>>> is there any particular reason why we are limited to 100 sections? 
>>> (is there some ELF limitation here perhaps?)
>>
>> I would still like to know if you see significant different numbers 
>> than Kamalesh.
>> If you see a number close to 100 then OK.
>> But if you see a number say in the range of below 80 then we should 
>> dive deeper into this.
>>
>> I do not even know what the program does - never looked at it befoe
>> so why the original limit was 100 I dunno.
>>
> 
> It looks to me that the people who did the relocatable kernel code just 
> put in a magic number.  There is certainly no inherent reason for this 
> limit.
> 
> What's really ugly is that this is in a host-space program!  It would 
> have been one thing if it had been in a piece of code run in a 
> restricted environment, e.g. in the decompressor, but this one runs in 
> user space on the build environment.
> 
> The quick solution is to change this number to something obscenely big 
> (say 10000, but even that could be an issue if we end up doing stuff 
> like section per function); the proper solution is to turn these arrays 
> into a structure and allocate the array dynamically.

Here is a quick patch to just change the number; I'll take a quick pass 
to see how much work it'd be to allocate it dynamically.

	-hpa

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 412 bytes --]

diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
index edaadea..9daca63 100644
--- a/arch/x86/boot/compressed/relocs.c
+++ b/arch/x86/boot/compressed/relocs.c
@@ -10,7 +10,7 @@
 #define USE_BSD
 #include <endian.h>
 
-#define MAX_SHDRS 100
+#define MAX_SHDRS 10000
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 static Elf32_Ehdr ehdr;
 static Elf32_Shdr shdr[MAX_SHDRS];

  reply	other threads:[~2008-06-30 20:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-30 14:16 linux-next: Tree for June 30 Stephen Rothwell
2008-06-30 16:02 ` [BUILD-FAILURE] " Kamalesh Babulal
2008-06-30 16:43   ` Kamalesh Babulal
2008-06-30 18:59     ` Sam Ravnborg
2008-06-30 19:26       ` Ingo Molnar
2008-06-30 19:47         ` Sam Ravnborg
2008-06-30 20:06           ` Ingo Molnar
2008-06-30 20:11             ` Ingo Molnar
2008-06-30 20:25             ` Sam Ravnborg
2008-06-30 20:37               ` H. Peter Anvin
2008-06-30 20:42                 ` H. Peter Anvin [this message]
2008-06-30 21:46                 ` H. Peter Anvin
2008-07-01  2:10                   ` Vivek Goyal
2008-07-01  6:56                   ` Ingo Molnar
2008-07-01  8:15                   ` Eric W. Biederman
2008-07-01  9:21                   ` Kamalesh Babulal
2008-06-30 17:59   ` Jens Axboe
2008-06-30 18:21     ` Kamalesh Babulal
2008-06-30 18:25 ` [BUILD-FAILURE] linux-next: Tree for June 30 - powerpc - build failure at arch_add_memory() Kamalesh Babulal
2008-07-01  1:34   ` Tony Breeds
2008-07-01  8:04     ` Kamalesh Babulal
2008-06-30 18:43 ` linux-next: Tree for June 30 (USB: cdc-acm) Randy Dunlap
2008-06-30 19:01   ` Greg KH
2008-06-30 19:32     ` Alan Stern
2008-07-01 12:22     ` Oliver Neukum
2008-07-01 17:10     ` Oliver Neukum

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=48694521.2000802@zytor.com \
    --to=hpa@zytor.com \
    --cc=apw@shadowen.org \
    --cc=ebiederm@xmission.com \
    --cc=jens.axboe@oracle.com \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    /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).