LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matthew Garrett <mjg@redhat.com>
To: Don Zickus <dzickus@redhat.com>
Cc: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>, mingo@redhat.com
Subject: Re: [PATCH] x86: use int instead of long to set reset vector back to 0
Date: Mon, 28 Feb 2011 15:15:16 +0000	[thread overview]
Message-ID: <20110228151516.GA5662@srcf.ucam.org> (raw)
In-Reply-To: <1297139100-424-1-git-send-email-dzickus@redhat.com>

On Mon, Feb 07, 2011 at 11:25:00PM -0500, Don Zickus wrote:
> A customer of ours, complained that when setting the reset vector
> back to 0, it trashed other data and hung their box.  They noticed
> when only 4 bytes were set to 0 instead of 8, everything worked
> correctly.

We're supposed to be resetting trampoline_phys_low and 
trampoline_phys_high here, which are two 16-bit values. Writing 64 bits 
is definitely going to overwrite space that we're not supposed to be 
touching.

> -	*((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
> +	*((volatile int *)phys_to_virt(apic->trampoline_phys_low)) = 0;

I'd suggest either using u32 here, or alternatively make it more obvious 
what's going on and set trampoline_phys_low and trampoline_phys_high 
(which are both 16 bit) independently.

Ingo? Looks like you touched this last, but it seems that the bug was 
there already.
-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2011-02-28 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08  4:25 Don Zickus
2011-02-28 15:15 ` Matthew Garrett [this message]
2011-02-28 15:26 ` [tip:x86/urgent] x86: Use u32 " tip-bot for Don Zickus
2011-02-23 22:12 [PATCH] x86: use int " Don Zickus

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=20110228151516.GA5662@srcf.ucam.org \
    --to=mjg@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=x86@kernel.org \
    --subject='Re: [PATCH] x86: use int instead of long to set reset vector back to 0' \
    /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

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).