aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/io_bitmap.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-11-12 21:40:33 +0100
committerThomas Gleixner <tglx@linutronix.de>2019-11-16 11:24:06 +0100
commit111e7b15cf10f6e973ccf537c70c66a5de539060 (patch)
tree93f6a063e7829376797a00750c338338be0eee7d /arch/x86/include/asm/io_bitmap.h
parentx86/iopl: Remove legacy IOPL option (diff)
downloadlinux-dev-111e7b15cf10f6e973ccf537c70c66a5de539060.tar.xz
linux-dev-111e7b15cf10f6e973ccf537c70c66a5de539060.zip
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.h6
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