summaryrefslogtreecommitdiff
path: root/ioops.c
AgeCommit message (Expand)AuthorFilesLines
2016-04-26ioops: Add mkostemp_or_die() wrapper for mkostemp(3)Tobias Klauser1-0/+10
2016-04-17build: fix compilation warnings with _GNU_SOURCEarch3y1-1/+3
2013-07-31ioops: Constify `name' parameter to tun_open_or_die()Tobias Klauser1-1/+1
2013-06-12ioops: mark failure path as unlikelyDaniel Borkmann1-9/+8
2013-06-12ioops: misc: add dup{,2}_or_die to ioopsDaniel Borkmann1-0/+16
2013-06-04ioops: fix build error by renaming 'len' variableDaniel Borkmann1-2/+2
2013-06-04ioops: Add {read,write}_blob_or_die for reading/writing binary blobsDaniel Borkmann1-0/+23
2013-06-04xutils: eliminate xutils, move rest to epoll2Daniel Borkmann1-1/+0
2013-06-04xutils: move device management functions out of xutilsDaniel Borkmann1-0/+1
2013-06-04xio: rename xio to ioops and reduce its includesDaniel Borkmann1-0/+98
tables. With that in mind, modify the x86-64's arch_hibernation_header_save() and arch_hibernation_header_restore() routines to pass the physical address of the image kernel's entry point (in addition to its virtual address) to the boot kernel (a small piece of assembly code involved in passing the entry point's virtual address to the image kernel is not necessary any more after that, so drop it). Update RESTORE_MAGIC too to reflect the image header format change. Next, in set_up_temporary_mappings(), use the physical and virtual addresses of the image kernel's entry point passed in the image header to set up a minimum kernel text mapping (using memory pages that won't be overwritten by the image kernel's memory contents) that will map those addresses to each other as appropriate. This makes the concern about the possible corruption of the original boot kernel text mapping go away and if the the minimum kernel text mapping used for the final jump marks the image kernel's entry point memory as executable, the jump to it is guaraneed to succeed. Fixes: ab76f7b4ab23 (x86/mm: Set NX on gap between __ex_table and rodata) Link: http://marc.info/?l=linux-pm&m=146372852823760&w=2 Reported-by: Logan Gunthorpe <logang@deltatee.com> Reported-and-tested-by: Borislav Petkov <bp@suse.de> Tested-by: Kees Cook <keescook@chromium.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat