linux/kernel/entry
Thomas Gleixner 5fbda3ecd1 sched: highmem: Store local kmaps in task struct
Instead of storing the map per CPU provide and use per task storage. That
prepares for local kmaps which are preemptible.

The context switch code is preparatory and not yet in use because
kmap_atomic() runs with preemption disabled. Will be made usable in the
next step.

The context switch logic is safe even when an interrupt happens after
clearing or before restoring the kmaps. The kmap index in task struct is
not modified so any nesting kmap in an interrupt will use unused indices
and on return the counter is the same as before.

Also add an assert into the return to user space code. Going back to user
space with an active kmap local is a nono.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20201118204007.372935758@linutronix.de
2020-11-24 14:42:09 +01:00
..
common.c sched: highmem: Store local kmaps in task struct 2020-11-24 14:42:09 +01:00
kvm.c tracehook: clear TIF_NOTIFY_RESUME in tracehook_notify_resume() 2020-10-17 15:04:36 -06:00
Makefile entry: Provide infrastructure for work before transitioning to guest mode 2020-07-24 15:03:42 +02:00