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]
Date: Fri, 22 Mar 2024 12:25:19 +0000
From: Liviu Dudau <liviu@...au.co.uk>
To: Bjørn Mork <bjorn@...k.no>
Cc: Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>,
	Haijun Liu <haijun.liu@...iatek.com>,
	Chiranjeevi Rapolu <chiranjeevi.rapolu@...ux.intel.com>,
	M Chetan Kumar <m.chetan.kumar@...ux.intel.com>,
	Ricardo Martinez <ricardo.martinez@...ux.intel.com>,
	Loic Poulain <loic.poulain@...aro.org>,
	Sergey Ryazanov <ryazanov.s.a@...il.com>,
	Johannes Berg <johannes@...solutions.net>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: net: wwan: t7xx: BUG: Unaligned access when loading mtk_t7xx
 module

On Fri, Mar 22, 2024 at 01:00:22PM +0100, Bjørn Mork wrote:
> Liviu Dudau <liviu@...au.co.uk> writes:
> 
> >  I had a
> > go at guessing that UL registers are at 0x8 and 0x48 offsets and DL
> > registers are at 0x0478 and 0x04b8, but while that fixes the alignment
> > exception, I now get a "CLDMA{0,1} queue 0 is not empty" message.
> 
> I don't think you can assume the register offsets are wrong.  It looks
> more like the device doesn't care about alignment.

Sorry, I should clarify: the offsets are wrong when you're trying to do
a 64bit read over PCIe for a MEM64 area. Accessed addresses are expected
to be multiples of 8 bytes. t7xx_cldma_hw_set_start_addr() uses the offset
for the low register for calculating the address for the write, which is
not 64bit aligned for the UL block.

> 
> But given that the driver includes <linux/io-64-nonatomic-lo-hi.h>, you
> can probably replace those unaligned 64bit accesses with two nonatomic
> 32bit accesses.
>

I've tried your suggestion and things seem to progress further, thanks for
that! I'm getting some errors on not being able to transition from D3hot
to D0, but I guess it might be something to do with the PCIe-to-M.2 adaptor
that I'm using. Will continue my investigation into the setup and report
back with a patch to replace the register accesses with the lo_hi variants.

Best regards,
Liviu

> 
> Bjørn

-- 
Everyone who uses computers frequently has had, from time to time,
a mad desire to attack the precocious abacus with an axe.
       	   	      	     	  -- John D. Clark, Ignition!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ