[Cbe-oss-dev] [PATCH] spufs: avoid using backing operation for wbox write

Arnd Bergmann arnd at arndb.de
Wed Aug 8 02:40:44 EST 2007


On Tuesday 07 August 2007, André Detsch wrote:
> Arnd Bergmann wrote:
> > On Tuesday 07 August 2007, Arnd Bergmann wrote:
> > 
> >> I've also been able to spot a bug in this area in the line
> >> 'ctx->csa.prob.mb_stat_R = (((4 - slot) & 0xff) << 8);' when writing
> >> to the mailbox from user space, we overwrite the entire mb_stat_R
> >> state, not just the part responsible for the inbound mbox.
> > 
> > If this is indeed the problem, please try the patch below.
> 
> The patch didn't fixed the problem. However, the way we handle mb_stat_R 
>   is a possible issue.
> I may be missing something obvious, but how is mb_stat_R value restored?
> 
> Save operation, in the other hand, is quite explicit:
> /* Save, Step 39:
>   *     Save MB_Stat register in the CSA.
>   */
> csa->prob.mb_stat_R = in_be32(&prob->mb_stat_R);

This register does not get restored, it only reflects the value of the
mailbox channel counts that are set elsewhere, so if this causes a bug,
that can only manifest itself while the context is saved.

	Arnd <><



More information about the cbe-oss-dev mailing list