From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754020Ab2CIR6r (ORCPT ); Fri, 9 Mar 2012 12:58:47 -0500 Received: from terminus.zytor.com ([198.137.202.10]:60504 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753378Ab2CIR6q (ORCPT ); Fri, 9 Mar 2012 12:58:46 -0500 Message-ID: <4F5A448D.70605@zytor.com> Date: Fri, 09 Mar 2012 09:57:33 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Kees Cook CC: Ingo Molnar , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , x86@kernel.org, Andy Lutomirski , Hidetoshi Seto , Andrew Morton , Mike Frysinger , Borislav Petkov , Steven Rostedt , Peter Zijlstra Subject: Re: [PATCH] x86: use enum instead of literals for trap values References: <20120309074202.GA28609@www.outflux.net> <20120309092845.GA10281@elte.hu> In-Reply-To: X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/09/2012 08:30 AM, Kees Cook wrote: > On Fri, Mar 9, 2012 at 1:28 AM, Ingo Molnar wrote: >> >> * Kees Cook 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