syscall_emul: extend mmap system call to support file backed mmaps
Review Request #3324 - Created Feb. 10, 2016 and submitted
| Information | |
|---|---|
| Brandon Potter | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 11342:b9961efec183 --------------------------- syscall_emul: extend mmap system call to support file backed mmaps
In general this patch looks good. I can't see any issues with the extension to handle mmap more comprehensively.
As a minor comment, could you consider making using multiline comments / / for multiple line comments.
-
src/sim/syscall_emul.hh (Diff revision 1) -
In general, perhaps the multi-line comments should use / /?
Looks good. Thanks for implementing this! Just a couple minor comments below.
-
src/sim/syscall_emul.hh (Diff revision 1) -
For readability, it would be nice to add parens around the & expressions here. Order of operations is not immediately clear.
-
src/sim/syscall_emul.hh (Diff revision 1) -
Thank you for the warning here! After reading the patch description, I immediately wondered about mmapped file writes.
I'm not opening an issue here, but I'm curious about how it's possible for mmap writes to succeed in the simulated system, but not allow those updates to the file on the host system. Maybe that's default behavior for mmapping a file with PROT_READ, or does the file copy below take care of that? Either way, it might be good to have an explicit comment here that describes the process.
Description: |
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+627 -101) |
