[lkml]   [2005]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 02/02] Debug option to write-protect rodata: the write protect logic and config option
    2005/11/11, Arjan van de Ven <>:
    > > people objecting to that.
    > > >
    > > > (It's not clear cut: while the last bit of the kernel no longer is
    > > > covered by a 2Mb tlb, most intel cpus have very few of such tlbs in the
    > > > first place and this would free up one such tlb for other things (say
    > > > the stack data) or even the userspace database), so it's not all that
    > > > clear cut what the cost of this is)
    > >
    > > I'm dumb. But how is "the last bit of the kernel no longer is covered
    > > by a 2Mb tlb"? Could you explain a bit more?
    > in memory it'll look something like this
    > 0 2 4 6
    > -- kernel text -- + -- kernel text -- + --- k. text-- rodata -- + --
    > normally the range from 0 to 6 is covered with 2Mb tlb's.
    > Now to make rodata read only, the hugetlb entry covering 4-6 Mb range
    > needs to be split into 4Kb entries, so that the rodata portion can have
    > different permissions than the rest of that range.

    Indeed. Thanks.

    And we could also mark text section read-only and data/stack section
    noexec if NX is supported. But I doubt the whole thing would really
    help much. Kill the kernel thread? We can't. We only run into a panic.
    Anyway I'd attach a quick patch to mark text section read only in the
    next mail.

    If it's ok, I'd add Kconfig support. Comments?
    Coywolf Qi Hunt
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-11-11 19:59    [W:0.021 / U:40.644 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site