Re: [patch] Memory Error Handling Improvement

From: Russ Anderson <rja_at_sgi.com>
Date: 2005-06-25 06:18:04
Hidetoshi Seto wrote:
> Russ Anderson wrote:
> 
> > +	pmsa = (pal_min_state_area_t *)(sal_to_os_handoff_state->pal_min_state | (6ul<<61));
> > +	if (psr1->cpl != 0 || (pmsa->pmsa_iip >= (unsigned long)&interrupt &&
> > +			       pmsa->pmsa_iip <  (unsigned long)&interrupt_pnr)) {
> 
> It seems that the latter state just means "this was in early of interrupt."
> You shoud also make sure that the interrupt has happen in user context, right?

Yes, that is a good point.   The updated patch has that change.

------------------------------------------------------------------------------
        psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr);
+       psr2 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_xpsr);

        /*
         *  Check the privilege level of interrupted context.
         *   If it is user-mode, then terminate affected process.
         */
-       if (psr1->cpl != 0) {
+       pmsa = (pal_min_state_area_t *)(sal_to_os_handoff_state->pal_min_state | (6ul<<61));
+
+       if (psr1->cpl != 0 || ((psr2->cpl != 0) &&
+                              (pmsa->pmsa_iip >= (unsigned long)ia64_ivt+0x3000 &&
+                               pmsa->pmsa_iip <  (unsigned long)&interrupt_pnr))) {
                smei = peidx_bus_check(peidx, 0);


-- 
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          rja@sgi.com
-
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 Fri Jun 24 16:20:00 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:40 EST