Re: [PATCH] [1/2] CPA: Fix set_memory_x for ioremap v2

From: Thomas Gleixner
Date: Tue Feb 12 2008 - 18:03:23 EST


On Tue, 12 Feb 2008, Andi Kleen wrote:
> There would be several possible ways to fix this:
> - Simply don't set the NX bit in the original ioremap and drop
> set_memory_x and add a ioremap_exec(). That would be my preferred solution,
> but unfortunately has been dismissed before
> - Drop all __pas and always use the physical address derived
> from the looked up PTE. This would need some significant restructuring
> and would only fix the first problem above, not the second.
> - Special case NX clear to change any aliases. I chose this one
> because it happens to fix both problems, so is both a fix
> and a optimization.
>
> This implies that it's still not safe calling set_memory_(not x) on
> any ioremaped/vmalloced/module addresses.

There is another option:

- Fix it proper.

The so-called "significant restructuring" took a mere 2 hours,
which is probably less than the time consumed in this thread.

http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-x86.git;a=shortlog;h=mm

Thanks,

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