mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 20:06:46 +07:00
746b25b1aa
- Support 'make compile_commands.json' to generate the compilation database more easily, avoiding stale entries - Support 'make clang-analyzer' and 'make clang-tidy' for static checks using clang-tidy - Preprocess scripts/modules.lds.S to allow CONFIG options in the module linker script - Drop cc-option tests from compiler flags supported by our minimal GCC/Clang versions - Use always 12-digits commit hash for CONFIG_LOCALVERSION_AUTO=y - Use sha1 build id for both BFD linker and LLD - Improve deb-pkg for reproducible builds and rootless builds - Remove stale, useless scripts/namespace.pl - Turn -Wreturn-type warning into error - Fix build error of deb-pkg when CONFIG_MODULES=n - Replace 'hostname' command with more portable 'uname -n' - Various Makefile cleanups -----BEGIN PGP SIGNATURE----- iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAl+RfS0VHG1hc2FoaXJv eUBrZXJuZWwub3JnAAoJED2LAQed4NsGG1QP/2hzoMzK1YXErPUhGrhYU1rxz7Nu HkLTIkyKF1HPwSJf5XyNW/FTBI4SDlkNoVg/weEDCS1yFxxpvQLIck8ChzA1kIIM P+1IfBWOTzqn91XsapU2zwSno3gylphVchVIvYAB3oLUotGeMSluy1cQtBRzyA5D rj2Q7H8fzkzk3YoBcBC/BOKDlfo/usqQ1X/gsfRFwN/BJxeZSYoujNBE7KtHaDsd 8K/ggBIqmST4NBn+M8c11d8CxzvWbtG1gq3EkUL5nG8T13DsGn1EFC0SPt85bkvv f9YywfJi37HixhZzK6tXYjN/PWoiEY6z90mhd0NtZghQT7kQMiTQ3sWrM8dX3ssf phBzO94uFQDjhyxOaSSsCoI/TIciAPo4+G8PNjcaEtj63IEfhEz/dnlstYwY5Y9P Pp3aZtVjSGJwGW2u2EUYj6paFVqjf6DXQjQKPNHnsYCEidIvFTjjguRGvx9gl6mx yd8oseOsAtOEf0alRe9MMdvN17O3UrRAxgBdap7fktg02TLVRGxZIbuwKmBf29ho ORl9zeFkYBn6XQFyuItJoXy/kYFyHDaBEPYCRQcY4dwqcjZIiAc/FhYbqYthJ59L 5vLN2etmDIVSuUv1J5nBqHHGCqJChykbqg7riQ651dCNKw4gZB8ctCay2lXhBXMg 1mqOcoG5WWL7//F+ =tZRN -----END PGP SIGNATURE----- Merge tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Support 'make compile_commands.json' to generate the compilation database more easily, avoiding stale entries - Support 'make clang-analyzer' and 'make clang-tidy' for static checks using clang-tidy - Preprocess scripts/modules.lds.S to allow CONFIG options in the module linker script - Drop cc-option tests from compiler flags supported by our minimal GCC/Clang versions - Use always 12-digits commit hash for CONFIG_LOCALVERSION_AUTO=y - Use sha1 build id for both BFD linker and LLD - Improve deb-pkg for reproducible builds and rootless builds - Remove stale, useless scripts/namespace.pl - Turn -Wreturn-type warning into error - Fix build error of deb-pkg when CONFIG_MODULES=n - Replace 'hostname' command with more portable 'uname -n' - Various Makefile cleanups * tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits) kbuild: Use uname for LINUX_COMPILE_HOST detection kbuild: Only add -fno-var-tracking-assignments for old GCC versions kbuild: remove leftover comment for filechk utility treewide: remove DISABLE_LTO kbuild: deb-pkg: clean up package name variables kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n kbuild: enforce -Werror=return-type scripts: remove namespace.pl builddeb: Add support for all required debian/rules targets builddeb: Enable rootless builds builddeb: Pass -n to gzip for reproducible packages kbuild: split the build log of kallsyms kbuild: explicitly specify the build id style scripts/setlocalversion: make git describe output more reliable kbuild: remove cc-option test of -Werror=date-time kbuild: remove cc-option test of -fno-stack-check kbuild: remove cc-option test of -fno-strict-overflow kbuild: move CFLAGS_{KASAN,UBSAN,KCSAN} exports to relevant Makefiles kbuild: remove redundant CONFIG_KASAN check from scripts/Makefile.kasan kbuild: do not create built-in objects for external module builds ...
123 lines
5.0 KiB
ReStructuredText
123 lines
5.0 KiB
ReStructuredText
.. _submitchecklist:
|
|
|
|
Linux Kernel patch submission checklist
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Here are some basic things that developers should do if they want to see their
|
|
kernel patch submissions accepted more quickly.
|
|
|
|
These are all above and beyond the documentation that is provided in
|
|
:ref:`Documentation/process/submitting-patches.rst <submittingpatches>`
|
|
and elsewhere regarding submitting Linux kernel patches.
|
|
|
|
|
|
1) If you use a facility then #include the file that defines/declares
|
|
that facility. Don't depend on other header files pulling in ones
|
|
that you use.
|
|
|
|
2) Builds cleanly:
|
|
|
|
a) with applicable or modified ``CONFIG`` options ``=y``, ``=m``, and
|
|
``=n``. No ``gcc`` warnings/errors, no linker warnings/errors.
|
|
|
|
b) Passes ``allnoconfig``, ``allmodconfig``
|
|
|
|
c) Builds successfully when using ``O=builddir``
|
|
|
|
d) Any Documentation/ changes build successfully without new warnings/errors.
|
|
Use ``make htmldocs`` or ``make pdfdocs`` to check the build and
|
|
fix any issues.
|
|
|
|
3) Builds on multiple CPU architectures by using local cross-compile tools
|
|
or some other build farm.
|
|
|
|
4) ppc64 is a good architecture for cross-compilation checking because it
|
|
tends to use ``unsigned long`` for 64-bit quantities.
|
|
|
|
5) Check your patch for general style as detailed in
|
|
:ref:`Documentation/process/coding-style.rst <codingstyle>`.
|
|
Check for trivial violations with the patch style checker prior to
|
|
submission (``scripts/checkpatch.pl``).
|
|
You should be able to justify all violations that remain in
|
|
your patch.
|
|
|
|
6) Any new or modified ``CONFIG`` options do not muck up the config menu and
|
|
default to off unless they meet the exception criteria documented in
|
|
``Documentation/kbuild/kconfig-language.rst`` Menu attributes: default value.
|
|
|
|
7) All new ``Kconfig`` options have help text.
|
|
|
|
8) Has been carefully reviewed with respect to relevant ``Kconfig``
|
|
combinations. This is very hard to get right with testing -- brainpower
|
|
pays off here.
|
|
|
|
9) Check cleanly with sparse.
|
|
|
|
10) Use ``make checkstack`` and fix any problems that it finds.
|
|
|
|
.. note::
|
|
|
|
``checkstack`` does not point out problems explicitly,
|
|
but any one function that uses more than 512 bytes on the stack is a
|
|
candidate for change.
|
|
|
|
11) Include :ref:`kernel-doc <kernel_doc>` to document global kernel APIs.
|
|
(Not required for static functions, but OK there also.) Use
|
|
``make htmldocs`` or ``make pdfdocs`` to check the
|
|
:ref:`kernel-doc <kernel_doc>` and fix any issues.
|
|
|
|
12) Has been tested with ``CONFIG_PREEMPT``, ``CONFIG_DEBUG_PREEMPT``,
|
|
``CONFIG_DEBUG_SLAB``, ``CONFIG_DEBUG_PAGEALLOC``, ``CONFIG_DEBUG_MUTEXES``,
|
|
``CONFIG_DEBUG_SPINLOCK``, ``CONFIG_DEBUG_ATOMIC_SLEEP``,
|
|
``CONFIG_PROVE_RCU`` and ``CONFIG_DEBUG_OBJECTS_RCU_HEAD`` all
|
|
simultaneously enabled.
|
|
|
|
13) Has been build- and runtime tested with and without ``CONFIG_SMP`` and
|
|
``CONFIG_PREEMPT.``
|
|
|
|
16) All codepaths have been exercised with all lockdep features enabled.
|
|
|
|
17) All new ``/proc`` entries are documented under ``Documentation/``
|
|
|
|
18) All new kernel boot parameters are documented in
|
|
``Documentation/admin-guide/kernel-parameters.rst``.
|
|
|
|
19) All new module parameters are documented with ``MODULE_PARM_DESC()``
|
|
|
|
20) All new userspace interfaces are documented in ``Documentation/ABI/``.
|
|
See ``Documentation/ABI/README`` for more information.
|
|
Patches that change userspace interfaces should be CCed to
|
|
linux-api@vger.kernel.org.
|
|
|
|
21) Check that it all passes ``make headers_check``.
|
|
|
|
22) Has been checked with injection of at least slab and page-allocation
|
|
failures. See ``Documentation/fault-injection/``.
|
|
|
|
If the new code is substantial, addition of subsystem-specific fault
|
|
injection might be appropriate.
|
|
|
|
23) Newly-added code has been compiled with ``gcc -W`` (use
|
|
``make EXTRA_CFLAGS=-W``). This will generate lots of noise, but is good
|
|
for finding bugs like "warning: comparison between signed and unsigned".
|
|
|
|
24) Tested after it has been merged into the -mm patchset to make sure
|
|
that it still works with all of the other queued patches and various
|
|
changes in the VM, VFS, and other subsystems.
|
|
|
|
25) All memory barriers {e.g., ``barrier()``, ``rmb()``, ``wmb()``} need a
|
|
comment in the source code that explains the logic of what they are doing
|
|
and why.
|
|
|
|
26) If any ioctl's are added by the patch, then also update
|
|
``Documentation/userspace-api/ioctl/ioctl-number.rst``.
|
|
|
|
27) If your modified source code depends on or uses any of the kernel
|
|
APIs or features that are related to the following ``Kconfig`` symbols,
|
|
then test multiple builds with the related ``Kconfig`` symbols disabled
|
|
and/or ``=m`` (if that option is available) [not all of these at the
|
|
same time, just various/random combinations of them]:
|
|
|
|
``CONFIG_SMP``, ``CONFIG_SYSFS``, ``CONFIG_PROC_FS``, ``CONFIG_INPUT``, ``CONFIG_PCI``, ``CONFIG_BLOCK``, ``CONFIG_PM``, ``CONFIG_MAGIC_SYSRQ``,
|
|
``CONFIG_NET``, ``CONFIG_INET=n`` (but latter with ``CONFIG_NET=y``).
|