lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrW_U7z7RC-D5+Ji+PQd73nR-=xQGH5uieb7y3Z7yzYPRw@mail.gmail.com>
Date:	Sun, 22 Jun 2014 09:59:34 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/urgent] x86/vdso: Discard the __bug_table section

On Sun, Jun 22, 2014 at 1:47 AM, Ingo Molnar <mingo@...nel.org> wrote:
>
> * tip-bot for Andy Lutomirski <tipbot@...or.com> wrote:
>
>> Commit-ID:  5f56e7167e6d438324fcba87018255d81e201383
>> Gitweb:     http://git.kernel.org/tip/5f56e7167e6d438324fcba87018255d81e201383
>> Author:     Andy Lutomirski <luto@...capital.net>
>> AuthorDate: Wed, 18 Jun 2014 15:59:46 -0700
>> Committer:  H. Peter Anvin <hpa@...ux.intel.com>
>> CommitDate: Thu, 19 Jun 2014 15:44:51 -0700
>>
>> x86/vdso: Discard the __bug_table section
>>
>> It serves no purpose in user code.
>>
>> Signed-off-by: Andy Lutomirski <luto@...capital.net>
>> Link: http://lkml.kernel.org/r/2a5bebff42defd8a5e81d96f7dc00f21143c80e8.1403129369.git.luto@amacapital.net
>> Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
>> ---
>>  arch/x86/vdso/vdso-layout.lds.S | 1 +
>>  1 file changed, 1 insertion(+)
>
> 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

To summarize, the issue is that, in 3.16, the vvar area is accessed in
a PC-relative manner from the vdso code.  So we have:

vdso page 1 | vdso page 2 | vvar page 1 | vvar page 2  (where the
number of vdso pages can vary)

The difficulty comes from the fact that a decent amount of userspace
code wants the vdso to have some section headers, and linkers don't
stick section headers into allocatable sections, since section headers
were never intended to be memory mapped.  So there's a risk that the
section headers dangle off the last loadable page in the vdso, at
which point they overlap the vvar area.  I've seen this happen.

The "solution" in tip is to move the section headers into a real
allocatable area reserved for that purpose.  The error you're seeing
is that I didn't allocate enough space for all the allocatable section
headers.

This crap almost makes me want to go back to something closer to
Stefani's implementation of sticking vvar before the vdso so we can
safely leave non-allocatable crap dangling off the end of the vdso.  I
don't really want to play section header whack-a-mole.  We could also
just give up on space efficiency and allocate space for several extra
section headers (and their associated names!).

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists