Skip to content
Kazuhito Hagio edited this page Nov 21, 2023 · 9 revisions

https://crash-utility.github.io/


Contribution Guidelines

Basics

  • We do not accept/put new extension modules into the crash repository.

    Instead, we add them to crash extension modules page. If you want us to do it, please let us know via the crash-utility mailing list.

  • Currently we are not very interested in fixing typos in code comments, minor spaces and indents issues, minor coding style issues and etc. Please fix those when you touch the code around them.

Writing patches

  • Keep backward-compatibility.

    The crash utility has to be able to read vmcores from old kernels. To determine which symbols/members are defined in the kernel, kernel_symbol_exists() function, MEMBER_EXISTS() macro and etc. can be used. It's preferable to avoid using a kernel version to switch behavior if possible, because kernel patches can be backported to an old kernel.

  • If you add struct members to tables in global_data.c i.e. offset_table, size_table and etc., they have to be appended to the end of the tables.

    This can avoid breaking extension modules previously compiled with old definitions. Also, please add them to the corresponding dump functions like dump_offset_table() (in arbitrarily order).

  • To allocate memory, use GETBUF/FREEBUF() usually.

  • To change a gdb file, add your patch to the end of the gdb-<version>.patch. Please do not modify the patches already in the gdb-<version>.patch.

    Also, if the gdb file is already patched before adding your patch, you have to add the gdb file to the list of the gdb files restored by tar in the beginning of gdb-<version>.patch.

  • We do not care about indents (spaces or tabs) strictly, but adjusting your code to surrounding codes is better.

  • Do make clean and make warn to check if there is no compilation warning.

  • Add your Signed-off-by: tag to the commit message.

Submitting patches

  • Submit your patch to the crash-utility mailing list because the list has much more watchers than GitHub. We usually do not accept Pull Requests from GitHub.

    And the list is members-only list, emails posted by non-member will be moderated by admins. Please subscribe to the list before posting.

  • Your patch needs 2 acks from the maintainers to accept.

Clone this wiki locally