Bug 220102

Summary: struct taskstats breaks backward compatibility since version 15
Product: Linux Reporter: Boian Bonev (bbonev)
Component: KernelAssignee: Virtual assignee for kernel bugs (linux-kernel)
Status: NEW ---    
Severity: normal CC: bbonev
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: Patch to fix the problem

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