diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-11-12 23:40:33 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-11-16 13:24:06 +0300 |
commit | 111e7b15cf10f6e973ccf537c70c66a5de539060 (patch) | |
tree | 93f6a063e7829376797a00750c338338be0eee7d /arch/x86/include/asm/io_bitmap.h | |
parent | a24ca9976843156eabbc5f2d798954b5674d1b61 (diff) | |
download | linux-111e7b15cf10f6e973ccf537c70c66a5de539060.tar.xz |
x86/ioperm: Extend IOPL config to control ioperm() as well
If iopl() is disabled, then providing ioperm() does not make much sense.
Rename the config option and disable/enable both syscalls with it. Guard
the code with #ifdefs where appropriate.
Suggested-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/io_bitmap.h')
-rw-r--r-- | arch/x86/include/asm/io_bitmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io_bitmap.h b/arch/x86/include/asm/io_bitmap.h index b664baadf736..02c6ef8f7667 100644 --- a/arch/x86/include/asm/io_bitmap.h +++ b/arch/x86/include/asm/io_bitmap.h @@ -15,9 +15,15 @@ struct io_bitmap { struct task_struct; +#ifdef CONFIG_X86_IOPL_IOPERM void io_bitmap_share(struct task_struct *tsk); void io_bitmap_exit(void); void tss_update_io_bitmap(void); +#else +static inline void io_bitmap_share(struct task_struct *tsk) { } +static inline void io_bitmap_exit(void) { } +static inline void tss_update_io_bitmap(void) { } +#endif #endif |