aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/io_bitmap.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-11-11 23:03:24 +0100
committerThomas Gleixner <tglx@linutronix.de>2019-11-16 11:24:03 +0100
commitea5f1cd7ab494f65f50f338299eabb40ad6a1767 (patch)
tree4e9addcdf5873dbac21bbe70aadb312760b55a87 /arch/x86/include/asm/io_bitmap.h
parentx86/ioperm: Move TSS bitmap update to exit to user work (diff)
downloadlinux-dev-ea5f1cd7ab494f65f50f338299eabb40ad6a1767.tar.xz
linux-dev-ea5f1cd7ab494f65f50f338299eabb40ad6a1767.zip
x86/ioperm: Remove bitmap if all permissions dropped
If ioperm() results in a bitmap with all bits set (no permissions to any I/O port), then handling that bitmap on context switch and exit to user mode is pointless. Drop it. Move the bitmap exit handling to the ioport code and reuse it for both the thread exit path and dropping it. This allows to reuse this code for the upcoming iopl() emulation. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Andy Lutomirski <luto@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/io_bitmap.h')
-rw-r--r--arch/x86/include/asm/io_bitmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io_bitmap.h b/arch/x86/include/asm/io_bitmap.h
index 6d82a37cb17c..784a88edb25d 100644
--- a/arch/x86/include/asm/io_bitmap.h
+++ b/arch/x86/include/asm/io_bitmap.h
@@ -11,6 +11,8 @@ struct io_bitmap {
unsigned long bitmap[IO_BITMAP_LONGS];
};
+void io_bitmap_exit(void);
+
void tss_update_io_bitmap(void);
#endif