Re: [PATCH -mm] vmscan: make mapped executable pages the first class citizen

From: KOSAKI Motohiro
Date: Sun May 10 2009 - 06:06:48 EST


>> I don't think this is desirable, like Andrew already said, there's tons
>> of ways to defeat any of this and we've so far always priorized mappings
>> over !mappings. Limiting this to only PROT_EXEC mappings is already less
>> than it used to be.
>
> Yeah. One thing I realized in readahead is that *anything* can happen.
> When it comes to caching, app/user behaviors are *far more* unpredictable.
> We can make the heuristics as large as 1000LOC (and leave users and
> ourselves lost in the mist) or as simple as 100LOC (and make it happy
> to hacking or even abuse).

umm. I think it isn't good example.
Please see recent_scan/rotate stastics. it use only less 100LOC.

Plus, I don't think stastics is wrong.
if the page can claim "I'm high priority", it's risky. bad userland
program might exploit this rule.
but if the page claim "I think PROT_EXEC is important, maybe", it
isn't risky. if user-program want to exploit the rule, kernel ignore
the claim.
--
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/