[SLOF] [PATCH v2 20/20] make last entry in log appear

Stefan Berger stefanb at linux.vnet.ibm.com
Fri Nov 20 03:21:58 AEDT 2015

On 11/19/2015 06:34 AM, Thomas Huth wrote:
> On 17/11/15 18:02, Stefan Berger wrote:
>> From: Stefan Berger <stefanb at linux.vnet.ibm.com>
>> Due to the off-by-one error in Linux, we need to add a 1 to the
>> actual size of the log.
> If there's a bug in Linux, why don't you fix it there instead?
> Introducing wrong behavior here sounds wrong to me.

The problem is that this a bug that's been in Linux basically forever. 
So it's unfortunately 'cheaper' now to fix it here.

On x86 Linux does not ask for the size of the log but for the size of 
the buffer allocated for the log and uses that. Typically we do not run 
into that problem there that the last entry in the log is not shown (in 
sysfs) due to this off-by-one error since the buffer is much larger than 
the log written into it. Future ppc64 Linux versions will also ask for 
the allocated buffer, using a new firmware API that we already have in 
this patch series, and the situation will be the same, but so far this 
is not the case.


More information about the SLOF mailing list