Tainted lsmod output
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
Quoted 7 lines · Márcio Oliveira
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.
Signature · 1 line
~Randy
Quoted 7 lines · Randy.Dunlap
* '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
Quoted 10 lines · Hugh Dickins
Quoted 7 lines · Randy.Dunlap
* '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' : ' ');
Signature · 1 line
~Randy
Quoted 8 lines · Randy.Dunlap
Quoted 2 lines · Hugh Dickins
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
Quoted 11 lines · Hugh Dickins
Quoted 8 lines · Randy.Dunlap
Quoted 2 lines · Hugh Dickins
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.
Signature · 1 line
~Randy
Quoted 11 lines · Hugh Dickins
Quoted 8 lines · Randy.Dunlap
Quoted 2 lines · Hugh Dickins
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'?
Quoted 7 lines · [email protected] wrote:
Quoted 6 lines · Hugh Dickins
Quoted 5 lines · Randy.Dunlap
Quoted 1 line · Hugh Dickins
The one that puzzles me greatly isn't listed there: 'G'
I guess it means GPL.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
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)?
Signature · 4 lines
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
Quoted 7 lines · Horst von Brand
Quoted 3 lines · [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);
}Quoted 3 lines · 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