diff for duplicates of <1270319696.12516.321.camel@localhost> diff --git a/a/content_digest b/N1/content_digest index 2b4afd9..6b649f8 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "From\0Ben Hutchings <ben@decadent.org.uk>\0" "Subject\0[PATCH 1/4] panic: Allow warnings to set different taint flags\0" - "Date\0Sat, 03 Apr 2010 19:34:56 +0100\0" + "Date\0Sat, 03 Apr 2010 18:34:56 +0000\0" "To\0Jesse Barnes <jbarnes@virtuousgeek.org>\0" "Cc\0David Woodhouse <dwmw2@infradead.org>" linux-pci@vger.kernel.org @@ -322,4 +322,4 @@ "-- \n" 1.7.0.3 -c3896abb978f11d71ca45ea3171ddb238c6bed3417b259abd4149f55ff18a3f9 +e3bf18b69ad1c76412d889e2b57546bb2a3f8eaaa08d3b142e71fb61e4fbaaae
diff --git a/a/1.txt b/N2/1.txt index 37feea2..4350ce7 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -29,25 +29,27 @@ Ben. lib/bug.c | 2 +- 8 files changed, 67 insertions(+), 20 deletions(-) -diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt +diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.tx= +t index c10c022..069fab3 100644 --- a/Documentation/oops-tracing.txt +++ b/Documentation/oops-tracing.txt -@@ -256,6 +256,7 @@ characters, each representing a particular tainted value. +@@ -256,6 +256,7 @@ characters, each representing a particular tainted valu= +e. 9: 'A' if the ACPI table has been overridden. - +=20 10: 'W' if a warning has previously been issued by the kernel. + (Though some warnings may set more specific taint flags.) - +=20 11: 'C' if a staging driver has been loaded. - +=20 diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h index 75e46c5..72cfdb0 100644 --- a/arch/parisc/include/asm/bug.h +++ b/arch/parisc/include/asm/bug.h @@ -44,7 +44,7 @@ #endif - +=20 #ifdef CONFIG_DEBUG_BUGVERBOSE -#define __WARN() \ +#define __WARN_TAINT(taint) \ @@ -77,14 +79,15 @@ index 75e46c5..72cfdb0 100644 "i" (sizeof(struct bug_entry)) ); \ } while(0) #endif -diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h +diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.= +h index 2c15212..065c590 100644 --- a/arch/powerpc/include/asm/bug.h +++ b/arch/powerpc/include/asm/bug.h @@ -85,12 +85,12 @@ } \ } while (0) - +=20 -#define __WARN() do { \ +#define __WARN_TAINT(taint) do { \ __asm__ __volatile__( \ @@ -95,7 +98,7 @@ index 2c15212..065c590 100644 + "i" (BUGFLAG_TAINT(taint)), \ "i" (sizeof(struct bug_entry))); \ } while (0) - +=20 @@ -104,7 +104,7 @@ "1: "PPC_TLNEI" %4,0\n" \ _EMIT_BUG_ENTRY \ @@ -112,15 +115,15 @@ index 9beeb9d..bf90d1f 100644 @@ -46,18 +46,18 @@ unreachable(); \ } while (0) - +=20 -#define __WARN() do { \ - __EMIT_BUG(BUGFLAG_WARNING); \ +#define __WARN_TAINT(taint) do { \ + __EMIT_BUG(BUGFLAG_TAINT(taint)); \ } while (0) - +=20 #define WARN_ON(x) ({ \ - int __ret_warn_on = !!(x); \ + int __ret_warn_on =3D !!(x); \ if (__builtin_constant_p(__ret_warn_on)) { \ if (__ret_warn_on) \ - __EMIT_BUG(BUGFLAG_WARNING); \ @@ -139,7 +142,7 @@ index d02c01b..6323f86 100644 @@ -48,7 +48,7 @@ do { \ "i" (sizeof(struct bug_entry))); \ } while (0) - +=20 -#define __WARN() \ +#define __WARN_TAINT(taint) \ do { \ @@ -153,7 +156,7 @@ index d02c01b..6323f86 100644 + "i" (BUGFLAG_TAINT(taint)), \ "i" (sizeof(struct bug_entry))); \ } while (0) - +=20 diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 18c435d..c2c9ba0 100644 --- a/include/asm-generic/bug.h @@ -161,14 +164,14 @@ index 18c435d..c2c9ba0 100644 @@ -25,7 +25,10 @@ struct bug_entry { }; #endif /* __ASSEMBLY__ */ - +=20 -#define BUGFLAG_WARNING (1<<0) +#define BUGFLAG_WARNING (1 << 0) +#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8)) +#define BUG_GET_TAINT(bug) ((bug)->flags >> 8) + #endif /* CONFIG_GENERIC_BUG */ - +=20 /* @@ -56,17 +59,25 @@ struct bug_entry { * appear at runtime. Use the versions with printk format strings @@ -195,14 +198,15 @@ index 18c435d..c2c9ba0 100644 +#define __WARN_printf_taint(taint, arg...) \ + do { printk(arg); __WARN_TAINT(taint); } while (0) #endif - +=20 #ifndef WARN_ON -@@ -87,6 +98,13 @@ extern void warn_slowpath_null(const char *file, const int line); +@@ -87,6 +98,13 @@ extern void warn_slowpath_null(const char *file, const i= +nt line); }) #endif - +=20 +#define WARN_TAINT(condition, taint, format...) ({ \ -+ int __ret_warn_on = !!(condition); \ ++ int __ret_warn_on =3D !!(condition); \ + if (unlikely(__ret_warn_on)) \ + __WARN_printf_taint(taint, format); \ + unlikely(__ret_warn_on); \ @@ -211,32 +215,34 @@ index 18c435d..c2c9ba0 100644 #else /* !CONFIG_BUG */ #ifndef HAVE_ARCH_BUG #define BUG() do {} while(0) -@@ -110,6 +128,8 @@ extern void warn_slowpath_null(const char *file, const int line); +@@ -110,6 +128,8 @@ extern void warn_slowpath_null(const char *file, const = +int line); }) #endif - +=20 +#define WARN_TAINT(condition, taint, format...) WARN_ON(condition) + #endif - +=20 #define WARN_ON_ONCE(condition) ({ \ -@@ -132,6 +152,16 @@ extern void warn_slowpath_null(const char *file, const int line); +@@ -132,6 +152,16 @@ extern void warn_slowpath_null(const char *file, const= + int line); unlikely(__ret_warn_once); \ }) - +=20 +#define WARN_TAINT_ONCE(condition, taint, format...) ({ \ + static bool __warned; \ -+ int __ret_warn_once = !!(condition); \ ++ int __ret_warn_once =3D !!(condition); \ + \ + if (unlikely(__ret_warn_once)) \ + if (WARN_TAINT(!__warned, taint, format)) \ -+ __warned = true; \ ++ __warned =3D true; \ + unlikely(__ret_warn_once); \ +}) + #define WARN_ON_RATELIMIT(condition, state) \ WARN_ON((condition) && __ratelimit(state)) - +=20 diff --git a/kernel/panic.c b/kernel/panic.c index 13d966b..8b821bc 100644 --- a/kernel/panic.c @@ -244,25 +250,28 @@ index 13d966b..8b821bc 100644 @@ -365,7 +365,8 @@ struct slowpath_args { va_list args; }; - --static void warn_slowpath_common(const char *file, int line, void *caller, struct slowpath_args *args) +=20 +-static void warn_slowpath_common(const char *file, int line, void *caller,= + struct slowpath_args *args) +static void warn_slowpath_common(const char *file, int line, void *caller, + unsigned taint, struct slowpath_args *args) { const char *board; - -@@ -381,7 +382,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, struc +=20 +@@ -381,7 +382,7 @@ static void warn_slowpath_common(const char *file, int = +line, void *caller, struc print_modules(); dump_stack(); print_oops_end_marker(); - add_taint(TAINT_WARN); + add_taint(taint); } - +=20 void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) -@@ -390,14 +391,29 @@ void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) - - args.fmt = fmt; +@@ -390,14 +391,29 @@ void warn_slowpath_fmt(const char *file, int line, co= +nst char *fmt, ...) +=20 + args.fmt =3D fmt; va_start(args.args, fmt); - warn_slowpath_common(file, line, __builtin_return_address(0), &args); + warn_slowpath_common(file, line, __builtin_return_address(0), @@ -270,13 +279,13 @@ index 13d966b..8b821bc 100644 va_end(args.args); } EXPORT_SYMBOL(warn_slowpath_fmt); - +=20 +void warn_slowpath_fmt_taint(const char *file, int line, + unsigned taint, const char *fmt, ...) +{ + struct slowpath_args args; + -+ args.fmt = fmt; ++ args.fmt =3D fmt; + va_start(args.args, fmt); + warn_slowpath_common(file, line, __builtin_return_address(0), + taint, &args); @@ -296,14 +305,15 @@ diff --git a/lib/bug.c b/lib/bug.c index 300e41a..f13daf4 100644 --- a/lib/bug.c +++ b/lib/bug.c -@@ -165,7 +165,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) +@@ -165,7 +165,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, st= +ruct pt_regs *regs) (void *)bugaddr); - +=20 show_regs(regs); - add_taint(TAINT_WARN); + add_taint(BUG_GET_TAINT(bug)); return BUG_TRAP_TYPE_WARN; } - --- +=20 +--=20 1.7.0.3 diff --git a/a/content_digest b/N2/content_digest index 2b4afd9..bf43076 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -2,14 +2,14 @@ "Subject\0[PATCH 1/4] panic: Allow warnings to set different taint flags\0" "Date\0Sat, 03 Apr 2010 19:34:56 +0100\0" "To\0Jesse Barnes <jbarnes@virtuousgeek.org>\0" - "Cc\0David Woodhouse <dwmw2@infradead.org>" + "Cc\0linux-s390@vger.kernel.org" + linux-parisc@vger.kernel.org + linux-sh@vger.kernel.org linux-pci@vger.kernel.org LKML <linux-kernel@vger.kernel.org> - linux-parisc@vger.kernel.org linuxppc-dev@ozlabs.org - linux-s390@vger.kernel.org - linux-sh@vger.kernel.org - " Paul Mundt <lethal@linux-sh.org>\0" + Paul Mundt <lethal@linux-sh.org> + " David Woodhouse <dwmw2@infradead.org>\0" "\00:1\0" "b\0" "WARN() is used in some places to report firmware or hardware bugs that\n" @@ -43,25 +43,27 @@ " lib/bug.c | 2 +-\n" " 8 files changed, 67 insertions(+), 20 deletions(-)\n" "\n" - "diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt\n" + "diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.tx=\n" + "t\n" "index c10c022..069fab3 100644\n" "--- a/Documentation/oops-tracing.txt\n" "+++ b/Documentation/oops-tracing.txt\n" - "@@ -256,6 +256,7 @@ characters, each representing a particular tainted value.\n" + "@@ -256,6 +256,7 @@ characters, each representing a particular tainted valu=\n" + "e.\n" " 9: 'A' if the ACPI table has been overridden.\n" - " \n" + "=20\n" " 10: 'W' if a warning has previously been issued by the kernel.\n" "+ (Though some warnings may set more specific taint flags.)\n" - " \n" + "=20\n" " 11: 'C' if a staging driver has been loaded.\n" - " \n" + "=20\n" "diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h\n" "index 75e46c5..72cfdb0 100644\n" "--- a/arch/parisc/include/asm/bug.h\n" "+++ b/arch/parisc/include/asm/bug.h\n" "@@ -44,7 +44,7 @@\n" " #endif\n" - " \n" + "=20\n" " #ifdef CONFIG_DEBUG_BUGVERBOSE\n" "-#define __WARN()\t\t\t\t\t\t\t\\\n" "+#define __WARN_TAINT(taint)\t\t\t\t\t\t\\\n" @@ -91,14 +93,15 @@ " \t\t\t \"i\" (sizeof(struct bug_entry)) );\t\t\\\n" " \t} while(0)\n" " #endif\n" - "diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h\n" + "diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.=\n" + "h\n" "index 2c15212..065c590 100644\n" "--- a/arch/powerpc/include/asm/bug.h\n" "+++ b/arch/powerpc/include/asm/bug.h\n" "@@ -85,12 +85,12 @@\n" " \t}\t\t\t\t\t\t\t\\\n" " } while (0)\n" - " \n" + "=20\n" "-#define __WARN() do {\t\t\t\t\t\t\\\n" "+#define __WARN_TAINT(taint) do {\t\t\t\t\\\n" " \t__asm__ __volatile__(\t\t\t\t\t\\\n" @@ -109,7 +112,7 @@ "+\t\t \"i\" (BUGFLAG_TAINT(taint)),\t\t\t\\\n" " \t\t \"i\" (sizeof(struct bug_entry)));\t\t\\\n" " } while (0)\n" - " \n" + "=20\n" "@@ -104,7 +104,7 @@\n" " \t\t\"1:\t\"PPC_TLNEI\"\t%4,0\\n\"\t\t\t\\\n" " \t\t_EMIT_BUG_ENTRY\t\t\t\t\t\\\n" @@ -126,15 +129,15 @@ "@@ -46,18 +46,18 @@\n" " \tunreachable();\t\t\t\t\t\\\n" " } while (0)\n" - " \n" + "=20\n" "-#define __WARN() do {\t\t\t\t\t\\\n" "-\t__EMIT_BUG(BUGFLAG_WARNING);\t\t\t\\\n" "+#define __WARN_TAINT(taint) do {\t\t\t\\\n" "+\t__EMIT_BUG(BUGFLAG_TAINT(taint));\t\t\\\n" " } while (0)\n" - " \n" + "=20\n" " #define WARN_ON(x) ({\t\t\t\t\t\\\n" - " \tint __ret_warn_on = !!(x);\t\t\t\\\n" + " \tint __ret_warn_on =3D !!(x);\t\t\t\\\n" " \tif (__builtin_constant_p(__ret_warn_on)) {\t\\\n" " \t\tif (__ret_warn_on)\t\t\t\\\n" "-\t\t\t__EMIT_BUG(BUGFLAG_WARNING);\t\\\n" @@ -153,7 +156,7 @@ "@@ -48,7 +48,7 @@ do {\t\t\t\t\t\t\t\\\n" " \t\t \"i\" (sizeof(struct bug_entry)));\t\\\n" " } while (0)\n" - " \n" + "=20\n" "-#define __WARN()\t\t\t\t\t\\\n" "+#define __WARN_TAINT(taint)\t\t\t\t\\\n" " do {\t\t\t\t\t\t\t\\\n" @@ -167,7 +170,7 @@ "+\t\t \"i\" (BUGFLAG_TAINT(taint)),\t\t\\\n" " \t\t \"i\" (sizeof(struct bug_entry)));\t\\\n" " } while (0)\n" - " \n" + "=20\n" "diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h\n" "index 18c435d..c2c9ba0 100644\n" "--- a/include/asm-generic/bug.h\n" @@ -175,14 +178,14 @@ "@@ -25,7 +25,10 @@ struct bug_entry {\n" " };\n" " #endif\t\t/* __ASSEMBLY__ */\n" - " \n" + "=20\n" "-#define BUGFLAG_WARNING\t(1<<0)\n" "+#define BUGFLAG_WARNING\t\t(1 << 0)\n" "+#define BUGFLAG_TAINT(taint)\t(BUGFLAG_WARNING | ((taint) << 8))\n" "+#define BUG_GET_TAINT(bug)\t((bug)->flags >> 8)\n" "+\n" " #endif\t/* CONFIG_GENERIC_BUG */\n" - " \n" + "=20\n" " /*\n" "@@ -56,17 +59,25 @@ struct bug_entry {\n" " * appear at runtime. Use the versions with printk format strings\n" @@ -209,14 +212,15 @@ "+#define __WARN_printf_taint(taint, arg...)\t\t\t\t\\\n" "+\tdo { printk(arg); __WARN_TAINT(taint); } while (0)\n" " #endif\n" - " \n" + "=20\n" " #ifndef WARN_ON\n" - "@@ -87,6 +98,13 @@ extern void warn_slowpath_null(const char *file, const int line);\n" + "@@ -87,6 +98,13 @@ extern void warn_slowpath_null(const char *file, const i=\n" + "nt line);\n" " })\n" " #endif\n" - " \n" + "=20\n" "+#define WARN_TAINT(condition, taint, format...) ({\t\t\t\\\n" - "+\tint __ret_warn_on = !!(condition);\t\t\t\t\\\n" + "+\tint __ret_warn_on =3D !!(condition);\t\t\t\t\\\n" "+\tif (unlikely(__ret_warn_on))\t\t\t\t\t\\\n" "+\t\t__WARN_printf_taint(taint, format);\t\t\t\\\n" "+\tunlikely(__ret_warn_on);\t\t\t\t\t\\\n" @@ -225,32 +229,34 @@ " #else /* !CONFIG_BUG */\n" " #ifndef HAVE_ARCH_BUG\n" " #define BUG() do {} while(0)\n" - "@@ -110,6 +128,8 @@ extern void warn_slowpath_null(const char *file, const int line);\n" + "@@ -110,6 +128,8 @@ extern void warn_slowpath_null(const char *file, const =\n" + "int line);\n" " })\n" " #endif\n" - " \n" + "=20\n" "+#define WARN_TAINT(condition, taint, format...) WARN_ON(condition)\n" "+\n" " #endif\n" - " \n" + "=20\n" " #define WARN_ON_ONCE(condition)\t({\t\t\t\t\\\n" - "@@ -132,6 +152,16 @@ extern void warn_slowpath_null(const char *file, const int line);\n" + "@@ -132,6 +152,16 @@ extern void warn_slowpath_null(const char *file, const=\n" + " int line);\n" " \tunlikely(__ret_warn_once);\t\t\t\t\\\n" " })\n" - " \n" + "=20\n" "+#define WARN_TAINT_ONCE(condition, taint, format...)\t({\t\\\n" "+\tstatic bool __warned;\t\t\t\t\t\\\n" - "+\tint __ret_warn_once = !!(condition);\t\t\t\\\n" + "+\tint __ret_warn_once =3D !!(condition);\t\t\t\\\n" "+\t\t\t\t\t\t\t\t\\\n" "+\tif (unlikely(__ret_warn_once))\t\t\t\t\\\n" "+\t\tif (WARN_TAINT(!__warned, taint, format))\t\\\n" - "+\t\t\t__warned = true;\t\t\t\\\n" + "+\t\t\t__warned =3D true;\t\t\t\\\n" "+\tunlikely(__ret_warn_once);\t\t\t\t\\\n" "+})\n" "+\n" " #define WARN_ON_RATELIMIT(condition, state)\t\t\t\\\n" " \t\tWARN_ON((condition) && __ratelimit(state))\n" - " \n" + "=20\n" "diff --git a/kernel/panic.c b/kernel/panic.c\n" "index 13d966b..8b821bc 100644\n" "--- a/kernel/panic.c\n" @@ -258,25 +264,28 @@ "@@ -365,7 +365,8 @@ struct slowpath_args {\n" " \tva_list args;\n" " };\n" - " \n" - "-static void warn_slowpath_common(const char *file, int line, void *caller, struct slowpath_args *args)\n" + "=20\n" + "-static void warn_slowpath_common(const char *file, int line, void *caller,=\n" + " struct slowpath_args *args)\n" "+static void warn_slowpath_common(const char *file, int line, void *caller,\n" "+\t\t\t\t unsigned taint, struct slowpath_args *args)\n" " {\n" " \tconst char *board;\n" - " \n" - "@@ -381,7 +382,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, struc\n" + "=20\n" + "@@ -381,7 +382,7 @@ static void warn_slowpath_common(const char *file, int =\n" + "line, void *caller, struc\n" " \tprint_modules();\n" " \tdump_stack();\n" " \tprint_oops_end_marker();\n" "-\tadd_taint(TAINT_WARN);\n" "+\tadd_taint(taint);\n" " }\n" - " \n" + "=20\n" " void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)\n" - "@@ -390,14 +391,29 @@ void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)\n" - " \n" - " \targs.fmt = fmt;\n" + "@@ -390,14 +391,29 @@ void warn_slowpath_fmt(const char *file, int line, co=\n" + "nst char *fmt, ...)\n" + "=20\n" + " \targs.fmt =3D fmt;\n" " \tva_start(args.args, fmt);\n" "-\twarn_slowpath_common(file, line, __builtin_return_address(0), &args);\n" "+\twarn_slowpath_common(file, line, __builtin_return_address(0),\n" @@ -284,13 +293,13 @@ " \tva_end(args.args);\n" " }\n" " EXPORT_SYMBOL(warn_slowpath_fmt);\n" - " \n" + "=20\n" "+void warn_slowpath_fmt_taint(const char *file, int line,\n" "+\t\t\t unsigned taint, const char *fmt, ...)\n" "+{\n" "+\tstruct slowpath_args args;\n" "+\n" - "+\targs.fmt = fmt;\n" + "+\targs.fmt =3D fmt;\n" "+\tva_start(args.args, fmt);\n" "+\twarn_slowpath_common(file, line, __builtin_return_address(0),\n" "+\t\t\t taint, &args);\n" @@ -310,16 +319,17 @@ "index 300e41a..f13daf4 100644\n" "--- a/lib/bug.c\n" "+++ b/lib/bug.c\n" - "@@ -165,7 +165,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)\n" + "@@ -165,7 +165,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, st=\n" + "ruct pt_regs *regs)\n" " \t\t\t (void *)bugaddr);\n" - " \n" + "=20\n" " \t\tshow_regs(regs);\n" "-\t\tadd_taint(TAINT_WARN);\n" "+\t\tadd_taint(BUG_GET_TAINT(bug));\n" " \t\treturn BUG_TRAP_TYPE_WARN;\n" " \t}\n" - " \n" - "-- \n" + "=20\n" + "--=20\n" 1.7.0.3 -c3896abb978f11d71ca45ea3171ddb238c6bed3417b259abd4149f55ff18a3f9 +f96387552d7b637fdeb04aea8d288b9ac9daf41d518f47c56609387c6881c2fb
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.