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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Apr 2022 14:34:40 +0800
From:   Zheyu Ma <zheyuma97@...il.com>
To:     Damien Le Moal <damien.lemoal@...nsource.wdc.com>
Cc:     Sergey Shtylyov <s.shtylyov@....ru>, linux-ide@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] ata: pata_marvell: Warning when probing the module

On Mon, Apr 11, 2022 at 7:53 AM Damien Le Moal
<damien.lemoal@...nsource.wdc.com> wrote:
>
> On 4/10/22 15:30, Zheyu Ma wrote:
> > Hello,
> >
> > I found a bug in the pata_marvell module.
> > When probing the driver, it seems to trigger the error path and
> > executes the function marvell_cable_detect(), but the
> > 'ap->ioaddr.bmdma_addr' is not initialized, which causes a warning.
>
> I do not have this hardware so I cannot debug this. Please debug it and
> send a patch. bmdma_addr is normally set in ata_pci_bmdma_init(), but some
> drivers set it manually in their probe functions. No idea about the
> marvell driver, I have not checked it.

To be honest I don't have a good solution to this problem, because
other drivers don't have similar behavior. The marvell driver doesn't
even initialize 'bmdma_addr' before calling 'cable_detect'.

So a simple idea I have is to check if 'bmdma_addr' is 0 before
reading it and if so return the error code ATA_CBL_NONE.

Zheyu Ma

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ