public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Andy Lutomirski <luto@amacapital.net>, Ingo Molnar <mingo@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	"linux-tip-commits@vger.kernel.org" 
	<linux-tip-commits@vger.kernel.org>
Subject: Re: [tip:x86/urgent] x86/vdso: Discard the __bug_table section
Date: Tue, 24 Jun 2014 11:26:11 -0700	[thread overview]
Message-ID: <53A9C2C3.7050508@zytor.com> (raw)
In-Reply-To: <CALCETrXohybf=Lk70j=hVG1zaAQ-mw8CVo6P59xjM2qsc-p+Gg@mail.gmail.com>

On 06/24/2014 11:19 AM, Andy Lutomirski wrote:
>>>
>>> One of the recent x86/urgent vdso commits causes this build failure:
>>>
>>>  Error: too many copied sections (max = 13)
>>
>> I can't reproduce this with your config, which suggestes a binutils
>> issue, which is annoying.  Can you tell me what version of ld you're
>> using and send me the output of:
>>
>> for i in arch/x86/vdso/*.so.dbg; do echo $i; eu-readelf -S $i; done
> 
> Ping!
> 
> The current state of this is obviously not so good, but I don't know
> how to proceed.
> 

We used to have this kind of problems with PHDRs, where ld would guess
how much space it would need, somehow guess wrong, and fall on its face.

I think we want to actually print the number that we are trying to copy
in addition to the maximum, and I also noticed the test looks wrong.
Thus I would like to propose the following patch as a diagnostic:

diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h
index f42e2ddc663d..94158e100f26 100644
--- a/arch/x86/vdso/vdso2c.h
+++ b/arch/x86/vdso/vdso2c.h
@@ -99,8 +99,9 @@ static void BITSFUNC(copy_section)(struct
BITSFUNC(fake_sections) *out,
        if (!copy)
                return;

-       if (out->count >= out->max_count)
-               fail("too many copied sections (max = %d)\n",
out->max_count);
+       if (out->count > out->max_count)
+               fail("too many copied sections (max = %d, need = %d)\n",
+                    out->max_count, out->count);

        if (in_idx == out->in_shstrndx)
                out->out_shstrndx = out->count;

Does anyone have any objection?  Andy, I presume I am correct that =>
should be > there?

	-hpa

  reply	other threads:[~2014-06-24 18:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 22:59 [PATCH 0/5] x86,vdso: Restore a bunch of section headers Andy Lutomirski
2014-06-18 22:59 ` [PATCH 1/5] x86,vdso: Discard the __bug_table section Andy Lutomirski
2014-06-21  2:07   ` [tip:x86/urgent] x86/vdso: " tip-bot for Andy Lutomirski
2014-06-22  8:47     ` Ingo Molnar
2014-06-22 16:59       ` Andy Lutomirski
2014-06-24 18:19         ` Andy Lutomirski
2014-06-24 18:26           ` H. Peter Anvin [this message]
2014-06-24 18:37             ` Andy Lutomirski
2014-06-24 18:43               ` H. Peter Anvin
2014-06-24 19:40                 ` Andy Lutomirski
2014-06-24 19:50                 ` [PATCH 0/2] x86: Build fixes for tip/x86/urgent Andy Lutomirski
2014-06-24 19:50                   ` [PATCH 1/2] x86,vdso: Move DISABLE_BRANCH_PROFILING into the vdso makefile Andy Lutomirski
2014-06-24 20:09                     ` H. Peter Anvin
2014-06-24 19:50                   ` [PATCH 2/2] x86,vdso2c: Error out if DT_RELA is present Andy Lutomirski
2014-06-24 20:46                 ` [PATCH v2 0/2] x86: Build fixes for tip/x86/urgent Andy Lutomirski
2014-06-24 20:46                   ` [PATCH v2 1/2] x86,vdso: Move DISABLE_BRANCH_PROFILING into the vdso makefile Andy Lutomirski
2014-06-24 22:16                     ` [tip:x86/urgent] x86/vdso: " tip-bot for Andy Lutomirski
2014-06-24 20:46                   ` [PATCH v2 2/2] x86,vdso2c: Error out if DT_RELA is present Andy Lutomirski
2014-06-24 22:16                     ` [tip:x86/urgent] x86/vdso: Error out in vdso2c " tip-bot for Andy Lutomirski
2014-06-24 18:29       ` [tip:x86/urgent] x86/vdso: Discard the __bug_table section H. Peter Anvin
2014-06-24 18:47         ` H. Peter Anvin
2014-06-18 22:59 ` [PATCH 2/5] x86,vdso2c: Use better macros for ELF bitness Andy Lutomirski
2014-06-21  2:07   ` [tip:x86/urgent] x86/vdso2c: " tip-bot for Andy Lutomirski
2014-06-18 22:59 ` [PATCH 3/5] x86,vdso: Improve the fake section headers Andy Lutomirski
2014-06-21  2:07   ` [tip:x86/urgent] x86/vdso: " tip-bot for Andy Lutomirski
2014-06-18 22:59 ` [PATCH 4/5] x86,vdso: Remove some redundant in-memory " Andy Lutomirski
2014-06-21  2:08   ` [tip:x86/urgent] x86/vdso: " tip-bot for Andy Lutomirski
2014-06-18 22:59 ` [PATCH 5/5] x86,vdso: Create .build-id links for unstripped vdso files Andy Lutomirski
2014-06-19 22:46   ` H. Peter Anvin
2014-06-19 23:59     ` Andy Lutomirski
2014-06-19 22:42 ` [PATCH 0/5] x86,vdso: Restore a bunch of section headers H. Peter Anvin

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=53A9C2C3.7050508@zytor.com \
    --to=hpa@zytor.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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