lkml.org 
[lkml]   [2008]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/1] x86: fix text_poke
    On Fri, Apr 25, 2008 at 09:06:37AM -0700, Linus Torvalds wrote:
    >
    >
    > On Fri, 25 Apr 2008, Andi Kleen wrote:
    > >
    > > So all these checks can be just removed.
    >
    > Quite frankly, I'd rather tighten them up. All the callers actually seem
    > to do just a single-byte one.

    I think Mathieu did them to prepare for his immediate values which
    need to write more bytes (although actually it would be quite
    possible to have immediate values only for byte immediates too)

    But that code needs much more infrastructure anyways.

    >
    > So I'd suggest really tightening it up to require total natural alignment

    For the common (everything but kprobes) "other code not running"
    it doesn't matter and I don't think natural alignment works for the
    other cases anyways.

    FWIW the original text_poke I started long ago only did bytes

    > (rather than the weaker version that required that it fit in an aligned
    > unsigned long or whatever). And I'd suggest using FIXMAP's instead of
    > vmap. Maybe something like the appended (TOTALLY UNTESTED!)

    Not sure how the fixmap is better. It's pretty much equivalent, isn't it?
    Perhaps a little cheaper, but the code shouldn't be performance critical.

    -Andi



    \
     
     \ /
      Last update: 2008-04-25 18:15    [W:0.074 / U:88.576 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site