Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src



Module Name:    xsrc
Committed By:   rin
Date:           Tue Jul 23 12:01:53 UTC 2019

Modified Files:
        xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
Correctly support the case of fbi->fbi_fboffset != 0, which means base
address of framebuffer is not page-aligned:

- When mmap framebuffer, fbi->fbi_fboffset is added to the length of
  framebuffer. Otherwise, the last page of framebuffer is not mapped
  properly if (size of framebuffer) <= (page boundary) < (size of
  framebuffer + fbi->fbi_fboffset), since length of mapped area is
  counted from page-truncated address. This results in memory
  corruption in the upper adjacent page, or SEGV.

- Use fPtr->fbstart (real base address of framebuffer) instead of
  fPtr->fbmem (return value of mmap, i.e., page-aligned base address)
  where appropriate.

Tested on genfb(4) on Cubietruck, where fbi->fbi_fboffset = 4096.

No functional changes for majority of framebuffer drivers, whose base
address is page-aligned.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 \
    xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index