Hi Ayaz,

Thanks for your help.

Can I do it through the page cache by getting the page (page descriptor 
structure) corresponding to the file in vfs_write call? If so do you know where 
should I make the changes?

Thanks

________________________________
From: Ayaz Akram <yazak...@ucdavis.edu>
Sent: Sunday, December 20, 2020 8:28 AM
To: gem5 users mailing list <gem5-users@gem5.org>
Cc: gem5-users <gem5-users-boun...@gem5.org>; ABD ALRHMAN ABO ALKHEEL 
<abdkeel...@hotmail.com>
Subject: Re: [gem5-users] PTE Flags

Hi,

Based on my understanding of what you are trying to do, I would suggest looking 
into src/arch/x86/tlb.cc (assuming you want to use x86) around line 400, to see 
how to access page table entries from a process pointer. syscall_emul.hh 
already includes sim/process.hh, so you can follow what is done in tlb.cc and 
play with the flags that you want to change.

-Ayaz

On Fri, Dec 11, 2020 at 5:08 PM ABD ALRHMAN ABO ALKHEEL via gem5-users 
<gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote:
Hello Everyone,

I am currently working on write_func system call in syscall_hh and i want to 
prevent writing to the file by changing the page table entry (PTE) flag. Where 
should i change?

Any help would be appreciated.

Thanks
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org<mailto:gem5-users@gem5.org>
To unsubscribe send an email to 
gem5-users-le...@gem5.org<mailto:gem5-users-le...@gem5.org>
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to