xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>, Don Slutz <dslutz@verizon.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/traps: Remove redundant trapnr parameter from fatal_trap()
Date: Sat, 06 Sep 2014 20:18:57 -0400	[thread overview]
Message-ID: <540BA471.5000601@terremark.com> (raw)
In-Reply-To: <54049E6F.20205@citrix.com>


On 09/01/14 12:27, Andrew Cooper wrote:
> On 01/09/14 17:10, Don Slutz wrote:
>> On 09/01/14 06:06, Andrew Cooper wrote:
>>> It is always available via regs->entry_vector.
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>> CC: Jan Beulich <JBeulich@suse.com>
>>> ---

>>> -void fatal_trap(int trapnr, const struct cpu_user_regs *regs)
>>> +void fatal_trap(const struct cpu_user_regs *regs)
>>>    {
>>>        static DEFINE_PER_CPU(char, depth);
>>> +    unsigned int trapnr = regs->entry_vector;
>> Should this be:
>>
>> unsigned int trapnr = regs->entry_vector &
>> ~(TRAP_regs_partial|TRAP_syscall);
>>
>>
>> To get rid of the extra bits?
>>
>>    -Don Slutz
> No; I don't think so.  There should be no paths into fatal_trap() which
> would set these bits, as these bits are only set as a result of guest
> sys/hypercall interaction, while fatal_trap() is a terminal error condition.
>
> Furthermore, if a path is discovered then a) it will be more obvious
> from the error message and b) we probably have a security problem to fix.
>
> ~Andrew

Ok.

Reviewed-by: Don Slutz <dslutz@verizon.com>

      reply	other threads:[~2014-09-07  0:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 10:06 [PATCH] x86/traps: Remove redundant trapnr parameter from fatal_trap() Andrew Cooper
2014-09-01 16:10 ` Don Slutz
2014-09-01 16:27   ` Andrew Cooper
2014-09-07  0:18     ` Don Slutz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540BA471.5000601@terremark.com \
    --to=dslutz@verizon.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).