Re: Read *pgd again in vhpt_miss handler

From: Zoltan Menyhart <Zoltan.Menyhart_at_bull.net>
Date: 2006-04-27 21:04:10
Chen, Kenneth W wrote:

> A more favorable change is to remove comparing pud/pmd entry, but
> condition the vhpt TLB purging upon detecting pte modification.
> I had this patch in my pocket for a while for other optimizations
> I'm working on and it looks like a good timing to post it now.

I cannot agree with you.

1. If *pte becomes invalid in the mean time, then the translation
   for the PTE page can be still valid.
   E.g. the swapper removes PTE-s and purges the translations for
   user pages only, never for a PTE page.

2. Let's have a look at your posting on the 30th os March, in the thread
  "accessed/dirty bit handler tuning":

> cpu0                            cpu1                  cpu2
> Vhpt miss:
>   walk page table
>                                 free_pgtables
>                                 ptc.g fault address
>                                 ptc.g hash address
>                                                       pud_alloc/pmd_alloc
>                                                       new page instantiation
>   itc.d faulting address
>   itc.d hash address
>   read pte
>   kill tlb for fault addr
>   rfi
> 
> Touch fault addr
> Walker install the tlb
> with staled vhpt tlb
> -> using someone else's page
>  -> data corruption

I did agree with you.

In addition, I wanted to add a protection for protecting the
pgd ... pte chain walking.
I wanted to use the mm semaphore => no need to walk again the
pgd ... pte chain.

I think your new patch widens the security hole.

Regards,

Zoltan
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Apr 27 21:05:34 2006

This archive was generated by hypermail 2.1.8 : 2006-04-27 21:05:47 EST