
There is no point to update the TSS bitmap for tasks which use I/O bitmaps on every context switch. It's enough to update it right before exiting to user space. That reduces the context switch bitmap handling to invalidating the io bitmap base offset in the TSS when the outgoing task has TIF_IO_BITMAP set. The invaldiation is done on purpose when a task with an IO bitmap switches out to prevent any possible leakage of an activated IO bitmap. It also removes the requirement to update the tasks bitmap atomically in ioperm(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 lines
335 B
C
17 lines
335 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_X86_IOBITMAP_H
|
|
#define _ASM_X86_IOBITMAP_H
|
|
|
|
#include <asm/processor.h>
|
|
|
|
struct io_bitmap {
|
|
u64 sequence;
|
|
/* The maximum number of bytes to copy so all zero bits are covered */
|
|
unsigned int max;
|
|
unsigned long bitmap[IO_BITMAP_LONGS];
|
|
};
|
|
|
|
void tss_update_io_bitmap(void);
|
|
|
|
#endif
|