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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Jul 2008 14:10:44 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	ebiederm@...ssion.com (Eric W. Biederman)
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>,
	Mike Travis <travis@....com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>, Jack Steiner <steiner@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC 00/15] x86_64: Optimize percpu accesses

On Wed, 09 Jul 2008 13:22:06 -0700
ebiederm@...ssion.com (Eric W. Biederman) wrote:

> Jeremy Fitzhardinge <jeremy@...p.org> writes:
> 
> > It's just the stack canary.  It isn't library accesses; it's the
> > code gcc generates:
> >
> > foo:	subq	$152, %rsp
> >        movq    %gs:40, %rax
> >        movq    %rax, 136(%rsp)
> > ...
> >        movq    136(%rsp), %rdx
> >        xorq    %gs:40, %rdx
> >        je      .L3
> >        call    __stack_chk_fail
> > .L3:
> >        addq    $152, %rsp
> >        .p2align 4,,4
> >        ret
> >
> >
> > There are two irritating things here:
> >
> > One is that the kernel supports -fstack-protector for x86-64, which
> > forces us into all these contortions in the first place.  We don't
> > support stack-protector for 32-bit (gcc does), and things are much
> > easier.
> 
> How does gcc know to use %gs instead of the usual %fs for accessing
> the stack protector variable?  My older gcc-4.1.x on ubuntu always
> uses %fs.

ubuntu broke gcc (they don't want to have compiler flags per package so
patches stuff in gcc instead).


> I think the unification is valid and useful, and that trying to keep
> that stupid stack canary working is currently more trouble then it is
> worth.

I think that "unification over everything" is stupid, especially if it
removes useful features.



-- 
If you want to reach me at my work email, use arjan@...ux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ