diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-04-10 20:40:13 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-04-10 20:40:13 +0200 |
commit | 4cbead658138d378a236d9e7da86d79693c5986b (patch) | |
tree | 0ff2b3ed944bbebd8a0d21ae83b08f9a66acf151 | |
parent | 5d83a9c89352529e6da5f27964236921dfd77870 (diff) | |
download | minilinux-4cbead658138d378a236d9e7da86d79693c5986b.tar.gz |
Added megumin.diff.
Can be apllied to the linux kernel to add a Megumin to panic message.
-rw-r--r-- | megumin.diff | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/megumin.diff b/megumin.diff new file mode 100644 index 0000000..1934f37 --- /dev/null +++ b/megumin.diff @@ -0,0 +1,87 @@ +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 |