PERFORCE change 124465 for review

John Baldwin jhb at freebsd.org
Sat Aug 25 08:34:45 PDT 2007


On Wednesday 01 August 2007 10:24:49 am Roman Divacky wrote:
> http://perforce.freebsd.org/chv.cgi?CH=124465
> 
> Change 124465 by rdivacky at rdivacky_witten on 2007/08/01 14:24:10
> 
> 	Initialize cr2 using rcr2() in signal context.
> 	
> 	PR: 77710
> 
> Affected files ...
> 
> .. //depot/projects/soc2007/rdivacky/linux_fixes/sys/i386/linux/linux_sysvec.c#2 edit
> 
> Differences ...
> 
> ==== //depot/projects/soc2007/rdivacky/linux_fixes/sys/i386/linux/linux_sysvec.c#2 (text+ko) ====
> 
> @@ -359,6 +359,7 @@
>  	frame.sf_sc.uc_mcontext.sc_esp_at_signal = regs->tf_esp;
>  	frame.sf_sc.uc_mcontext.sc_ss     = regs->tf_ss;
>  	frame.sf_sc.uc_mcontext.sc_err    = regs->tf_err;
> +	frame.sf_sc.uc_mcontext.sc_cr2    = rcr2();
>  	frame.sf_sc.uc_mcontext.sc_trapno = bsd_to_linux_trapcode(code);
>  
>  #ifdef DEBUG
> @@ -487,6 +488,7 @@
>  	frame.sf_sc.sc_esp_at_signal = regs->tf_esp;
>  	frame.sf_sc.sc_ss     = regs->tf_ss;
>  	frame.sf_sc.sc_err    = regs->tf_err;
> +	frame.sf_sc.sc_cr2    = rcr2();
>  	frame.sf_sc.sc_trapno = bsd_to_linux_trapcode(ksi->ksi_trapno);
>  
>  	for (i = 0; i < (LINUX_NSIG_WORDS-1); i++)

This is wrong.  Use the same thing that the i386 freebsd code uses to set
sc_addr.  I think it is ksi->ksi_addr.  The sc_err part of the PR is already
fixed by the recent fixes for sc_err for wine.

-- 
John Baldwin


More information about the p4-projects mailing list