Re: [PATCH] x86/cpu: Fix SMAP check in PVOPS environments

From: Ingo Molnar
Date: Fri Jun 05 2015 - 03:13:41 EST



* Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:

> As the comment in arch/x86/include/asm/paravirt_types.h says:
>
> * Get/set interrupt state. save_fl and restore_fl are only
> * expected to use X86_EFLAGS_IF; all other bits
> * returned from save_fl are undefined, and may be ignored by
> * restore_fl.

There should be no 'may' about this: under CONFIG_PARAVIRT_DEBUG=y the reminder of
the flags should be cleared (or all bits should be set: that will instantly crash
if restored verbatim), so that we trip up generic code that relies on non-IF
restoration?

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/