]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
13 years ago[iobuf] Relax alignment requirement for small I/O buffers
Michael Brown [Fri, 29 Jun 2012 15:07:12 +0000 (16:07 +0100)] 
[iobuf] Relax alignment requirement for small I/O buffers

iPXE currently aligns all I/O buffers on a 2kB boundary.  This is
overkill for transmitted packets, which are typically much smaller
than 2kB.

Align I/O buffers on their own size.  This reduces the alignment
requirement for small buffers, while preserving the guarantee that I/O
buffers will never cross boundaries that might cause problems for some
DMA engines.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tls] Request a maximum fragment length of 2048 bytes
Michael Brown [Fri, 29 Jun 2012 14:28:15 +0000 (15:28 +0100)] 
[tls] Request a maximum fragment length of 2048 bytes

The default maximum plaintext fragment length for TLS is 16kB, which
is a substantial amount of memory for iPXE to have to allocate for a
temporary decryption buffer.

Reduce the memory footprint of TLS connections by requesting a maximum
fragment length of 2kB.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tcp] Add support for TCP window scaling
Michael Brown [Fri, 29 Jun 2012 13:30:18 +0000 (14:30 +0100)] 
[tcp] Add support for TCP window scaling

The maximum unscaled TCP window (64kB) implies a maximum bandwidth of
around 300kB/s on a WAN link with an RTT of 200ms.  Add support for
the TCP window scaling option to remove this upper limit.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[undi] Align the received frame payload for faster processing
Michael Brown [Fri, 29 Jun 2012 00:03:38 +0000 (01:03 +0100)] 
[undi] Align the received frame payload for faster processing

The undinet driver always has to make a copy of the received frame
into an I/O buffer.  Align this copy sensibly so that subsequent
operations are as fast as possible.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[monojob] Check for keypresses only once per timer tick
Michael Brown [Thu, 28 Jun 2012 11:27:43 +0000 (12:27 +0100)] 
[monojob] Check for keypresses only once per timer tick

Checking for keypresses takes a non-negligible amount of time, and
measurably affects our RTT.  Minimise the impact by checking for
keypresses only once per timer tick.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tcpip] Add faster algorithm for calculating the TCP/IP checksum
Michael Brown [Tue, 26 Jun 2012 16:19:18 +0000 (17:19 +0100)] 
[tcpip] Add faster algorithm for calculating the TCP/IP checksum

The generic TCP/IP checksum implementation requires approximately 10
CPU clocks per byte (as measured using the TSC).  Improve this to
approximately 0.5 CPU clocks per byte by using "lodsl ; adcl" in an
unrolled loop.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[test] Add self-tests for TCP/IP checksum calculation
Michael Brown [Tue, 26 Jun 2012 13:49:26 +0000 (14:49 +0100)] 
[test] Add self-tests for TCP/IP checksum calculation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tcpip] Allow for architecture-specific TCP/IP checksum routines
Michael Brown [Wed, 27 Jun 2012 11:02:58 +0000 (12:02 +0100)] 
[tcpip] Allow for architecture-specific TCP/IP checksum routines

Calculating the TCP/IP checksum on received packets accounts for a
substantial fraction of the response latency.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[libc] Simplify memcpy() implementation
Michael Brown [Tue, 26 Jun 2012 11:42:24 +0000 (12:42 +0100)] 
[libc] Simplify memcpy() implementation

The "rep" prefix can be used with an iteration count of zero, which
allows the variable-length memcpy() to be implemented without using
any conditional jumps.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[test] Add memcpy() self-tests
Michael Brown [Tue, 26 Jun 2012 11:42:19 +0000 (12:42 +0100)] 
[test] Add memcpy() self-tests

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[cmdline] Increase resolution of "time" command
Michael Brown [Tue, 26 Jun 2012 11:42:06 +0000 (12:42 +0100)] 
[cmdline] Increase resolution of "time" command

A reasonably large (512MB) file transferred via HTTP over Gigabit
Ethernet should complete in around 4.6 seconds.  Increase the
resolution of the "time" command to tenths of a second, to allow such
transfers to be meaningfully measured.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[realtek] Add missing cpu_to_le16()
Michael Brown [Thu, 14 Jun 2012 11:54:04 +0000 (12:54 +0100)] 
[realtek] Add missing cpu_to_le16()

Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[ui] Allow colours to be configured via config/colour.h
Christian Hesse [Wed, 27 Jun 2012 17:39:46 +0000 (18:39 +0100)] 
[ui] Allow colours to be configured via config/colour.h

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[ui] Change "login" colours to match other UIs
Michael Brown [Wed, 27 Jun 2012 17:01:33 +0000 (18:01 +0100)] 
[ui] Change "login" colours to match other UIs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[sky2] Fix invalid memory access
Valentine Barshak [Sat, 2 Jun 2012 13:38:00 +0000 (17:38 +0400)] 
[sky2] Fix invalid memory access

Use hw pointer in PCI driver data as expected by sky2_remove().

Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[syslog] Include hostname within syslog messages where possible
Michael Brown [Wed, 20 Jun 2012 13:39:33 +0000 (14:39 +0100)] 
[syslog] Include hostname within syslog messages where possible

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[settings] Move "domain" setting from dns.c to settings.c
Michael Brown [Wed, 20 Jun 2012 13:38:22 +0000 (14:38 +0100)] 
[settings] Move "domain" setting from dns.c to settings.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Allow an error margin on X.509 certificate validity periods
Michael Brown [Wed, 20 Jun 2012 11:15:42 +0000 (12:15 +0100)] 
[crypto] Allow an error margin on X.509 certificate validity periods

iPXE has no concept of the local time zone, mainly because there is no
viable way to obtain time zone information in the absence of local
state.  This causes potential problems with newly-issued certificates
and certificates that are about to expire.

Avoid such problems by allowing an error margin of around 12 hours on
certificate validity periods, similar to the error margin already
allowed for OCSP response timestamps.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[dhcp] Request broadcast responses when we already have an IPv4 address
Michael Brown [Wed, 20 Jun 2012 10:56:43 +0000 (11:56 +0100)] 
[dhcp] Request broadcast responses when we already have an IPv4 address

FCoE requires the use of multiple local unicast link-layer addresses.
To avoid the complexity of managing multiple addresses, iPXE operates
in promiscuous mode.  As a consequence, any unicast packets with
non-matching IPv4 addresses are rejected at the IPv4 layer (rather
than at the link layer).

This can cause problems when issuing a second DHCP request: if the
address chosen by the DHCP server does not match the existing address,
then the DHCP response will itself be rejected.

Fix by requesting a broadcast response from the DHCP server if the
network interface already has any IPv4 addresses.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[romprefix] Treat 0xffffffff as an error return from PMM
Michael Brown [Tue, 19 Jun 2012 17:54:22 +0000 (18:54 +0100)] 
[romprefix] Treat 0xffffffff as an error return from PMM

PMM defines the return code 0xffffffff as meaning "unsupported
function".  It's hard to imagine a PMM BIOS that doesn't support
pmmAllocate(), but apparently such things do exist.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[util] Update mergerom.pl to handle .mrom images
Michael Brown [Mon, 11 Jun 2012 18:27:23 +0000 (19:27 +0100)] 
[util] Update mergerom.pl to handle .mrom images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[romprefix] Allow .mrom image to be placed anywhere within the BAR
Michael Brown [Sun, 10 Jun 2012 18:01:20 +0000 (19:01 +0100)] 
[romprefix] Allow .mrom image to be placed anywhere within the BAR

A .mrom image currently assumes that it is the first image within the
expansion ROM BAR, which may not be correct when multiple images are
present.

Fix by scanning through the BAR until we locate an image matching our
build ID.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[romprefix] Add a dummy ROM header to cover the .mrom payload
Michael Brown [Sun, 10 Jun 2012 17:25:26 +0000 (18:25 +0100)] 
[romprefix] Add a dummy ROM header to cover the .mrom payload

The header of a .mrom image declares its length to be only a few
kilobytes; the remainder is accessed via a sideband mechanism.  This
makes it difficult to append an additional ROM image, such as an EFI
ROM.

Add a second, dummy ROM header covering the payload portion of the
.mrom image, allowing consumers to locate any appended ROM images in
the usual way.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[util] Rewrite catrom.pl to use Option::ROM library
Michael Brown [Mon, 11 Jun 2012 00:42:33 +0000 (01:42 +0100)] 
[util] Rewrite catrom.pl to use Option::ROM library

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[util] Allow Option::ROM to access multiple ROM images
Michael Brown [Sun, 10 Jun 2012 17:23:24 +0000 (18:23 +0100)] 
[util] Allow Option::ROM to access multiple ROM images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[cmdline] Use "cpuid --ext" instead of "cpuid --amd"
Michael Brown [Tue, 12 Jun 2012 10:32:24 +0000 (11:32 +0100)] 
[cmdline] Use "cpuid --ext" instead of "cpuid --amd"

Avoid potential confusion in the documentation by using a
vendor-neutral name for the extended (AMD-defined) feature set.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[cmdline] Add "sync" command
Michael Brown [Sat, 9 Jun 2012 18:00:04 +0000 (19:00 +0100)] 
[cmdline] Add "sync" command

Add "sync" command (loosely based on the Unix "sync"), which will wait
for any pending operations to complete.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tls] Mark security negotiation as a pending operation
Michael Brown [Sat, 9 Jun 2012 17:58:54 +0000 (18:58 +0100)] 
[tls] Mark security negotiation as a pending operation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tcp] Mark any unacknowledged transmission as a pending operation
Michael Brown [Sat, 9 Jun 2012 17:56:07 +0000 (18:56 +0100)] 
[tcp] Mark any unacknowledged transmission as a pending operation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[pending] Add concept of "pending operations"
Michael Brown [Sat, 9 Jun 2012 17:48:09 +0000 (18:48 +0100)] 
[pending] Add concept of "pending operations"

iPXE is fundamentally asynchronous in operation: some operations
continue in the background even after the foreground has continued to
a new task.  For example, the closing FIN/ACK exchanges of a TCP
connection will take place in the background after an HTTP download
has completed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[cmdline] Add "cpuid" command
Michael Brown [Wed, 6 Jun 2012 15:08:24 +0000 (16:08 +0100)] 
[cmdline] Add "cpuid" command

Allow x86 CPU feature flags (such as support for 64-bit mode) to be
checked using the "cpuid" command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[contrib] Update bochsrc.txt to latest version of bochs
Michael Brown [Wed, 6 Jun 2012 19:37:53 +0000 (20:37 +0100)] 
[contrib] Update bochsrc.txt to latest version of bochs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[build] Merge i386 and x86_64 versions of errfile.h
Michael Brown [Wed, 6 Jun 2012 14:21:34 +0000 (15:21 +0100)] 
[build] Merge i386 and x86_64 versions of errfile.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Fix unused-but-set variable warning
Michael Brown [Wed, 23 May 2012 22:48:12 +0000 (23:48 +0100)] 
[crypto] Fix unused-but-set variable warning

Reported-by: Brandon Penglase <bpenglase-ipxe@spaceservices.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[http] Add support for Digest authentication
Michael Brown [Tue, 22 May 2012 22:10:59 +0000 (23:10 +0100)] 
[http] Add support for Digest authentication

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[http] Provide credentials only when requested by server
Michael Brown [Tue, 22 May 2012 11:32:28 +0000 (12:32 +0100)] 
[http] Provide credentials only when requested by server

Provide HTTP Basic authentication credentials only in response to a
401 Unauthorized response from the server.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[http] Split construction of Authorization header out of http_step()
Michael Brown [Tue, 22 May 2012 13:14:35 +0000 (14:14 +0100)] 
[http] Split construction of Authorization header out of http_step()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[http] Defer processing response code until after receiving all headers
Michael Brown [Tue, 22 May 2012 11:23:34 +0000 (12:23 +0100)] 
[http] Defer processing response code until after receiving all headers

Some headers can modify the meaning of the response code.  For
example, a WWW-Authenticate header can change the interpretation of a
401 Unauthorized response from "Access denied" to "Please
authenticate".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[http] Reopen connections when server does not keep connection alive
Michael Brown [Tue, 22 May 2012 10:17:50 +0000 (11:17 +0100)] 
[http] Reopen connections when server does not keep connection alive

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Rename KEY= to PRIVKEY= and "key" to "privkey"
Michael Brown [Tue, 22 May 2012 00:09:34 +0000 (01:09 +0100)] 
[crypto] Rename KEY= to PRIVKEY= and "key" to "privkey"

The setting name "key" conflicts with the setting name "key" already
in use by the 802.11 code.  Resolve the conflict by renaming the newer
setting to "privkey".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Require OCSP check if certificate provides an OCSP URI
Michael Brown [Mon, 21 May 2012 23:53:44 +0000 (00:53 +0100)] 
[crypto] Require OCSP check if certificate provides an OCSP URI

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Automatically perform OCSP checks when applicable
Michael Brown [Sun, 20 May 2012 15:46:00 +0000 (16:46 +0100)] 
[crypto] Automatically perform OCSP checks when applicable

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[image] Allow "imgtrust" to automatically download cross-signed certificates
Michael Brown [Mon, 21 May 2012 23:45:31 +0000 (00:45 +0100)] 
[image] Allow "imgtrust" to automatically download cross-signed certificates

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[monojob] Allow monojob to be completely silent
Michael Brown [Mon, 21 May 2012 23:44:49 +0000 (00:44 +0100)] 
[monojob] Allow monojob to be completely silent

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Construct OCSP check URI
Michael Brown [Sun, 20 May 2012 14:54:03 +0000 (15:54 +0100)] 
[crypto] Construct OCSP check URI

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Fix margin of error for OCSP checks
Michael Brown [Mon, 21 May 2012 22:00:46 +0000 (23:00 +0100)] 
[crypto] Fix margin of error for OCSP checks

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Return a NULL OCSP check if construction fails
Michael Brown [Mon, 21 May 2012 22:01:29 +0000 (23:01 +0100)] 
[crypto] Return a NULL OCSP check if construction fails

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Return a NULL X.509 certificate if construction fails
Michael Brown [Mon, 21 May 2012 22:00:08 +0000 (23:00 +0100)] 
[crypto] Return a NULL X.509 certificate if construction fails

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Accept UTCTime/GeneralizedTime with no "seconds" field
Michael Brown [Mon, 21 May 2012 22:20:03 +0000 (23:20 +0100)] 
[crypto] Accept UTCTime/GeneralizedTime with no "seconds" field

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[test] Add self-tests for base64
Michael Brown [Sun, 20 May 2012 16:10:23 +0000 (17:10 +0100)] 
[test] Add self-tests for base64

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[base64] Avoid overrunning input data buffer
Michael Brown [Sun, 20 May 2012 15:38:57 +0000 (16:38 +0100)] 
[base64] Avoid overrunning input data buffer

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[efi] Work around platforms which choke on EFI_PCI_DEVICE_ENABLE
Michael Brown [Wed, 16 May 2012 18:04:33 +0000 (19:04 +0100)] 
[efi] Work around platforms which choke on EFI_PCI_DEVICE_ENABLE

EFI_PCI_DEVICE_ENABLE is a list of the standard attributes that must
be enabled for a PCI device to function: I/O cycles, memory cycles,
and bus-mastering.  We currently call EFI_PCI_IO_PROTOCOL::Attribute()
with the parameter EFI_PCI_DEVICE_ENABLE to enable a PCI device.  This
should translate to a single write to PCI configuration space.

Simplicity is not a virtue within the UEFI world.  Some platforms will
'helpfully' report an error if EFI_PCI_DEVICE_ENABLE is used on a
device that doesn't actually support all three of the relevant
attributes.  For example, if a PCI device provides only memory-mapped
accesses (and so hardwires the I/O enable bit to zero), then using
EFI_PCI_DEVICE_ENABLE on such a platform will result in an
EFI_UNSUPPORTED error.

There is no plausible use case in which it is useful for the platform
to return an error in this way, and doing so makes it impossible to
distinguish genuine errors from noise.

Work around this broken behaviour by attempting to enable the three
attributes individually, and ignoring any errors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[iscsi] Report SCSI response only when applicable
Michael Brown [Wed, 16 May 2012 09:50:56 +0000 (10:50 +0100)] 
[iscsi] Report SCSI response only when applicable

iSCSI generally includes a full SCSI response only when an error
occurs.  iscsi_scsi_done() currently passes the NULL response through
to scsi_response(), which ends up causing scsicmd_response() to
dereference a NULL pointer.

Fix by calling scsi_response() only if we have a non-NULL response.

Reported-by: Brendon Walsh <brendonwalsh@niamu.com>
Tested-by: Brendon Walsh <brendonwalsh@niamu.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[test] Add self-tests for OCSP
Michael Brown [Mon, 14 May 2012 17:25:00 +0000 (18:25 +0100)] 
[test] Add self-tests for OCSP

Add self-tests for OCSP using test vectors generated with the openssl
tools.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Add framework for OCSP
Michael Brown [Mon, 14 May 2012 17:22:38 +0000 (18:22 +0100)] 
[crypto] Add framework for OCSP

Add support for constructing OCSP queries and parsing OCSP responses.
(There is no support yet for actually issuing an OCSP query via an
HTTP POST.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Add functions for constructing ASN.1 objects
Michael Brown [Fri, 11 May 2012 15:40:28 +0000 (16:40 +0100)] 
[crypto] Add functions for constructing ASN.1 objects

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Parse OCSPSigning key purpose, if present
Michael Brown [Mon, 14 May 2012 13:09:52 +0000 (14:09 +0100)] 
[crypto] Parse OCSPSigning key purpose, if present

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Generalise x509_parse_bit_string() to asn1_bit_string()
Michael Brown [Mon, 14 May 2012 08:54:19 +0000 (09:54 +0100)] 
[crypto] Generalise x509_parse_bit_string() to asn1_bit_string()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Generalise asn1_{digest,pubkey,signature}_algorithm()
Michael Brown [Sun, 13 May 2012 23:13:00 +0000 (00:13 +0100)] 
[crypto] Generalise asn1_{digest,pubkey,signature}_algorithm()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Generalise x509_parse_time() to asn1_generalized_time()
Michael Brown [Sun, 13 May 2012 22:38:56 +0000 (23:38 +0100)] 
[crypto] Generalise x509_parse_time() to asn1_generalized_time()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Parse X.509 raw public key bit string
Michael Brown [Fri, 11 May 2012 23:58:42 +0000 (00:58 +0100)] 
[crypto] Parse X.509 raw public key bit string

OCSP requires direct access to the bit string portion of the subject
public key information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Include "?subject=" in cross-signed certificate URI
Michael Brown [Wed, 9 May 2012 09:07:16 +0000 (10:07 +0100)] 
[crypto] Include "?subject=" in cross-signed certificate URI

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Reduce standard debugging output
Michael Brown [Wed, 9 May 2012 09:01:14 +0000 (10:01 +0100)] 
[crypto] Reduce standard debugging output

X.509 certificate processing currently produces an overwhelming amount
of debugging information.  Move some of this from DBGLVL_LOG to
DBGLVL_EXTRA, to make the output more manageable.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[image] Avoid potential NULL pointer dereference
Michael Brown [Tue, 8 May 2012 20:04:57 +0000 (21:04 +0100)] 
[image] Avoid potential NULL pointer dereference

Detected using Valgrind.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Automatically download cross-signed certificates
Michael Brown [Tue, 8 May 2012 15:55:32 +0000 (16:55 +0100)] 
[crypto] Automatically download cross-signed certificates

Automatically attempt to download any required cross-signing
certificates from http://ca.ipxe.org/auto, in order to enable the use
of standard SSL certificates issued by public CAs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[xferbuf] Add generic data-transfer buffer
Michael Brown [Tue, 8 May 2012 15:54:38 +0000 (16:54 +0100)] 
[xferbuf] Add generic data-transfer buffer

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tls] Use asynchronous certificate validator
Michael Brown [Tue, 8 May 2012 11:11:51 +0000 (12:11 +0100)] 
[tls] Use asynchronous certificate validator

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Add asynchronous certificate validator
Michael Brown [Tue, 8 May 2012 11:10:01 +0000 (12:10 +0100)] 
[crypto] Add asynchronous certificate validator

To allow for automatic download of cross-signing certificates and for
OCSP, the validation of certificates must be an asynchronous process.
Create a stub validator which uses a job-control interface to report
the result of certificate validation.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Add x509_auto_append()
Michael Brown [Tue, 8 May 2012 10:12:09 +0000 (11:12 +0100)] 
[crypto] Add x509_auto_append()

CMS includes an unordered certificate set, from which certificates
must be extracted in order by matching up issuers with subjects.  We
will use the same functionality as part of the automatic download of
cross-signing certificates.  Generalise cms_find_subject() to
x509_find_subject(), and create x509_auto_append().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Add x509_append_raw()
Michael Brown [Tue, 8 May 2012 09:57:50 +0000 (10:57 +0100)] 
[crypto] Add x509_append_raw()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Check that common name contains no NUL characters
Michael Brown [Tue, 8 May 2012 09:38:04 +0000 (10:38 +0100)] 
[crypto] Check that common name contains no NUL characters

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Allow for X.509 certificates with no common name
Michael Brown [Tue, 8 May 2012 09:36:09 +0000 (10:36 +0100)] 
[crypto] Allow for X.509 certificates with no common name

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[list] Add list_last_entry()
Michael Brown [Tue, 8 May 2012 09:46:39 +0000 (10:46 +0100)] 
[list] Add list_last_entry()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tcp] Discard all TCP connections on shutdown
Michael Brown [Tue, 8 May 2012 11:39:04 +0000 (12:39 +0100)] 
[tcp] Discard all TCP connections on shutdown

Allow detection of genuine memory leaks by ensuring that all TCP
connections are freed on shutdown.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[tcp] Fix potential NULL pointer dereference
Michael Brown [Tue, 8 May 2012 11:47:51 +0000 (12:47 +0100)] 
[tcp] Fix potential NULL pointer dereference

Detected using Valgrind.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[test] Add self-tests for crc32_le()
Michael Brown [Mon, 7 May 2012 15:56:17 +0000 (16:56 +0100)] 
[test] Add self-tests for crc32_le()

Add self-tests for crc32_le() using test vectors generated with Perl's
Digest::CRC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[test] Fix compiler warning on older gcc versions
Michael Brown [Fri, 4 May 2012 17:46:26 +0000 (18:46 +0100)] 
[test] Fix compiler warning on older gcc versions

Reported-by: Alex Davies <alex@davz.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Allow certificate chains to be long-lived data structures
Michael Brown [Fri, 4 May 2012 16:12:32 +0000 (17:12 +0100)] 
[crypto] Allow certificate chains to be long-lived data structures

At present, certificate chain validation is treated as an
instantaneous process that can be carried out using only data that is
already in memory.  This model does not allow for validation to
include non-instantaneous steps, such as downloading a cross-signing
certificate, or determining certificate revocation status via OCSP.

Redesign the internal representation of certificate chains to allow
chains to outlive the scope of the original source of certificates
(such as a TLS Certificate record).

Allow for certificates to be cached, so that each certificate needs to
be validated only once.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[time] Add Linux time source using gettimeofday()
Michael Brown [Fri, 4 May 2012 16:53:23 +0000 (17:53 +0100)] 
[time] Add Linux time source using gettimeofday()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[malloc] Allow Valgrind to be used when all assertions are enabled
Michael Brown [Fri, 4 May 2012 16:12:49 +0000 (17:12 +0100)] 
[malloc] Allow Valgrind to be used when all assertions are enabled

The free-memory-block traversal code triggers multiple warnings from
Valgrind when assertions are enabled, since the list consistency
checks performed by list_check() end up accessing areas that have been
marked as inaccessible.

Fix by ensuring that any memory areas that will be accessed by
list_check() are marked as defined when necessary.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Fix memory leak in cms_verify_digest()
Michael Brown [Fri, 4 May 2012 14:32:20 +0000 (15:32 +0100)] 
[crypto] Fix memory leak in cms_verify_digest()

Detected using Valgrind.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Parse OCSP responder URI from X.509 certificate
Michael Brown [Mon, 30 Apr 2012 00:49:01 +0000 (01:49 +0100)] 
[crypto] Parse OCSP responder URI from X.509 certificate

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[list] Add list_for_each_entry_continue() and _continue_reverse()
Michael Brown [Fri, 4 May 2012 14:12:22 +0000 (15:12 +0100)] 
[list] Add list_for_each_entry_continue() and _continue_reverse()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[test] Fix memory leak in settings self-tests
Michael Brown [Thu, 3 May 2012 14:24:01 +0000 (15:24 +0100)] 
[test] Fix memory leak in settings self-tests

Detected using Valgrind.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[malloc] Discard all cached data on shutdown
Michael Brown [Mon, 30 Apr 2012 19:33:23 +0000 (20:33 +0100)] 
[malloc] Discard all cached data on shutdown

Allow detection of genuine memory leaks by ensuring that all cached
data is freed on shutdown.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[menu] Add "--default" option to "choose" command
Michael Brown [Sat, 28 Apr 2012 22:18:55 +0000 (23:18 +0100)] 
[menu] Add "--default" option to "choose" command

Suggested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[realtek] Support RTL8139 cards within generic Realtek driver
Michael Brown [Sat, 28 Apr 2012 14:47:46 +0000 (15:47 +0100)] 
[realtek] Support RTL8139 cards within generic Realtek driver

RTL8139C+ cards use essentially the same datapath as RTL8169, which is
zerocopy and 64-bit capable.  Older RTL8139 cards use a single receive
ring buffer rather than a descriptor ring, but still share substantial
amounts of functionality with RTL8169.

Include support for RTL8139 cards within the generic Realtek driver,
since there is no way to differentiate between RTL8139 and RTL8139C+
cards based on the PCI IDs alone.

Many thanks to all the people who worked on the rtl8139 driver over
the years.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[http] Fix typo in memory allocation
Kevin Tran [Fri, 27 Apr 2012 20:07:12 +0000 (21:07 +0100)] 
[http] Fix typo in memory allocation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[myson] Replace driver for Myson Technology NICs
Michael Brown [Thu, 26 Apr 2012 21:10:54 +0000 (22:10 +0100)] 
[myson] Replace driver for Myson Technology NICs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[natsemi] Fix test for addresses below 4GB
Michael Brown [Fri, 27 Apr 2012 00:18:19 +0000 (01:18 +0100)] 
[natsemi] Fix test for addresses below 4GB

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[natsemi] Replace driver for National Semicondutor NICs
Michael Brown [Tue, 24 Apr 2012 20:48:48 +0000 (21:48 +0100)] 
[natsemi] Replace driver for National Semicondutor NICs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Do not allow build-time cryptography settings to be overridden
Michael Brown [Tue, 24 Apr 2012 15:10:22 +0000 (16:10 +0100)] 
[crypto] Do not allow build-time cryptography settings to be overridden

If a root certificate has been explicitly specified at build time
using TRUST=/path/to/cert then do not allow this to be overridden even
from a trustworthy settings source (such as VMware GuestInfo).

Similarly, if a client certificate (and private key) has been
explicitly specified at build time, then do not allow it to be
overridden at runtime.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[crypto] Allow client certificate to be changed without a rebuild
Michael Brown [Tue, 24 Apr 2012 12:17:29 +0000 (13:17 +0100)] 
[crypto] Allow client certificate to be changed without a rebuild

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[build] Use $(xxx_DEPS) for additional dependency information
Michael Brown [Tue, 24 Apr 2012 12:11:21 +0000 (13:11 +0100)] 
[build] Use $(xxx_DEPS) for additional dependency information

Some objects (embedded.o, rootcert.o, and clientcert.o) define
additional dependencies on external files, using syntax such as:

    $(BIN)/clientcert.o : $(CERT_LIST)

This dependency can be missed when using debug builds.  For example,
if DEBUG=clientcert is used, then the relevant object is
$(BIN)/clientcert.dbg1.o rather than $(BIN)/clientcert.o.

Fix by adding dependencies to $(clientcert_DEPS) instead:

    clientcert_DEPS += $(CERT_LIST)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[util] Remove obsolete Makefile rule for util/prototester.c
Marin Hannache [Thu, 12 Apr 2012 21:14:46 +0000 (23:14 +0200)] 
[util] Remove obsolete Makefile rule for util/prototester.c

util/prototester.c was removed in commit a6d1815 ("Obsolete for some
time now") back in 2006.

Signed-off-by: Marin Hannache <mareo@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[image] Remove non-working image loaders
Marin Hannache [Thu, 12 Apr 2012 21:14:08 +0000 (23:14 +0200)] 
[image] Remove non-working image loaders

The WinCE, a.out and FreeBSD loaders are designed to be #included by
core/loader.c, which no longer exists.  These old loaders are not
usable anymore and cause compilation failures when enabled in
config/general.h.

Signed-off-by: Marin Hannache <mareo@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[intel] Replace driver for Intel Gigabit NICs
Michael Brown [Mon, 23 Apr 2012 22:29:18 +0000 (23:29 +0100)] 
[intel] Replace driver for Intel Gigabit NICs

Tested-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[http] Avoid using stack-allocated memory in http_step()
Michael Brown [Mon, 23 Apr 2012 22:26:29 +0000 (23:26 +0100)] 
[http] Avoid using stack-allocated memory in http_step()

http_step() allocates a potentially large block of storage (since the
URI can be arbitrarily long), and can be invoked as part of an already
deep call stack via xfer_window_changed().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[script] Avoid using stack-allocated memory in process_line()
Michael Brown [Mon, 23 Apr 2012 21:42:10 +0000 (22:42 +0100)] 
[script] Avoid using stack-allocated memory in process_line()

Script lines can be arbitrarily long; allocate on the heap rather than
on the stack.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
13 years ago[xfer] Avoid using stack-allocated memory in xfer_printf()
Michael Brown [Mon, 23 Apr 2012 19:17:24 +0000 (20:17 +0100)] 
[xfer] Avoid using stack-allocated memory in xfer_printf()

xfer_printf() occasionally has to deal with strings that are
potentially long, such as HTTP URIs with multiple query parameters.
Allocating these on the stack can lead to stack overruns and memory
corruption.

Fix by using vasprintf() instead of a stack allocation.

Signed-off-by: Michael Brown <mcb30@ipxe.org>