david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src
Michael Brown cc9f31ee0c [librm] Do not unconditionally preserve flags across virt_call()
Commit 196f0f2 ("[librm] Convert prot_call() to a real-mode near
call") introduced a regression in which any deliberate modification to
the low 16 bits of the CPU flags (in struct i386_all_regs) would be
overwritten with the original flags value at the time of entry to
prot_call().

The regression arose because the alignment requirements of the
protected-mode stack necessitated the insertion of two bytes of
padding immediately below the prot_call() return address.  The
solution chosen was to extend the existing "pushfl / popfl" pair to
"pushfw;pushfl / popfl;popfw".  The extra "pushfw / popfw" appears at
first glance to be a no-op, but fails to take into account the fact
that the flags restored by popfl may have been deliberately modified
by the protected-mode function.

Fix by replacing "pushfw / popfw" with "pushw %ss / popw %ss".  While
%ss does appear within struct i386_all_regs, any modification to the
stored value has always been ignored by prot_call() anyway.

The most visible symptom of this regression was that SAN booting would
fail since every INT 13 call would be chained to the original INT 13
vector.

Reported-by: Vishvananda Ishaya <vishvananda@gmail.com>
Reported-by: Jamie Thompson <forum.ipxe@jamie-thompson.co.uk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-03-12 12:39:17 +00:00
..
arch [librm] Do not unconditionally preserve flags across virt_call() 2016-03-12 12:39:17 +00:00
bin Rename .cvsignore files to .gitignore 2007-06-09 22:57:00 +01:00
config [xsigo] Add support for Xsigo virtual Ethernet (XVE) EoIB devices 2016-03-09 08:46:24 +00:00
core [pixbuf] Check for unsigned integer overflow on multiplication 2016-03-12 00:09:23 +00:00
crypto [crypto] Allow for zero-length ASN.1 cursors 2016-03-11 16:58:51 +00:00
doc [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
drivers [eoib] Support non-FullMember gateway devices 2016-03-09 08:43:40 +00:00
hci [infiniband] Add "ibstat" command 2016-03-08 17:38:06 +00:00
image [efi] Add support for EFI_GRAPHICS_OUTPUT_PROTOCOL frame buffer consoles 2015-10-16 16:38:41 +01:00
include [arp] Validate length of ARP packet 2016-03-12 01:24:03 +00:00
interface [efi] Work around broken GetFontInfo() implementations 2016-03-10 18:09:59 +00:00
libgcc [build] Mark __intel_new_proc_init with __libgcc rather than cdecl 2009-08-03 15:56:10 +01:00
net [arp] Validate length of ARP packet 2016-03-12 01:24:03 +00:00
tests [iobuf] Improve robustness of I/O buffer allocation 2016-02-11 19:04:23 +00:00
usr [ifmgmt] Include human-readable error message for configuration failure 2016-03-08 17:45:30 +00:00
util [efi] Add %.usb target for building EFI-bootable USB (or other) disk images 2015-12-07 13:08:22 +00:00
.gitignore [build] Add support for local configuration files 2010-03-26 19:07:22 +00:00
doxygen.cfg [build] Remove PACKED macro 2010-05-29 23:49:47 +01:00
Makefile [librm] Add support for running in 64-bit long mode 2016-02-24 03:10:12 +00:00
Makefile.housekeeping [debug] Allow debug colourisation to be disabled 2016-01-12 15:39:14 +00:00