From: Tejun Heo <tj@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: hpa@zytor.com, jeremy@goop.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org, x86@kernel.org,
rusty@rustcorp.com.au
Subject: Re: [PATCHSET x86/master] add stack protector support for x86_32
Date: Tue, 10 Feb 2009 23:16:28 +0900 [thread overview]
Message-ID: <49918C3C.8030208@kernel.org> (raw)
In-Reply-To: <499186FB.4070506@kernel.org>
Tejun Heo wrote:
> Ingo Molnar wrote:
>> * Ingo Molnar <mingo@elte.hu> wrote:
>>
>>> [...] I might not get around testing it today and pushing it out into tip:master,
>>> but i pushed out the core/percpu bits, should you queue up further changes.
>> ok, activated it for -tip testing, and there's a 64-bit build failure caused by
>> it:
>>
>> arch/x86/kernel/head64.o: In function `x86_64_start_reservations':
>> head64.c:(.init.text+0x26): undefined reference to `__stack_chk_guard'
>> head64.c:(.init.text+0xc2): undefined reference to `__stack_chk_guard'
>> arch/x86/kernel/head64.o: In function `x86_64_start_kernel':
>> head64.c:(.init.text+0x104): undefined reference to `__stack_chk_guard'
>> head64.c:(.init.text+0x1cd): undefined reference to `__stack_chk_guard'
>> arch/x86/kernel/head.o: In function `reserve_ebda_region':
>> head.c:(.init.text+0xb): undefined reference to `__stack_chk_guard'
>> arch/x86/kernel/head.o:head.c:(.init.text+0x87): more undefined references to
>> `__stack_chk_guard' follow
>
> Call to __stack_chk_guard is probably generated automatically.
> Strangely, my gcc only generates calls to __stack_chk_fail.
>
> > gcc --version
> gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
> Copyright (C) 2008 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > nm build/vmlinux|grep __stack_chk_
> 00000000f0fdf6cb A __crc___stack_chk_fail
> ffffffff80d53e50 r __kcrctab___stack_chk_fail
> ffffffff80d5ff81 r __kstrtab___stack_chk_fail
> ffffffff80d3d140 r __ksymtab___stack_chk_fail
> ffffffff80248619 T __stack_chk_fail
>
> I'll try other compilers but which version are you using? The
> difference is that before the patchset, -fno-stack-protector was
> always added whether stackprotector was enabled or not so this problem
> wasn't visible (at the cost of bogus stackprotector of course). We'll
> probably need to add __stack_chk_guard or disable if gcc generates
> such symbol. I'll play with different gccs.
Can't reproduce with gcc-4.1 or 4.2. Any chance you're using distcc
w/ a build machine w/ glibc < 2.4? __stack_chk_guard is the symbol
gcc fetches stack canary from if TLS is not supported, so somehow gcc
thought that TLS wasn't available while building head64.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-02-10 14:17 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 13:39 [PATCHSET x86/master] add stack protector support for x86_32 Tejun Heo
2009-02-09 13:39 ` [PATCH 01/11] x86: include correct %gs in a.out core dump Tejun Heo
2009-02-09 17:12 ` Jeremy Fitzhardinge
2009-02-09 13:39 ` [PATCH 02/11] x86: math_emu info cleanup Tejun Heo
2009-02-09 13:42 ` Ingo Molnar
2009-02-09 13:45 ` Ingo Molnar
2009-02-09 13:52 ` Tejun Heo
2009-02-09 13:39 ` [PATCH 03/11] x86: fix math_emu register frame access Tejun Heo
2009-02-09 17:13 ` Brian Gerst
2009-02-09 23:40 ` Ingo Molnar
2009-02-10 1:08 ` Tejun Heo
2009-02-09 13:39 ` [PATCH 04/11] elf: add ELF_CORE_COPY_KERNEL_REGS() Tejun Heo
2009-02-09 13:39 ` [PATCH 05/11] x86: stackprotector.h misc update Tejun Heo
2009-02-09 13:39 ` [PATCH 06/11] stackprotector: update make rules Tejun Heo
2009-02-09 13:39 ` [PATCH 07/11] x86: no stack protector for vdso Tejun Heo
2009-02-09 13:39 ` [PATCH 08/11] x86: use asm .macro instead of cpp #define in entry_32.S Tejun Heo
2009-02-09 18:34 ` Jeremy Fitzhardinge
2009-02-10 1:14 ` Tejun Heo
2009-02-10 1:18 ` Jeremy Fitzhardinge
2009-02-10 11:11 ` Ingo Molnar
2009-02-09 13:39 ` [PATCH 09/11] x86: add %gs accessors for x86_32 Tejun Heo
2009-02-09 13:39 ` [PATCH 10/11] x86: make lazy %gs optional on x86_32 Tejun Heo
2009-02-09 18:12 ` Jeremy Fitzhardinge
2009-02-10 1:27 ` Tejun Heo
2009-02-10 1:51 ` Jeremy Fitzhardinge
2009-02-09 13:39 ` [PATCH 11/11] x86: implement x86_32 stack protector Tejun Heo
2009-02-10 15:25 ` Brian Gerst
2009-02-10 15:39 ` Tejun Heo
2009-02-11 7:31 ` [PATCH x86#core/percpu] x86: fix x86_32 stack protector bugs Tejun Heo
2009-02-11 10:34 ` Ingo Molnar
2009-02-11 14:18 ` Tejun Heo
2009-02-09 13:55 ` [PATCHSET x86/master] add stack protector support for x86_32 Ingo Molnar
2009-02-09 14:06 ` Ingo Molnar
2009-02-09 20:30 ` Ingo Molnar
2009-02-10 13:56 ` Tejun Heo
2009-02-10 14:16 ` Ingo Molnar
2009-02-09 14:12 ` Ingo Molnar
2009-02-10 13:54 ` Tejun Heo
2009-02-10 14:16 ` Tejun Heo [this message]
2009-02-10 14:20 ` Ingo Molnar
2009-02-10 14:26 ` Tejun Heo
2009-02-11 10:57 ` Ingo Molnar
2009-02-11 11:18 ` [PATCH] stackprotector: fix multi-word cross-builds Ingo Molnar
2009-02-11 14:19 ` Tejun Heo
2009-02-10 14:19 ` [PATCHSET x86/master] add stack protector support for x86_32 Ingo Molnar
2009-02-09 14:09 ` Brian Gerst
2009-02-09 14:15 ` Ingo Molnar
2009-02-10 1:36 ` Tejun Heo
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=49918C3C.8030208@kernel.org \
--to=tj@kernel.org \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.