From: Randy Dunlap <randy.dunlap@oracle.com>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org, dzickus@redhat.com
Subject: Re: [PATCH] Add TAINT_HARDWARE_UNSUPPORTED flag
Date: Thu, 17 Jun 2010 09:13:22 -0700 [thread overview]
Message-ID: <20100617091322.b7d21473.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20100617134654.22523.39845.sendpatchset@prarit.bos.redhat.com>
On Thu, 17 Jun 2010 09:54:45 -0400 Prarit Bhargava wrote:
> This patch is similar to Theordore Ts'o's TAINT_USER patch,
> linux-2.6 commit 34f5a39899f3f3e815da64f48ddb72942d86c366.
and augmented by 92946bc72f2e74c3281b7fc12be9704d455fb3ed, so please
add similar info to Documentation/oops-tracing.txt.
> This patch introduces the TAINT_HARDWARE_UNSUPPORTED flag for distributions
> to use.
>
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> Signed-off-by: Don Zickus <dzickus@redhat.com>
>
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index 8317ec4..f722b0d 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -347,6 +347,7 @@ extern enum system_states {
> #define TAINT_WARN 9
> #define TAINT_CRAP 10
> #define TAINT_FIRMWARE_WORKAROUND 11
> +#define TAINT_HARDWARE_UNSUPPORTED 12
>
> extern void dump_stack(void) __cold;
>
> diff --git a/kernel/panic.c b/kernel/panic.c
> index 3b16cd9..394a5bb 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -180,6 +180,7 @@ static const struct tnt tnts[] = {
> { TAINT_WARN, 'W', ' ' },
> { TAINT_CRAP, 'C', ' ' },
> { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' },
> + { TAINT_HARDWARE_UNSUPPORTED, 'H', ' ' },
> };
>
> /**
> @@ -197,6 +198,7 @@ static const struct tnt tnts[] = {
> * 'W' - Taint on warning.
> * 'C' - modules from drivers/staging are loaded.
> * 'I' - Working around severe firmware bug.
> + * 'H' - Hardware is unsupported.
> *
> * The string is overwritten by the next call to print_tainted().
> */
> @@ -243,6 +245,9 @@ void add_taint(unsigned flag)
> */
> if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off())
> printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n");
> + if (flag == TAINT_HARDWARE_UNSUPPORTED)
> + printk(KERN_CRIT "WARNING: This system's hardware is "
> + "unsupported.\n");
Preferable not to split the string, so more like:
printk(KERN_CRIT
"WARNING: This system's hardware is unsupported.\n");
>
> set_bit(flag, &tainted_mask);
> }
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2010-06-17 16:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 13:54 Prarit Bhargava
2010-06-17 16:13 ` Randy Dunlap [this message]
2010-06-17 19:54 ` Prarit Bhargava
2010-06-17 20:28 ` Randy Dunlap
2010-06-21 19:21 ` Andrew Morton
2010-06-21 19:45 ` Don Zickus
2010-06-21 20:00 ` Andrew Morton
2010-06-21 20:46 ` Don Zickus
2010-06-22 15:34 ` [PATCH v3] " Don Zickus
2010-06-22 15:48 ` Alan Cox
2010-06-22 16:38 ` Matthew Garrett
2010-06-22 16:57 ` Alan Cox
2010-06-22 17:04 ` Matthew Garrett
2010-06-23 3:06 ` Paul Mundt
2010-06-23 3:30 ` Matthew Garrett
2010-06-23 20:00 ` Don Zickus
2010-06-22 18:58 ` [PATCH v4] " Don Zickus
2010-07-06 20:33 ` Don Zickus
2010-07-06 22:18 ` Alan Cox
2010-06-19 8:40 ` [PATCH] " Andi Kleen
2010-06-19 9:30 ` Alan Cox
2010-06-21 13:26 ` Don Zickus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100617091322.b7d21473.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=prarit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®