Re: [patch] x86: test case for the RODATA config option

From: Andi Kleen
Date: Wed Jan 23 2008 - 10:27:27 EST



> What it does is check if the rodata marking was succesful.

The only difference I see is that you check that the TLB flush works,
but for that it looks awfully incomplete. In particular if you really
wanted to test the TLB you would need to do the access test on
all online CPUs. Otherwise you have no guarantee the TLBs are
actually changed everywhere (assuming that was broken)

Other than it is identical [modulo the kernel mapping bit on 64bit]-- you just
toggle a different bit in the PTE, but c_p_a() does not actually care which
bits you toggle.

>> Testing the kernel mapping might be a good idea, but I would
>> suggest adding it to pageattr-test.c

>where we move the actual test function...

What I meant using the more extensive test in pageattr-test.c
to test a few changes in the 64bit kernel mapping too, not moving your
code. I don't think moving your code makes sense. Sorry for being unclear.

-Andi
--
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/