Re: [PATCH] use add_taint() for setting tainted bit flags

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

 



On Sun, 11 Sep 2005 22:33:53 +0400 Alexey Dobriyan wrote:

> On Sun, Sep 11, 2005 at 10:44:31AM -0700, Randy.Dunlap wrote:
> > Use the add_taint() interface for setting tainted bit flags
> > instead of doing it manually.
> 
> > --- linux-2613-git10/kernel/module.c~use_add_taint
> > +++ linux-2613-git10/kernel/module.c
> > @@ -20,6 +20,7 @@
> >  #include <linux/module.h>
> >  #include <linux/moduleloader.h>
> >  #include <linux/init.h>
> > +#include <linux/kernel.h>
>    ^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Will something like this be accepted? Not even boot-tested yet.

Makes sense to me.

> [PATCH] Separate tainted code.
> 
> include/linux/kernel.h is overcrowded. kernel/panic.c has nothing to do
> with tainting.
> 
>  arch/i386/kernel/smpboot.c |    1 +
>  arch/x86_64/kernel/mce.c   |    1 +
>  include/linux/kernel.h     |   10 ----------
>  include/linux/tainted.h    |   15 +++++++++++++++
>  kernel/Makefile            |    2 +-
>  kernel/module.c            |    1 +
>  kernel/panic.c             |   37 -------------------------------------
>  kernel/sysctl.c            |    1 +
>  kernel/tainted.c           |   41 +++++++++++++++++++++++++++++++++++++++++
>  mm/page_alloc.c            |    1 +
>  10 files changed, 62 insertions(+), 48 deletions(-)
> 

> +/**
> + * print_tainted - return a string to represent the kernel taint state.
> + *
> + * 'P' - Proprietary module has been loaded.
> + * 'F' - Module has been forcibly loaded.
> + * 'S' - SMP with CPUs not designed for SMP.
> + * 'R' - User forced a module unload.
> + * 'M' - Machine had a machine check experience.
> + * 'B' - System has hit bad_page.
> + *
> + * The string is overwritten by the next call to print_taint().
                                                    ~~~~~~~~~~~
Please change that to 'print_tainted' too.

> + */
> +
> +const char * print_tainted(void)
> +{

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux