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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190604142837.GB28355@kroah.com>
Date:   Tue, 4 Jun 2019 16:28:37 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Richard Gong <richard.gong@...ux.intel.com>
Cc:     robh+dt@...nel.org, mark.rutland@....com, dinguyen@...nel.org,
        atull@...nel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, sen.li@...el.com,
        Richard Gong <richard.gong@...el.com>
Subject: Re: A potential broken at platform driver?

On Mon, Jun 03, 2019 at 06:08:37PM -0500, Richard Gong wrote:
> Hi Greg,
> 
> On 6/3/19 1:02 PM, Greg KH wrote:
> > On Mon, Jun 03, 2019 at 10:57:18AM -0500, Richard Gong wrote:
> > > 
> > > Hi Greg,
> > > 
> > > Following your suggestion, I replaced devm_device_add_groups() with .group =
> > > rus_groups in my version #4 submission. But I found out that RSU driver
> > > outputs the garbage data if I use .group = rsu_groups.
> > 
> > What is "garbage"?
> I mean incorrect status info.
> 
> > 
> > > To make RSU driver work properly, I have to revert the change at version #4
> > > and use devm_device_add_groups() again. Sorry, I didn't catch this problem
> > > early.
> > > 
> > > I did some debug & below are captured log, you can see priv pointer get
> > > messed at current_image_show(). I am not sure if something related to
> > > platform driver work properly. I attach my debug patch in this mail.
> > > 
> > > 1. Using .groups = rsu_groups,
> > > 
> > > [    1.191115] *** rsu_status_callback:
> > > [    1.194782] res->a1=2000000
> > > [    1.197588] res->a1=0
> > > [    1.199865] res->a2=0
> > > [    1.202150] res->a3=0
> > > [    1.204433] priv=0xffff80007aa28e80
> > > [    1.207933] version=0, state=0, current_image=2000000, fail_image=0,
> > > error_location=0, error_details=0
> > > [    1.217249] *** stratix10_rsu_probe: priv=0xffff80007aa28e80
> > > root@...atix10:/sys/bus/platform/drivers/stratix10-rsu# cat current_image
> > > [   38.849341] *** current_image_show: priv=0xffff80007aa28d00
> > > ... output garbage data
> > > priv pointer got changed
> > 
> > I don't understand this, sorry.  Are you sure you are actually using the
> > correct pointer to your device?
> > 
> I think so.
> 
> The dev pointer at current_image_show() should points to RSU device, but it
> seems point to driver_private if I use .group = rsU_groups. As a result I
> can't get the priv pointer properly at current_image_show().

It points to the driver kobject, not the device kobject.  So that's the
issue here.  See the patch that I just posted for a potential fix for
this.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ