commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnumach ChangeLog i386/i386/gdt.h i386/i386/pcb... [gnumach-1-branch


From: Roland McGrath
Subject: Re: gnumach ChangeLog i386/i386/gdt.h i386/i386/pcb... [gnumach-1-branch]
Date: Sun, 5 Nov 2006 13:41:43 -0800 (PST)

> -           else if (thread == current_thread()) {
> -               struct x86_desc template = {0, 0, 0, ACC_P, 0, 0 ,0};
> +           else {
> +               struct real_descriptor template = {0, 0, 0, ACC_P, 0, 0 ,0};

This can't be right (changing the if).

> -      for (idx = sel_idx (USER_GDT); idx < sel_idx (USER_GDT) + 
> USER_GDT_SLOTS;

These changes are cosmetic, though I don't know why he didn't follow the
old code.
> [i386_get_gdt]
>    if ((selector & (SEL_LDT|SEL_PL)) != SEL_PL_U
> -      || sel_idx (selector) < USER_GDT
> -      || sel_idx (selector) >= USER_GDT + USER_GDT_SLOTS)
> +      || sel_idx (selector) < sel_idx(USER_GDT)
> +      || sel_idx (selector) >= sel_idx(USER_GDT) + USER_GDT_SLOTS)
>      return KERN_INVALID_ARGUMENT;

That's probably fixing a bug in the old code.

> -  *desc = thread->pcb->ims.user_gdt[sel_idx (selector)];
> +  *desc = thread->pcb->ims.user_gdt[sel_idx (selector) - sel_idx(USER_GDT)];

This too.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]