public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* what is the rationale for "TAINT_USER"?
@ 2007-10-12 12:04 Robert P. J. Day
  2007-10-12 12:18 ` Robert P. J. Day
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Robert P. J. Day @ 2007-10-12 12:04 UTC (permalink / raw)
  To: Linux Kernel Mailing List


  i can see what the theoretical purpose for it is here:

http://kerneltrap.org/node/6656

but it's not clear how it can possibly be set from userland given
that:

$ grep -r TAINT_USER *
include/linux/kernel.h:#define TAINT_USER                       (1<<6)
kernel/panic.c:                 tainted & TAINT_USER ? 'U' : ' ',
$

  am i missing something screamingly obvious?

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: what is the rationale for "TAINT_USER"?
  2007-10-12 12:04 what is the rationale for "TAINT_USER"? Robert P. J. Day
@ 2007-10-12 12:18 ` Robert P. J. Day
  2007-10-12 12:27 ` Björn Steinbrink
  2007-10-12 12:30 ` Nadia Derbey
  2 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2007-10-12 12:18 UTC (permalink / raw)
  To: Linux Kernel Mailing List

On Fri, 12 Oct 2007, Robert P. J. Day wrote:

>
>   i can see what the theoretical purpose for it is here:
>
> http://kerneltrap.org/node/6656
>
> but it's not clear how it can possibly be set from userland given
> that:
>
> $ grep -r TAINT_USER *
> include/linux/kernel.h:#define TAINT_USER                       (1<<6)
> kernel/panic.c:                 tainted & TAINT_USER ? 'U' : ' ',
> $
>
>   am i missing something screamingly obvious?

whoops, never mind -- if i read correctly, that particular flag bit
must be set *explicitly* when writing to /proc/sys/kernel/tainted.  i
originally thought it would be set by kernel code simply by the act of
writing to /proc/sys/kernel/tainted, and i couldn't see where that was
happening.  carry on.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: what is the rationale for "TAINT_USER"?
  2007-10-12 12:04 what is the rationale for "TAINT_USER"? Robert P. J. Day
  2007-10-12 12:18 ` Robert P. J. Day
@ 2007-10-12 12:27 ` Björn Steinbrink
  2007-10-12 12:37   ` Robert P. J. Day
  2007-10-12 12:30 ` Nadia Derbey
  2 siblings, 1 reply; 6+ messages in thread
From: Björn Steinbrink @ 2007-10-12 12:27 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List

On 2007.10.12 08:04:20 -0400, Robert P. J. Day wrote:
> 
>   i can see what the theoretical purpose for it is here:
> 
> http://kerneltrap.org/node/6656
> 
> but it's not clear how it can possibly be set from userland given
> that:
> 
> $ grep -r TAINT_USER *
> include/linux/kernel.h:#define TAINT_USER                       (1<<6)
> kernel/panic.c:                 tainted & TAINT_USER ? 'U' : ' ',
> $
> 
>   am i missing something screamingly obvious?

Grepping for "tainted" leads me to:

echo 32 > /proc/sys/kernel/tainted

Björn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: what is the rationale for "TAINT_USER"?
  2007-10-12 12:04 what is the rationale for "TAINT_USER"? Robert P. J. Day
  2007-10-12 12:18 ` Robert P. J. Day
  2007-10-12 12:27 ` Björn Steinbrink
@ 2007-10-12 12:30 ` Nadia Derbey
  2 siblings, 0 replies; 6+ messages in thread
From: Nadia Derbey @ 2007-10-12 12:30 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List

Robert P. J. Day wrote:
>   i can see what the theoretical purpose for it is here:
> 
> http://kerneltrap.org/node/6656
> 
> but it's not clear how it can possibly be set from userland given
> that:
> 
> $ grep -r TAINT_USER *
> include/linux/kernel.h:#define TAINT_USER                       (1<<6)
> kernel/panic.c:                 tainted & TAINT_USER ? 'U' : ' ',
> $
> 
>   am i missing something screamingly obvious?
> 
> rday

#ifdef CONFIG_PROC_SYSCTL
         {
                 .ctl_name       = KERN_TAINTED,
                 .procname       = "tainted",
                 .data           = &tainted,
                 .maxlen         = sizeof(int),
                 .mode           = 0644,
                 .proc_handler   = &proc_dointvec_taint,
         },
#endif


Regards,
Nadia

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: what is the rationale for "TAINT_USER"?
  2007-10-12 12:27 ` Björn Steinbrink
@ 2007-10-12 12:37   ` Robert P. J. Day
  2007-10-12 12:48     ` Björn Steinbrink
  0 siblings, 1 reply; 6+ messages in thread
From: Robert P. J. Day @ 2007-10-12 12:37 UTC (permalink / raw)
  To: Björn Steinbrink; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1225 bytes --]

On Fri, 12 Oct 2007, Björn Steinbrink wrote:

> On 2007.10.12 08:04:20 -0400, Robert P. J. Day wrote:
> >
> >   i can see what the theoretical purpose for it is here:
> >
> > http://kerneltrap.org/node/6656
> >
> > but it's not clear how it can possibly be set from userland given
> > that:
> >
> > $ grep -r TAINT_USER *
> > include/linux/kernel.h:#define TAINT_USER                       (1<<6)
> > kernel/panic.c:                 tainted & TAINT_USER ? 'U' : ' ',
> > $
> >
> >   am i missing something screamingly obvious?
>
> Grepping for "tainted" leads me to:
>
> echo 32 > /proc/sys/kernel/tainted

???.  i have no idea what you were grepping through to find that
phrase, but TAINT_USER would seem to be equivalent to echo 64, not
echo 32, anyway, no?

in any event, as i posted in a followup, i'm assuming that that
particular bit is meant to be set explicitly from user space using
something like:

  # echo 64 > /proc/sys/kernel/tainted

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: what is the rationale for "TAINT_USER"?
  2007-10-12 12:37   ` Robert P. J. Day
@ 2007-10-12 12:48     ` Björn Steinbrink
  0 siblings, 0 replies; 6+ messages in thread
From: Björn Steinbrink @ 2007-10-12 12:48 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List

On 2007.10.12 08:37:04 -0400, Robert P. J. Day wrote:
> On Fri, 12 Oct 2007, Björn Steinbrink wrote:
> 
> > On 2007.10.12 08:04:20 -0400, Robert P. J. Day wrote:
> > >
> > >   i can see what the theoretical purpose for it is here:
> > >
> > > http://kerneltrap.org/node/6656
> > >
> > > but it's not clear how it can possibly be set from userland given
> > > that:
> > >
> > > $ grep -r TAINT_USER *
> > > include/linux/kernel.h:#define TAINT_USER                       (1<<6)
> > > kernel/panic.c:                 tainted & TAINT_USER ? 'U' : ' ',
> > > $
> > >
> > >   am i missing something screamingly obvious?
> >
> > Grepping for "tainted" leads me to:
> >
> > echo 32 > /proc/sys/kernel/tainted
> 
> ???.  i have no idea what you were grepping through to find that
> phrase, but TAINT_USER would seem to be equivalent to echo 64, not
> echo 32, anyway, no?

Oops, yeah, 64... And it didn't lead me to the exact phrase, but the
sysctl handler, which (implicitly) led me to that command. Sorry for
the confusion.

Björn

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-12 12:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-12 12:04 what is the rationale for "TAINT_USER"? Robert P. J. Day
2007-10-12 12:18 ` Robert P. J. Day
2007-10-12 12:27 ` Björn Steinbrink
2007-10-12 12:37   ` Robert P. J. Day
2007-10-12 12:48     ` Björn Steinbrink
2007-10-12 12:30 ` Nadia Derbey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox