aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/head.S
diff options
context:
space:
mode:
authorZachary Amsden <zach@vmware.com>2006-01-06 03:11:55 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:35 -0500
commit5fe9fe3c6f9a1ae7aa224bb7a66eb9aad9e4abef (patch)
treeec120ce6e72700fe49720127bc76228c51bd406b /arch/i386/kernel/head.S
parent3fae1c37eea98097de34ba665796fea93b29f4aa (diff)
[PATCH] x86: Pnp byte granularity
The one remaining caller of set_limit, the PnP BIOS code, calls into the PnP BIOS, passing kernel parameters in and out. These parameteres may be passed from arbitrary kernel virtual memory, so they deserve strict protection to stop a bad BIOS from smashing beyond the object size. Unfortunately, the use of set_limit was badly botching this by setting the limit in terms of pages, when it really should have byte granularity. When doing this, I discovered my BIOS had the buggy code during the "get system device node" call: mov ax, es:[bx] Which is harmless, but has a trivial workaround. Signed-off-by: Zachary Amsden <zach@vmware.com> Cc: "Seth, Rohit" <rohit.seth@intel.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/head.S')
-rw-r--r--arch/i386/kernel/head.S12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index 37b599fa4d18..58d2746670b7 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -504,12 +504,12 @@ ENTRY(cpu_gdt_table)
504 .quad 0x0000000000000000 /* 0x80 TSS descriptor */ 504 .quad 0x0000000000000000 /* 0x80 TSS descriptor */
505 .quad 0x0000000000000000 /* 0x88 LDT descriptor */ 505 .quad 0x0000000000000000 /* 0x88 LDT descriptor */
506 506
507 /* Segments used for calling PnP BIOS */ 507 /* Segments used for calling PnP BIOS have byte granularity */
508 .quad 0x00c09a0000000000 /* 0x90 32-bit code */ 508 .quad 0x00409a0000000000 /* 0x90 32-bit code */
509 .quad 0x00809a0000000000 /* 0x98 16-bit code */ 509 .quad 0x00009a0000000000 /* 0x98 16-bit code */
510 .quad 0x0080920000000000 /* 0xa0 16-bit data */ 510 .quad 0x0000920000000000 /* 0xa0 16-bit data */
511 .quad 0x0080920000000000 /* 0xa8 16-bit data */ 511 .quad 0x0000920000000000 /* 0xa8 16-bit data */
512 .quad 0x0080920000000000 /* 0xb0 16-bit data */ 512 .quad 0x0000920000000000 /* 0xb0 16-bit data */
513 513
514 /* 514 /*
515 * The APM segments have byte granularity and their bases 515 * The APM segments have byte granularity and their bases