lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BANLkTikopw_egOuA_jT+-e=DewR8FK9B8Q@mail.gmail.com>
Date:	Sat, 18 Jun 2011 22:52:06 +0200
From:	Rafał Miłecki <zajec5@...il.com>
To:	Pekka Paalanen <pq@....fi>, David Woodhouse <dwmw2@...radead.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-wireless@...r.kernel.org,
	Larry Finger <Larry.Finger@...inger.net>
Subject: Re: Lock up when faking MMIO read[bwl] on some machines [WAS: Faking
 MMIO ops? Fooling a driver]

W dniu 18 czerwca 2011 16:43 użytkownik Rafał Miłecki
<zajec5@...il.com> napisał:
> W dniu 18 czerwca 2011 14:03 użytkownik Pekka Paalanen <pq@....fi> napisał:
>> Maybe the driver is doing a 16-bit wide access, and happens to
>> store something else in the other 16/48 bits of RAX?
>
> OK, attached is updated version of my patch. I think we can get some
> clue from dmesgs with this patch applied.
>
>
> My system (working):
> [   74.472502] mmiotrace: ZAJEC: overwriting 0x27 with 0xFFFF
> [   74.472511] mmiotrace: [ZAJEC] opcode is 0x8B
> [   74.472515] mmiotrace: [ZAJEC] prf info: shorted:1; enlarged:0, rexr:0, rex:0
> [   74.472517] mmiotrace: [ZAJEC] register is 0x0
> [   74.472520] mmiotrace: [ZAJEC] overwritting 2-byte value 0x0514 with 0xFFFF
> [   74.472523] mmiotrace: [ZAJEC] overwritting resulted in 0xFFFF
>
> [   74.487081] mmiotrace: ZAJEC: overwriting 0x20 with 0xFFFF
> [   74.487086] mmiotrace: [ZAJEC] opcode is 0x8B
> [   74.487089] mmiotrace: [ZAJEC] prf info: shorted:1; enlarged:0, rexr:0, rex:0
> [   74.487092] mmiotrace: [ZAJEC] register is 0x0
> [   74.487095] mmiotrace: [ZAJEC] overwritting 2-byte value 0x427E with 0xFFFF
> [   74.487097] mmiotrace: [ZAJEC] overwritting resulted in 0xFFFF
>
>
> MacBook (with real overwritting commenet out!):
> [  228.248715] mmiotrace: ZAJEC: overwriting 0x810 with 0xFFFF
> [  228.254227] mmiotrace: [ZAJEC] opcode is 0xB70F
> [  228.259784] mmiotrace: [ZAJEC] prf info: shorted:0; enlarged:0, rexr:0, rex:0
> [  228.265399] mmiotrace: [ZAJEC] register is 0x0
> [  228.270955] mmiotrace: [ZAJEC] overwritting 4-byte value 0x00000000
> with 0xFFFF
> [  228.276597] mmiotrace: [ZAJEC] overwritting resulted in 0x00000000
>
> [  228.284284] mmiotrace: ZAJEC: overwriting 0x810 with 0xFFFF
> [  228.289818] mmiotrace: [ZAJEC] opcode is 0xB70F
> [  228.295250] mmiotrace: [ZAJEC] prf info: shorted:0; enlarged:0, rexr:0, rex:0
> [  228.300838] mmiotrace: [ZAJEC] register is 0x0
> [  228.306339] mmiotrace: [ZAJEC] overwritting 4-byte value 0x00000000
> with 0xFFFF
> [  228.311905] mmiotrace: [ZAJEC] overwritting resulted in 0x00000000
>
>
> It's 2-byte vs. 4-byte. I suspect this can be the source of our
> problem. Writing u16 0xFFFF value as u32 write.

Ohh, that was so stupid...

Writing 0xFFFF to PHY register 0x810 causes lockup on BCM4331! That's
all! My code is working fine, just some bits in 0xFFFF value are
really not friendly for the hardware.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ