- Nov 28, 2023
-
-
Gustavo A. R. Silva authored
It seems that we have finished addressing all the remaining issues regarding -Wstringop-overflow. So, we are now in good shape to enable this compiler option globally. Signed-off-by:
Gustavo A. R. Silva <gustavoars@kernel.org>
-
Masahiro Yamada authored
The rpm-pkg and deb-pkg targets have transitioned to using 'git archive' for tarball creation. Although the old cmd_src_tar is still used by snap-pkg, there is no need to pack and unpack a tarball solely for passing the source to snapcraft. Instead, you can use 'source-type: local' to tell the source location to snapcraft. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
- Nov 27, 2023
-
-
Heiko Carstens authored
The checkstack script omits all functions with a stack usage of less than 100 bytes. However the script already has support for a parameter which allows to override the default, but it cannot be set with $ make checkstack Add a MINSTACKSIZE parameter which allows to change the default. This might be useful in order to print the stack usage of all functions, or only those with large stack usage: $ make checkstack MINSTACKSIZE=0 $ make checkstack MINSTACKSIZE=800 Link: https://lkml.kernel.org/r/20231120183719.2188479-4-hca@linux.ibm.com Signed-off-by:
Heiko Carstens <hca@linux.ibm.com> Cc: Maninder Singh <maninder1.s@samsung.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Vaneet Narang <v.narang@samsung.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
-
Linus Torvalds authored
-
- Nov 19, 2023
-
-
Linus Torvalds authored
-
- Nov 13, 2023
-
-
Linus Torvalds authored
-
- Oct 30, 2023
-
-
Linus Torvalds authored
-
- Oct 28, 2023
-
-
Simon Glass authored
These should add a hyphen to indicate that it makes a adjective. Fix them. Signed-off-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
Masahiro Yamada authored
scripts/pahole-flags.sh is executed so many times. You can confirm it, as follows: $ cat <<EOF >> scripts/pahole-flags.sh > echo "scripts/pahole-flags.sh was executed" >&2 > EOF $ make -s scripts/pahole-flags.sh was executed scripts/pahole-flags.sh was executed scripts/pahole-flags.sh was executed scripts/pahole-flags.sh was executed scripts/pahole-flags.sh was executed [ lots of repeated lines... ] This scripts is executed more than 20 times during the kernel build because PAHOLE_FLAGS is a recursively expanded variable and exported to sub-processes. With GNU Make >= 4.4, it is executed more than 60 times because exported variables are also passed to other $(shell ) invocations. Without careful coding, it is known to cause an exponential fork explosion. [1] The use of $(shell ) in an exported recursive variable is likely wrong because $(shell ) is always evaluated due to the 'export' keyword, and the evaluation can occur multiple times by the nature of recursive variables. Convert the shell script to a Makefile, which is included only when CONFIG_DEBUG_INFO_BTF=y. [1]: https://savannah.gnu.org/bugs/index.php?64746 Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Alan Maguire <alan.maguire@oracle.com> Tested-by:
Alan Maguire <alan.maguire@oracle.com> Reviewed-by:
Nicolas Schier <n.schier@avm.de> Tested-by:
Miguel Ojeda <ojeda@kernel.org> Acked-by:
Miguel Ojeda <ojeda@kernel.org> Acked-by:
Jiri Olsa <jolsa@kernel.org> Reviewed-by:
Martin Rodriguez Reboredo <yakoyoku@gmail.com>
-
Masahiro Yamada authored
Now that vdso_install does not depend on any in-tree build artifact, it no longer needs a compiler, making no-compiler-targets the same as no-sync-config-targets. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu>
-
Masahiro Yamada authored
Currently, there is no standard implementation for vdso_install, leading to various issues: 1. Code duplication Many architectures duplicate similar code just for copying files to the install destination. Some architectures (arm, sparc, x86) create build-id symlinks, introducing more code duplication. 2. Unintended updates of in-tree build artifacts The vdso_install rule depends on the vdso files to install. It may update in-tree build artifacts. This can be problematic, as explained in commit 19514fc6 ("arm, kbuild: make "make install" not depend on vmlinux"). 3. Broken code in some architectures Makefile code is often copied from one architecture to another without proper adaptation. 'make vdso_install' for parisc does not work. 'make vdso_install' for s390 installs vdso64, but not vdso32. To address these problems, this commit introduces a generic vdso_install rule. Architectures that support vdso_install need to define vdso-install-y in arch/*/Makefile. vdso-install-y lists the files to install. For example, arch/x86/Makefile looks like this: vdso-install-$(CONFIG_X86_64) += arch/x86/entry/vdso/vdso64.so.dbg vdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdsox32.so.dbg vdso-install-$(CONFIG_X86_32) += arch/x86/entry/vdso/vdso32.so.dbg vdso-install-$(CONFIG_IA32_EMULATION) += arch/x86/entry/vdso/vdso32.so.dbg These files will be installed to $(MODLIB)/vdso/ with the .dbg suffix, if exists, stripped away. vdso-install-y can optionally take the second field after the colon separator. This is needed because some architectures install a vdso file as a different base name. The following is a snippet from arch/arm64/Makefile. vdso-install-$(CONFIG_COMPAT_VDSO) += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so This will rename vdso.so.dbg to vdso32.so during installation. If such architectures change their implementation so that the base names match, this workaround will go away. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Acked-by: Sven Schnelle <svens@linux.ibm.com> # s390 Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu> Reviewed-by:
Guo Ren <guoren@kernel.org> Acked-by: Helge Deller <deller@gmx.de> # parisc Acked-by:
Catalin Marinas <catalin.marinas@arm.com> Acked-by:
Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-
- Oct 22, 2023
-
-
Linus Torvalds authored
-
- Oct 19, 2023
-
-
Miguel Ojeda authored
The Rust code documentation output path moved from `rust/doc` to `Documentation/output/rust/rustdoc`. The `make cleandocs` target takes care of cleaning it now since it is integrated with the rest of the documentation. Thus remove the old reference. Fixes: 48fadf44 ("docs: Move rustdoc output, cross-reference it") Reviewed-by:
Benno Lossin <benno.lossin@proton.me> Reviewed-by:
Alice Ryhl <aliceryhl@google.com> Reviewed-by:
Andreas Hindborg <a.hindborg@samsung.com> Link: https://lore.kernel.org/r/20231018160145.1017340-2-ojeda@kernel.org Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
-
- Oct 15, 2023
-
-
Linus Torvalds authored
-
- Oct 08, 2023
-
-
Linus Torvalds authored
-
- Oct 05, 2023
-
-
Björn Töpel authored
Some kselftests has a per-arch config, e.g. tools/testing/selftests/bpf/config.s390x. Make sure these configs are picked up by the kselftest-merge target. Signed-off-by:
Björn Töpel <bjorn@rivosinc.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Björn Töpel authored
The kselftest-merge target walks all kselftests configs, and merges them. However, builtin does not have precedence over modules. This breaks some of the tests, e.g.: $ grep CONFIG_NF_NAT tools/testing/selftests/{bpf,net}/config tools/testing/selftests/bpf/config:CONFIG_NF_NAT=y tools/testing/selftests/net/config:CONFIG_NF_NAT=m Here, the net config will set NF_NAT to module, which makes it clunky to run the BPF tests. Add '-y' to scripts/kconfig/merge_config.sh. Signed-off-by:
Björn Töpel <bjorn@rivosinc.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
- Oct 03, 2023
-
-
Masahiro Yamada authored
kernel.spec is the last piece that resides outside the rpmbuild/ directory. Move all the RPM-related files to rpmbuild/ consistently. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nathan Chancellor <nathan@kernel.org> Tested-by:
Nathan Chancellor <nathan@kernel.org>
-
- Oct 01, 2023
-
-
Linus Torvalds authored
-
- Sep 24, 2023
-
-
Linus Torvalds authored
-
- Sep 17, 2023
-
-
Linus Torvalds authored
-
- Sep 11, 2023
-
-
Ard Biesheuvel authored
Drop or update mentions of IA64, as appropriate. Signed-off-by:
Ard Biesheuvel <ardb@kernel.org>
-
- Sep 10, 2023
-
-
Linus Torvalds authored
-
- Sep 03, 2023
-
-
Kees Cook authored
Currently the Kconfig fragments in kernel/configs and arch/*/configs that aren't used internally aren't discoverable through "make help", which consists of hard-coded lists of config fragments. Instead, list all the fragment targets that have a "# Help: " comment prefix so the targets can be generated dynamically. Add logic to the Makefile to search for and display the fragment and comment. Add comments to fragments that are intended to be direct targets. Signed-off-by:
Kees Cook <keescook@chromium.org> Co-developed-by:
Masahiro Yamada <masahiroy@kernel.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
- Sep 01, 2023
-
-
Masahiro Yamada authored
The modules_sign target is currently only available for in-tree modules, but it actually works for external modules as well. Move the modules_sign rule to the common part. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu>
-
Masahiro Yamada authored
Move more relevant code to scripts/Makefile.modinst. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu>
-
- Aug 29, 2023
-
-
Masahiro Yamada authored
This reverts the old commit "kbuild: Introduce source symlink in /lib/modules/.../". [1] The current Kbuild does not require $(MODLIB)/source. If the kernel was built in a separate output directory, $(MODLIB)/build/Makefile wraps the Makefile in the source tree. It is enough for building external modules. [1] https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=e09e58867154b8aae0a3ac26a9b1c05962f5a355 Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu>
-
Masahiro Yamada authored
depmod is a part of the module installation. scripts/Makefile.modinst is a better place to run it. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu>
-
Masahiro Yamada authored
Like modules_install, modules_sign should avoid the syncconfig. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu>
-
Masahiro Yamada authored
Commit 961ab4a3 ("kbuild: merge scripts/Makefile.modsign to scripts/Makefile.modinst") started to run depmod at the end of 'make modules_sign'. Move the depmod rule to scripts/Makefile.modinst and run it only when $(modules_sign_only) is empty. Fixes: 961ab4a3 ("kbuild: merge scripts/Makefile.modsign to scripts/Makefile.modinst") Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nicolas Schier <nicolas@fjasle.eu>
-
- Aug 27, 2023
-
-
Linus Torvalds authored
-
- Aug 22, 2023
-
-
Masahiro Yamada authored
This is a remnant of commit 5e9e95cc ("kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion"). Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Nick Desaulniers <ndesaulniers@google.com>
-
- Aug 20, 2023
-
-
Linus Torvalds authored
-
Arnd Bergmann authored
Warning options are enabled and disabled in inconsistent ways and inconsistent locations. Start rearranging those by moving all options into Makefile.extrawarn. This should not change any behavior, but makes sure we can group them in a way that ensures that each warning that got temporarily disabled is turned back on at an appropriate W=1 level later on. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
- Aug 14, 2023
-
-
Miguel Ojeda authored
Introduced in Rust 1.69.0 [1], this lint prevents forgetting to set the C ABI when using `#[no_mangle]` (or thinking it is implied). For instance, it would have prevented the issue [2] fixed by commit c682e4c3 ("rust: kernel: Mark rust_fmt_argument as extern "C""). error: `#[no_mangle]` set on a function with the default (`Rust`) ABI --> rust/kernel/print.rs:21:1 | 21 | / unsafe fn rust_fmt_argument( 22 | | buf: *mut c_char, 23 | | end: *mut c_char, 24 | | ptr: *const c_void, 25 | | ) -> *mut c_char { | |________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_mangle_with_rust_abi = note: requested on the command line with `-D clippy::no-mangle-with-rust-abi` help: set an ABI | 21 | unsafe extern "C" fn rust_fmt_argument( | ++++++++++ help: or explicitly set the default | 21 | unsafe extern "Rust" fn rust_fmt_argument( | +++++++++++++ Thus enable it. In rare cases, we may need to use the Rust ABI even with `#[no_mangle]` (e.g. one case, before 1.71.0, would have been the `__rust_*` functions). In those cases, we would need to `#[allow(...)]` the lint, since using `extern "Rust"` explicitly (as the compiler suggests) currently gets overwritten by `rustfmt` [3]. Link: https://github.com/rust-lang/rust-clippy/issues/10347 [1] Link: https://github.com/Rust-for-Linux/linux/pull/967 [2] Link: https://github.com/rust-lang/rustfmt/issues/5701 [3] Reviewed-by:
Trevor Gross <tmgross@umich.edu> Reviewed-by:
Gary Guo <gary@garyguo.net> Reviewed-by:
Martin Rodriguez Reboredo <yakoyoku@gmail.com> Link: https://lore.kernel.org/r/20230729220317.416771-2-ojeda@kernel.org Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
-
- Aug 13, 2023
-
-
Linus Torvalds authored
-
- Aug 09, 2023
-
-
Masahiro Yamada authored
The -v option is passed when this script is invoked from Makefile, but not when invoked from Kconfig. As you can see in scripts/Kconfig.include, the 'success' macro suppresses stdout and stderr anyway, so this script does not need to be quiet. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Miguel Ojeda <ojeda@kernel.org> Tested-by:
Miguel Ojeda <ojeda@kernel.org> Reviewed-by:
Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20230109061436.3146442-1-masahiroy@kernel.org [ Reworded prefix to match the others in the patch series. ] Reviewed-by:
Martin Rodriguez Reboredo <yakoyoku@gmail.com> Link: https://lore.kernel.org/r/20230616001631.463536-2-ojeda@kernel.org Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
-
- Aug 07, 2023
-
-
Vinay Varma authored
Adds support for out-of-tree rust modules to use the `rust-analyzer` make target to generate the rust-project.json file. The change involves adding an optional parameter `external_src` to the `generate_rust_analyzer.py` which expects the path to the out-of-tree module's source directory. When this parameter is passed, I have chosen not to add the non-core modules (samples and drivers) into the result since these are not expected to be used in third party modules. Related changes are also made to the Makefile and rust/Makefile allowing the `rust-analyzer` target to be used for out-of-tree modules as well. Link: https://github.com/Rust-for-Linux/linux/pull/914 Link: https://github.com/Rust-for-Linux/rust-out-of-tree-module/pull/2 Signed-off-by:
Vinay Varma <varmavinaym@gmail.com> Link: https://lore.kernel.org/r/20230411091714.130525-1-varmavinaym@gmail.com Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
-
- Aug 06, 2023
-
-
Linus Torvalds authored
-
- Jul 30, 2023
-
-
Linus Torvalds authored
-