Hi there,
Anybody knows why lsmod command shows the fields "Tainted" and "Not
Tainted" and what means the "P", "PF" and other letter showed in front
of this field?
Thanks a lot.
M?rcio
On Mon, 12 Sep 2005, M?rcio Oliveira wrote:
> Hi there,
>
> Anybody knows why lsmod command shows the fields "Tainted" and "Not
> Tainted" and what means the "P", "PF" and other letter showed in front
> of this field?
>
> Thanks a lot.
There's a patch for these in current -mm.
For now, you can read kernel/panic.c comments:
* '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.
--
~Randy
On Mon, 12 Sep 2005, Randy.Dunlap wrote:
>
> * '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 one that puzzles me greatly isn't listed there: 'G'
Hugh
On Mon, 12 Sep 2005, Hugh Dickins wrote:
> On Mon, 12 Sep 2005, Randy.Dunlap wrote:
> >
> > * '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 one that puzzles me greatly isn't listed there: 'G'
I guess it means GPL.
It's just the opposite of 'P', whereas all of the others
have opposites of ' '.
snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c",
tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
tainted & TAINT_FORCED_RMMOD ? 'R' : ' ',
tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
tainted & TAINT_BAD_PAGE ? 'B' : ' ');
--
~Randy
On Mon, 12 Sep 2005, Randy.Dunlap wrote:
> On Mon, 12 Sep 2005, Hugh Dickins wrote:
> >
> > The one that puzzles me greatly isn't listed there: 'G'
>
> I guess it means GPL.
>
> It's just the opposite of 'P', whereas all of the others
> have opposites of ' '.
I guess the same, but doesn't it seem a strange kind of taint?
Hugh
On Mon, 12 Sep 2005, Hugh Dickins wrote:
> On Mon, 12 Sep 2005, Randy.Dunlap wrote:
> > On Mon, 12 Sep 2005, Hugh Dickins wrote:
> > >
> > > The one that puzzles me greatly isn't listed there: 'G'
> >
> > I guess it means GPL.
> >
> > It's just the opposite of 'P', whereas all of the others
> > have opposites of ' '.
>
> I guess the same, but doesn't it seem a strange kind of taint?
<tainted> has already been found to be non-0.
Looks like someone decided to reinforce the GPL-ness of
all modules at that point and that some other tainted flag(s)
should be set.
--
~Randy
On Mon, 12 Sep 2005 20:58:01 BST, Hugh Dickins said:
> On Mon, 12 Sep 2005, Randy.Dunlap wrote:
> > On Mon, 12 Sep 2005, Hugh Dickins wrote:
> > >
> > > The one that puzzles me greatly isn't listed there: 'G'
> >
> > I guess it means GPL.
> >
> > It's just the opposite of 'P', whereas all of the others
> > have opposites of ' '.
>
> I guess the same, but doesn't it seem a strange kind of taint?
Somebody had an automated log-parsing tool, and wanted to make sure there
were guaranteed at least 2 non-whitespace tokens on the line so they wouldn't
have to deal with parsing 'Tainted: \n'?
[email protected] wrote:
> On Mon, 12 Sep 2005 20:58:01 BST, Hugh Dickins said:
> > On Mon, 12 Sep 2005, Randy.Dunlap wrote:
> > > On Mon, 12 Sep 2005, Hugh Dickins wrote:
> > > > The one that puzzles me greatly isn't listed there: 'G'
> > > I guess it means GPL.
> > >
> > > It's just the opposite of 'P', whereas all of the others
> > > have opposites of ' '.
> > I guess the same, but doesn't it seem a strange kind of taint?
> Somebody had an automated log-parsing tool, and wanted to make sure there
> were guaranteed at least 2 non-whitespace tokens on the line so they wouldn't
> have to deal with parsing 'Tainted: \n'?
That's a lame excuse for messing up the kernel and mistifying the heck out
of users. Either "Tainted: <some gunk>" or "Not tainted" (or just nothing)?
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
On Mon, Sep 12, 2005 at 05:27:03PM -0400, Horst von Brand wrote:
> [email protected] wrote:
> > Somebody had an automated log-parsing tool, and wanted to make sure there
> > were guaranteed at least 2 non-whitespace tokens on the line so they wouldn't
> > have to deal with parsing 'Tainted: \n'?
>
> That's a lame excuse for messing up the kernel and mistifying the heck out
> of users. Either "Tainted: <some gunk>" or "Not tainted" (or just nothing)?
That's precisely what is does. It's just that when there's taint other
than proprietary-module taint, it puts a "G" in that column instead of a
blank. Which is oddly inconsistent, but whatever.
--b.
const char *print_tainted(void)
{
static char buf[20];
if (tainted) {
snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c",
tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
tainted & TAINT_FORCED_RMMOD ? 'R' : ' ',
tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
tainted & TAINT_BAD_PAGE ? 'B' : ' ');
}
else
snprintf(buf, sizeof(buf), "Not tainted");
return(buf);
}
On Mon, Sep 12, 2005 at 04:16:45PM -0400, [email protected] wrote:
> Somebody had an automated log-parsing tool, and wanted to make sure there
> were guaranteed at least 2 non-whitespace tokens on the line so they wouldn't
> have to deal with parsing 'Tainted: \n'?
That situation is impossible to hit. It'd be not tainted in that case.
The 'G' only gets shown if at least 1 other taint flag (typically 'M'
in my experience) is also set.
Dave