summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [golan] Bug fixes and improved paging allocation methodRaed Salem2017-03-2318-555/+200Star
| | | | | | | | Updates: - revert Support for clear interrupt via BAR Signed-off-by: Raed Salem <raeds@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [rtl818x] Fix resource leak on error pathMichael Brown2017-03-231-2/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [travis] Integrate with Coverity ScanMichael Brown2017-03-231-0/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [travis] Build and run the unit test suiteMichael Brown2017-03-221-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [travis] Add minimal .travis.yml fileMichael Brown2017-03-221-0/+45
| | | | | | | | | | Allow for automated builds via Travis CI (https://travis-ci.org). Note that the bin-i386-linux build platform is deliberately omitted since the required linux-libc-dev:i386 package is not on the allowed packages list for the Travis 14.04 ("trusty") container environment. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Track maximum heap usageMichael Brown2017-03-222-3/+23
| | | | | | | Track the current and maximum heap usage, and display the maximum during shutdown when DEBUG=malloc is enabled. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [coverity] Add Coverity user modelMichael Brown2017-03-221-0/+21
| | | | | | | | Add a trivial model file to prevent Coverity from making various incorrect assumptions about functions where the iPXE behaviour diverges from POSIX or Linux norms. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Ensure SLK labels are always terminatedMichael Brown2017-03-221-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sis190] Avoid NULL pointer dereferenceMichael Brown2017-03-221-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [w89c840] Avoid potential array overrunMichael Brown2017-03-221-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tlan] Guard against failure to identify chipMichael Brown2017-03-221-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Assert that mapping length is non-zeroMichael Brown2017-03-221-0/+1
| | | | | | | An (impossible) mapping length of zero produces a negative bit shift, which is technically undefined. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Assert that mapping length is non-zeroMichael Brown2017-03-221-0/+1
| | | | | | | An (impossible) mapping length of zero produces a negative bit shift, which is technically undefined. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [video_subr] Use memmove() for overlapping memory copyMichael Brown2017-03-221-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Use correct length for memset()Michael Brown2017-03-221-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xen] Use standard calling pattern for asprintf()Michael Brown2017-03-221-2/+1Star
| | | | | | | | Our asprintf() implementation guarantees that strp will be NULL on allocation failure, but this is not standard behaviour. Detect errors by checking for a negative return value instead of a NULL pointer. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Use correct length for memcpy()Michael Brown2017-03-221-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pixbuf] Avoid potential division by zeroMichael Brown2017-03-221-1/+3
| | | | | | | | Avoid potential division by zero when performing the check against multiplication overflow. (Note that if the width is zero then there can be no overflow anyway, so it is then safe to bypass the check.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ath] Add missing break statementsMichael Brown2017-03-221-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [block] Quell spurious Coverity size mismatch warningMichael Brown2017-03-221-6/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Return status code from ib_create_mi()Michael Brown2017-03-223-16/+19
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Return status code from ib_create_cq() and ib_create_qp()Michael Brown2017-03-228-90/+88Star
| | | | | | | | | | | | Any underlying errors arising during ib_create_cq() or ib_create_qp() are lost since the functions simply return NULL on error. This makes debugging harder, since a debug-enabled build is required to discover the root cause of the error. Fix by returning a status code from these functions, thereby allowing any underlying errors to be propagated. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid confusing sparse in single-argument DBG() macrosMichael Brown2017-03-221-2/+2
| | | | | | | | | | | | | For visual consistency with surrounding lines, the definitions of DBG_MORE(), DBG_PAUSE(), etc include an unnecessary ##__VA_ARGS__ argument which is always elided. This confuses sparse, which complains about DBG_MORE_IF() being called with more than one argument. Work around this problem by adding an unused variable argument list to the single-argument macros DBG_MORE_IF() and DBG_PAUSE_IF(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Avoid accessing beyond end of endpoint context arrayMichael Brown2017-03-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Attempt to fix use of uninitialised buffer with strcat()Michael Brown2017-03-211-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Add missing check for memory allocation failureMichael Brown2017-03-211-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [eoib] Avoid passing a NULL I/O buffer to netdev_tx_complete_err()Michael Brown2017-03-211-1/+2
| | | | | | | | | Report errors in eoib_duplicate() via netdev_tx_err() rather than netdev_tx_complete_err(), since netdev_tx_complete_err() accepts only valid I/O buffers that are currently in the network device's transmit queue. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [slam] Avoid NULL pointer dereference in slam_pull_value()Michael Brown2017-03-211-5/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [slam] Fix resource leak on error pathMichael Brown2017-03-211-4/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hyperv] Fix resource leaks on error pathMichael Brown2017-03-211-5/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Attempt to fix resource leaksMichael Brown2017-03-211-6/+4Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Attempt to fix keypress processing logicMichael Brown2017-03-211-4/+3Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Attempt to fix test for empty stringMichael Brown2017-03-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Use correct length for memcpy()Michael Brown2017-03-211-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [librm] Fail gracefully if asked to ioremap() a zero lengthMichael Brown2017-03-211-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Free correct pointer on the error pathMichael Brown2017-03-211-3/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [802.11] Remove redundant NULL pointer check after dereferenceMichael Brown2017-03-211-3/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sis900] Remove extraneous memset() with incorrect lengthMichael Brown2017-03-211-2/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Use correct length for memset()Michael Brown2017-03-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linda] Use correct length for memset()Michael Brown2017-03-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nfs] Fix double free bug on error pathMichael Brown2017-03-211-6/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xfer] Ensure va_end() is called on failure pathMichael Brown2017-03-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Avoid potential integer overflow when calculating memory mappingsMichael Brown2017-03-211-1/+1
| | | | | | | | When the area to be mapped straddles the 2GB boundary, the expression (high+size) will overflow on the first loop iteration. Fix by using (end-size), which cannot underflow. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Avoid potential integer overflow when calculating memory mappingsMichael Brown2017-03-211-1/+1
| | | | | | | | When the area to be mapped straddles the 2GB boundary, the expression (high+size) will overflow on the first loop iteration. Fix by using (end-size), which cannot underflow. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Allow vendor class to be changed in DHCP requestsMichael Brown2017-03-203-11/+34
| | | | | | | Allow the DHCPv4 vendor class to be specified via the "vendor-class" setting. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [undi] Move PXE API caller back into UNDI driverMichael Brown2017-03-195-367/+300Star
| | | | | | | | | | | | | | As of commit 10d19bd ("[pxe] Always retrieve cached DHCPACK and apply to relevant network device"), the UNDI driver has been the only user of pxeparent_call(). Remove the unnecessary layer of abstraction by refactoring this code back into undinet.c, and fix the ability of undiisr.S to fall back to chaining to the original handler if we were unable to unhook our own ISR. This effectively reverts commit 337e1ed ("[pxe] Separate parent PXE API caller from UNDINET driver"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Skip cable detection at initialisation where possibleMichael Brown2017-03-191-23/+19Star
| | | | | | | | | | | | | | | | | | We currently request cable detection in PXE_OPCODE_INITIALIZE to work around buggy Emulex drivers (see commit c0b61ba ("[efi] Work around bugs in Emulex NII driver")). This causes problems with some other NII drivers (e.g. Mellanox), which may time out if the underlying link is intrinsically slow to come up. Attempt to work around both problems simultaneously by requesting cable detection only if the underlying NII driver does not support link status reporting via PXE_OPCODE_GET_STATUS. (This is based on a potentially incorrect assumption that the buggy Emulex drivers do not claim to report link status via PXE_OPCODE_GET_STATUS.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Provide ACPI table description for SAN devicesMichael Brown2017-03-131-0/+69
| | | | | | | | | Provide a basic proof of concept ACPI table description (e.g. iBFT for iSCSI) for SAN devices in a UEFI environment, using a control flow that is functionally identical to that used in a BIOS environment. Originally-implemented-by: Vishvananda Ishaya Abrams <vish.ishaya@oracle.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add EFI_ACPI_TABLE_PROTOCOL header and GUID definitionMichael Brown2017-03-104-0/+137
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Update to current EDK2 headersMichael Brown2017-03-1014-44/+1233
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>