diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-11-11 23:03:24 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-11-16 11:24:03 +0100 |
commit | ea5f1cd7ab494f65f50f338299eabb40ad6a1767 (patch) | |
tree | 4e9addcdf5873dbac21bbe70aadb312760b55a87 /arch/x86/include/asm/io_bitmap.h | |
parent | 22fe5b0439dd53643fd6f4c582c46c6dba0fde53 (diff) | |
download | linux-ea5f1cd7ab494f65f50f338299eabb40ad6a1767.tar.gz |
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.h | 2 |
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 |