Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/23063 )

Change subject: sim-se: Check Path redirection when mmapping
......................................................................

sim-se: Check Path redirection when mmapping

Every syscall file access should go through the redirection process

Change-Id: I1ba2063b5a254e11f47392bdad0bf0887ba73d3d
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23063
Reviewed-by: Brandon Potter <brandon.pot...@amd.com>
Reviewed-by: Jason Lowe-Power <ja...@lowepower.com>
Maintainer: Brandon Potter <brandon.pot...@amd.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/sim/syscall_emul.hh
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
Brandon Potter: Looks good to me, but someone else must approve; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 2d4ef25..0eaec4c 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1890,7 +1890,10 @@
         if (p->interpImage.contains(tc->pcState().instAddr())) {
             std::shared_ptr<FDEntry> fdep = (*p->fds)[tgt_fd];
             auto ffdp = std::dynamic_pointer_cast<FileFDEntry>(fdep);
-            ObjectFile *lib = createObjectFile(ffdp->getFileName());
+            auto process = tc->getProcessPtr();
+            ObjectFile *lib = createObjectFile(
+                process->checkPathRedirect(
+                    ffdp->getFileName()));

             if (lib) {
                 lib->loadAllSymbols(debugSymbolTable,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/23063
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I1ba2063b5a254e11f47392bdad0bf0887ba73d3d
Gerrit-Change-Number: 23063
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Brandon Potter <brandon.pot...@amd.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to