Re: [PATCH 1/2] x86/asm/entry/64: Enable interrupts *after* we fetch PER_CPU_VAR(old_rsp)

From: Andy Lutomirski
Date: Tue Mar 17 2015 - 14:05:08 EST


On Tue, Mar 17, 2015 at 6:42 AM, Denys Vlasenko <dvlasenk@xxxxxxxxxx> wrote:
> Without this change, it is still not possible to get rid of
> PER_CPU_VAR(old_rsp) usage in switch_to: if preemption happens
> while we did not fetch PER_CPU_VAR(old_rsp) and stored it in pt_regs->sp,
> PER_CPU_VAR(old_rsp) gets corrupted by other task's user sp.
>

[...]

> - ENABLE_INTERRUPTS(CLBR_NONE)

[...]

> + ENABLE_INTERRUPTS(CLBR_RAX)

In future patches, please don't sneak these things in. It makes it
much harder to review. If you need to move code and change it like
this, I think it should be clearly and explicitly mentioned in the
changelog.

--Andy
--
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/