Re: [PATCH v2] x86/asm: Pad assembly functions with INT3 instructions

From: Linus Torvalds
Date: Tue May 15 2018 - 19:29:18 EST


On Tue, May 15, 2018 at 3:58 PM Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
> jb resume_kernel # not returning to v8086
or userspace
> -
> -ENTRY(resume_userspace)

I went back in history, and we used to have multiple "jmp resume_userspace"
including even the vm86.c code (in a different file) doing that, so there
*used* to be a reason for this being a global symbol (and yes, we had a
fall-through to that global symbol even in those days).

That said, I also look at "resume_kernel". There's no reason to make that
globally visible afaik. It looks local to entry_32.S, and should look like
restore_all rather than resume_userspace.

So we probably should remove the ENTRY() for that too, and just make it be

ALIGN
resume_kernel:

instead?

I guess the reason for removing that other ENTRY() is different from this
case, though..

Linus