fix error case of xen
Subsystems (2)
PATCH 1/1 fix error case of xen
Hi,
Curret kdump-xen with makdumpfile always return 0. So if we fail to kdump, we will get $?=0. This patch improve it.
makedumpfile.c +4 -1
@@ -993,6 +993,8 @@ get_symbol_addr(char *symname)if (!strcmp (sym_name, symname)) { symbol = sym.st_value;break ; + }else if (i >= (shdr.sh_size/shdr.sh_entsize)-1 ) { +DEBUG_MSG ("Can't get symbol of %s.\n" , symname); } } out:
@@ -6146,7 +6148,8 @@ main(int argc, char *argv[]) goto out; } info->dump_level |=DL_EXCLUDE_XEN ; -return handle_xen (); +if (!handle_xen ()) + goto out; }else if (info->flag_rearrange) {if (!open_files_for_rearranging_dumpdata ())
Best Regards,
Akio Takebe
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Takebe-san,
Thank you for the patch.
Quoted 9 lines · Akio Takebe
Curret kdump-xen with makdumpfile always return 0. So if we fail to kdump, we will get $?=0. This patch improve it.
Signed-off-by Akio Takebe <[email protected]>
makedumpfile.c get_symbol_addr(char *symname) · line 997
Quoted 5 lines
makedumpfile.c +2
-0@@ -993,6 +993,8 @@ get_symbol_addr(char *symname)if (!strcmp (sym_name, symname)) { symbol = sym.st_value;break ; + }else if (i >= (shdr.sh_size/shdr.sh_entsize)-1 ) { +DEBUG_MSG ("Can't get symbol of %s.\n" , symname);
This patch is for fixing error code of xen, but the above code adds the debugging message. So the above code doesn't match its purpose. Is it necessary ?
makedumpfile.c get_symbol_addr(char *symname) · line 999
Quoted 3 lines
makedumpfile.c +2
-1-return handle_xen (); +if (!handle_xen ()) + goto out;
I guess that the above code is not enough. If handle_xen() succeeds, it should return TRUE instead of COMPLETED like the attached patch, right ?
Thanks
Ken'ichi Ohmichi
---
makedumpfile.c renamed from v1.2.5/makedumpfile.c +3 -2
@@ -5855,7 +5855,7 @@ handle_xen()MSG ("\n" );MSG ("The dumpfile is saved to %s.\n" , info->name_dumpfile); -return COMPLETED ; +return TRUE; out:return FALSE;#endif
@@ -6146,7 +6146,8 @@ main(int argc, char *argv[]) goto out; } info->dump_level |=DL_EXCLUDE_XEN ; -return handle_xen (); +if (!handle_xen ()) + goto out; }else if (info->flag_rearrange) {if (!open_files_for_rearranging_dumpdata ())
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Takebe-san,
Quoted 11 lines · Ken'ichi Ohmichi
Hi Takebe-san,
Thank you for the patch.
Quoted 6 lines · Akio Takebe
Curret kdump-xen with makdumpfile always return 0. So if we fail to kdump, we will get $?=0. This patch improve it.
Signed-off-by Akio Takebe <[email protected]>
Quoted 12 lines
makedumpfile.c get_symbol_addr(char *symname) · line 997
Quoted 8 lines
makedumpfile.c +2
-0@@ -993,6 +993,8 @@ get_symbol_addr(char *symname)if (!strcmp (sym_name, symname)) { symbol = sym.st_value;break ; + }else if (i >= (shdr.sh_size/shdr.sh_entsize)-1 ) { +DEBUG_MSG ("Can't get symbol of %s.\n" , symname);This patch is for fixing error code of xen, but the above code adds the debugging message. So the above code doesn't match its purpose. Is it necessary ?
Sorry for incomprehensible comment.
The existences of symbols depend on linux version, cpu architecture, and linux configuration (.config file). If the above code is merged, the debugging message will be big and unreadable.
Do you want to know the lacks of necessary symbol for dump filtering of Xen ? -D option prints them.
Thanks
Ken'ichi Ohmichi
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi, Ohmichi-san
Thank you for your review.
Quoted 20 lines
Quoted 7 lines
Quoted 6 lines · Akio Takebe
Curret kdump-xen with makdumpfile always return 0. So if we fail to kdump, we will get $?=0. This patch improve it.
Signed-off-by Akio Takebe <[email protected]>Quoted 12 lines
makedumpfile.c get_symbol_addr(char *symname) · line 997
Quoted 8 lines
makedumpfile.c +2
-0@@ -993,6 +993,8 @@ get_symbol_addr(char *symname)if (!strcmp (sym_name, symname)) { symbol = sym.st_value;break ; + }else if (i >= (shdr.sh_size/shdr.sh_entsize)-1 ) { +DEBUG_MSG ("Can't get symbol of %s.\n" , symname);This patch is for fixing error code of xen, but the above code adds the debugging message. So the above code doesn't match its purpose. Is it necessary ?
Quoted 8 lines
Sorry for incomprehensible comment.
The existences of symbols depend on linux version, cpu architecture, and linux configuration (.config file). If the above code is merged, the debugging message will be big and unreadable.
Do you want to know the lacks of necessary symbol for dump filtering of Xen ? -D option prints them.
Yes, that's right.
The concept of this hunk is to catch error at making vmcoreinfo file. Current vmcoreinfo doesn't show error if some necessary symbols are not included. Then we will find it at failing kdump.
So I wanted to add the debug message into the function finding symbol. Since the hunk is not important, please drop it.
Best Regards,
Akio Takebe
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi, Ohmichi-san
Quoted 7 lines
makedumpfile.c main(int argc, char *argv[]) · line 6150
Quoted 4 lines
makedumpfile.c renamed from v1.2.5/makedumpfile.c +2
-1-return handle_xen (); +if (!handle_xen ()) + goto out;I guess that the above code is not enough. If
handle_xen()succeeds, it should return TRUE instead of COMPLETED like the attached patch, right ?
You're right!
Your patch looks good, thank you very much for your review.
Best Regards,
Akio Takebe
Quoted 21 lines
Thanks
Ken'ichi OhmichiSigned-off-by Akio Takebe <[email protected]>Signed-off-by Ken'ichi Ohmichi <[email protected]>---
diff -puNbackup/v1.2.5/makedumpfile.cmakedumpfile/makedumpfile.cmakedumpfile.c renamed from v1.2.5/makedumpfile.c +1
-1@@ -5855,7 +5855,7 @@ handle_xen()MSG ("\n" );MSG ("The dumpfile is saved to %s.\n" , info->name_dumpfile); -return COMPLETED ; +return TRUE;out:
return FALSE;#endif
makedumpfile.c main(int argc, char *argv[]) · line 6153
Quoted 9 lines
makedumpfile.c renamed from v1.2.5/makedumpfile.c +2
-1@@ -6146,7 +6146,8 @@ main(int argc, char *argv[]) goto out; } info->dump_level |=DL_EXCLUDE_XEN ; -return handle_xen (); +if (!handle_xen ()) + goto out; }else if (info->flag_rearrange) {if (!open_files_for_rearranging_dumpdata ())
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Takebe-san,
Quoted 5 lines · Akio Takebe
Quoted 2 lines
I guess that the above code is not enough. If
handle_xen()succeeds, it should return TRUE instead of COMPLETED like the attached patch, right ?You're right!
Your patch looks good, thank you very much for your review.
Thank you for the comment.
I'll release the next makedumpfile which includes it.
Thanks
Ken'ichi Ohmichi
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec