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:	Wed, 4 Apr 2012 16:07:22 -0700
From:	Jing Huang <huangj@...cade.COM>
To:	David Miller <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Adapter Linux Open Src Ext Team" 
	<AdapterLinuxOpenSrcExtTeam@...cade.com>
Subject: RE: [PATCH 0/7] bna: Update driver version to 3.0.23.0 (resubmit)

>But I would suggest modifying how the driver spins waiting for the
>firmware to release semaphore bits in registers.
>
>You have no timeouts or limits in these loops.
>
>So if the firmware crashes or gets stuck, this will take out the
>entire computer which is very undesirable.
>
>Change these loops to have a limit and signal an error and fail the
>top-level operation if the limit is hit.

Thanks David.

The ioc init semaphore register is only used by driver. Firmware will never touch this
register.  It will only be set to 1 when there is a driver instance holding it. So in practice, 
the infinite look will happen only if a driver instance grab the semaphore but forgot to
release it. We add this logic to serialize register access for potential case of concurrent PCI
function probe, which seems pretty rare in Linux.

I agree that this code looks ugly and wrong in theory. We will consider remove it or
implement some timeout logic for it.

Jing
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ