Re: [PATCH 02/20] context_tracking: Add a note about noinstr VS unsafe context tracking functions

Peter Zijlstra
2022-06-09T10:51:06Z

On Wed, Jun 08, 2022 at 04:40:19PM +0200, Frederic Weisbecker wrote:
> +/*
> + * OBSOLETE:
> + * This function should be noinstr but the below local_irq_restore() is
> + * unsafe because it involves illegal RCU uses through tracing and lockdep.
> + * This is unlikely to be fixed as this function is obsolete. The preferred
> + * way is to call __context_tracking_enter() through user_enter_irqoff()
> + * or context_tracking_guest_enter(). It should be the arch entry code
> + * responsibility to call into context tracking with IRQs disabled.
> +
> + */

whitespace fail there, methinks.

> void context_tracking_enter(enum ctx_state state)
> {
> unsigned long flags;