Bug 605816 - [RHEL 5.6] move Tausworthe net_random generator to lib/random32
[RHEL 5.6] move Tausworthe net_random generator to lib/random32
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.6
All Linux
high Severity high
: rc
: 5.6
Assigned To: Jarod Wilson
Red Hat Kernel QE team
: FutureFeature, OtherQA
Depends On:
Blocks: 557597 564513 571862
  Show dependency treegraph
 
Reported: 2010-06-18 16:44 EDT by Jarod Wilson
Modified: 2013-01-10 22:04 EST (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 16:38:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
random32 support backport to rhel5 (12.36 KB, patch)
2010-06-22 16:14 EDT, Jarod Wilson
no flags Details | Diff
port lpfc driver to use kernel-provided random32 (6.84 KB, patch)
2010-06-22 16:17 EDT, Jarod Wilson
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0017 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.6 kernel security and bug fix update 2011-01-13 05:37:42 EST

  None (edit)
Description Jarod Wilson 2010-06-18 16:44:24 EDT
+++ This bug was initially created as a clone of Bug #571862 +++

Update Emulex lpfc driver for BE3 Asic in RHEL5.6.  Patch forthcoming.

--- Additional comment from andriusb@redhat.com on 2010-03-09 13:43:07 EST ---

*** Bug 562308 has been marked as a duplicate of this bug. ***

--- Additional comment from laurie.barry@emulex.com on 2010-03-11 13:07:45 EST ---

Emulex's lpfc patch for RHEL5.6 will include a fix for for an AER related issue identified by HP BCS during their testing.  (reference RHE5.5 bugzilla 529244 for details.)

Laurie

--- Additional comment from andriusb@redhat.com on 2010-03-29 12:53:55 EDT ---

Laurie - I'm assuming .66 or newer is planned for 5.6, correct?

--- Additional comment from laurie.barry@emulex.com on 2010-03-29 12:59:14 EDT ---

Correct, we are up to 8.2.0.71 and will continue to turn for bug fixes up until you say no more.

--- Additional comment from joseph.mann@emulex.com on 2010-04-08 16:43:52 EDT ---

Created an attachment (id=405404)
Emulex LPFC 8.2.0.73.1p driver source tarball

--- Additional comment from joseph.mann@emulex.com on 2010-04-08 16:46:29 EDT ---

Created an attachment (id=405406)
LPFC 8.2.0.63.3p to 8.2.0.73.1p patch

Patch to update Emulex lpfc driver to 8.2.0.73.1p (applies on top of 8.2.0.63.3p)

These are the changes included in this patch:

* Changed version number to 8.2.0.73.1p
* Fix swapping target's FC ports caused I/O failure due to target
rejecting PLOGI (CR 100464)
* Fix lpfc_get_hba_info to return correct value for max vpi count
* Add OneSecure definitions and hooks
* OneSecure changes for the encryption IOCB special handling
* Correct comment to reflect lpfc_suppress_link_up instead of
lpfc_init_link
* Add lpfc_suppress_link_up parameter and support
* OneSecure changes for IOCB command define values
* Added OneSecure PCI ID
* Make sure driver sets the "FCP Initiator" flag for remote
initiator ports (CR 100554)
* Changed version number to 8.2.0.72
* Reset HBA when UNREG_VPI fail with busy status (CR 100218)
* Fix failure of unreg_vpi mailbox command (CR 100219)
* Fixed hang on link transitions (CR 99675)
* Change mailbox commands to use SLI4 mailbox size instead of
PAGE_SIZE
* Fix UE and other issues seen after HBA resets with I/O (CR 97910)
* Fix crash with els reject data being formed (CR 99991)
* Changed version number to 8.2.0.71
* Rework logical link speed (CR 99148 99149)
* Changed version number to 8.2.0.70
* Add ratov and edtov to the reg_vfi
* Enable NPIV by default
* Prevent log message 1801 during vport delete
* Implement the new logical link speed event (CR 99148 99149)
Changes from 20100301 to 20100316
* Changed version number to 8.2.0.69
* Separate logging New FCF Found and FCF Parameter Modified
messages
* Fix devloss timeout running Hazard with AER error injection every
30-60 seconds (CR 97468)
* Fixed sli4 params read
* Fixed Crash when cable pulled on initiator in same zone (CR 99675
99587)
* Fix driver issue where the driver was unable to discover the
paths of LUNs on physical port of an HBA after uplink failover
on VC-FC module (CR 99120)
* Changed version number to 8.2.0.68
* Fixed driver bug where the driver is unable to discover the paths of vport 
luns on legacy adapter after uplink failover (CR 99070)
* Remove unused variable from lpfc_nodev_tmo_show
* Add logging messages for critical errors (CR 98726)
* Add fixes for Big Endian sli4 support
* Made the FCF related informational log message only logged to
FCoE devices
* Removed fast FCF failover fabric name matching to allow failover
to any fit FCF
* Added fast FCF failover in response to FCF DEAD event on current
FCF record
* Added round robin FCF failover on initial or FCF rediscovery
FLOGI failure
* Fast FCF failover randomly choose from eligible FCF records with
equal probability
* Change sysfs parameter macros to be uint instead of int (CR 98283)
* Made driver SLI4 reporting ulpWord[4] status on aborted iocb same
as SLI3 (CR 98963)
* Fixed SGL leak when XB bit is set (CR 98736)
* Fixed not clearing LPFC_DRIVER_ABORTED bit in aborted FCP
cmdiocb->iocb_flag
* Changed version number to 8.2.0.67
* Fixed memory allocation failure in the read_sparam mailbox
handling (CR 98738)
* Fixed memory allocation issue in lpfc_config_port_post (CR 98739)
* Fixed vport discovery failure after CVL handling
* Fixed IO error code comparison
* Fixed NULL pointer dereference when kernel is out of memory (CR
98587)
* Use asynchronous mailbox command for requesting FCF recovery
* Remove check post request_features for dif support
* Changed version number to 8.2.0.66
* Add FCF failover support
* Added init_vpi mailbox command before re-registering VPI
* Changed version number to 8.2.0.65
* Submit abort WQE to same work queue as the command WQE
* Changed version number to 8.2.0.64
* Add QOS Link Speed info so user can see it (CR 96665)
* Fix sli4 released aborted els cmd's xri (SGL) before HBA's abort
XRI event (CR 97288)
* Support for Nport ID change after Clear Virtual Link (CR 97188)

--- Additional comment from bzeranski@redhat.com on 2010-05-05 16:22:54 EDT ---

*** Bug 569537 has been marked as a duplicate of this bug. ***

--- Additional comment from andriusb@redhat.com on 2010-05-12 16:29:28 EDT ---

This bug is now blocking bug 591674, which is a request to update lpfc to 8.2.0.76.1p. Please add yourselves to this bug if you wish.

--- Additional comment from revers@redhat.com on 2010-06-16 15:45:18 EDT ---

Please provide upstream commit ids for the following, which appear to be new features:

> * Add OneSecure definitions and hooks
> * OneSecure changes for the encryption IOCB special handling

> * Add lpfc_suppress_link_up parameter and support
> * OneSecure changes for IOCB command define values
> * Added OneSecure PCI ID

> * Add ratov and edtov to the reg_vfi
> * Enable NPIV by default

> * Implement the new logical link speed event (CR 99148 99149)

> * Add FCF failover support

--- Additional comment from joseph.mann@emulex.com on 2010-06-17 11:22:06 EDT ---

Rob, here are the upstream submissions these changes were part of.

(In reply to comment #9)
> Please provide upstream commit ids for the following, which appear to be new
> features:
> 
> > * Add OneSecure definitions and hooks
Added in upstream patchset 8.3.2


> > * OneSecure changes for the encryption IOCB special handling
Added in upstream patchset 8.3.10


> > * Add lpfc_suppress_link_up parameter and support
> > * OneSecure changes for IOCB command define values
Added in upstream patchset 8.3.9


> > * Added OneSecure PCI ID
Added in upstream patchset 8.3.6

 
> > * Add ratov and edtov to the reg_vfi
> > * Enable NPIV by default
> 
> > * Implement the new logical link speed event (CR 99148 99149)
> 
> > * Add FCF failover support
Added in upstream patchset 8.3.12

--- Additional comment from laurie.barry@emulex.com on 2010-06-17 14:09:09 EDT ---

8.3.13 commits:
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=47a997e2da2bad67c2a351b58907482ea7ba5b67
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=e1c6cf96ccef0aefd27f6100a5319b9223005ae9
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=056864ab7781eaecd5299f117c7017ce1bb362be
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=8279979e1024297e86ffdf405dd4746ced5f8f89
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=84a0e8865eec139a0a1b74c37bedad104e307e23
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=cd8c1011262617a3fe3dccc78239a3aaced19540

8.3.14 commits:
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=dcdfc7274a3b9e9f8fe1dfc8ff905586f43de322
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=55b06345267e04c4f1e2f6b72fd0d49540aca8b8
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=4012d45994229dc93b6faa619db63be1f3c3e6b2
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=b0c73b154198664810bf3e918b9a9860a25e6be0

--- Additional comment from jarod@redhat.com on 2010-06-18 16:42:51 EDT ---

Not a fan of the inclusion of the Tausworthe random number generator, and the comment about it being backported from 2.6.33rc7 is misleading. The code is already present in the rhel5 kernel tree at net/core/utils.c, and was moved from there to lib/random32.c upstream in 2.6.19. The better route here is to properly move the Tausworthe bits first, then create this patch atop that change.
Comment 1 Jarod Wilson 2010-06-18 16:47:54 EDT
Commit aaa248f6c9c81b2683db7dbb0689cd5ed1c86d88 upstream (pre-2.6.19) renamed and moved the net_random interface from net/core/utils.c to random32 in lib/random32.c. The lpfc driver uses the random32 interface, and thus we should properly backport it in the RHEL5 kernel.
Comment 2 Rob Evers 2010-06-18 17:16:58 EDT
Jarod,

Can you post the patch on this bz so Emulex has access to it until they can get a build with this code in it?

Thanks, Rob
Comment 3 Jarod Wilson 2010-06-18 17:21:41 EDT
(In reply to comment #2)
> Jarod,
> 
> Can you post the patch on this bz so Emulex has access to it until they can get
> a build with this code in it?

Yep, will do, as soon as I have a patch together, hopefully early next week...
Comment 4 Andrius Benokraitis 2010-06-18 18:05:49 EDT
So this patch will also need to be provided in the DUP, Rob?
Comment 5 Rob Evers 2010-06-21 10:42:21 EDT
(In reply to comment #4)
> So this patch will also need to be provided in the DUP, Rob?    

Given the timing constraints of delivering the DUP, Jarod and I agree to take the original patch for the DUP and the backport here will not be required.

Jarod will backport the functionality and Emulex is encouraged to update the lpfc driver to eliminate what will be redundant code when the backport is complete.
Comment 6 Jarod Wilson 2010-06-21 17:56:06 EDT
Initial backport is done, throwing it into a test build momentarily, and assuming that works, I'll tack the patch onto this bz and post it for internal review.
Comment 7 Jarod Wilson 2010-06-22 16:14:52 EDT
Created attachment 426078 [details]
random32 support backport to rhel5

Matches current (2.6.35-rc3) lib/random32.c and accompanying code as closely as possible, with only minor deviations for context differences, and a need to preserve the net_random and net_srandom kabi symbols.
Comment 8 Jarod Wilson 2010-06-22 16:17:53 EDT
Created attachment 426079 [details]
port lpfc driver to use kernel-provided random32

This patch applies atop the lpfc patches submitted under bugzilla #591674 and bugzilla #571862, and adapts the lpfc driver to use the kernel-provided random32 functions from the other patch posted in this bug.
Comment 9 Vaios Papadimitriou 2010-06-22 17:24:18 EDT
The patch looks good. We will update our LPFC driver based on this patch.

Based on this LPFC driver patch and the comments from Comment 8, is there any additional information needed from Emulex as far as BZ #591674 and
#571862 are concerned? Do you need a separate Emulex LPFC driver patch that takes into account removing the random32 defines or the patch from Comment 8 will be sufficient?
Comment 10 Jarod Wilson 2010-06-22 18:16:29 EDT
(In reply to comment #9)
> The patch looks good. We will update our LPFC driver based on this patch.
> 
> Based on this LPFC driver patch and the comments from Comment 8, is there any
> additional information needed from Emulex as far as BZ #591674 and
> #571862 are concerned? Do you need a separate Emulex LPFC driver patch that
> takes into account removing the random32 defines or the patch from Comment 8
> will be sufficient?    

The random32 addition in comment #7 and the lpfc modifications in comment #8 have already been posted for internal review, so no need for Emulex to post anything else at this time. What we could definitely use is testing feedback from Emulex when running with these two patches applied, just to confirm that we're not breaking anything with this change. If we run into issues when testing, then we may need help from Emulex fixing any regressions caused by these patches, but they actually get us much closer to upstream, so I'm fully anticipating everything will be just fine, and all we really need is the thumbs up from Emulex.
Comment 11 Rob Evers 2010-06-23 10:37:32 EDT
(In reply to comment #9)
> The patch looks good. We will update our LPFC driver based on this patch.
> 
> Based on this LPFC driver patch and the comments from Comment 8, is there any
> additional information needed from Emulex as far as BZ #591674 and
> #571862 are concerned? Do you need a separate Emulex LPFC driver patch that
> takes into account removing the random32 defines or the patch from Comment 8
> will be sufficient?    

Both the BZ #591674 and #571862 patches have been posted and no other info is required from Emulex for these updates.
Comment 15 Jarod Wilson 2010-08-10 20:12:57 EDT
in kernel-2.6.18-211.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.
Comment 17 Chris Ward 2010-11-09 08:35:38 EST
~~ Attention Customers and Partners - RHEL 5.6 Public Beta is now available on RHN ~~

A fix for this 'OtherQA' BZ should be present and testable in the release. 

If this Bugzilla is verified as resolved, please update the Verified field above with an appropriate value and include a summary of the testing executed and the results obtained.

If you encounter any issues or have questions while testing, please describe them and set this bug into NEED_INFO. 

If you encounter new defects or have additional patches to request for inclusion, promptly escalate the new issues through your support representative.

Finally, future Beta kernels can be found here:
 http://people.redhat.com/jwilson/el5/

Note: Bugs with the 'OtherQA' keyword require Third-Party testing to confirm the request has been properly addressed. See: https://bugzilla.redhat.com/describekeywords.cgi#OtherQA ).
Comment 18 Chris Ward 2010-12-02 10:28:20 EST
Reminder! There should be a fix present for this BZ in snapshot 3 -- unless otherwise noted in a previous comment.

Please test and update this BZ with test results as soon as possible.
Comment 20 errata-xmlrpc 2011-01-13 16:38:34 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html

Note You need to log in before you can comment on or make changes to this bug.