From mboxrd@z Thu Jan 1 00:00:00 1970 From: ruben@mrbrklyn.com (Ruben Safir) Date: Fri, 6 Jul 2018 14:49:58 -0400 Subject: How to change page permission from inside the kernel? In-Reply-To: References: Message-ID: <88bf3863-4ed7-962e-e776-d4306d4b3d80@mrbrklyn.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On 07/06/2018 02:06 PM, Ahmed Soliman wrote: > I have a memory page allocated with mmap() from user space, This > address is passed to some kernel module (kvm_intel to be specific) and > i want to know how can I change the page permission from inside there > My goal is to achieve something like this > mprotect(mem, PAGE_SIZE, PROT_READ) > except for mprotect can't be called from the kernel, and I couldn't > find the right way to do it. > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > sounds like a good way to make a virus -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013