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>
Cc: Ingo Molnar <mingo@kernel.org>,
	"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:43:55 -0700	[thread overview]
Message-ID: <53A9C6EB.50900@zytor.com> (raw)
In-Reply-To: <CALCETrX8xJQwm=Cp63xSWsmsF1EXB9pPkZ46rX1u49f0oCfxfw@mail.gmail.com>

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

On 06/24/2014 11:37 AM, Andy Lutomirski wrote:
>>
>> 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);
>>
> 
> I think the old test was correct: we haven't incremented count yet
> (it's a couple lines below), so count is the zero-based index to which
> we're writing.
> 
> I thought of doing the need = %d thing, but I think that the output is
> a foregone conclusion: count == max_count + 1 when this fails.  A list
> of all the section names would be more interesting, but eu-readelf -S
> will tell is that.
> 

Well, I have reproduced this failure.  eu-readelf output included.

	-hpa


[-- Attachment #2: err --]
[-- Type: text/plain, Size: 9972 bytes --]

o.test/arch/x86/vdso/vdso32-int80.so.dbg
There are 27 section headers, starting at offset 0x9774:

Section Headers:
[Nr] Name                 Type         Addr     Off    Size   ES Flags Lk Inf Al
[ 0]                      NULL         00000000 000000 000000  0        0   0  0
[ 1] .hash                HASH         000000b4 0000b4 000038  4 A      2   0  4
[ 2] .dynsym              DYNSYM       000000ec 0000ec 000090 16 A      3   1  4
[ 3] .dynstr              STRTAB       0000017c 00017c 000095  0 A      0   0  1
[ 4] .gnu.version         GNU_versym   00000212 000212 000012  2 A      2   0  2
[ 5] .gnu.version_d       GNU_verdef   00000224 000224 000054  0 A      3   3  4
[ 6] .dynamic             DYNAMIC      00000278 000278 000080  8 WA     3   0  4
[ 7] .rodata              PROGBITS     000002f8 0002f8 000228  4 WA     0   0  4
[ 8] .fake_shstrtab       PROGBITS     00000520 000520 000076  0 A      0   0 32
[ 9] .note                NOTE         00000598 000598 000060  0 A      0   0  4
[10] .eh_frame_hdr        PROGBITS     000005f8 0005f8 000024  0 A      0   0  4
[11] .eh_frame            PROGBITS     0000061c 00061c 0000f4  0 A      0   0  4
[12] .text                PROGBITS     00000710 000710 000633  0 AX     0   0 16
[13] .altinstructions     PROGBITS     00000d43 000d43 000018  0 A      0   0  1
[14] .altinstr_replacement PROGBITS     00000d5b 000d5b 000006  0 AX     0   0  1
[15] .debug_info          PROGBITS     00000000 000d61 004a84  0        0   0  1
[16] .debug_abbrev        PROGBITS     00000000 0057e5 000519  0        0   0  1
[17] .debug_loc           PROGBITS     00000000 005cfe 00064f  0        0   0  1
[18] .debug_aranges       PROGBITS     00000000 006350 000058  0        0   0  8
[19] .debug_ranges        PROGBITS     00000000 0063a8 000208  0        0   0  1
[20] .debug_line          PROGBITS     00000000 0065b0 00077b  0        0   0  1
[21] .debug_str           PROGBITS     00000000 006d2b 0027f2  1 MS     0   0  1
[22] .comment             PROGBITS     00000000 00951d 00002c  1 MS     0   0  1
[23] .debug_frame         PROGBITS     00000000 00954c 000100  0        0   0  4
[24] .shstrtab            STRTAB       00000000 00964c 000127  0        0   0  1
[25] .symtab              SYMTAB       00000000 009bac 000380 16       26  48  4
[26] .strtab              STRTAB       00000000 009f2c 000226  0        0   0  1

o.test/arch/x86/vdso/vdso32-syscall.so.dbg
There are 27 section headers, starting at offset 0x979c:

Section Headers:
[Nr] Name                 Type         Addr     Off    Size   ES Flags Lk Inf Al
[ 0]                      NULL         00000000 000000 000000  0        0   0  0
[ 1] .hash                HASH         000000b4 0000b4 000038  4 A      2   0  4
[ 2] .dynsym              DYNSYM       000000ec 0000ec 000090 16 A      3   1  4
[ 3] .dynstr              STRTAB       0000017c 00017c 000095  0 A      0   0  1
[ 4] .gnu.version         GNU_versym   00000212 000212 000012  2 A      2   0  2
[ 5] .gnu.version_d       GNU_verdef   00000224 000224 000054  0 A      3   3  4
[ 6] .dynamic             DYNAMIC      00000278 000278 000080  8 WA     3   0  4
[ 7] .rodata              PROGBITS     000002f8 0002f8 000220  4 WA     0   0  4
[ 8] .fake_shstrtab       PROGBITS     00000520 000520 000076  0 A      0   0 32
[ 9] .note                NOTE         00000598 000598 000060  0 A      0   0  4
[10] .eh_frame_hdr        PROGBITS     000005f8 0005f8 000024  0 A      0   0  4
[11] .eh_frame            PROGBITS     0000061c 00061c 0000fc  0 A      0   0  4
[12] .text                PROGBITS     00000720 000720 000640  0 AX     0   0 16
[13] .altinstructions     PROGBITS     00000d60 000d60 000018  0 A      0   0  1
[14] .altinstr_replacement PROGBITS     00000d78 000d78 000006  0 AX     0   0  1
[15] .debug_info          PROGBITS     00000000 000d7e 004a84  0        0   0  1
[16] .debug_abbrev        PROGBITS     00000000 005802 000519  0        0   0  1
[17] .debug_loc           PROGBITS     00000000 005d1b 00064f  0        0   0  1
[18] .debug_aranges       PROGBITS     00000000 006370 000058  0        0   0  8
[19] .debug_ranges        PROGBITS     00000000 0063c8 000208  0        0   0  1
[20] .debug_line          PROGBITS     00000000 0065d0 000783  0        0   0  1
[21] .debug_str           PROGBITS     00000000 006d53 0027f2  1 MS     0   0  1
[22] .comment             PROGBITS     00000000 009545 00002c  1 MS     0   0  1
[23] .debug_frame         PROGBITS     00000000 009574 000100  0        0   0  4
[24] .shstrtab            STRTAB       00000000 009674 000127  0        0   0  1
[25] .symtab              SYMTAB       00000000 009bd4 000380 16       26  48  4
[26] .strtab              STRTAB       00000000 009f54 000228  0        0   0  1

o.test/arch/x86/vdso/vdso32-sysenter.so.dbg
There are 27 section headers, starting at offset 0x97ac:

Section Headers:
[Nr] Name                 Type         Addr     Off    Size   ES Flags Lk Inf Al
[ 0]                      NULL         00000000 000000 000000  0        0   0  0
[ 1] .hash                HASH         000000b4 0000b4 000038  4 A      2   0  4
[ 2] .dynsym              DYNSYM       000000ec 0000ec 000090 16 A      3   1  4
[ 3] .dynstr              STRTAB       0000017c 00017c 000095  0 A      0   0  1
[ 4] .gnu.version         GNU_versym   00000212 000212 000012  2 A      2   0  2
[ 5] .gnu.version_d       GNU_verdef   00000224 000224 000054  0 A      3   3  4
[ 6] .dynamic             DYNAMIC      00000278 000278 000080  8 WA     3   0  4
[ 7] .rodata              PROGBITS     000002f8 0002f8 000214  4 WA     0   0  4
[ 8] .fake_shstrtab       PROGBITS     00000520 000520 000076  0 A      0   0 32
[ 9] .note                NOTE         00000598 000598 000060  0 A      0   0  4
[10] .eh_frame_hdr        PROGBITS     000005f8 0005f8 000024  0 A      0   0  4
[11] .eh_frame            PROGBITS     0000061c 00061c 000108  0 A      0   0  4
[12] .text                PROGBITS     00000730 000730 000644  0 AX     0   0 16
[13] .altinstructions     PROGBITS     00000d74 000d74 000018  0 A      0   0  1
[14] .altinstr_replacement PROGBITS     00000d8c 000d8c 000006  0 AX     0   0  1
[15] .debug_info          PROGBITS     00000000 000d92 004a84  0        0   0  1
[16] .debug_abbrev        PROGBITS     00000000 005816 000519  0        0   0  1
[17] .debug_loc           PROGBITS     00000000 005d2f 00064f  0        0   0  1
[18] .debug_aranges       PROGBITS     00000000 006380 000058  0        0   0  8
[19] .debug_ranges        PROGBITS     00000000 0063d8 000208  0        0   0  1
[20] .debug_line          PROGBITS     00000000 0065e0 000784  0        0   0  1
[21] .debug_str           PROGBITS     00000000 006d64 0027f2  1 MS     0   0  1
[22] .comment             PROGBITS     00000000 009556 00002c  1 MS     0   0  1
[23] .debug_frame         PROGBITS     00000000 009584 000100  0        0   0  4
[24] .shstrtab            STRTAB       00000000 009684 000127  0        0   0  1
[25] .symtab              SYMTAB       00000000 009be4 000390 16       26  49  4
[26] .strtab              STRTAB       00000000 009f74 000240  0        0   0  1

o.test/arch/x86/vdso/vdso64.so.dbg
There are 28 section headers, starting at offset 0xfb38:

Section Headers:
[Nr] Name                 Type         Addr             Off      Size     ES Flags Lk Inf Al
[ 0]                      NULL         0000000000000000 00000000 00000000  0        0   0  0
[ 1] .hash                HASH         0000000000000120 00000120 00000040  4 A      2   0  8
[ 2] .dynsym              DYNSYM       0000000000000160 00000160 00000108 24 A      3   2  8
[ 3] .dynstr              STRTAB       0000000000000268 00000268 0000005e  0 A      0   0  1
[ 4] .gnu.version         GNU_versym   00000000000002c6 000002c6 00000016  2 A      2   0  2
[ 5] .gnu.version_d       GNU_verdef   00000000000002e0 000002e0 00000038  0 A      3   2  8
[ 6] .dynamic             DYNAMIC      0000000000000318 00000318 00000130 16 WA     3   0  8
[ 7] .rodata              PROGBITS     0000000000000448 00000448 0000039c  8 WA     0   0  8
[ 8] _ftrace_branch       PROGBITS     00000000000007e4 000007e4 00000078  0 WA     0   0  4
[ 9] .fake_shstrtab       PROGBITS     0000000000000860 00000860 00000076  0 A      0   0 32
[10] .note                NOTE         00000000000008d8 000008d8 0000003c  0 A      0   0  4
[11] .eh_frame_hdr        PROGBITS     0000000000000914 00000914 0000002c  0 A      0   0  4
[12] .eh_frame            PROGBITS     0000000000000940 00000940 000000e8  0 A      0   0  8
[13] .text                PROGBITS     0000000000000a30 00000a30 000008bc  0 AX     0   0 16
[14] .altinstructions     PROGBITS     00000000000012ec 000012ec 000000d8  0 A      0   0  1
[15] .altinstr_replacement PROGBITS     00000000000013c4 000013c4 00000036  0 AX     0   0  1
[16] .rela.dyn            RELA         0000000000001400 00001400 00000090 24 A      2   0  8
[17] .debug_info          PROGBITS     0000000000000000 00001490 0000719f  0        0   0  1
[18] .debug_abbrev        PROGBITS     0000000000000000 0000862f 0000083c  0        0   0  1
[19] .debug_loc           PROGBITS     0000000000000000 00008e6b 0000296c  0        0   0  1
[20] .debug_aranges       PROGBITS     0000000000000000 0000b7d7 00000080  0        0   0  1
[21] .debug_ranges        PROGBITS     0000000000000000 0000b857 00000bb0  0        0   0  1
[22] .debug_line          PROGBITS     0000000000000000 0000c407 00000afd  0        0   0  1
[23] .debug_str           PROGBITS     0000000000000000 0000cf04 00002ad2  1 MS     0   0  1
[24] .comment             PROGBITS     0000000000000000 0000f9d6 0000002c  1 MS     0   0  1
[25] .shstrtab            STRTAB       0000000000000000 0000fa02 00000133  0        0   0  1
[26] .symtab              SYMTAB       0000000000000000 00010238 000004f8 24       27  44  8
[27] .strtab              STRTAB       0000000000000000 00010730 0000018f  0        0   0  1


  reply	other threads:[~2014-06-24 18:44 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
2014-06-24 18:37             ` Andy Lutomirski
2014-06-24 18:43               ` H. Peter Anvin [this message]
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=53A9C6EB.50900@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