summaryrefslogtreecommitdiff
path: root/0001-Updated-kernel-panic.c-Added-megumin.patch
blob: 3ad61bf44e224ddd600870dbec4706fadf7e4a6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
From 1ca4ce5a2d0992b0c324741e325d26ca624cf0be Mon Sep 17 00:00:00 2001
From: Jonas Gunz <himself@jonasgunz.de>
Date: Wed, 10 Apr 2019 20:44:14 +0200
Subject: [PATCH] Updated kernel/panic.c: Added megumin

Kernel prints ASCII art of megumin on Panic. Why? Because.
---
 kernel/panic.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 61 insertions(+), 1 deletion(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 0ae0d7332f12..0a8ad8757ab6 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -8,6 +8,7 @@
  * This function is used through-out the kernel (including mm and fs)
  * to indicate a major problem.
  */
+
 #include <linux/debug_locks.h>
 #include <linux/sched/debug.h>
 #include <linux/interrupt.h>
@@ -167,6 +168,58 @@ void panic(const char *fmt, ...)
 	int old_cpu, this_cpu;
 	bool _crash_kexec_post_notifiers = crash_kexec_post_notifiers;
 
+	const char* megumin[] = {
+	"                                                                     #=&&%%%%%%%%%%%%%%%%%%%%%%%%%%%&$                                ",
+	"                                                                   $&???????????%%%%%%%%%%%%%%%%%%%%%&                                ",
+	"                                                                 &%///???????????????????%%%%???????%%$                               ",
+	"                                                              $%////////////??????????????????????????&                               ",
+	"                                                            $%!!!!!!!!!!!!!////????????????????//////??$                              ",
+	"                                                          $?<!!<!!!!!!!!!!!!!/////////????///!/////////%                              ",
+	"                                                        $?<!/?/!<<<<!!!!!!!!!//////????/////!<!!!!!!!!!/$                             ",
+	"                                                      $%!/?%%/??!;<<<<<<<<<!!!!!!!?%%%%%?///!!<<!!!<<<<<%                             ",
+	"                                                     &<!%%?////?<:;;;;;;;;<<<<<<;!?%%%?%%%/!!?:*:<<<<<<<<$                            ",
+	"                                                   =<:!/???!!!/<;***:::::;;;;;;;*!/??????&??!!;~-~:;;;;;;?                            ",
+	"                                                  %*\"</!<<!??!;;\"\"\"\"\"*****::::::\"<!???%%??&//<$&!;,<**::::$                           ",
+	"                                                 !~~*!<<<<<<;;;~-~~~~\"\"~~\"\"***::~-<!%??////?!<=  $.-;~\"***/                           ",
+	"                                               $<-:;;<<<<!;<<\",,,``--,,`-~~\"****~``!!/////!?/<%     $!\"~~\"*=                          ",
+	"                                              $;</\"-~*:!=.-\"~.`&*$~/!;,`-~\"\"\"\"\"\"\",.~?!<//!!!?;%       $%;~~<                          ",
+	"                                             $?&\"`-``,-\"&&&%%%&%???%/*~\"\"-----~~~`.;*-*;!<<!!*?          $/*&                         ",
+	"                                            #;`,-~\"\":;&$ =&.~~~~~``,<///?%%?!;:~-`,/?.!~.-~~\"\";*$          $&&=#                      ",
+	"                                            <,-~*;?%%%%%%/<!/%%%%%%!?!%%%%%/!/!/!;;<:!:; ,,-~\"\"<~$          &&%%&$                    ",
+	"                                          $$=!//<?!/%%%?<!%%!!%%%?<?%%!?%?<?%%<%%&%%/<</?<*\"~~~:~           $%%%&%&                   ",
+	"                                         $%%%%?<?%%/<??;/%%%%!<??:!/%/!;<;!/?%/!%%?!!?%!%&%?!;*~,\"&          %%%$=%?$                 ",
+	"                                        $!?%%/<%%?&=$= ,`\":!! :~,`,,.,.,,`-\"~\"<:/!/?%%%?!%%&%//<*~*$         $%%&$$&&$                ",
+	"                                       $%%!%==.`-\":;;<!!/?%%&&%%<?<*\",  ?<~~;<;:\"`,`~*:<;??!/%&/!?<%          $&%=$$$=                ",
+	"                                    $$  .,`,.  =&&&&&&&&=   $$$$    `-~\"::*!<!////!:~` =%/;*\":!?<&%!$           &%$$$$=               ",
+	"                                $ .```. = ,-~~-``,,,.....,``,,.,.``,.,.,``,`,,.    .,--~*:;<<;\"-`. &%$           $=$$$=               ",
+	"                           $ .`,`.  .,`~\"\";;::::***~~\"\"\"\"\"\"~~~- --~~~~~~~\"\"\"\"\"\"*~***~~-``.....,~:!/%~*!&$           $$$$              ",
+	"                       $ .,,.  .,`\"******:;:*:**\"*\"`\"\"\"~~~~~~~-  `-~~~~~~~~~~~~\"~~\"****:\"-,  &!; && :~~~\";/&$                         ",
+	"                  # .,..  ,`-\"*:;;;;;::*\";:*:**\"\"\"-$~~~~~~-----.& ,`----~~~~~~\"\":\"<!?<!-\",``---~\" ;\"*., %!:\"\";/=$                     ",
+	"               $ ,,. .`\";:``/??/!!<;;::**:*\"**\"\"\"\"`&-~~~~-````-,%%  ,`-~\"*::;<!!<!<?%?%.~,,``--~~\"\"\"\"&***:*-.$??...$                  ",
+	"               .-~:;:- ?:`,`:%??/!<<;:**:**\"**~\"\"~.&`-----`,,,,,%&=.= \":;<<<<<;<;!:/?/%&<\".,``--~\"\"\"\"*~***::::;:\"-,.   $              ",
+	"         $$ `\":<:`$?*\"\"~--`,$%%?/!<;::***\"*\"*\"~~~-.&  ,```````--$$$$ $=.~*:;;<<;<::!/!?%;<*.,-?-~~****`:*:::::;;;;;;:~`, ==$          ",
+	"     $  ,~::*, /;;;:**\"~~-`,&??/!!<;::\"*\"\"\"\"\"~~~~`,&=.=``~~\"~~-~&$$$$   = ~*:;;;;*;:!</?;-/~,\"<--~~:;:%!:::::;;;;;;;;;<<<;~,.$$$      ",
+	"  $=`:;;;` %!!<<;;;:**\"~~-,`<%?/!!<;:*\"\"\"\"\"\"\"~~--`.&&,= -`~~~~--$$$$   $$$& `\":;;*:*<;!//~:!\"\"<`-~~/:*!*.:::;;;;;<<<<<<!!!!//;`?/%$   ",
+	" $?;\"&=?!/!!!!<<<;;:**\"~~-,-&%?/!!<;:\"\"\"~~~~~~---`,%$ . , ,`~--`= $$$$$        .~*\"\";:<!!/?%!?!``-~!.**<~-<<!!;*~`,. $&&?%!*~~~\"\"\":&  ",
+	"   $&&%?/!!!!!<<<;;:*\"\"~-`,~:%?/!<;:**\"~~~~~~*::- -%$$  $.$..```$$$$$$ &&  ...    -\":*;<!!/?%/<,`-~!/?*<? ?;*~\"\"***::;<<!!//?%&&=$    ",
+	"        #$$==&&%?/!<;:**\"~`/**;<!;;**\"~~~~;;:;:*~.$ $&&   .$  ===$$$$$&?$ -\"~~: $$,~*\":;<!!!?%,.,`-?;:*<;&?/?%&&==$$$                 ",
+	"                   $$=&&%%/!<\"~`,/<?/!<;:*<:;***-.$ <;$    $$$$$$$$$$$$$$ \";`.: $$`-~\"::;<!!??//,`-$</&:  $                           ",
+	"                              $$==$ ,----~:*:*\"\"-`  $= ,```.$$$$$$$$$$$$$$ .,  $$ - ~**::;<</?!!`,`$</:<   $                          ",
+	"                                          `~*\"-~~`, $$$.~`.` $$$$$$$$$$$$$$$$=&=$.=.~\"**:;;*!/<% .-&</?\"                              ",
+	"                                           --~`---,, #$$$   $$$$$$$$$$$$$$$$$&%&= %,~\"\"**::~!!;%?*!~<\"<.  $                           ",
+	"                                           ,```,-`,, =$$$=$$$$$$$$$$$$$$$$$$$$$$ % `~~\"\"***~;!:/%.<`<..$  =$                          ",
+	"                                            ,,,,,``,. ==//&$$$$$$$$ .`\"\",$$$$$$$$%.-~~\"\"**~-\"<:;%!`\"<$    =                           ",
+	"                                              ,,.,,,..$$$$$$$$$$ `\"::::;; $$$$$$$$.-~~~\"\"~-~~*;*?&-*~$$  $$                           ",
+	"                                               ....    $&$$$$$$$$ ~***~`.$$$$$$$#$`--~~\"--\"~~-*~<&!!.   $$$                           ",
+	"                                                         $$$$$$$$$$$$$$$$$$$$#    `--~~`~*:~~.`\"`*!%     $                            ",
+	"                                                            $$$$$$$$$$$$$$$$$     `--``~\"*::\",  .  .$                                 ",
+	"                                                                   $$$$$$         ,-, `*\"*:;;~     $                                  ",
+	"                                                                       #           `  -:**:;<<                                        ",
+	"                                                                                      -:;;<<!!-                                       "};
+
+	unsigned int megucnt;
+	
+
 	/*
 	 * Disable local interrupts. This will prevent panic_smp_self_stop
 	 * from deadlocking the first cpu that invokes the panic, since
@@ -205,7 +258,14 @@ void panic(const char *fmt, ...)
 	if (len && buf[len - 1] == '\n')
 		buf[len - 1] = '\0';
 
-	pr_emerg("Kernel panic - not syncing: %s\n", buf);
+	pr_emerg("MegunPanic!\n(∩ಠ益[+])⊃━☆゚Explosion!\nKernel panic - not syncing: %s\n",  buf);
+
+
+	for(megucnt = 0; megucnt < sizeof(megumin) / sizeof(char*); megucnt++)
+	{
+		pr_emerg("%s\n", megumin[megucnt]);
+	}
+
 #ifdef CONFIG_DEBUG_BUGVERBOSE
 	/*
 	 * Avoid nested stack-dumping if a panic occurs during oops processing
-- 
2.21.0