Re: [PATCH] x86: Implement __WARN using UD0

From: Borislav Petkov
Date: Sat Feb 25 2017 - 15:30:15 EST


On Sat, Feb 25, 2017 at 12:04:18PM -0800, hpa@xxxxxxxxx wrote:
> Note that once you have a trap you can create an immediate yourself,
> the CPU doesn't need to do it for you, unless you really care about
> latency (reading the instruction steam can be kind of expensive,
> although it is quite a bit simpler if we know we come from kernel
> space.)

You mean, put it after the INT 9 opcode?

CD 09 immed8

Yeah, that could be one way to pass callsite-specific info, if needed.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.