lkml.org 
[lkml]   [2008]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Regression in 2.6.25-rc3: s2ram segfaults before suspending
Klaus S. Madsen wrote:
> open("/dev/mem", O_RDWR) = 5
> mmap2(NULL, 1282, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_FIXED, 5, 0) = 0
> mmap2(0xa0000, 393216, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 5, 0xa0) = 0xa0000
^^^^^^^^^^^^^^^^^^^^
> close(5) = 0
> ioperm(0, 0x400, 0x1) = 0
> iopl(0x3) = 0
> access("/sys/bus/pci", R_OK) = 0
> write(1, "Calling get_mode\n", 17) = 17
> vm86(0x1, 0xb7f14ccc, 0xb7f14830, 0xc000, 0x18b6 <unfinished ...>
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV (core dumped) +++

This is the VGA BIOS being mapped, it's mapped PROT_READ|PROT_WRITE, but
no PROT_EXEC; if the kernel is NX-capable it *should* segfault trying
to execute out of this area, which is exactly what will happen when vm86
executes INT 10h.

If we can find that mmap() in the s2ram source code and add PROT_EXEC to
it, it would be interesting.

-hpa


\
 
 \ /
  Last update: 2008-02-29 22:09    [W:0.096 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site