disabling kernel access to memory
Mike Kravetz
kravetz at us.ibm.com
Tue Aug 17 09:48:16 EST 2004
On Mon, Aug 16, 2004 at 12:00:31PM -0700, Dave Hansen wrote:
>
> That shouldn't be too hard. This is for debugging anyway, right Mike?
> Put a check in the htab_pte_insert() (or whatever the hardware insertion
> call) is to scream if you attempt to set a hardware pte to one of the
> empty areas. Then go kill all the Linux ptes, effectively (if these
> were real functions (you shouldn't have to do this anyway if all of the
> pages from that area are out of the allocator):
>
> for_each_task()
> for_each_pgd()
> for_each_pmd()
> ...
>
> Then, kill the kernel mappings.
>
Thanks, I'll give that a try.
> > Back in my userspace days I remember threading libraries liked to use
> > mprotect for such things. Linux kernel has mprotect and sys_mprotect,
> > not sure if they will fit your needs or not.
>
> Those only apply to userspace pages. I think Mike want to make sure to
> kill all accesses to the memory, including from the kernel.
Yeah, I'm mostly/only interested in access from the kernel.
Right now, I'm slowly finding places in the kernel that assume the
phys -> virt translations are linear. When I can get a kernel to
boot where the translations are nonlinear, then I'll look into the
debug stuff.
--
Mike
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list