* [PATCH] [2.5 i386] Fix AP GDT descs to have limit = size - 1
@ 2002-08-07 15:54 Luca Barbieri
2002-08-07 16:53 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Luca Barbieri @ 2002-08-07 15:54 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Ingo Molnar, Linux-Kernel ML
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
This is the right thing (also done by head.s).
diff --exclude-from=/home/ldb/src/linux-exclude -urNd a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
--- a/arch/i386/kernel/cpu/common.c 2002-08-06 10:26:11.000000000 +0200
+++ b/arch/i386/kernel/cpu/common.c 2002-08-07 17:47:05.000000000 +0200
@@ -451,7 +451,7 @@
*/
if (cpu) {
memcpy(cpu_gdt_table[cpu], cpu_gdt_table[0], GDT_SIZE);
- cpu_gdt_descr[cpu].size = GDT_SIZE;
+ cpu_gdt_descr[cpu].size = GDT_SIZE - 1;
cpu_gdt_descr[cpu].address = (unsigned long)cpu_gdt_table[cpu];
}
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [2.5 i386] Fix AP GDT descs to have limit = size - 1
2002-08-07 15:54 [PATCH] [2.5 i386] Fix AP GDT descs to have limit = size - 1 Luca Barbieri
@ 2002-08-07 16:53 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2002-08-07 16:53 UTC (permalink / raw)
To: Luca Barbieri; +Cc: Linus Torvalds, Linux-Kernel ML
On 7 Aug 2002, Luca Barbieri wrote:
> memcpy(cpu_gdt_table[cpu], cpu_gdt_table[0], GDT_SIZE);
> - cpu_gdt_descr[cpu].size = GDT_SIZE;
> + cpu_gdt_descr[cpu].size = GDT_SIZE - 1;
> cpu_gdt_descr[cpu].address = (unsigned long)cpu_gdt_table[cpu];
indeed, good eyes!
i'm wondering whether this could have caused any problems - since the
limit was not a proper multiple of 8 minus 1, no selector value could have
caused a descriptor to be loaded from the invalid byte.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-07 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-07 15:54 [PATCH] [2.5 i386] Fix AP GDT descs to have limit = size - 1 Luca Barbieri
2002-08-07 16:53 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.