eina mmap safety - only map zeropages if it's an eina file that sigbuses
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 30 Aug 2017 03:03:41 +0000 (12:03 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 30 Aug 2017 03:03:41 +0000 (12:03 +0900)
commita5c8e883d8f9b3389e9a6233ba79c47df3bdc420
tree670b9ce1adc8d8f2a3b6735873edcd1bf46545b2
parent15cdd9b71b6d5abef5adc563410b4aa9a3443800
eina mmap safety - only map zeropages if it's an eina file that sigbuses

restrict mapping /dev/zero to only eina files having a sigbus
reported. the mmap was before all our file access used eina_file i
think thus the raw mmap of it. now walk all eina files and find the
candidate and only then if it exists flag is as having a faulty i/o
backing and map the zerto pages then return, otherwise call abort.
more restricted mapping and perhaps a fix for not trapping non-efl
issues.

@fix
src/lib/eina/eina_file.c
src/lib/eina/eina_mmap.c
src/lib/eina/eina_private.h