Re: [PATCH] [RFC] fix kernel crash (protection id trap) when

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John David Anglin wrote:
>> I think the bug may be in flush_user_cache_page_non_current.  It hijacks
>> sr3 temporarily and I don't think cr8 is updated when this is done.  The
>> switch may need to be atomic.
> 
> The following might fix the protection ID bug.
> 
> --- cache.c.orig	2008-07-17 21:24:46.000000000 -0400
> +++ cache.c	2008-12-21 11:53:54.000000000 -0500
> @@ -312,14 +312,14 @@
>  
>  	/* make us current */
>  	mtctl(__pa(vma->vm_mm->pgd), 25);
> -	mtsp(vma->vm_mm->context, 3);
> +	load_context(vma->vm_mm->context);
>  
>  	flush_user_dcache_page(vmaddr);
>  	if(vma->vm_flags & VM_EXEC)
>  		flush_user_icache_page(vmaddr);
>  
>  	/* put the old current process back */
> -	mtsp(space, 3);
> +	load_context(space);

I came to the similar conclusion and tried exactly this patch earlier
today. It didn't fixed the problem (although I had the feeling that the
bug didn't appeared as often then).

Helge

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux