|
|
Log in / Subscribe / Register

get_user_pages(), pinned pages, and DAX

get_user_pages(), pinned pages, and DAX

Posted May 7, 2019 23:29 UTC (Tue) by jgg (subscriber, #55211)
In reply to: get_user_pages(), pinned pages, and DAX by roc
Parent article: get_user_pages(), pinned pages, and DAX

For executable mmaps the ftruncate can return ETXTBUSY. For others you could get SIGBUS on next access. So POSIX endorses both options.

The SIGBUS idea here is different, it would install kill other processes. It also isn't clear how it would know which processes to kill since all things doing this link the pin lifetime to a FD lifetime..


to post comments

get_user_pages(), pinned pages, and DAX

Posted Jun 28, 2019 5:16 UTC (Fri) by shentino (guest, #76459) [Link]

Accessing a range of an MMAP'ed file that's been truncated at the filesystem level is analogous to trying to access a range of physical memory that does not exist.

In this case it is very much the virtual equivalent of a bus error so a SIGBUS is completely appropriate given the insanity already present of whatever got the file truncated to begin with.

get_user_pages(), pinned pages, and DAX

Posted Jun 28, 2019 5:17 UTC (Fri) by shentino (guest, #76459) [Link]

SIGBUS shouldn't instakill processes, however it does, by default, terminate the receiving process with a core dump just like SIGSEGV


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds