From: "Rafał Miłecki" <zajec5@gmail.com>
To: Pekka Paalanen <pq@iki.fi>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-wireless@vger.kernel.org,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: Lock up when faking MMIO read[bwl] on some machines [WAS: Faking MMIO ops? Fooling a driver]
Date: Sat, 18 Jun 2011 12:57:26 +0200 [thread overview]
Message-ID: <BANLkTikT3qoZhTrd0uF-JNehNhTCRjF6kw@mail.gmail.com> (raw)
In-Reply-To: <20110618133957.378b5266@farn.lan>
W dniu 18 czerwca 2011 12:39 użytkownik Pekka Paalanen <pq@iki.fi> napisał:
> On Sat, 18 Jun 2011 00:31:32 +0200
> Rafał Miłecki <zajec5@gmail.com> wrote:
>
>> I use attached patch to fake result of read[bwl] performed by
>> closed source driver (ndiswrapper+bcmwl and wl).
>>
>> 1) It works great on my Sony VAIO with Intel(R) Core(TM)2 Duo CPU
>> P8400 2) It locks up Macbook Pro 8,1 with some 8-cores Intel
>>
>> Do you have any idea why it causes the lockup? Function causing
>> problem is "set_ins_reg_val". I've created it as copy of
>> get_ins_reg_val, it just sets values in struct pt_regs, instead of
>> reading them).
>
> Sorry, I have no insight to that... does unmodified mmiotrace
> work properly? Are you tracing the exact same kernel binary blob
> on both machines? Maybe it's using some rare instruction
> mmiotrace does not decode properly? Maybe with a rep prefix?
> Do those CPUs have any differences in their registers or
> struct pt_regs?
>
> I'm not even sure how "legal" it is to poke pt_regs there. :-/
Not modified MMIO tracing works great on this machine, I've grabbed
dumps 10-20 times without a lock up or anything.
I'm using different drivers on both machines, because Macbook Pro 8,1
has unique BCM4331 card that I can not buy and that is not available
with PCI(e) slot. Is uses some vendor specific, PCIe compatible slot.
Simple commenting out "set_ins_reg_val" work fine on this Macbook, PHY
reads are tracked correctly.
As for differences in struct pt_regs... yeah, I think that happens.
I'm using x86 kernel, while on Macbook we use x86_64 as it's required
to use 64bit driver in ndiswrapper.
I can try to find out, which register we try to overwrite on Macbook.
--
Rafał
next prev parent reply other threads:[~2011-06-18 11:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 22:31 Rafał Miłecki
2011-06-18 10:39 ` Pekka Paalanen
2011-06-18 10:57 ` Rafał Miłecki [this message]
2011-06-18 11:26 ` Rafał Miłecki
2011-06-18 12:03 ` Pekka Paalanen
2011-06-18 13:05 ` Rafał Miłecki
2011-06-18 14:43 ` Rafał Miłecki
2011-06-18 20:52 ` Rafał Miłecki
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=BANLkTikT3qoZhTrd0uF-JNehNhTCRjF6kw@mail.gmail.com \
--to=zajec5@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pq@iki.fi \
/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
all inboxes | Powered by JetHome®