Re: [PATCH RFC 4/6] Fix places where using %gs changes the usermode ABI.

Andi Kleen
2006-08-27T16:02:33Z

> ===================================================================
> --- a/arch/i386/kernel/ptrace.c
> +++ b/arch/i386/kernel/ptrace.c
> @@ -94,13 +94,9 @@ static int putreg(struct task_struct *ch
> return -EIO;
> child->thread.fs = value;
> return 0;
> - case GS:
> - if (value && (value & 3) != 3)
> - return -EIO;
> - child->thread.gs = value;
> - return 0;
> case DS:
> case ES:
> + case GS:
> if (value && (value & 3) != 3)
> return -EIO;
> value &= 0xffff;
> @@ -132,8 +128,6 @@ static unsigned long getreg(struct task_
> retval = child->thread.fs;
> break;
> case GS:
> - retval = child->thread.gs;
> - break;

Didn't the eip/esp offsets change too?

-Andi