david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

1416 Commits

Author SHA1 Message Date
Michael Brown d3c660b671 [image] Add "--autofree" option
Allow images to be automatically freed after execution completes
(successfully or otherwise).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 12:44:40 +01:00
Michael Brown 23b70323c7 [libc] Add missing wchar.h header
Commit 58ed3b1 ("[libc] Add support for "%lc" and "%ls" format
specifiers") was missing a file.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 17:19:51 +01:00
Michael Brown 58ed3b1cee [libc] Add support for "%lc" and "%ls" format specifiers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 16:33:33 +01:00
Michael Brown 7ad6caf29f [efi] Add EFI_LOAD_FILE_PROTOCOL header
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 13:15:25 +01:00
Michael Brown bc41c6ef02 [efi] Update to current EDK2 headers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 13:15:24 +01:00
Michael Brown 34576e5ff4 [efi] Standardise #include guard in ipxe_download.h
The script include/ipxe/efi/import.pl relies on a particular format
for the #include guard in order to detect EFI headers that are not
imported.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 13:15:24 +01:00
Michael Brown 07bc73e087 [tcp] Increase maximum window size to 256kB
A window size of 256kB should be sufficient to allow for
full-bandwidth transfers over a Gigabit LAN, and for acceptable
transfer speeds over other typical links.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-09 10:15:24 +01:00
Michael Brown 024247317d [arp] Try to avoid discarding ARP cache entries
Discarding the active ARP cache entry in the middle of a download will
substantially disrupt the TCP stream.  Try to minimise any such
disruption by treating ARP cache entries as expensive, and discarding
them only when nothing else is available to discard.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-09 10:08:38 +01:00
Michael Brown a5c016d93e [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>
2012-06-29 16:07:12 +01:00
Michael Brown 9a8c6b00d4 [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>
2012-06-29 15:28:15 +01:00
Michael Brown ea61075c60 [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>
2012-06-29 15:05:33 +01:00
Michael Brown 1d77d03216 [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>
2012-06-27 19:15:17 +01:00
Michael Brown cbc54bf559 [syslog] Include hostname within syslog messages where possible
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-20 14:59:06 +01:00
Michael Brown 7ea6764031 [settings] Move "domain" setting from dns.c to settings.c
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-20 14:39:03 +01:00
Michael Brown 4010890a39 [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>
2012-06-20 12:15:42 +01:00
Michael Brown c0942408b7 [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>
2012-06-20 12:01:50 +01:00
Michael Brown af47789ef2 [tls] Mark security negotiation as a pending operation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-09 18:59:41 +01:00
Michael Brown 021d7b21b7 [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>
2012-06-09 18:48:28 +01:00
Michael Brown 944e023def [crypto] Construct OCSP check URI
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-21 23:21:38 +01:00
Michael Brown 39ac285a8a [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>
2012-05-15 13:24:23 +01:00
Michael Brown deac4ea1ba [crypto] Add functions for constructing ASN.1 objects
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-14 18:09:43 +01:00
Michael Brown e01af7367d [crypto] Parse OCSPSigning key purpose, if present
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-14 18:09:40 +01:00
Michael Brown 4aad46ac70 [crypto] Generalise x509_parse_bit_string() to asn1_bit_string()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-14 11:02:38 +01:00
Michael Brown 7deb610881 [crypto] Generalise asn1_{digest,pubkey,signature}_algorithm()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-14 00:20:28 +01:00
Michael Brown 88c09b36cf [crypto] Generalise x509_parse_time() to asn1_generalized_time()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-14 00:20:25 +01:00
Michael Brown e5858c1938 [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>
2012-05-14 00:14:27 +01:00
Michael Brown 3e6e0078e0 [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>
2012-05-08 19:17:05 +01:00
Michael Brown 2e4be01690 [xferbuf] Add generic data-transfer buffer
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-08 19:16:46 +01:00
Michael Brown f19565f58f [tls] Use asynchronous certificate validator
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-08 12:49:02 +01:00
Michael Brown 29dcb0631b [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>
2012-05-08 12:49:01 +01:00
Michael Brown 1a5f025ad8 [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>
2012-05-08 12:49:01 +01:00
Michael Brown 99c798d87a [crypto] Add x509_append_raw()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-08 12:49:01 +01:00
Michael Brown 6ba7fb7c5c [list] Add list_last_entry()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-08 12:49:01 +01:00
Michael Brown 557f467bab [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>
2012-05-04 17:54:31 +01:00
Michael Brown 6ed905aba2 [time] Add Linux time source using gettimeofday()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-04 17:54:31 +01:00
Michael Brown 601cb3610f [crypto] Parse OCSP responder URI from X.509 certificate
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-04 15:15:34 +01:00
Michael Brown f91995f193 [list] Add list_for_each_entry_continue() and _continue_reverse()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-04 15:15:34 +01:00
Michael Brown 838a76a042 [menu] Add "--default" option to "choose" command
Suggested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-28 23:42:15 +01:00
Michael Brown 1fe27a3e0e [myson] Replace driver for Myson Technology NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-27 11:46:58 +01:00
Michael Brown 2c1e8d2cb1 [natsemi] Replace driver for National Semicondutor NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-26 14:17:24 +01:00
Michael Brown 63d9cc28b9 [crypto] Allow client certificate to be changed without a rebuild
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-24 13:17:29 +01:00
Michael Brown 945e428137 [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>
2012-04-23 23:29:18 +01:00
Michael Brown 38d2ad8676 [skel] Add skeleton network driver
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-21 08:05:24 +01:00
Michael Brown 02f1f3066d [crypto] Allow trusted root certificate to be changed without a rebuild
Changing the trusted root certificate currently requires a rebuild of
the iPXE binary, which may be inconvenient or impractical.

Allow the list of trusted root certificate fingerprints to be
overridden using the "trust" setting, but only at the point of iPXE
initialisation.  This prevents untrusted sources of settings
(e.g. DHCP) from subverting the chain of trust, while allowing
trustworthy sources to change the trusted root certificate without
requiring a rebuild.

The basic idea is that if you are able to manipulate a trustworthy
source of settings (e.g. VMware GuestInfo or non-volatile stored
options), then you would be able to replace the iPXE binary anyway,
and so no security is lost by allowing such sources to override the
list of trusted root certificates.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-19 16:11:20 +01:00
Michael Brown 31e60de676 [settings] Add fetch_setting_copy()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-19 16:10:07 +01:00
Michael Brown 62eb2294f0 [multiboot] Place multiboot modules low in memory
Solaris assumes that there is enough space above the Multiboot modules
to use as a decompression and scratch area.  This assumption is
invalid when using iPXE, which places the Multiboot modules near the
top of (32-bit) memory.

Fix by copying the modules to an area of memory immediately following
the loaded kernel.

Debugged-by: Michael Brown <mcb30@ipxe.org>
Debugged-by: Scott McWhirter <scottm@joyent.com>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-19 13:13:32 +01:00
Michael Brown 2a0154db5b [realtek] Replace driver for Realtek Gigabit NICs
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-18 16:33:36 +01:00
Michael Brown 9b2aabe534 [mii] Add generic MII reset function
iPXE provides no support for manually configuring the link speed.
Provide a generic routine which should be able to reset any MII/GMII
PHY and enable autonegotiation.

Prototyped-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-18 16:33:18 +01:00
Michael Brown d27e6d6efd [mii] Synchronise constants with current Linux include/linux/mii.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-18 16:32:57 +01:00
Michael Brown 2f3f0ca953 [mii] Remove unused functionality
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-18 16:32:57 +01:00