-2

How can I load a kernel driver at a specific memory address?

How could it be done with the following methods?

  1. commands/scripts like insmod or modprobe
  2. using C code (not sure if there may exist such an option)
2
  • 1
    You can't. Why do you want to do that anyway? Jan 9, 2014 at 22:48
  • 1
    Not sure who put a -1 to that question. Customer wants that, there are controlled details to the project, it may be military, so we are not allowed to ask further on the criteria.
    – Ursa Major
    Jan 9, 2014 at 23:22

1 Answer 1

5

You can't load a kernel module at a specific physical address. You can't load a kernel module at a specific virtual address. The kernel decides where it loads the module.

Inside the kernel, of course, you can do what you want. But I think arranging to load a driver at a specific address would require a lot of deep changes.

I fail to see what would require loading a driver at a specific physical or virtual address. Devices may need to be mapped at specific physical addresses (and there are mechanisms for that), but code doesn't care.

1
  • yes, the base kernel may be able to do something about the loading process of the loadable kernel modules (LKM), however, we are not allow to touch that. I wonder why they set the game like this. You are not going anywhere without a +1 for you, @Gilles. :)
    – Ursa Major
    Jan 10, 2014 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .