On Mon, Apr 07, 2025 at 09:31:08AM +0200, gregkh@linuxfoundation.org wrote:
We understand. We might make the tool available to help simplify the human effort of backporting. To make this more successful, is there a way to identify the errors and learnings you mention from the past? Avoiding them automatically early in the process helps keeping the errors away.
Don't ignore fuzz, manually check, and verify, everything.
Also, diffing the file between the latest kernel and the one you're backporting to helps discover changed assumptions. For example, a group of functions might be called with similar assumptions in the old kernel, with some tests replicated everywhere (say pointer foo must not be NULL). In newer kernels this test is moved up in the caller chain and is no longer performed in the lower functions. When you want to backport a fix from this kernel to the old one, you may need to reimplement yourself the nullity check that the old kernel requires. And that's valid for locking and many other things in general. There's no way to automatically discover these ones, aside comparing the older and newer states of the file to see how it evolved over time, and developing your own habits of remembering that certain areas are different in your kernel, by doing lots of backports there, as well as following LKML to try to spot some changes that may affect your areas of interest. After a few years on old kernel you can start to develop some reflexes but that's not rocket science.
good luck!
Seconded!
greg k-h
Willy