Skip to content
Kazuhito Hagio edited this page Dec 24, 2021 · 9 revisions

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


Contribution Guidelines

Basics

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, etc. can be used.

  • 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