Commit 1b0bf596 authored by Arun Sharma's avatar Arun Sharma Committed by David Mosberger

[PATCH] ia64: don't touch IA-32 segment descriptors too early

Without this patch, if a signal handler tried to access TLS data (via %gs), things break, because the GS descriptor is zero.

To be compatible with i386, we shouldn't be touching the segment descriptors
before getting into signal handlers.
parent b2062209
......@@ -877,8 +877,6 @@ setup_frame_ia32 (int sig, struct k_sigaction *ka, sigset_t *set, struct pt_regs
regs->cr_iip = IA32_SA_HANDLER(ka);
set_fs(USER_DS);
regs->r16 = (__USER_DS << 16) | (__USER_DS); /* ES == DS, GS, FS are zero */
regs->r17 = (__USER_DS << 16) | __USER_CS;
#if 0
regs->eflags &= ~TF_MASK;
......@@ -950,9 +948,6 @@ setup_rt_frame_ia32 (int sig, struct k_sigaction *ka, siginfo_t *info,
set_fs(USER_DS);
regs->r16 = (__USER_DS << 16) | (__USER_DS); /* ES == DS, GS, FS are zero */
regs->r17 = (__USER_DS << 16) | __USER_CS;
#if 0
regs->eflags &= ~TF_MASK;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment