Advertisement
stnmrshx

Patch uvesafb OOPS try exec NX Protected Page

Apr 16th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.83 KB | None | 0 0
  1. ---
  2. drivers/video/uvesafb.c |   11 +++++++++--
  3. 1 file changed, 9 insertions(+), 2 deletions(-)
  4.  
  5. diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
  6. index 260cca7..26e83d7 100644
  7. --- a/drivers/video/uvesafb.c
  8. +++ b/drivers/video/uvesafb.c
  9. @@ -815,8 +815,15 @@ static int __devinit uvesafb_vbe_init(struct fb_info *info)
  10.     par->pmi_setpal = pmi_setpal;
  11.     par->ypan = ypan;
  12.  
  13. -   if (par->pmi_setpal || par->ypan)
  14. -       uvesafb_vbe_getpmi(task, par);
  15. +   if (par->pmi_setpal || par->ypan) {
  16. +       if (__supported_pte_mask & _PAGE_NX) {
  17. +           par->pmi_setpal = par->ypan = 0;
  18. +           printk(KERN_WARNING "uvesafb: NX protection is active."
  19. +               "Please do not use the PMI.\n");
  20. +       } else {
  21. +           uvesafb_vbe_getpmi(task, par);
  22. +       }
  23. +   }
  24. #else
  25.     /* The protected mode interface is not available on non-x86. */
  26.     par->pmi_setpal = par->ypan = 0;
  27. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement