This is the mail archive of the
mailing list for the glibc project.
Re: PATCH: Add x32 support to STACK_CHK_GUARD
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 11 May 2012 14:01:14 -0700 (PDT)
- Subject: Re: PATCH: Add x32 support to STACK_CHK_GUARD
- References: <20120511161347.GA12794@intel.com>
We already support sysdeps stackguard-macros.h files for ports and all
those machine-specific cases ought to be moved out to new sysdeps files.
It's not important that this cleanup be done right away. But for a new
case, just add a new sysdeps file instead.
While we're getting cleaner, it really would be better to use a %P0 with
"i" (offsetof (tcbhead_t, stack_guard)) rather than the magic constant.
In fact, AFAICT if you do that and make the insn just "mov", then a single
x86_64 file would dtrt for both x86_64 and x32.