public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28281]  New: gcc uses the wrong segment register for TLS access for -fstack-protector in kernel mode
@ 2006-07-06  9:23 arjan at linux dot intel dot com
  2006-07-06  9:24 ` [Bug c/28281] " arjan at linux dot intel dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: arjan at linux dot intel dot com @ 2006-07-06  9:23 UTC (permalink / raw)
  To: gcc-bugs

Userspace and kernel space use a different segment register for TLS access in
x86_64. (This is so that a syscall doesn't need to switch these registers most
of the time, so good for performance)

This means that the kernel cannot use -fstack-protector currently, which is sad
since today another buffer overflow has been found in the linux kernel.

The solution is quite simple, and I will attach a patch to fix this next; just
use a different segement register for the mc_kernel model.

(the patch is trivial; it copies a line and changes a few characters in it, and
then places an if around it)


-- 
           Summary: gcc uses the wrong segment register for TLS access for -
                    fstack-protector in kernel mode
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: arjan at linux dot intel dot com
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28281


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-07-29  7:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-06  9:23 [Bug c/28281] New: gcc uses the wrong segment register for TLS access for -fstack-protector in kernel mode arjan at linux dot intel dot com
2006-07-06  9:24 ` [Bug c/28281] " arjan at linux dot intel dot com
2006-07-06  9:49 ` arjan at linux dot intel dot com
2006-07-06 11:09 ` arjan at linux dot intel dot com
2006-07-06 14:53 ` [Bug target/28281] " pinskia at gcc dot gnu dot org
2006-07-29  7:46 ` arjan at linux dot intel dot com
2006-07-29  7:47 ` belyshev at depni dot sinp dot msu dot ru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).