[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMzpN2j5sYh9MNsfwvr+R7YdaGy1y13ZHh2fvhe0jQiYkT0fEg@mail.gmail.com>
Date: Fri, 7 Oct 2011 07:54:24 -0400
From: Brian Gerst <brgerst@...il.com>
To: 33user@...il.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: x86: gdt_page and debugging from gdb against /proc
On Fri, Oct 7, 2011 at 7:18 AM, myname <33user@...il.com> wrote:
> in kernel/cpu/kernel/common.c, the initialization for the gdt_table symbol is like the following:
>
> [GDT_ENTRY_KERNEL_CS] = GDT_ENTRY_INIT(0xc09a, 0, 0xfffff),
> [GDT_ENTRY_KERNEL_DS] = GDT_ENTRY_INIT(0xc092, 0, 0xfffff),
> [GDT_ENTRY_DEFAULT_USER_CS] = GDT_ENTRY_INIT(0xc0fa, 0, 0xfffff),
> [GDT_ENTRY_DEFAULT_USER_DS] = GDT_ENTRY_INIT(0xc0f2, 0, 0xfffff),
>
> so, that the gtd_page[12] should have base = 0, and limit = 0xffffff, and so on for the next 3 slots in the array.
>
> now if i do: `sudo gdb -q ~/linux-3.0.3/vmlinux /proc/kcore' and in gdb ask for the command p/t gdt_table, i get, which obviously if you check for base and limit in member 12, 13 and so on, doesn't fit the above description. why?
gdt_page is a per-cpu variable, so you are looking at the original
location in init mem that has been overwritten with other data.
--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists