Re: Audit 2.6 set_pte users

From: Andrew Morton
Date: Sat Jan 24 2004 - 16:20:25 EST


Anton Blanchard <anton@xxxxxxxxx> wrote:
>
>
> Hi,
>
> I went through all the users of set_pte to check if they flush the
> current pte if it is present. Below is a summary of the audit,
> everything looks good except for a failure case in
> dup_mmap->copy_page_range.

I was hoping this might fix the "missing TLB flush" which Martin
Schwidefsky believes is there, and which is causing him grief.

> --- 1.154/kernel/fork.c Tue Jan 20 10:38:15 2004
> +++ edited/kernel/fork.c Sat Jan 24 14:17:00 2004
> @@ -347,6 +347,7 @@
> fail_nomem:
> retval = -ENOMEM;
> fail:
> + flush_tlb_mm(current->mm);
> vm_unacct_memory(charge);
> goto out;
> }

But look:

retval = 0;
build_mmap_rb(mm);

out:
flush_tlb_mm(current->mm);
up_write(&oldmm->mmap_sem);
return retval;
fail_nomem:
retval = -ENOMEM;
fail:
+ flush_tlb_mm(current->mm);
vm_unacct_memory(charge);
goto out;
}


There is no missing flush here.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/