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]
Message-ID: <Y+dVeeSODu8w5ns9@kroah.com>
Date:   Sat, 11 Feb 2023 09:44:41 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Tharunkumar.Pasumarthi@...rochip.com
Cc:     arnd@...db.de, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v4 char-misc-next] misc: microchip: pci1xxxx: Add
 OTP/EEPROM driver for the pci1xxxx switch

On Sat, Feb 11, 2023 at 05:07:43AM +0000, Tharunkumar.Pasumarthi@...rochip.com wrote:
> > From: Greg KH <gregkh@...uxfoundation.org>
> > Sent: Thursday, February 9, 2023 2:25 PM
> > To: Tharunkumar Pasumarthi - I67821
> > <Tharunkumar.Pasumarthi@...rochip.com>
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> > content is safe
> > 
> > > +     } while (data & EEPROM_CMD_EPC_BUSY_BIT);
> > 
> > That's a very busy "sit and spin" loop here, what happens if the read of the
> > bit never actually succeeds?  You just locked up the system with no way to
> > interrupt it :(
> > 
> > Please provide some sort of timeout, or way to break out of this.
> > 
> > > +
> > > +     if (data & EEPROM_CMD_EPC_TIMEOUT_BIT) {
> > > +             dev_err(&priv->pdev->dev, "EEPROM write timed out\n");
> > 
> > How can the timeout bit happen if the busy bit was still set?
> > 
> > And what can userspace do about this if it is reported?
> 
> Hi Greg,
> If EEPROM_CMD_EPC_BUSY_BIT is set for more than 30ms, it will be cleared automatically by the hardware logic and EEPROM_CMD_EPC_TIMEOUT_BIT bit will be set to indicate the timeout. User space application will inform user about timeout on EEPROM write/read when this error occurs.

Ok, if the bit being set will notify userspace of the issue, then why
also spam the kernel error log?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ