lkml.org 
[lkml]   [1999]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: gdb strangness Under 2.3.11-pre1


    On Sun, 18 Jul 1999, Tim Waugh wrote:
    >
    > No, Linus' fault. ;-)

    Oops, indeed.

    Thanks, patch obviously correct and applied.

    However, I further _suspect_ that the test should be extended to do
    "!pte_dirty()" too, but I wouldn't want to add that without testing. As
    you have an obvious test-case, would you mind trying with the following
    modified version:

    > + if (write && (!pte_write(*pgtable) || !pte_dirty(*pgtable)))
    > + goto fault_in_page;

    which also makes sure that the page will always be marked dirty after the
    thing.

    > We probably have to mark the page dirty if (write) as well; exercise for
    > the reader I guess. The 'if (pgd_none(*pgdir))' looks suspicious too --
    > should that that be !pgd_present?

    (pgd_none() <=> !pgd_present) for all cases except for the error cases.
    Linux does not support swapped out page tables - it adds a surprising
    amount to complexity for a fairly small gain.

    So the stickler version to test a page directory entry is:

    if (pgd_none(entry)) goto no-entry
    if (pgd_bad(entry)) goto bad-entry
    .. it's present and usable ..

    so pgd/pmd_present is basically not really ever usable (except as part of
    the pgd/pmd_bad() test, where a non-present pmd/pgd is always considered
    bad).

    Linus


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:53    [W:0.021 / U:3.076 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site