Re: [PATCH 0/3] Show that the kernel is tainted at init-time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Aaron,

sorry for the delay.

-----Original Message-----
> The goal of this patchset is to explicitly indicate to the
> user that the Linux kernel is "tainted" at init-time or
> when the 'sys' command is used. In additional to the above
> show_kernel_taints() has been consolidated to avoid
> duplication and hopefully improve readability.

That would be usuful and looks more readable, thanks.

To stop the compilation warning below, with initializing the variables,
Acked-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>


cc -c -g -DX86_64 -DLZO -DSNAPPY -DZSTD -DGDB_10_2  kernel.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
kernel.c: In function ‘show_kernel_taints’:
kernel.c:11268:12: warning: ‘sp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  tnts_addr = sp->value;
  ~~~~~~~~~~^~~~~~~~~~~
kernel.c:11222:6: warning: ‘tnts_len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int tnts_len;
      ^~~~~~~~

--- a/kernel.c
+++ b/kernel.c
@@ -11219,11 +11219,11 @@ show_kernel_taints(char *buf, int verbose)
        int i, bx;
        uint8_t tnt_bit;
        char tnt_true, tnt_false;
-       int tnts_len;
+       int tnts_len = 0;
        ulong tnts_addr;
        ulong tainted_mask, *tainted_mask_ptr;
        int tainted;
-       struct syment *sp;
+       struct syment *sp = NULL;
 
        if (kernel_symbol_exists("tainted")) {
                get_symbol_data("tainted", sizeof(int), &tainted);


> 
> 
> Aaron Tomlin (3):
>   kernel: consolidate show_kernel_taints()
>   kernel: Introduce is_kernel_tainted()
>   kernel: show that the kernel is tainted at init-time
> 
>  kernel.c | 210 ++++++++++++++++++++++++++-----------------------------
>  1 file changed, 98 insertions(+), 112 deletions(-)
> 
> --
> 2.31.1
> 
> --
> Crash-utility mailing list
> Crash-utility@xxxxxxxxxx
> https://listman.redhat.com/mailman/listinfo/crash-utility


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux