Re: Calling function from address

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

 



On Tue, Jun 07, 2011 at 10:47:16PM +0200, Micha M. wrote:
> Hi!
> 
> 
> Is it possible to call a function that is somewere in the physical-address
> space? So I'd like to jump to a certain physical address, execute the code
> there and then return to my kernel module. 
> I already tried to ioremap that address and cast the new address to a
> funtion pointer and then call the function, but there where some page
> faults.
> 
> 
> Regards
> 
> #micha


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)

Regards

#micha

-- 
/* 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