#
9db55f64 |
| 20-May-2024 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: fix short log for AS in link-vmlinux.sh
[ Upstream commit 3430f65d6130ccbc86f0ff45642eeb9e2032a600 ]
In convention, short logs print the output file, not the input file.
Let's change the s
kbuild: fix short log for AS in link-vmlinux.sh
[ Upstream commit 3430f65d6130ccbc86f0ff45642eeb9e2032a600 ]
In convention, short logs print the output file, not the input file.
Let's change the suffix for 'AS' since it assembles *.S into *.o.
[Before]
LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.S LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.S LD vmlinux
[After]
LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.o LD vmlinux
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
04c0dbdb |
| 12-Feb-2024 |
Nathan Chancellor <nathan@kernel.org> |
kbuild: Fix changing ELF file type for output of gen_btf for big endian
commit e3a9ee963ad8ba677ca925149812c5932b49af69 upstream.
Commit 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF") c
kbuild: Fix changing ELF file type for output of gen_btf for big endian
commit e3a9ee963ad8ba677ca925149812c5932b49af69 upstream.
Commit 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF") changed the ELF type of .btf.vmlinux.bin.o to ET_REL via dd, which works fine for little endian platforms:
00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............| -00000010 03 00 b7 00 01 00 00 00 00 00 00 80 00 80 ff ff |................| +00000010 01 00 b7 00 01 00 00 00 00 00 00 80 00 80 ff ff |................|
However, for big endian platforms, it changes the wrong byte, resulting in an invalid ELF file type, which ld.lld rejects:
00000000 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00 |.ELF............| -00000010 00 03 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................| +00000010 01 03 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................|
Type: <unknown>: 103
ld.lld: error: .btf.vmlinux.bin.o: unknown file type
Fix this by updating the entire 16-bit e_type field rather than just a single byte, so that everything works correctly for all platforms and linkers.
00000000 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00 |.ELF............| -00000010 00 03 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................| +00000010 00 01 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................|
Type: REL (Relocatable file)
While in the area, update the comment to mention that binutils 2.35+ matches LLD's behavior of rejecting an ET_EXEC input, which occurred after the comment was added.
Cc: stable@vger.kernel.org Fixes: 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF") Link: https://github.com/llvm/llvm-project/pull/75643 Suggested-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Fangrui Song <maskray@google.com> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
ca09bf48 |
| 08-Mar-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
scripts/kallsyms: exclude symbols generated by itself dynamically
Drop the symbols generated by scripts/kallsyms itself automatically instead of maintaining the symbol list manually.
Pass the kalls
scripts/kallsyms: exclude symbols generated by itself dynamically
Drop the symbols generated by scripts/kallsyms itself automatically instead of maintaining the symbol list manually.
Pass the kallsyms object from the previous kallsyms step (if it exists) as the third parameter of scripts/mksysmap, which will weed out the generated symbols from the input to the next kallsyms step.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
#
4b3d049f |
| 06-Mar-2023 |
Andrew Morton <akpm@linux-foundation.org> |
scripts/link-vmlinux.sh: fix error message presentation
This comes out as
Try make KALLSYMS_EXTRA_PASS=1 as a workaround
but we want quotes:
Try "make KALLSYMS_EXTRA_PASS=1" as a workaround
scripts/link-vmlinux.sh: fix error message presentation
This comes out as
Try make KALLSYMS_EXTRA_PASS=1 as a workaround
but we want quotes:
Try "make KALLSYMS_EXTRA_PASS=1" as a workaround
Link: https://lkml.kernel.org/r/202303042034.Cjc7JTd0-lkp@intel.com Cc: kernel test robot <lkp@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|
#
010a0aad |
| 02-Nov-2022 |
Zhen Lei <thunder.leizhen@huawei.com> |
kallsyms: Correctly sequence symbols when CONFIG_LTO_CLANG=y
LLVM appends various suffixes for local functions and variables, suffixes observed: - foo.llvm.[0-9a-f]+ - foo.[0-9a-f]+
Therefore, wh
kallsyms: Correctly sequence symbols when CONFIG_LTO_CLANG=y
LLVM appends various suffixes for local functions and variables, suffixes observed: - foo.llvm.[0-9a-f]+ - foo.[0-9a-f]+
Therefore, when CONFIG_LTO_CLANG=y, kallsyms_lookup_name() needs to truncate the suffix of the symbol name before comparing the local function or variable name.
Old implementation code: - if (strcmp(namebuf, name) == 0) - return kallsyms_sym_address(i); - if (cleanup_symbol_name(namebuf) && strcmp(namebuf, name) == 0) - return kallsyms_sym_address(i);
The preceding process is traversed by address from low to high. That is, for those with the same name after the suffix is removed, the one with the smallest address is returned first. Therefore, when sorting in the tool, if the raw names are the same, they should be sorted by address in ascending order.
ASCII[.] = 2e ASCII[0-9] = 30,39 ASCII[A-Z] = 41,5a ASCII[_] = 5f ASCII[a-z] = 61,7a
According to the preceding ASCII code values, the following sorting result is strictly followed. --------------------------------- | main-key | sub-key | |---------------------------------| | | addr_lowest | | <name> | ... | | <name>.<suffix> | ... | | | addr_highest | |---------------------------------| | <name>?<others> | | //? is [_A-Za-z0-9] ---------------------------------
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
show more ...
|
#
5d4aeffb |
| 28-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: rebuild .vmlinux.export.o when its prerequisite is updated
When include/linux/export-internal.h is updated, .vmlinux.export.o must be rebuilt, but it does not happen because its rule is hidd
kbuild: rebuild .vmlinux.export.o when its prerequisite is updated
When include/linux/export-internal.h is updated, .vmlinux.export.o must be rebuilt, but it does not happen because its rule is hidden behind scripts/link-vmlinux.sh.
Move it out of the shell script, so that Make can see the dependency between vmlinux and .vmlinux.export.o.
Move the vmlinux rule to scripts/Makefile.vmlinux.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
#
7a342e6c |
| 28-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: move modules.builtin(.modinfo) rules to Makefile.vmlinux_o
Do not build modules.builtin(.modinfo) as a side-effect of vmlinux.
There are no good reason to rebuild them just because any of v
kbuild: move modules.builtin(.modinfo) rules to Makefile.vmlinux_o
Do not build modules.builtin(.modinfo) as a side-effect of vmlinux.
There are no good reason to rebuild them just because any of vmlinux's prerequistes (vmlinux.lds, .vmlinux.export.c, etc.) has been updated.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
#
aa221f2e |
| 26-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kallsyms: take the input file instead of reading stdin
This gets rid of the pipe operator connected with 'cat'.
Also use getopt_long() to parse the command line.
Signed-off-by: Masahiro Yamada <ma
kallsyms: take the input file instead of reading stdin
This gets rid of the pipe operator connected with 'cat'.
Also use getopt_long() to parse the command line.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
#
94ff2f63 |
| 26-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: reuse mksysmap output for kallsyms
scripts/mksysmap internally runs ${NM} (dropping some symbols).
When CONFIG_KALLSYMS=y, mksysmap creates .tmp_System.map, but it is almost the same as the
kbuild: reuse mksysmap output for kallsyms
scripts/mksysmap internally runs ${NM} (dropping some symbols).
When CONFIG_KALLSYMS=y, mksysmap creates .tmp_System.map, but it is almost the same as the output from the ${NM} invocation in kallsyms(). It is true scripts/mksysmap drops some symbols, but scripts/kallsyms.c ignores more anyway.
Keep the mksysmap output as *.syms, and reuse it for kallsyms and 'cmp -s'. It saves one ${NM} invocation.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
#
32164845 |
| 24-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: use obj-y instead extra-y for objects placed at the head
The objects placed at the head of vmlinux need special treatments:
- arch/$(SRCARCH)/Makefile adds them to head-y in order to place
kbuild: use obj-y instead extra-y for objects placed at the head
The objects placed at the head of vmlinux need special treatments:
- arch/$(SRCARCH)/Makefile adds them to head-y in order to place them before other archives in the linker command line.
- arch/$(SRCARCH)/kernel/Makefile adds them to extra-y instead of obj-y to avoid them going into built-in.a.
This commit gets rid of the latter.
Create vmlinux.a to collect all the objects that are unconditionally linked to vmlinux. The objects listed in head-y are moved to the head of vmlinux.a by using 'ar m'.
With this, arch/$(SRCARCH)/kernel/Makefile can consistently use obj-y for builtin objects.
There is no *.o that is directly linked to vmlinux. Drop unneeded code in scripts/clang-tools/gen_compile_commands.py.
$(AR) mPi needs 'T' to workaround the llvm-ar bug. The fix was suggested by Nathan Chancellor [1].
[1]: https://lore.kernel.org/llvm/YyjjT5gQ2hGMH0ni@dev-arch.thelio-3990X/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|
#
f73edc89 |
| 24-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: unify two modpost invocations
Currently, modpost is executed twice; first for vmlinux, second for modules.
This commit merges them.
Current build flow ==================
1) build obj-y
kbuild: unify two modpost invocations
Currently, modpost is executed twice; first for vmlinux, second for modules.
This commit merges them.
Current build flow ==================
1) build obj-y and obj-m objects 2) link vmlinux.o 3) modpost for vmlinux 4) link vmlinux 5) modpost for modules 6) link modules (*.ko)
The build steps 1) through 6) are serialized, that is, modules are built after vmlinux. You do not get benefits of parallel builds when scripts/link-vmlinux.sh is being run.
New build flow ==============
1) build obj-y and obj-m objects 2) link vmlinux.o 3) modpost for vmlinux and modules 4a) link vmlinux 4b) link modules (*.ko)
In the new build flow, modpost is invoked just once.
vmlinux and modules are built in parallel. One exception is CONFIG_DEBUG_INFO_BTF_MODULES=y, where modules depend on vmlinux.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|
#
9c5a0ac3 |
| 24-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: move vmlinux.o rule to the top Makefile
Move the build rules of vmlinux.o out of scripts/link-vmlinux.sh to clearly separate 1) pre-modpost, 2) modpost, 3) post-modpost stages. This will mak
kbuild: move vmlinux.o rule to the top Makefile
Move the build rules of vmlinux.o out of scripts/link-vmlinux.sh to clearly separate 1) pre-modpost, 2) modpost, 3) post-modpost stages. This will make further refactoring possible.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|
#
26ef40de |
| 24-Sep-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: move .vmlinux.objs rule to Makefile.modpost
.vmlinux.objs is used by modpost, so scripts/Makefile.modpost is a better place to generate it.
It is used only when CONFIG_MODVERSIONS=y. It sho
kbuild: move .vmlinux.objs rule to Makefile.modpost
.vmlinux.objs is used by modpost, so scripts/Makefile.modpost is a better place to generate it.
It is used only when CONFIG_MODVERSIONS=y. It should be guarded by "ifdef CONFIG_MODVERSIONS".
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
show more ...
|
#
2df8220c |
| 27-Aug-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: build init/built-in.a just once
Kbuild builds init/built-in.a twice; first during the ordinary directory descending, second from scripts/link-vmlinux.sh.
We do this because UTS_VERSION cont
kbuild: build init/built-in.a just once
Kbuild builds init/built-in.a twice; first during the ordinary directory descending, second from scripts/link-vmlinux.sh.
We do this because UTS_VERSION contains the build version and the timestamp. We cannot update it during the normal directory traversal since we do not yet know if we need to update vmlinux. UTS_VERSION is temporarily calculated, but omitted from the update check. Otherwise, vmlinux would be rebuilt every time.
When Kbuild results in running link-vmlinux.sh, it increments the version number in the .version file and takes the timestamp at that time to really fix UTS_VERSION.
However, updating the same file twice is a footgun. To avoid nasty timestamp issues, all build artifacts that depend on init/built-in.a are atomically generated in link-vmlinux.sh, where some of them do not need rebuilding.
To fix this issue, this commit changes as follows:
[1] Split UTS_VERSION out to include/generated/utsversion.h from include/generated/compile.h
include/generated/utsversion.h is generated just before the vmlinux link. It is generated under include/generated/ because some decompressors (s390, x86) use UTS_VERSION.
[2] Split init_uts_ns and linux_banner out to init/version-timestamp.c from init/version.c
init_uts_ns and linux_banner contain UTS_VERSION. During the ordinary directory descending, they are compiled with __weak and used to determine if vmlinux needs relinking. Just before the vmlinux link, they are compiled without __weak to embed the real version and timestamp.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
show more ...
|
#
b42d2306 |
| 28-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: factor out the common objtool arguments
scripts/Makefile.build and scripts/link-vmlinux.sh have similar setups for the objtool arguments.
It was difficult to factor out them because all the
kbuild: factor out the common objtool arguments
scripts/Makefile.build and scripts/link-vmlinux.sh have similar setups for the objtool arguments.
It was difficult to factor out them because all the vmlinux build rules were written in a shell script. It is somewhat tedious to touch the two files every time a new objtool option is supported.
To reduce the code duplication, move the objtool for vmlinux.o into scripts/Makefile.vmlinux_o. Then, move the common macros to Makefile.lib so they are shared between Makefile.build and Makefile.vmlinux_o.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
show more ...
|
#
5d45950d |
| 28-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o
This is a preparation for moving the objtool rule in the next commit.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Seda
kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o
This is a preparation for moving the objtool rule in the next commit.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
show more ...
|
#
b0d6207b |
| 28-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: clean .tmp_* pattern by make clean
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 r
kbuild: clean .tmp_* pattern by make clean
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: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
show more ...
|
#
a78b6afa |
| 28-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: remove redundant cleanups in scripts/link-vmlinux.sh
These are cleaned by the top Makefile.
vmlinux.o and .vmlinux.d matches the '*.[aios]' and '.*.d' patterns respectively.
Signed-off-by:
kbuild: remove redundant cleanups in scripts/link-vmlinux.sh
These are cleaned by the top Makefile.
vmlinux.o and .vmlinux.d matches the '*.[aios]' and '.*.d' patterns respectively.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
show more ...
|
#
0aa24a79 |
| 28-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: do not try to parse *.cmd files for objects provided by compiler
Guenter Roeck reported the build breakage for parisc and csky. I confirmed nios2 and openrisc are broken as well.
The reason
kbuild: do not try to parse *.cmd files for objects provided by compiler
Guenter Roeck reported the build breakage for parisc and csky. I confirmed nios2 and openrisc are broken as well.
The reason is that they borrow libgcc.a from the toolchains.
For example, see this line in arch/parisc/Makefile:
LIBGCC := $(shell $(CC) -print-libgcc-file-name)
Some objects in libgcc.a are linked to vmlinux.o, but they do not have .*.cmd files.
Obviously, there is no EXPORT_SYMBOL in external objects. Ignore them.
(Most of the architectures import library code into the kernel tree. Perhaps those 4 architectures can do similar, but I do not know how challenging it is.)
Fixes: f292d875d0dc ("modpost: extract symbol versions from *.cmd files") Link: https://lore.kernel.org/linux-kbuild/20220528224745.GA2501857@roeck-us.net/T/#mac65c20c71c3e272db0350ecfba53fcd8905b0a0 Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
7375cbcf |
| 13-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: stop merging *.symversions
Now modpost reads symbol versions from .*.cmd files.
The merged *.symversions are no longer needed.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewe
kbuild: stop merging *.symversions
Now modpost reads symbol versions from .*.cmd files.
The merged *.symversions are no longer needed.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Tested-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
show more ...
|
#
7b453719 |
| 13-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_* as a placeholder.
Genksyms writes the version CRCs into t
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_* as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be used for filling the __crc_* symbols. The linker script format depends on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs, it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of symbols exported by vmlinux. It is compiled and linked to vmlinux in scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c files. No additional build step is needed for modules. As before, *.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the same way, whether CONFIG_RELOCATABLE is enabled or not. CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nicolas Schier <nicolas@fjasle.eu> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
show more ...
|
#
e493f472 |
| 05-May-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
kbuild: generate a list of objects in vmlinux
A *.mod file lists the member objects of a module, but vmlinux does not have such a file.
Generate this list to allow modpost to know all the member ob
kbuild: generate a list of objects in vmlinux
A *.mod file lists the member objects of a module, but vmlinux does not have such a file.
Generate this list to allow modpost to know all the member objects.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Tested-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
#
753da417 |
| 18-Apr-2022 |
Josh Poimboeuf <jpoimboe@redhat.com> |
objtool: Remove --lto and --vmlinux in favor of --link
The '--lto' option is a confusing way of telling objtool to do stack validation despite it being a linked object. It's no longer needed now th
objtool: Remove --lto and --vmlinux in favor of --link
The '--lto' option is a confusing way of telling objtool to do stack validation despite it being a linked object. It's no longer needed now that an explicit '--stackval' option exists. The '--vmlinux' option is also redundant.
Remove both options in favor of a straightforward '--link' option which identifies a linked object.
Also, implicitly set '--link' with a warning if the user forgets to do so and we can tell that it's a linked object. This makes it easier for manual vmlinux runs.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/dcd3ceffd15a54822c6183e5766d21ad06082b45.1650300597.git.jpoimboe@redhat.com
show more ...
|
#
0f620cef |
| 18-Apr-2022 |
Josh Poimboeuf <jpoimboe@redhat.com> |
objtool: Rename "VMLINUX_VALIDATION" -> "NOINSTR_VALIDATION"
CONFIG_VMLINUX_VALIDATION is just the validation of the "noinstr" rules. That name is a misnomer, because now objtool actually does vmlin
objtool: Rename "VMLINUX_VALIDATION" -> "NOINSTR_VALIDATION"
CONFIG_VMLINUX_VALIDATION is just the validation of the "noinstr" rules. That name is a misnomer, because now objtool actually does vmlinux validation for other reasons.
Rename CONFIG_VMLINUX_VALIDATION to CONFIG_NOINSTR_VALIDATION.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/173f07e2d6d1afc0874aed975a61783207c6a531.1650300597.git.jpoimboe@redhat.com
show more ...
|
#
22102f45 |
| 18-Apr-2022 |
Josh Poimboeuf <jpoimboe@redhat.com> |
objtool: Make noinstr hacks optional
Objtool has some hacks in place to workaround toolchain limitations which otherwise would break no-instrumentation rules. Make the hacks explicit (and optional
objtool: Make noinstr hacks optional
Objtool has some hacks in place to workaround toolchain limitations which otherwise would break no-instrumentation rules. Make the hacks explicit (and optional for other arches) by turning it into a cmdline option and kernel config option.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/b326eeb9c33231b9dfbb925f194ed7ee40edcd7c.1650300597.git.jpoimboe@redhat.com
show more ...
|