bug-hurd
[Top][All Lists]
Advanced

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

gnumach, io perms


From: Alfred M. Szmidt
Subject: gnumach, io perms
Date: Sun, 08 Jan 2006 17:55:15 +0100

Looks good, fixed ChangeLog (you forgot to mention i386_io_port_add).

2006-01-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

        * iopb.c (iopb_create, i386_io_port_add): Set default IO
        permissions to none.
        * ktss.c (ktss_init): Likewise.

diff -urp gnumach-mine-1-user_tss/i386/i386/iopb.c 
gnumach-mine-2-default_noio/i386/i386/iopb.c
--- gnumach-mine-1-user_tss/i386/i386/iopb.c    2006-01-02 18:38:29.000000000 
+0100
+++ gnumach-mine-2-default_noio/i386/i386/iopb.c        2006-01-02 
18:38:31.000000000 +0100
@@ -271,7 +271,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;
 }
 
@@ -358,7 +358,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;
            }
diff -urp gnumach-mine-1-user_tss/i386/i386/ktss.c 
gnumach-mine-2-default_noio/i386/i386/ktss.c
--- gnumach-mine-1-user_tss/i386/i386/ktss.c    2006-01-02 18:35:08.000000000 
+0100
+++ gnumach-mine-2-default_noio/i386/i386/ktss.c        2005-12-26 
22:33:26.000000000 +0100
@@ -52,8 +52,8 @@ 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;
+       /* Set all bytes in the I/O bitmap to all 1's.  */
+       memset(((unsigned char*)&ktss)+sizeof(ktss), 0xff, 65536/8+1);
 
        /* Load the TSS.  */
        ltr(KERNEL_TSS);




reply via email to

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