tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: amd64 dtrace module VM limitation
On Fri, Aug 22, 2014 at 07:23:48PM +0000, Taylor R Campbell wrote:
> I don't understand what all the constraints on this limitation are,
> other than that it is necessary for the module loader to relocate JMPs
> without overflowing the instruction width.
We compile kernel and modules with -mcmodel=kernel, wich is documented
as:
`-mcmodel=kernel'
Generate code for the kernel code model. The kernel runs in the
negative 2 GB of the address space. This model has to be used for
Linux kernel code.
So as long as we allocate VA for loaded models in that area, everything
should be fine. The easiest way to do so is to reserve a fixed space
in pmap_bootstrap "somewhere".
Two variants of this can be found in sparc64/pmap.c (but the code model
there is slightly different and we live in the first +2GB instead of
negative addresses), search for module_start or module_end.
The other point is kernel page table organisation, but amd64 uses direct
map, so this should not be a problem, I suppose.
Martin
Home |
Main Index |
Thread Index |
Old Index