aboutsummaryrefslogtreecommitdiff
path: root/i386/include
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2018-11-09 22:17:46 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-05 22:37:02 +0100
commit2e85ea08a32706d7787fa7ec0e9873a49b1e52b8 (patch)
tree54f1f75923b564413b566ca20dc6b0e71e85482d /i386/include
parente952f70189bf34039453334b725a0da70086873e (diff)
downloadgnumach-2e85ea08a32706d7787fa7ec0e9873a49b1e52b8.tar.gz
gnumach-2e85ea08a32706d7787fa7ec0e9873a49b1e52b8.tar.bz2
gnumach-2e85ea08a32706d7787fa7ec0e9873a49b1e52b8.zip
Restrict access to PCI cfg io ports to one process
* i386/i386/io_perm.c (PCI_CFG1_START, PCI_CFG1_END, PCI_CFG2_START, PCI_CFG2_END, IS_IN_PROTECTED_RANGE): New macros. (taken_pci_cfg): New variable. (io_perm_deallocate): New function. (i386_io_perm_create): Return KERN_PROTECTION_FAILURE if requested port range contains PCI config registers and that is already taken. Set taken_pci_cfg to true when taking them. * i386/i386/io_perm.h (io_perm_deallocate): New declaration. * i386/include/mach/i386/mach_i386.defs (io_perm_t): Add io_perm_deallocate destructor.
Diffstat (limited to 'i386/include')
-rw-r--r--i386/include/mach/i386/mach_i386.defs2
1 files changed, 0 insertions, 2 deletions
diff --git a/i386/include/mach/i386/mach_i386.defs b/i386/include/mach/i386/mach_i386.defs
index 0703d59a..a8cb91ce 100644
--- a/i386/include/mach/i386/mach_i386.defs
+++ b/i386/include/mach/i386/mach_i386.defs
@@ -51,9 +51,7 @@ type io_perm_t = mach_port_t
#if KERNEL_SERVER
intran: io_perm_t convert_port_to_io_perm(mach_port_t)
outtran: mach_port_t convert_io_perm_to_port(io_perm_t)
-#if TODO_REMOVE_ME
destructor: io_perm_deallocate(io_perm_t)
-#endif
#endif /* KERNEL_SERVER */
;