- 12 9月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 05 9月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 01 9月, 2022 1 次提交
-
-
由 Masahiro Yamada 提交于
Previously 'make ARCH=um headers' stopped because of missing arch/um/include/uapi/asm/Kbuild. The error is not shown since commit ed102bf2 ("um: Fix W=1 missing-include-dirs warnings") added arch/um/include/uapi/asm/Kbuild. Hard-code the unsupported architecture, so it works like before. Fixes: ed102bf2 ("um: Fix W=1 missing-include-dirs warnings") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Acked-by: NRichard Weinberger <richard@nod.at>
-
- 29 8月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 22 8月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 21 8月, 2022 1 次提交
-
-
由 Masahiro Yamada 提交于
Commit b2c88554 ("kbuild: update modules.order only when contained modules are updated") accidentally changed the modules order. Prior to that commit, the modules order was determined based on vmlinux-dirs, which lists core-y/m, drivers-y/m, libs-y/m, in this order. Now, subdir-modorder lists them in a different order: core-y/m, libs-y/m, drivers-y/m. Presumably, there was no practical issue because the modules in drivers and libs are orthogonal, but there is no reason to have this distortion. Get back to the original order. Fixes: b2c88554 ("kbuild: update modules.order only when contained modules are updated") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 15 8月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 11 8月, 2022 1 次提交
-
-
由 Nick Desaulniers 提交于
Users of GNU ld (BFD) from binutils 2.39+ will observe multiple instances of a new warning when linking kernels in the form: ld: warning: vmlinux: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker ld: warning: vmlinux has a LOAD segment with RWX permissions Generally, we would like to avoid the stack being executable. Because there could be a need for the stack to be executable, assembler sources have to opt-in to this security feature via explicit creation of the .note.GNU-stack feature (which compilers create by default) or command line flag --noexecstack. Or we can simply tell the linker the production of such sections is irrelevant and to link the stack as --noexecstack. LLVM's LLD linker defaults to -z noexecstack, so this flag isn't strictly necessary when linking with LLD, only BFD, but it doesn't hurt to be explicit here for all linkers IMO. --no-warn-rwx-segments is currently BFD specific and only available in the current latest release, so it's wrapped in an ld-option check. While the kernel makes extensive usage of ELF sections, it doesn't use permissions from ELF segments. Link: https://lore.kernel.org/linux-block/3af4127a-f453-4cf7-f133-a181cce06f73@kernel.dk/ Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 Link: https://github.com/llvm/llvm-project/issues/57009Reported-and-tested-by: NJens Axboe <axboe@kernel.dk> Suggested-by: NFangrui Song <maskray@google.com> Signed-off-by: NNick Desaulniers <ndesaulniers@google.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 01 8月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 31 7月, 2022 1 次提交
-
-
由 Masahiro Yamada 提交于
Factor out the common prerequisites for DT compilation into the new target, dtbs_prepare. Add comments to explain why include/config/kernel.release is the prerequisite. Our policy is that installation targets must not rebuild anything in the tree. If 'make modules_install' is executed as root, include/config/kernel.release may be owned by root. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NNicolas Schier <nicolas@fjasle.eu> Reviewed-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
-
- 27 7月, 2022 3 次提交
-
-
由 Masahiro Yamada 提交于
If the directory path given to KBUILD_EXTMOD (or M=) contains % or :, the module fails to build. % is used in pattern rules, and : as the separator of dependencies. Bail out with a clearer error message. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NNicolas Schier <n.schier@avm.de>
-
由 Nick Desaulniers 提交于
The difference in most compilers between `-O3` and `-O2` is mostly down to whether loops with statically determinable trip counts are fully unrolled vs unrolled to a multiple of SIMD width. This patch is effectively a revert of commit 15f5db60 ("kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC") without re-adding ARCH_CFLAGS Ever since commit cfdbc2e1 ("ARC: Build system: Makefiles, Kconfig, Linker script") ARC has been built with -O3, though the reason for doing so was not specified in inline comments or the commit message. This commit does not re-add -O3 to arch/arc/Makefile. Folks looking to experiment with `-O3` (or any compiler flag for that matter) may pass them along to the command line invocation of make: $ make KCFLAGS=-O3 Code that looks to re-add an explicit Kconfig option for `-O3` should provide: 1. A rigorous and reproducible performance profile of a reasonable userspace workload that demonstrates a hot loop in the kernel that would benefit from `-O3` over `-O2`. 2. Disassembly of said loop body before and after. 3. Provides stats on terms of increase in file size. Link: https://lore.kernel.org/linux-kbuild/CA+55aFz2sNBbZyg-_i8_Ldr2e8o9dfvdSfHHuRzVtP2VMAUWPg@mail.gmail.com/Signed-off-by: NNick Desaulniers <ndesaulniers@google.com> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Guillaume Tucker 提交于
Replace headers_install with headers as kselftest uses the header files from within the kernel tree rather than from a system-wide installation. We can still run this directly: $ make O=build kselftest-all and when building from the selftests directory: $ make O=build headers $ make O=build -C tools/testing/selftests all Signed-off-by: NGuillaume Tucker <guillaume.tucker@collabora.com> Reported-by: NMasahiro Yamada <masahiroy@kernel.org> Acked-by: NShuah Khan <skhan@linuxfoundation.org> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
- 25 7月, 2022 2 次提交
-
-
由 Jens Axboe 提交于
In preparation for splitting io_uring up a bit, move it into its own top level directory. It didn't really belong in fs/ anyway, as it's not a file system only API. This adds io_uring/ and moves the core files in there, and updates the MAINTAINERS file for the new location. Signed-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Linus Torvalds 提交于
-
- 18 7月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 12 7月, 2022 1 次提交
-
-
由 Guillaume Tucker 提交于
Add headers_install as a dependency to kselftest targets so that they can be run directly from the top of the tree. The kselftest Makefile used to try to call headers_install "backwards" but failed due to the relative path not being consistent. Now we can either run this directly: $ make O=build kselftest-all or this: $ make O=build headers_install $ make O=build -C tools/testing/selftest all The same commands work as well when building directly in the source tree (no O=) or any arbitrary path (relative or absolute). Signed-off-by: NGuillaume Tucker <guillaume.tucker@collabora.com> Tested-by: NAnders Roxell <anders.roxell@linaro.org> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
- 11 7月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 04 7月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 27 6月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 26 6月, 2022 1 次提交
-
-
由 Masahiro Yamada 提交于
If CONFIG_TRIM_UNUSED_KSYMS is enabled and the kernel is built from a pristine state, the vmlinux is linked twice. Commit 3fdc7d3f ("kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS") explains why this happens, but it did not fix the issue at all. Now I realized I had applied a wrong patch. In v1 patch [1], the autoksyms_recursive target correctly recurses to "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive". In v2 patch [2], I accidentally dropped the diff line, and it recurses to "$(MAKE) -f $(srctree)/Makefile vmlinux". Restore the code I intended in v1. [1]: https://lore.kernel.org/linux-kbuild/1521045861-22418-8-git-send-email-yamada.masahiro@socionext.com/ [2]: https://lore.kernel.org/linux-kbuild/1521166725-24157-8-git-send-email-yamada.masahiro@socionext.com/ Fixes: 3fdc7d3f ("kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Tested-by: NSami Tolvanen <samitolvanen@google.com> Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
-
- 20 6月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 13 6月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 10 6月, 2022 2 次提交
-
-
由 Linus Torvalds 提交于
In commit 8b202ee2 ("s390: disable -Warray-bounds") the s390 people disabled the '-Warray-bounds' warning for gcc-12, because the new logic in gcc would cause warnings for their use of the S390_lowcore macro, which accesses absolute pointers. It turns out gcc-12 has many other issues in this area, so this takes that s390 warning disable logic, and turns it into a kernel build config entry instead. Part of the intent is that we can make this all much more targeted, and use this conflig flag to disable it in only particular configurations that cause problems, with the s390 case as an example: select GCC12_NO_ARRAY_BOUNDS and we could do that for other configuration cases that cause issues. Or we could possibly use the CONFIG_CC_NO_ARRAY_BOUNDS thing in a more targeted way, and disable the warning only for particular uses: again the s390 case as an example: KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_NO_ARRAY_BOUNDS),-Wno-array-bounds) but this ends up just doing it globally in the top-level Makefile, since the current issues are spread fairly widely all over: KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds We'll try to limit this later, since the gcc-12 problems are rare enough that *much* of the kernel can be built with it without disabling this warning. Cc: Kees Cook <keescook@chromium.org> Cc: Nathan Chancellor <nathan@kernel.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Linus Torvalds 提交于
While the concept of checking for dangling pointers to local variables at function exit is really interesting, the gcc-12 implementation is not compatible with reality, and results in false positives. For example, gcc sees us putting things on a local list head allocated on the stack, which involves exactly those kinds of pointers to the local stack entry: In function ‘__list_add’, inlined from ‘list_add_tail’ at include/linux/list.h:102:2, inlined from ‘rebuild_snap_realms’ at fs/ceph/snap.c:434:2: include/linux/list.h:74:19: warning: storing the address of local variable ‘realm_queue’ in ‘*&realm_27(D)->rebuild_item.prev’ [-Wdangling-pointer=] 74 | new->prev = prev; | ~~~~~~~~~~^~~~~~ But then gcc - understandably - doesn't really understand the big picture how the doubly linked list works, so doesn't see how we then end up emptying said list head in a loop and the pointer we added has been removed. Gcc also complains about us (intentionally) using this as a way to store a kind of fake stack trace, eg drivers/acpi/acpica/utdebug.c:40:38: warning: storing the address of local variable ‘current_sp’ in ‘acpi_gbl_entry_stack_pointer’ [-Wdangling-pointer=] 40 | acpi_gbl_entry_stack_pointer = ¤t_sp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ which is entirely reasonable from a compiler standpoint, and we may want to change those kinds of patterns, but not not. So this is one of those "it would be lovely if the compiler were to complain about us leaving dangling pointers to the stack", but not this way. Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 06 6月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 05 6月, 2022 1 次提交
-
-
由 Masahiro Yamada 提交于
Change the "make clean" rule to remove all the .tmp_* files. .tmp_objdiff is the only exception, which should be removed by "make mrproper". Rename the record directory of objdiff, .tmp_objdiff to .objdiff to avoid the removal by "make clean". Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
-
- 23 5月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 16 5月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 11 5月, 2022 1 次提交
-
-
由 Masahiro Yamada 提交于
Many architectures have similar install.sh scripts. The first half is really generic; it verifies that the kernel image and System.map exist, then executes ~/bin/${INSTALLKERNEL} or /sbin/${INSTALLKERNEL} if available. The second half is kind of arch-specific; it copies the kernel image and System.map to the destination, but the code is slightly different. Factor out the generic part into scripts/install.sh. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NNicolas Schier <n.schier@avm.de>
-
- 09 5月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 08 5月, 2022 5 次提交
-
-
由 Kees Cook 提交于
To enable the new Clang randstruct implementation[1], move randstruct into its own Makefile and split the CFLAGS from GCC_PLUGINS_CFLAGS into RANDSTRUCT_CFLAGS. [1] https://reviews.llvm.org/D121556 Cc: linux-hardening@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220503205503.3054173-5-keescook@chromium.org
-
由 Randy Dunlap 提交于
Fix typos in comments so that they make sense. Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Yann Droneaud 提交于
When developing new code/feature, CONFIG_WERROR is most often turned off, especially for people using make W=12 to get more warnings. In such case, turning on -Werror temporarily would require switching on CONFIG_WERROR in the configuration, building, then switching off CONFIG_WERROR. For this use case, this patch introduces a new 'e' modifier to W= as a short hand for KCFLAGS+=-Werror" so that -Werror got added to the kernel (built-in) and modules' CFLAGS. Signed-off-by: NYann Droneaud <ydroneaud@opteya.com> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The dependency $(obj)/%.mod: $(obj)/%$(mod-prelink-ext).o ... exists because *.mod files previously contained undefined symbols, which are computed from *.o files when CONFIG_TRIM_UNUSED_KSYMS=y. Now that the undefined symbols are put into separate *.usyms files, there is no reason to make *.mod depend on *.o files. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The *.mod files have two lines; the first line lists the member objects of the module, and the second line, if CONFIG_TRIM_UNUSED_KSYMS=y, lists the undefined symbols. Currently, we generate *.mod after constructing composite modules, otherwise, we cannot compute the second line. No prerequisite is required to print the first line. They are orthogonal. Splitting them into separate commands will ease further cleanups. This commit splits the list of undefined symbols out to *.usyms files. Previously, the list of undefined symbols ended up with a very long line, but now it has one symbol per line. Use sed like we did before commit 7d32358b ("kbuild: avoid split lines in .mod files"). Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NNicolas Schier <nicolas@fjasle.eu>
-
- 02 5月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 25 4月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 22 4月, 2022 1 次提交
-
-
由 Josh Poimboeuf 提交于
Now that stack validation is an optional feature of objtool, add CONFIG_OBJTOOL and replace most usages of CONFIG_STACK_VALIDATION with it. CONFIG_STACK_VALIDATION can now be considered to be frame-pointer specific. CONFIG_UNWINDER_ORC is already inherently valid for live patching, so no need to "validate" it. Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: NMiroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/939bf3d85604b2a126412bf11af6e3bd3b872bcb.1650300597.git.jpoimboe@redhat.com
-
- 18 4月, 2022 1 次提交
-
-
由 Linus Torvalds 提交于
-