Re: What I suspect

Richard Gooch (rgooch@ras.ucalgary.ca)
Wed, 8 Dec 1999 13:17:35 -0700


Linus Torvalds writes:
> On Wed, 8 Dec 1999, Richard Gooch wrote:
> >
> > 1a) the kernel exports a global page which has kernel data, such as the
> > current time. Since the kernel exports it, it knows where it is
>
> It knows the physical address. It doesn't know the linear
> address. Which means that it can't contain code (or rather, the code
> would have to be PIC for no good reason - nasty for performance).

I don't see why the kernel can't map this magic page to the same
virtual address for each process. I assumed you'd want to do that for
code anyway.

> > 1b) user-space can look for the known page and read values from it, if
> > it wants
>
> It's not about reading values. The time offsets are completely
> useless if the CPU doesn't support rdtsc. We want to export CODE,
> not data.

Yeah, OK. But user-space can MAP_INHERIT the code which is appropriate
for the CPU.

> > 2) MAP_INHERIT can be used by user-space to implement
> > machine-specific code.
>
> Sure. MAP_INHERIT can be used for general-purpose things. But
> MAP_INHERIT is not going to happen. It has security issues that you
> ignore,a dn it has performance issues for process creation (we can't
> just completely break down and re-build the page tables, we have to
> be careful). End of story.

Why do you say I've ignored the security issues? I've suggested a
number of ways of dealing with that. I've not seen any replies saying
that the solutions are flawed.

The re-building page table argument sounds like it's the killer,
though. I assume you're saying that we'd lose VM optimisations if we
have to avoid touching certain vma's when tearing down page tables?

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/