All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
@ 2009-06-19 19:57 Tim Abbott
  2009-06-19 20:11 ` Peter Zijlstra
  2009-06-22 17:46 ` Chuck Ebbert
  0 siblings, 2 replies; 10+ messages in thread
From: Tim Abbott @ 2009-06-19 19:57 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux kernel mailing list, Arjan van de Ven, Alexey Dobriyan,
	Andrew Morton, Anders Kaseorg, Jeffrey B Arnold

Distributions and kerneloops.org have requested that the Ksplice
rebootless update system taint the kernel the first time that a
Ksplice update is installed, in order to assist with bug triage.

Ksplice uses a new taint flag, TAINT_KSPLICE, displayed as 'K', for
this purpose.

We would like to confirm that this use of taint meets with the
community's approval and get this taint flag registered in mainline.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
---
 include/linux/kernel.h |    1 +
 kernel/panic.c         |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index c5a71c3..be77585 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -330,6 +330,7 @@ extern enum system_states {
 #define TAINT_OVERRIDDEN_ACPI_TABLE	8
 #define TAINT_WARN			9
 #define TAINT_CRAP			10
+#define TAINT_KSPLICE			11
 
 extern void dump_stack(void) __cold;
 
diff --git a/kernel/panic.c b/kernel/panic.c
index 984b3ec..c2ea780 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -160,6 +160,7 @@ static const struct tnt tnts[] = {
 	{ TAINT_OVERRIDDEN_ACPI_TABLE,	'A', ' ' },
 	{ TAINT_WARN,			'W', ' ' },
 	{ TAINT_CRAP,			'C', ' ' },
+	{ TAINT_KSPLICE,		'K', ' ' },
 };
 
 /**
@@ -176,6 +177,7 @@ static const struct tnt tnts[] = {
  *  'A' - ACPI table overridden.
  *  'W' - Taint on warning.
  *  'C' - modules from drivers/staging are loaded.
+ *  'K' - A Ksplice update has been loaded.
  *
  *	The string is overwritten by the next call to print_taint().
  */
-- 
1.6.3.1

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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-19 19:57 [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded Tim Abbott
@ 2009-06-19 20:11 ` Peter Zijlstra
  2009-06-22  7:51   ` Jon Masters
  2009-06-22 17:46 ` Chuck Ebbert
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Zijlstra @ 2009-06-19 20:11 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Arjan van de Ven,
	Alexey Dobriyan, Andrew Morton, Anders Kaseorg, Jeffrey B Arnold

On Fri, 2009-06-19 at 15:57 -0400, Tim Abbott wrote:
> Distributions and kerneloops.org have requested that the Ksplice
> rebootless update system taint the kernel the first time that a
> Ksplice update is installed, in order to assist with bug triage.
> 
> Ksplice uses a new taint flag, TAINT_KSPLICE, displayed as 'K', for
> this purpose.
> 
> We would like to confirm that this use of taint meets with the
> community's approval and get this taint flag registered in mainline.
> 
> Signed-off-by: Tim Abbott <tabbott@ksplice.com>

Since all of ksplice is still out-of-tree, it seems to me this taint
should be too.

Just add it to the ksplice patch. That way it will get into mainline
if/when ksplice will.

> ---
>  include/linux/kernel.h |    1 +
>  kernel/panic.c         |    2 ++
>  2 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index c5a71c3..be77585 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -330,6 +330,7 @@ extern enum system_states {
>  #define TAINT_OVERRIDDEN_ACPI_TABLE	8
>  #define TAINT_WARN			9
>  #define TAINT_CRAP			10
> +#define TAINT_KSPLICE			11
>  
>  extern void dump_stack(void) __cold;
>  
> diff --git a/kernel/panic.c b/kernel/panic.c
> index 984b3ec..c2ea780 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -160,6 +160,7 @@ static const struct tnt tnts[] = {
>  	{ TAINT_OVERRIDDEN_ACPI_TABLE,	'A', ' ' },
>  	{ TAINT_WARN,			'W', ' ' },
>  	{ TAINT_CRAP,			'C', ' ' },
> +	{ TAINT_KSPLICE,		'K', ' ' },
>  };
>  
>  /**
> @@ -176,6 +177,7 @@ static const struct tnt tnts[] = {
>   *  'A' - ACPI table overridden.
>   *  'W' - Taint on warning.
>   *  'C' - modules from drivers/staging are loaded.
> + *  'K' - A Ksplice update has been loaded.
>   *
>   *	The string is overwritten by the next call to print_taint().
>   */


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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-19 20:11 ` Peter Zijlstra
@ 2009-06-22  7:51   ` Jon Masters
  2009-06-22  8:50     ` Peter Zijlstra
  0 siblings, 1 reply; 10+ messages in thread
From: Jon Masters @ 2009-06-22  7:51 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Tim Abbott, Linus Torvalds, Linux kernel mailing list,
	Arjan van de Ven, Alexey Dobriyan, Andrew Morton, Anders Kaseorg,
	Jeffrey B Arnold

On Fri, 2009-06-19 at 22:11 +0200, Peter Zijlstra wrote:
> On Fri, 2009-06-19 at 15:57 -0400, Tim Abbott wrote:
> > Distributions and kerneloops.org have requested that the Ksplice
> > rebootless update system taint the kernel the first time that a
> > Ksplice update is installed, in order to assist with bug triage.
> > 
> > Ksplice uses a new taint flag, TAINT_KSPLICE, displayed as 'K', for
> > this purpose.
> > 
> > We would like to confirm that this use of taint meets with the
> > community's approval and get this taint flag registered in mainline.
> > 
> > Signed-off-by: Tim Abbott <tabbott@ksplice.com>
> 
> Since all of ksplice is still out-of-tree, it seems to me this taint
> should be too.

Respectfully, I disagree.

The thing is, distribution maintainers and others would really benefit
from knowing if this stuff is loaded today, before the possible eventual
addition of ksplice upstream. We already have tainting for non-GPL code
and I don't see us arguing about the fact that the kernel has no non-GPL
code actually shipping in it to cause such taints to get set :)

Jon.



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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-22  7:51   ` Jon Masters
@ 2009-06-22  8:50     ` Peter Zijlstra
  2009-06-22 13:32       ` Tim Abbott
  2009-06-22 21:25       ` Jon Masters
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Zijlstra @ 2009-06-22  8:50 UTC (permalink / raw)
  To: Jon Masters
  Cc: Tim Abbott, Linus Torvalds, Linux kernel mailing list,
	Arjan van de Ven, Alexey Dobriyan, Andrew Morton, Anders Kaseorg,
	Jeffrey B Arnold

On Mon, 2009-06-22 at 03:51 -0400, Jon Masters wrote:
> On Fri, 2009-06-19 at 22:11 +0200, Peter Zijlstra wrote:
> > On Fri, 2009-06-19 at 15:57 -0400, Tim Abbott wrote:
> > > Distributions and kerneloops.org have requested that the Ksplice
> > > rebootless update system taint the kernel the first time that a
> > > Ksplice update is installed, in order to assist with bug triage.
> > > 
> > > Ksplice uses a new taint flag, TAINT_KSPLICE, displayed as 'K', for
> > > this purpose.
> > > 
> > > We would like to confirm that this use of taint meets with the
> > > community's approval and get this taint flag registered in mainline.
> > > 
> > > Signed-off-by: Tim Abbott <tabbott@ksplice.com>
> > 
> > Since all of ksplice is still out-of-tree, it seems to me this taint
> > should be too.
> 
> Respectfully, I disagree.
> 
> The thing is, distribution maintainers and others would really benefit
> from knowing if this stuff is loaded today, before the possible eventual
> addition of ksplice upstream. We already have tainting for non-GPL code
> and I don't see us arguing about the fact that the kernel has no non-GPL
> code actually shipping in it to cause such taints to get set :)

But without ksplice patches you cannot ksplice, right? That is, there is
a non trivial patch to the kernel to make this happen afaik. If distros
ship that, then they can add this taint flag as well. No need to burden
mainline with any of that until it ksplice proper makes it in.





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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-22  8:50     ` Peter Zijlstra
@ 2009-06-22 13:32       ` Tim Abbott
  2009-06-22 14:53         ` Andrew Morton
  2009-06-22 21:25       ` Jon Masters
  1 sibling, 1 reply; 10+ messages in thread
From: Tim Abbott @ 2009-06-22 13:32 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Jon Masters, Linus Torvalds, Linux kernel mailing list,
	Arjan van de Ven, Alexey Dobriyan, Andrew Morton, Anders Kaseorg,
	Jeffrey B Arnold, Waseem S. Daher

On Mon, 22 Jun 2009, Peter Zijlstra wrote:

> But without ksplice patches you cannot ksplice, right? That is, there is
> a non trivial patch to the kernel to make this happen afaik. If distros
> ship that, then they can add this taint flag as well. No need to burden
> mainline with any of that until it ksplice proper makes it in.

No, Ksplice can patch completely unmodified upstream and distribution 
kernels.

	-Tim Abbott



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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-22 13:32       ` Tim Abbott
@ 2009-06-22 14:53         ` Andrew Morton
  2009-06-23 18:56           ` Tim Abbott
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2009-06-22 14:53 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Peter Zijlstra, Jon Masters, Linus Torvalds,
	Linux kernel mailing list, Arjan van de Ven, Alexey Dobriyan,
	Anders Kaseorg, Jeffrey B Arnold, Waseem S. Daher

On Mon, 22 Jun 2009 09:32:13 -0400 (EDT) Tim Abbott <tabbott@ksplice.com> wrote:

> On Mon, 22 Jun 2009, Peter Zijlstra wrote:
> 
> > But without ksplice patches you cannot ksplice, right? That is, there is
> > a non trivial patch to the kernel to make this happen afaik. If distros
> > ship that, then they can add this taint flag as well. No need to burden
> > mainline with any of that until it ksplice proper makes it in.
> 
> No, Ksplice can patch completely unmodified upstream and distribution 
> kernels.
> 

Have the ksplice people considered using /proc/sys/kernel/tainted and
TAINT_USER?



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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-19 19:57 [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded Tim Abbott
  2009-06-19 20:11 ` Peter Zijlstra
@ 2009-06-22 17:46 ` Chuck Ebbert
  2009-06-22 19:59   ` Maxim Levitsky
  1 sibling, 1 reply; 10+ messages in thread
From: Chuck Ebbert @ 2009-06-22 17:46 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Arjan van de Ven,
	Alexey Dobriyan, Andrew Morton, Anders Kaseorg, Jeffrey B Arnold

On Fri, 19 Jun 2009 15:57:21 -0400 (EDT)
Tim Abbott <tabbott@ksplice.com> wrote:

> Distributions and kerneloops.org have requested that the Ksplice
> rebootless update system taint the kernel the first time that a
> Ksplice update is installed, in order to assist with bug triage.
> 
> Ksplice uses a new taint flag, TAINT_KSPLICE, displayed as 'K', for
> this purpose.
> 
> We would like to confirm that this use of taint meets with the
> community's approval and get this taint flag registered in mainline.
> 

How about a more generic taint flag that just says some user program has
patched the running kernel?

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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-22 17:46 ` Chuck Ebbert
@ 2009-06-22 19:59   ` Maxim Levitsky
  0 siblings, 0 replies; 10+ messages in thread
From: Maxim Levitsky @ 2009-06-22 19:59 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Tim Abbott, Linus Torvalds, Linux kernel mailing list,
	Arjan van de Ven, Alexey Dobriyan, Andrew Morton, Anders Kaseorg,
	Jeffrey B Arnold

On Mon, 2009-06-22 at 13:46 -0400, Chuck Ebbert wrote:
> On Fri, 19 Jun 2009 15:57:21 -0400 (EDT)
> Tim Abbott <tabbott@ksplice.com> wrote:
> 
> > Distributions and kerneloops.org have requested that the Ksplice
> > rebootless update system taint the kernel the first time that a
> > Ksplice update is installed, in order to assist with bug triage.
> > 
> > Ksplice uses a new taint flag, TAINT_KSPLICE, displayed as 'K', for
> > this purpose.
> > 
> > We would like to confirm that this use of taint meets with the
> > community's approval and get this taint flag registered in mainline.
> > 
> 
> How about a more generic taint flag that just says some user program has
> patched the running kernel?
Like TAINT_ROOTKIT :-)



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


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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-22  8:50     ` Peter Zijlstra
  2009-06-22 13:32       ` Tim Abbott
@ 2009-06-22 21:25       ` Jon Masters
  1 sibling, 0 replies; 10+ messages in thread
From: Jon Masters @ 2009-06-22 21:25 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Tim Abbott, Linus Torvalds, Linux kernel mailing list,
	Arjan van de Ven, Alexey Dobriyan, Andrew Morton, Anders Kaseorg,
	Jeffrey B Arnold

On Mon, 2009-06-22 at 10:50 +0200, Peter Zijlstra wrote:
> On Mon, 2009-06-22 at 03:51 -0400, Jon Masters wrote:
> > On Fri, 2009-06-19 at 22:11 +0200, Peter Zijlstra wrote:
> > > On Fri, 2009-06-19 at 15:57 -0400, Tim Abbott wrote:
> > > > Distributions and kerneloops.org have requested that the Ksplice
> > > > rebootless update system taint the kernel the first time that a
> > > > Ksplice update is installed, in order to assist with bug triage.
> > > > 
> > > > Ksplice uses a new taint flag, TAINT_KSPLICE, displayed as 'K', for
> > > > this purpose.
> > > > 
> > > > We would like to confirm that this use of taint meets with the
> > > > community's approval and get this taint flag registered in mainline.
> > > > 
> > > > Signed-off-by: Tim Abbott <tabbott@ksplice.com>
> > > 
> > > Since all of ksplice is still out-of-tree, it seems to me this taint
> > > should be too.
> > 
> > Respectfully, I disagree.
> > 
> > The thing is, distribution maintainers and others would really benefit
> > from knowing if this stuff is loaded today, before the possible eventual
> > addition of ksplice upstream. We already have tainting for non-GPL code
> > and I don't see us arguing about the fact that the kernel has no non-GPL
> > code actually shipping in it to cause such taints to get set :)
> 
> But without ksplice patches you cannot ksplice, right?

Nah. This is a common missunderstanding. Ksplice actually doesn't need
any in-kernel patches, but it does include a rather uncomfortable (from
upstream PoV) disassembler to help it with patching. To avoid this, the
Ksplice guys are looking to get some of the split function sections
stuff, etc. upstream so that they don't need the extraneous stuff.

> That is, there is
> a non trivial patch to the kernel to make this happen afaik.

Well, actually there are several ways that could get in upstream - even
just the base bits are useful. Upstream may never take the shadow data
structure tracking kABI stuff that also comes with Ksplice (I can,
however, think of a few distributions that might be interested in adding
those bits for themselves sometime), but that can live in their module.

> If distros
> ship that, then they can add this taint flag as well. No need to burden
> mainline with any of that until it ksplice proper makes it in.

Nah. We need a flag. It's a really nice way to know "is this backtrace
I'm seeing coming from the kernel that I shipped?". Just imagine you're
one of the folks in $enterprise_vendor who needs to figure this out
(sure you should get there from the linked module list if you've half a
brain, but perhaps "you" is actually an automated tool, like sosreport
on RH systems and I'm sure other vendors have their own equivalents).

Jon.



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

* Re: [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded.
  2009-06-22 14:53         ` Andrew Morton
@ 2009-06-23 18:56           ` Tim Abbott
  0 siblings, 0 replies; 10+ messages in thread
From: Tim Abbott @ 2009-06-23 18:56 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Peter Zijlstra, Jon Masters, Linus Torvalds,
	Linux kernel mailing list, Arjan van de Ven, Alexey Dobriyan,
	Anders Kaseorg, Jeffrey B Arnold, Waseem S. Daher, devel

On Mon, 22 Jun 2009, Andrew Morton wrote:
> Have the ksplice people considered using /proc/sys/kernel/tainted and
> TAINT_USER?

We're thinking about using TAINT_USER to indicate when a user has 
installed a Ksplice update that they generated on their own.  We'd like to 
be able to distinguish between the cases (1) where a user has generated a 
potentially-bad Ksplice update by providing their own naughty patch and 
(2) where a user is running binary Ksplice updates provided by a vendor 
that is taking care to use Ksplice properly.  Our patch currently uses 
TAINT_KSPLICE to indicate whether _any_ Ksplice update has been applied.

	-Tim Abbott



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

end of thread, other threads:[~2009-06-23 18:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-19 19:57 [PATCH] Add new TAINT_KSPLICE flag for when a Ksplice update has been loaded Tim Abbott
2009-06-19 20:11 ` Peter Zijlstra
2009-06-22  7:51   ` Jon Masters
2009-06-22  8:50     ` Peter Zijlstra
2009-06-22 13:32       ` Tim Abbott
2009-06-22 14:53         ` Andrew Morton
2009-06-23 18:56           ` Tim Abbott
2009-06-22 21:25       ` Jon Masters
2009-06-22 17:46 ` Chuck Ebbert
2009-06-22 19:59   ` Maxim Levitsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.