Re: [PATCH] x86: use enum instead of literals for trap values

From: H. Peter Anvin
Date: Fri Mar 09 2012 - 12:58:44 EST


On 03/09/2012 08:30 AM, Kees Cook wrote:
> On Fri, Mar 9, 2012 at 1:28 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
>>
>> * Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>>
>>> The traps are referred to by their numbers and it can be difficult to
>>> understand them while reading the code without context. This patch adds
>>> enumeration of the trap numbers and replaces the numbers with the correct
>>> enum for x86.
>>>

I have to admit personally to prefer something like X86_XCP_XX where XX
is the two-letter code that the Intel documentation uses for that trap,
i.e. #GP, #BR, #MC and so on.

-hpa

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