Misc driver fix for 5.15-rc1
The following changes since commit bf9f243f23e6623f310ba03fbb14e10ec3a61290:
Merge tag '5.15-rc-ksmbd-part2' of git://git.samba.org/ksmbd (2021-09-09 16:17:14 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git tags/char-misc-5.15-rc1-lkdtm
for you to fetch changes up to 3a3a11e6e5a2bc0595c7e36ae33c861c9e8c75b1:
lkdtm: Use init_uts_ns.name instead of macros (2021-09-10 17:09:40 +0200)
----------------------------------------------------------------
Misc driver fix for 5.15-rc1
Here is a single patch for 5.15-rc1, for the lkdtm misc driver.
It resolves a build issue that many people were hitting with your current tree, and Kees and others felt would be good to get merged before -rc1 comes out, to prevent them from having to constantly hit it as many development trees restart on -rc1, not older -rc releases.
It has NOT been in linux-next, but has passed 0-day testing and looks "obviously correct" when reviewing it locally :)
----------------------------------------------------------------
Kees Cook (1):
lkdtm: Use init_uts_ns.name instead of macros
drivers/misc/lkdtm/core.c | 10 ++++++++++ drivers/misc/lkdtm/lkdtm.h | 28 +++++++++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-)
Quoted 3 lines · Greg KH
It resolves a build issue that many people were hitting with your current tree [...]
I was like "Oh, serious build problems"..
But as far as I can tell, the "build issue" is that a couple of files get recompiled every time you add a commit. Ok, that added possibly a few seconds to the build.
So fixing that is good, but why is that lkdtm driver insisting on writing the release and machine information AT ALL?
IOW, the fix seems kind of silly. The kernel release information should just have been removed entirely, because the kernel prints that out as the very first thing anyway, so 'dmesg' will have something like
Linux version 5.14.0-11181-gd8e988b62f94 (torvalds@ryzen) (clang
version 12.0.1 ...
at the very top.
So I think that whole 'lkdtm_kernel_info' thing is all kinds of pointless.
Could we please just stop pointlessly printing out kernel version data that is already available other ways? Just do 'dmesg', or 'uname -r' or whatever instead of insisting on printing out redundant information?
Linus
The pull request you sent on Sun, 12 Sep 2021 16:03:40 +0200:
The pull request you sent on Sun, 12 Sep 2021 16:03:40 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.gittags/char-misc-5.15-rc1-lkdtm
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/d8e988b62f948d47dd86ec655c89d54053df1754
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
Quoted 4 lines · Linus Torvalds
Could we please just stop pointlessly printing out kernel version data that is already available other ways? Just do 'dmesg', or 'uname -r' or whatever instead of insisting on printing out redundant information?
This was done to deal with the various mangling of reports (i.e. "summaries") I've been getting from CI systems that run LKDTM. It has been difficult to reliably extract actionable details, so instead I included it with the test output. And the extra details go the other way too:
frequently folks configuring the CI have no context for why tests fail, and LKDTM usually has a reasonable amount of information about what Kconfig settings have gone missing, etc, so those hints are reported as well.
Signature · 1 line
Kees Cook
Quoted 3 lines · Kees Cook
This was done to deal with the various mangling of reports (i.e. "summaries") I've been getting from CI systems that run LKDTM.
.. and what makes LKDTM so special?
IOW, what about ALL THE OTHER REPORTS?
And no, my argument is most definitely not "ok, everything should do this".
It's the reverse. The CI systems should be the ones that are fixed, not random messages from random places in the kernel have version information added.
A CI report that doesn't report the version of the kernel is kind of fundamentally broken, wouldn't you agree?
The fix is not to add the kernel version string into every single message you print out.
Linus
Quoted 8 lines · Linus Torvalds
Quoted 3 lines · Kees Cook
This was done to deal with the various mangling of reports (i.e. "summaries") I've been getting from CI systems that run LKDTM.
.. and what makes LKDTM so special?
IOW, what about ALL THE OTHER REPORTS?
I'm not sure I consider it "special", but since it reports hints about the build/test configuration combinations (i.e. "this test failed probably because CONFIG_FOO is missing"), it seemed trivial to also include the specifics of the version and arch.
Quoted 1 line
And no, my argument is most definitely not "ok, everything should do this".
Right, I completely understand that. If you really want it gone, I will rip it out; it'll just make it more time consuming to analyze some CI reports.
Quoted 3 lines
It's the reverse. The CI systems should be the ones that are fixed, not random messages from random places in the kernel have version information added.
Completely agreed, and I've been _also_ been spending my time sending patches[1] to CI tooling too, trying to solve this from both sides. But not all CIs have the source for their machinery open for patching. :(
-Kees
[1] https://github.com/Linaro/test-definitions/commit/8bd338bbcfa5a03efcf1d12e25b5d341d5a29cbc
Signature · 1 line
Kees Cook
Quoted 4 lines · Kees Cook
Right, I completely understand that. If you really want it gone, I will rip it out; it'll just make it more time consuming to analyze some CI reports.
Well, I've pulled it, so it is what it is.
I would ask you to try to get the CI cases fixed, and then remove the odd printouts from LKDTM, but it's certainly ok by me if that doesn't happen immediately.
Linus
Quoted 11 lines · Linus Torvalds
Quoted 4 lines · Kees Cook
Right, I completely understand that. If you really want it gone, I will rip it out; it'll just make it more time consuming to analyze some CI reports.
Well, I've pulled it, so it is what it is.
I would ask you to try to get the CI cases fixed, and then remove the odd printouts from LKDTM, but it's certainly ok by me if that doesn't happen immediately.
Okay, sounds good. Thanks!
Signature · 1 line
Kees Cook