[PATCH 2/3] bootcount: Add missing count value masking

Niko Mauno niko.mauno at vaisala.com
Wed Feb 4 14:21:00 CET 2026


On 2/3/26 6:13 PM, Tom Rini wrote:
> On Tue, Feb 03, 2026 at 04:44:03PM +0200, niko.mauno at vaisala.com wrote:
> 
>> From: Niko Mauno <niko.mauno at vaisala.com>
>>
>> When storing the single word bootcount value, add applying of the
>> bootcount count mask which seemed to be missing.
>>
>> Signed-off-by: Niko Mauno <niko.mauno at vaisala.com>
>> ---
>>   drivers/bootcount/bootcount.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> A cover letter for the series would be good. I assume you found this
> problem in practice as part of doing 3/3 and so the wording here should
> be more assertive that there is a problem and this is the fix, rather
> than passive voiced.
> 

Thanks Tom, now submitted v2 which adds the cover letter for the series as You
suggested, and tries to improve the wording of this second commit's subject/message.

I did not encounter the problem in practice, but rather noticed that bootcount.c did
not seem to be consistent with respect to the clobbering prevention comparing
to the other existing single word bootcount storing implementations, therefore I
proceeded to propose also this change, along with the other two commits.

-Niko



More information about the U-Boot mailing list