Bug 220102 - struct taskstats breaks backward compatibility since version 15
Summary: struct taskstats breaks backward compatibility since version 15
Status: NEW
Alias: None
Product: Linux
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: Virtual assignee for kernel bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-09 18:14 UTC by Boian Bonev
Modified: 2025-05-09 18:26 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Patch to fix the problem (3.09 KB, patch)
2025-05-09 18:26 UTC, Boian Bonev
Details | Diff

Description Boian Bonev 2025-05-09 18:14:57 UTC
Hello!

Since version 15 (TASKSTATS_VERSION=15) the new layout of the structure adds fields in the middle of the structure, rendering all old software incompatible with newer kernels and software compiled against the new kernel headers incompatible with older kernels.

I think that change has to be reverted and the added fields moved to the end of the structure. Also bumping the version to 16 after the change is a good idea in order for the userspace software to be able to distinguish the different formats.

Here is the list of the commits causing the problem:

658eb5ab916ddc92f294dbce8e3d449470be9f86 - adding some fields
f65c64f311ee2f1ddc1eb395ed8b20e6b9d14e85 - adding more fields
b016d0873777462e55af4c615104cc684fce086d - version bump to 15

The fix is trivial, but if that helps, I can provide a patch too.

With best regards,
b.
Comment 1 Boian Bonev 2025-05-09 18:26:08 UTC
Created attachment 308109 [details]
Patch to fix the problem

Note You need to log in before you can comment on or make changes to this bug.