Re: Calling function from address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 10, 2011 at 07:30:46AM +0800, Gavin Guo wrote:
> > So maybe I have to explain some more. There is some code located in the
> > pysical address space and I need to call it from a kernel module. The
> > problem is, that the code must be run from that location it is stored (it
> > contains absolute jumps). So I'd like to be able to run that code in that
> > address space, or to "tell" the keeernel to ignore page faults/memory
> > protection on a certain address range, so that I can jump there run the
> > code and return to the caller (kernel module)
> 
> What is the architecture do you use? ex: x86, arm, mips,...

ARM.

> I know in some platform like andes, it is possible to turn off the
> virtual memory.
> Then you can jump to the physical address. After doing what you want, turning on
> virtual memory again. Finally, system return to the normal operation.
> However, the
> code is a little tricky. Before turning off the virtual memory, you
> must lock the
> code jumping to physical address in cache. Otherwise, behaviors, after
> turning off
> the cache, is unpredictable.
> 
> Gavin Guo


-- 
/* To err is human; to really fuck things up requires the root password */

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux