Re: Rework arch/ia64/kernel/salinfo.c for 2.4

From: Zoltan Menyhart <Zoltan.Menyhart_AT_bull.net_at_nospam.org>
Date: 2003-10-21 21:55:07
(SOORRY, THE TAIL OF MY MAIL GOT LOST, HERE IT IS:)

> >- do not "clear" nor "shift" MCA logs
> >- the MCA handler can overwrite the buffer of the CPU on which
> >  it executes
> >- for the "read <n>" command, you may:
> >  + calculate a CRC32 of the buffer[n]
> >  + copy_to_user(buffer[n],...)
> >  + calculate again the CRC32 of the buffer[n] and restart
> >    if it is not the same as before
> 
> Doing a CRC at "read <n>" time is too late, the CRC would have to be
> taken in the interrupt handler.  In any case, the record ID is supposed
> to be unique and is the first field in the record.  Checking that the
> ID is unchanged after taking a copy is sufficient and is much cheaper
> than a CRC check.

If you start copy_to_user(buffer...) and in the mean time there is a
new MCA (recovered successfully), the the buffer gets overwritten.
We cannot lock out the MCA handler. We need to make sure that the copy
does not include e.g. the beginning of a previous MCA and the end of
the current one.

Regards,

Zoltan Menyhart
-
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 Tue Oct 21 07:57:02 2003

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