[lkml]   [2003]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Alternate futex non-page-pinning and COW fix
    Linus Torvalds wrote:
    > Actually: the VM_SHARED flag will never change, so testing VM_SHARED is
    > actually the _right_ thing from a mm perspective.

    Yes it can. See sys_mprotect(). If that's not intended, it's a bug
    in mprotect(). What does PROT_SEM mean for Linux, btw?

    if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM))
    return -EINVAL;

    newflags = prot | (vma->vm_flags & ~(PROT_READ | PROT_WRITE | PROT_EXEC));
    if ((newflags & ~(newflags >> 4)) & 0xf) {
    error = -EACCES;
    goto out;

    newflags is than used to index protection_map[], like this:
    newprot = protection_map[newflags & 0xf];

    and that is stored in the page tables.

    -- Jamie
    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-03-22 13:48    [W:0.019 / U:9.360 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site