1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#DPATCHLEVEL=0
2001-10-07 Marcus Brinkmann <marcus@gnu.org>
* i386/i386/iopb.c (iopb_create, i386_io_port_add): Disable io
permissions by default.
2004-11-16 Guillem Jover <guillem@hadrons.org>
* i386/i386/ktss.c (ktss_init): Disable io permissions by default.
Index: i386/i386/iopb.c
===================================================================
--- i386/i386/iopb.c.orig 2006-11-14 04:15:49.000000000 +0200
+++ i386/i386/iopb.c 2006-11-14 04:15:57.000000000 +0200
@@ -273,7 +273,7 @@ iopb_create(void)
register iopb_tss_t ts;
ts = (iopb_tss_t) kalloc(sizeof (struct iopb_tss));
- io_tss_init(ts, TRUE); /* XXX */
+ io_tss_init(ts, FALSE);
return ts;
}
@@ -360,7 +360,7 @@ i386_io_port_add(
simple_unlock(&iopb_lock);
new_io_tss = (iopb_tss_t) kalloc(sizeof(struct iopb_tss));
- io_tss_init(new_io_tss, TRUE); /* XXX */
+ io_tss_init(new_io_tss, FALSE);
goto Retry;
}
Index: i386/i386/ktss.c
===================================================================
--- i386/i386/ktss.c.orig 2006-11-14 03:58:56.000000000 +0200
+++ i386/i386/ktss.c 2006-11-14 04:15:57.000000000 +0200
@@ -44,7 +44,7 @@ ktss_init()
/* Initialize the master TSS descriptor. */
fill_gdt_descriptor(KERNEL_TSS,
- kvtolin(&ktss), sizeof(ktss)+65536/8+1-1,
+ kvtolin(&ktss), sizeof(ktss)-1,
ACC_PL_K|ACC_TSS, 0);
/* Initialize the master TSS. */
@@ -52,9 +52,6 @@ ktss_init()
ktss.esp0 = (unsigned)(exception_stack+1024);
ktss.io_bit_map_offset = sizeof(ktss);
- /* Set the last byte in the I/O bitmap to all 1's. */
- ((unsigned char*)&ktss)[sizeof(ktss)+65536/8] = 0xff;
-
/* Load the TSS. */
ltr(KERNEL_TSS);
}
|