From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31005 invoked by alias); 14 May 2008 21:59:17 -0000 Received: (qmail 30995 invoked by uid 22791); 14 May 2008 21:59:16 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 May 2008 21:58:57 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 399FB983FA; Wed, 14 May 2008 21:58:55 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 151E7983F9; Wed, 14 May 2008 21:58:55 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JwOzt-00077M-TE; Wed, 14 May 2008 17:58:53 -0400 Date: Thu, 15 May 2008 00:39:00 -0000 From: Daniel Jacobowitz To: David Miller Cc: uweigand@de.ibm.com, gdb-patches@sourceware.org Subject: Re: longjmp handling vs. glibc LD_POINTER_GUARD problems Message-ID: <20080514215853.GA27037@caradoc.them.org> Mail-Followup-To: David Miller , uweigand@de.ibm.com, gdb-patches@sourceware.org References: <200805141800.m4EI0IHe006471@d12av02.megacenter.de.ibm.com> <20080514.142658.174642357.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080514.142658.174642357.davem@davemloft.net> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00450.txt.bz2 On Wed, May 14, 2008 at 02:26:58PM -0700, David Miller wrote: > I think you can treat this the same way we treat the signal frame > layout. It's something undocumented but effectively fixed in stone. > > If glibc ever changed the offset within the thread struct for this > cookie, so many binaries would break. So it is very likely the value > will stay the same for the forseeable future. I don't think that's true, is it? There's two cookies, only one of them is exposed to GCC, and glibc uses internal macros to protect the contents of a jmp_buf which are not necessarily the same as those used by GCC. e.g. gcc uses xor with %fs:0x14 on i386-linux. That's __stack_chk_guard and jmp_buf uses PTR_MANGLE -> __pointer_chk_guard. Many architectures don't expose either variable. -- Daniel Jacobowitz CodeSourcery