[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2/2] perf_counter: optimize context switch between identical inherited contexts
    Peter Zijlstra writes:

    > Suppose someone writes a malicious proglet that inherits the counters,
    > puts the child to sleep, does 2^32 mods on the counter set, and then
    > wakes up the child.
    > Would that merely corrupt the results, or make the kernel explode?

    You'd have to do something like create some counters on yourself,
    fork, do the 2^32 counter creations and deletions, then do another
    fork. All that would happen is that some of the counters would count
    on one of the child processes when they should be counting on the

    But it would be easy and cheap to make the generation count be 64
    bits, and then it won't overflow in my lifetime at least, and after
    that I don't care. :) So I agree with Ingo that we should just do


     \ /
      Last update: 2009-05-22 11:59    [W:0.019 / U:15.928 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site