Hello, On Sat, Jul 06, 2024 at 12:15:01AM -0300, Ágatha Isabelle Chris Moreira Guedes wrote: > Fix the absence of warning message and kernel tainting when initializing > drivers from the `drivers/staging` subtree from initcalls (when > configured as built-in). > > When such a driver is built as module and the module is loaded, the > `load_module()` function taints the kernel to signal code of unknown > quality is loaded, and produces a warning like this: > > [ 8.076352] rts5208: module is from the staging directory, the > quality is unknown, you have been warned. > > The same behaviour is absent, however, when a staging driver is compiled > as built-in on the kernel image, since loading it happens through > initcalls and not through load_module(). > > This might prevent relevant information of being available on a bug > report (i.e. on a panic log) among other possible problems. > > NOTES: > - The patch is written in such a way that all non-staging drivers are > kept the way they were, except for staging drivers built with > `-DSTAGING_CODE`. > - Since it changes some macros related to clang LTO as well, I tested it > and it works properly in kernels compiled with both clang and gcc. > - Some `checkpatch.pl` errors, warnings and checks (with `--strict`) are > present. Some were already there, some I introduced but I think > they're unavoidable. Some IMHO don´t make sense at all, I think they > would apply for most regular macros but initcall macros are just way > different. > > Fixes: 061b1bd394ca ("Staging: add TAINT_CRAP for all drivers/staging code") > Signed-off-by: Ágatha Isabelle Chris Moreira Guedes <code@xxxxxxxxxx> I didn't grok the complete patch, the but intention is good. Thanks Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> Best regards Uwe
Attachment:
signature.asc
Description: PGP signature