Re: [PATCH] kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact

2025-01-29 Thread Masahiro Yamada
gt; Signed-off-by: Kienan Stewart Good catch, this actually got broken by 13b25489b6f8. Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Acked-by: Masahiro Yamada > > --- > > arch/powerpc/M

Re: [PATCH v13 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2025-01-17 Thread Masahiro Yamada
On Wed, Jan 15, 2025 at 3:58 AM Sami Tolvanen wrote: > > On Tue, Jan 14, 2025 at 10:22:15AM +0900, Masahiro Yamada wrote: > > On Tue, Jan 14, 2025 at 5:04 AM Sami Tolvanen > > wrote: > > > > > > Hi Masahiro, > > > > > > On Fri,

Re: [PATCH v13 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2025-01-13 Thread Masahiro Yamada
On Tue, Jan 14, 2025 at 5:04 AM Sami Tolvanen wrote: > > Hi Masahiro, > > On Fri, Jan 10, 2025 at 6:26 PM Masahiro Yamada wrote: > > > > On Sat, Jan 4, 2025 at 2:37 AM Matthew Maurer wrote: > > > > > > From: Sami Tolvanen > > > > > >

Re: [PATCH v13 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2025-01-10 Thread Masahiro Yamada
> - | awk '$$2~/(T|R|D|B)/ && $$3!~/__cfi/ {printf > "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@ > + $(call rust_exports,$<,"EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3) > $@ I noticed a nit: Both of the two callsites of rust_exports pass '$$3' to the last parameter instead of hardcoding it. Is it a flexibility for future extensions? I cannot think of any other use except for printing the third column, i.e. symbol name. -- Best Regards Masahiro Yamada

Re: [PATCH v13 0/5] Extended MODVERSIONS Support

2025-01-10 Thread Masahiro Yamada
9ebc701...@suse.com/ > [5] > https://lore.kernel.org/linux-kbuild/20241228154603.2234284-1-masahi...@kernel.org > > Changes in v13: > - Fixed up missed s32 usage (Thanks Sami). Applied to linux-kbuild. Thanks. -- Best Regards Masahiro Yamada

Re: [PATCH v11 2/5] modpost: Produce extended MODVERSIONS information

2024-12-28 Thread Masahiro Yamada
t?plain=1#L197 > + buf_printf(b, "\t\"%s\\0\"\n", s->name); > + } > + buf_printf(b, ";\n"); > +} > + > /** > * Record CRCs for unresolved symbols > **/ > @@ -1827,9 +1875,14 @@ static void add_versions(struct buffer *b, s

Re: [PATCH v11 3/5] modules: Allow extended modversions without basic MODVERSIONS

2024-12-26 Thread Masahiro Yamada
RSIONS > The most likely reason you would enable this is to enable Rust > support. If unsure, say N. > > +config BASIC_MODVERSIONS > + bool "Basic Module Versioning Support" > + depends on MODVERSIONS > + default MODVERSIONS Nit: default y is simpler. -- Best Regards Masahiro Yamada

Re: [PATCH v6 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-10-27 Thread Masahiro Yamada
ol_stub_text_end_count, .long $num_ool_stubs_text) > + > +SYM_CODE_START(ftrace_ool_stub_text_end) > + .space $num_ool_stubs_text * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_text_end) > +.popsection > + > +.pushsection .tramp.ftrace.init,"aw" > +SYM_DATA(ftrace_ool_stub_inittext_count, .long $num_ool_stubs_inittext) > + > +SYM_CODE_START(ftrace_ool_stub_inittext) > + .space $num_ool_stubs_inittext * FTRACE_OOL_STUB_SIZE To avoid the warning mention in another thread, it is better to avoid zero .space. > +SYM_CODE_END(ftrace_ool_stub_inittext) > +.popsection > +EOF > -- > 2.47.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v6 13/17] powerpc64/ftrace: Support .text larger than 32MB with out-of-line stubs

2024-10-27 Thread Masahiro Yamada
quot; | > num_ool_stubs_inittext=$($objdump -r -j __patchable_function_entries > "$vmlinux_o" | > grep ".init.text" | grep -c "$RELOCATION") > > +if [ "$num_ool_stubs_text" -gt "$num_ool_stubs_text_builtin" ]; then > + num_ool_stubs_text_end=$((num_ool_stubs_text - > num_ool_stubs_text_builtin)) > +else > + num_ool_stubs_text_end=0 > +fi > + > cat > "$arch_vmlinux_S" < #include > #include > > .pushsection .tramp.ftrace.text,"aw" > -SYM_DATA(ftrace_ool_stub_text_end_count, .long $num_ool_stubs_text) > +SYM_DATA(ftrace_ool_stub_text_end_count, .long $num_ool_stubs_text_end) > > SYM_CODE_START(ftrace_ool_stub_text_end) > - .space $num_ool_stubs_text * FTRACE_OOL_STUB_SIZE > + .space $num_ool_stubs_text_end * FTRACE_OOL_STUB_SIZE > SYM_CODE_END(ftrace_ool_stub_text_end) > .popsection I got this warning: GEN arch/powerpc/tools/vmlinux.arch.S AS arch/powerpc/tools/vmlinux.arch.o arch/powerpc/tools/vmlinux.arch.S: Assembler messages: arch/powerpc/tools/vmlinux.arch.S:9: Warning: .space repeat count is zero, ignored -- Best Regards Masahiro Yamada

Re: [PATCH v6 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-10-27 Thread Masahiro Yamada
MAKE} -f "${srctree}/scripts/Makefile.build" obj=init > init/version-timestamp.o > > +arch_vmlinux_o="" Nit: unnecessary double quotes. arch_vmlinux_o= is enough. Other than that, Acked-by: Masahiro Yamada -- Best Regards Masahiro Yamada

Re: [PATCH v5 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-10-10 Thread Masahiro Yamada
On Thu, Oct 10, 2024 at 6:57 PM Hari Bathini wrote: > > > On 09/10/24 8:53 pm, Masahiro Yamada wrote: > > On Mon, Sep 16, 2024 at 5:58 AM Hari Bathini wrote: > >> > >> From: Naveen N Rao > >> > >> On powerpc, we would like to be able to make

Re: [PATCH v5 00/17] powerpc: Core ftrace rework, support for ftrace direct and bpf trampolines

2024-10-09 Thread Masahiro Yamada
++ > samples/ftrace/ftrace-direct-modify.c | 85 +- > samples/ftrace/ftrace-direct-multi-modify.c | 101 ++- > samples/ftrace/ftrace-direct-multi.c| 79 +- > samples/ftrace/ftrace-direct-too.c | 83 +- > samples/ftrace/ftrace-direct.c | 69 +-

Re: [PATCH v5 13/17] powerpc64/ftrace: Support .text larger than 32MB with out-of-line stubs

2024-10-09 Thread Masahiro Yamada
ble_function_entries ${vmlinux_o} | > grep ".init.text" | grep "${RELOCATION}" | wc -l) > > +num_ool_stubs_text_builtin=${1} > +if [ ${num_ool_stubs_text} -gt ${num_ool_stubs_text_builtin} ]; then > + num_ool_stubs_text_end=$(expr ${num_ool_stubs_text} - > ${num_ool_stubs_text_builtin}) > +else > + num_ool_stubs_text_end=0 > +fi > + > cat > ${arch_vmlinux_S} < #include > #include > > .pushsection .tramp.ftrace.text,"aw" > -SYM_DATA(ftrace_ool_stub_text_end_count, .long ${num_ool_stubs_text}) > +SYM_DATA(ftrace_ool_stub_text_end_count, .long ${num_ool_stubs_text_end}) > > SYM_CODE_START(ftrace_ool_stub_text_end) > - .space ${num_ool_stubs_text} * FTRACE_OOL_STUB_SIZE > + .space ${num_ool_stubs_text_end} * FTRACE_OOL_STUB_SIZE > SYM_CODE_END(ftrace_ool_stub_text_end) > .popsection > > -- > 2.46.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v5 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-10-09 Thread Masahiro Yamada
2 > + std r12, -16(r11) > mfctr r12 > +#else > + std r0, -16(r11) > + mflrr12 > + /* Put ctr in r12 for global entry and branch there */ > + mtctr r12 > +#endif > bctrl > > /* > diff --git a/arch/powerpc/tools/Makefile b/arch/powerpc/tools/Makefile > new file mode 100644 > index ..3a389526498e > --- /dev/null > +++ b/arch/powerpc/tools/Makefile > @@ -0,0 +1,12 @@ > +# SPDX-License-Identifier: GPL-2.0-or-later > + > +quiet_cmd_gen_ftrace_ool_stubs = GEN $@ > + cmd_gen_ftrace_ool_stubs = $< vmlinux.o $@ > + > +$(obj)/.vmlinux.arch.S: $(src)/ftrace-gen-ool-stubs.sh vmlinux.o FORCE $(obj)/vmlinux.arch.S: $(src)/ftrace-gen-ool-stubs.sh vmlinux.o FORCE > + $(call if_changed,gen_ftrace_ool_stubs) > + > +$(obj)/.vmlinux.arch.o: $(obj)/.vmlinux.arch.S FORCE > + $(call if_changed_rule,as_o_S) This is unnecessary because the build rule %.S -> %.o is available in scripts/Makefile.build > + > +clean-files += .vmlinux.arch.S .vmlinux.arch.o if_changed macro needs 'targets' assignment. This line should be replaced with: targets += vmlinux.arch.S > diff --git a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh > b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh > new file mode 100755 > index ..8e0a6d4ea202 > --- /dev/null > +++ b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh > @@ -0,0 +1,43 @@ > +#!/bin/sh > +# SPDX-License-Identifier: GPL-2.0-or-later > + > +# Error out on error > +set -e > + > +is_enabled() { > + grep -q "^$1=y" include/config/auto.conf > +} Instead of checking the CONFIG option in this script, I recommend passing the 64bit flag as a command line parameter. > + > +vmlinux_o=${1} > +arch_vmlinux_S=${2} > + > +RELOCATION=R_PPC64_ADDR64 > +if is_enabled CONFIG_PPC32; then > + RELOCATION=R_PPC_ADDR32 > +fi > + > +num_ool_stubs_text=$(${CROSS_COMPILE}objdump -r -j > __patchable_function_entries ${vmlinux_o} | ${CROSS_COMPILE}objdump -> ${OBJDUMP} > +grep -v ".init.text" | grep "${RELOCATION}" | wc -l) > +num_ool_stubs_inittext=$(${CROSS_COMPILE}objdump -r -j > __patchable_function_entries ${vmlinux_o} | ${CROSS_COMPILE}objdump -> ${OBJDUMP} I also recommend passing ${OBJDUMP} from the command line parameter. > +grep ".init.text" | grep "${RELOCATION}" | wc -l) > + > +cat > ${arch_vmlinux_S} < +#include > +#include > + > +.pushsection .tramp.ftrace.text,"aw" > +SYM_DATA(ftrace_ool_stub_text_end_count, .long ${num_ool_stubs_text}) > + > +SYM_CODE_START(ftrace_ool_stub_text_end) > + .space ${num_ool_stubs_text} * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_text_end) > +.popsection > + > +.pushsection .tramp.ftrace.init,"aw" > +SYM_DATA(ftrace_ool_stub_inittext_count, .long ${num_ool_stubs_inittext}) > + > +SYM_CODE_START(ftrace_ool_stub_inittext) > + .space ${num_ool_stubs_inittext} * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_inittext) > +.popsection > +EOF > -- > 2.46.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v5 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-10-09 Thread Masahiro Yamada
> } > > # generate .BTF typeinfo from DWARF debuginfo > @@ -214,6 +214,11 @@ fi > > ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init > init/version-timestamp.o > > +arch_vmlinux_o="" > +if is_enabled CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX; then > + arch_vmlinux_o=arch/${SRCARCH}/tools/.vmlinux.arch.o arch_vmlinux_o=arch/${SRCARCH}/tools/vmlinux.arch.o > +fi > + > btf_vmlinux_bin_o= > kallsymso= > strip_debug= > -- > 2.46.0 > -- Best Regards Masahiro Yamada

Re: linux-next: build failure after merge of the powerpc tree

2024-09-09 Thread Masahiro Yamada
ctree)/scripts/Makefile.userprogs endif -ifneq ($(need-dtbslist)$(dtb-y)$(dtb-)$(filter %.dtb.o %.dtbo.o,$(targets)),) +ifneq ($(need-dtbslist)$(dtb-y)$(dtb-)$(filter %.dtb %.dtb.o %.dtbo.o,$(targets)),) include $(srctree)/scripts/Makefile.dtbs endif -- Best Regards Masahiro Yamada

Re: [RFC PATCH v4 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-08-27 Thread Masahiro Yamada
e.init,"aw" > +SYM_DATA(ftrace_ool_stub_inittext_count, .long ${num_ool_stubs_inittext}) > + > +SYM_CODE_START(ftrace_ool_stub_inittext) > + .space ${num_ool_stubs_inittext} * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_inittext) > +.popsection > +EOF > + > +${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \ > + ${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \ > + -c -o ${arch_vmlinux_o} ${arch_vmlinux_S} Please do not compile this within a shell script. scripts/Makefile.build provides rule_as_o_S to do this. [1] vmlinux.o --> arch/powerpc/tools/vmlinux.S [2] arch/powerpc/tools/vmlinux.S --> arch/powerpc/tools/vmlinux.o Please split these in separate build rules. > -- > 2.45.2 > -- Best Regards Masahiro Yamada

Re: [PATCH 2/6] kallsyms: Emit symbol at the holes in the text

2024-07-20 Thread Masahiro Yamada
On Thu, Jul 18, 2024 at 12:45 PM Zheng Yejian wrote: > > On 2024/7/16 16:33, Masahiro Yamada wrote: > > On Thu, Jun 13, 2024 at 10:36 PM Zheng Yejian > > wrote: > >> > >> When a weak type function is overridden, its symbol will be removed > >> fr

Re: [PATCH 2/6] kallsyms: Emit symbol at the holes in the text

2024-07-16 Thread Masahiro Yamada
> if (base_relative) > record_relative_base(); > optimize_token_table(); > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index 518c70b8db50..8e1373902bfe 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.s

Re: [PATCH 1/6] kallsyms: Optimize multiple times of realloc() to one time of malloc()

2024-07-15 Thread Masahiro Yamada
; Signed-off-by: Zheng Yejian I do not think this is worthwhile. realloc() is simple. If this is a problem, you can increase the "+= 1" to "+= 65536" or something. -- Best Regards Masahiro Yamada

Re: [RFC PATCH v2 4/5] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-06-10 Thread Masahiro Yamada
On Tue, Jun 11, 2024 at 2:20 AM Naveen N Rao wrote: > > On Mon, Jun 10, 2024 at 06:14:51PM GMT, Masahiro Yamada wrote: > > On Mon, Jun 10, 2024 at 5:39 PM Naveen N Rao wrote: > > > > > > On powerpc, we would like to be able to make a pass on vmlinux.o and > >

Re: [RFC PATCH v2 4/5] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-06-10 Thread Masahiro Yamada
efile.vmlinux will be the right place. > + > btf_vmlinux_bin_o="" > if is_enabled CONFIG_DEBUG_INFO_BTF; then > btf_vmlinux_bin_o=.btf.vmlinux.bin.o > @@ -273,7 +285,7 @@ if is_enabled CONFIG_KALLSYMS; then > fi > fi > > -vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o} > +vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o} ${arch_vmlinux_o} > > # fill in BTF IDs > if is_enabled CONFIG_DEBUG_INFO_BTF && is_enabled CONFIG_BPF; then > -- > 2.45.2 > -- Best Regards Masahiro Yamada

Re: [RFC PATCH 1/2] objtool: Run objtool only if either of the config options are selected

2024-05-06 Thread Masahiro Yamada
On Tue, Apr 23, 2024 at 1:19 AM Sathvika Vasireddy wrote: > > Hi Masahiro, thanks for reviewing. > > On 4/22/24 5:39 PM, Masahiro Yamada wrote: > > On Mon, Apr 22, 2024 at 6:25 PM Sathvika Vasireddy wrote: > > Currently, when objtool is enabled and none of the supported

Re: [RFC PATCH 2/2] objtool/powerpc: Enhance objtool to fixup alternate feature relative addresses

2024-05-06 Thread Masahiro Yamada
_entry *fcur) > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index c65bb0fbd136..8fff27b9bdcb 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -290,6 +290,13 @@ ifneq ($(objtool-args-y),) > cmd_objtool = $(if $(objtool-enabled), ; $(objtool) $(objtool-args) $@) > endif > > +cmd_objtool_vmlinux := > +ifeq ($(CONFIG_HAVE_OBJTOOL_FTR_FIXUP),y) > +cmd_objtool_vmlinux = $(if $(objtool-enabled), ; $(objtool) $(objtool-args) > $@) > +vmlinux: > +$(cmd_objtool_vmlinux) This is complete garbage. At first, I thought it was a build rule for vmlinux, but it is not because $(cmd_objtool_vmlinux) is indented by 4 spaces, not a tab. Of course, you cannot add a vmlinux build rule here. If it had been a tab instead of 4 spaces, Make would have shown a warning. > +endif > + > cmd_gen_objtooldep = $(if $(objtool-enabled), { echo ; echo '$@: $$(wildcard > $(objtool))' ; } >> $(dot-target).cmd) > > endif # CONFIG_OBJTOOL -- Best Regards Masahiro Yamada

Re: [RFC PATCH 1/2] objtool: Run objtool only if either of the config options are selected

2024-04-22 Thread Masahiro Yamada
NEL_IBT)) > > +ifneq ($(objtool-args-y),) > cmd_objtool = $(if $(objtool-enabled), ; $(objtool) $(objtool-args) $@) > +endif > + > cmd_gen_objtooldep = $(if $(objtool-enabled), { echo ; echo '$@: $$(wildcard > $(objtool))' ; } >> $(dot-target).cmd) > > endif # CONFIG_OBJTOOL > -- > 2.34.1 > -- Best Regards Masahiro Yamada

Re: [PATCH] powerpc: remove unused *_syscall_64.o variables in Makefile

2024-02-16 Thread Masahiro Yamada
+To: Daniel Axtens Maybe, we should check if the issue fixed by 2f26ed1764b42a8c40d9c48441c73a70d805decf came back. On Fri, Feb 16, 2024 at 10:55 PM Masahiro Yamada wrote: > > Commit ab1a517d55b0 ("powerpc/syscall: Rename syscall_64.c into > interrupt.c") missed to

[PATCH] powerpc: remove unused KCSAN_SANITIZE_early_64.o in Makefile

2024-02-16 Thread Masahiro Yamada
Commit 2fb857bc9f9e ("powerpc/kcsan: Add exclusions from instrumentation") added KCSAN_SANITIZE_early_64.o to arch/powerpc/kernel/Makefile, while it does not compile early_64.o. Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/Makefile | 1 - 1 file changed, 1 deletion(-) di

[PATCH] powerpc: remove unused *_syscall_64.o variables in Makefile

2024-02-16 Thread Masahiro Yamada
them with: GCOV_PROFILE_interrupt.o := n KCOV_INSTRUMENT_interrupt.o := n UBSAN_SANITIZE_interrupt.o := n However, nobody has noticed the functional change in the past three years, so they were unneeded. Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/Makefile | 3 --- 1 file changed, 3 deletion

Re: [PATCH] powerpc: add crtsavres.o to always-y instead of extra-y

2024-02-05 Thread Masahiro Yamada
On Mon, Feb 5, 2024 at 10:22 PM Jan Stancek wrote: > > On Mon, Feb 5, 2024 at 12:50 PM Michael Ellerman wrote: > > > > Jan Stancek writes: > > > On Tue, Nov 21, 2023 at 10:51:34AM +1000, Nicholas Piggin wrote: > > >>On Tue Nov 21, 2023 at 9:23 AM AEST, Mas

Re: [PATCH] Reapply "kbuild: Create directory for target DTB"

2023-12-15 Thread Masahiro Yamada
On Wed, Dec 13, 2023 at 8:22 PM Matthias Schiffer wrote: > > On Tue, 2023-12-12 at 17:13 +, Masahiro Yamada wrote: > > > > > > On Wed, Dec 13, 2023 at 1:17 AM Matthias Schiffer > > wrote: > > > > > > This reverts commit dd7699e37f289fa433f42c6

Re: [PATCH] Reapply "kbuild: Create directory for target DTB"

2023-12-12 Thread Masahiro Yamada
bH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany > Amtsgericht München, HRB 105018 > Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider > https://www.tq-group.com/ > -- Best Regards Masahiro Yamada

Re: [PATCH v2 0/5] MODVERSIONS + RUST Redux

2023-11-23 Thread Masahiro Yamada
Would setting up Rust symbols so that they have a crc built out of .rmeta be > > sufficient for you to consider this useful? If not, can you help me > > understand > > what level of precision would be required? > > What exactly does .rmeta have to do with the function signature? That's > all you care about here. rmeta is generated per crate. CRC is computed per symbol. They have different granularity. It is weird to refuse a module for incompatibility of a symbol that it is not using at all. > thanks, > > greg k-h -- Best Regards Masahiro Yamada

Re: [PATCH v2 0/5] MODVERSIONS + RUST Redux

2023-11-22 Thread Masahiro Yamada
y considered to be a potential userspace break > because kmod tools inspect this kernel module metadata. Masahiro Yamada > suggested [2] that this could instead be done with a section per-field. > This gives us the ability to be more flexible with this format in the > future, as a new fi

Re: [PATCH] powerpc: add crtsavres.o to always-y instead of extra-y

2023-11-21 Thread Masahiro Yamada
On Tue, Nov 21, 2023 at 6:55 PM Aneesh Kumar K.V wrote: > > "Nicholas Piggin" writes: > > > On Tue Nov 21, 2023 at 9:23 AM AEST, Masahiro Yamada wrote: > >> crtsavres.o is linked to modules. However, as explained in commit > >> d0e628cd817f ("kbu

[PATCH] powerpc: add crtsavres.o to always-y instead of extra-y

2023-11-20 Thread Masahiro Yamada
: *** [Makefile:1844: modules] Error 2 make[1]: *** [/home/masahiro/workspace/linux-kbuild/Makefile:350: __build_one_by_one] Error 2 make: *** [Makefile:234: __sub-make] Error 2 Signed-off-by: Masahiro Yamada --- arch/powerpc/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[bpf-next PATCH v2 1/4] kbuild: remove ARCH_POSTLINK from module builds

2023-10-18 Thread Masahiro Yamada
The '%.ko' rule in arch/*/Makefile.postlink does nothing but call the 'true' command. Remove the meaningless code. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- (no changes since v1) arch/mips/Makefile.postlink| 3 --- arch/powerpc/Makefile.postlink

[PATCH 1/4] kbuild: remove ARCH_POSTLINK from module builds

2023-10-17 Thread Masahiro Yamada
The '%.ko' rule in arch/*/Makefile.postlink does nothing but call the 'true' command. Remove the meaningless code. Signed-off-by: Masahiro Yamada --- arch/mips/Makefile.postlink| 3 --- arch/powerpc/Makefile.postlink | 3 --- arch/riscv/Makefile.postlink

Re: [PATCH v3] kbuild: Show marked Kconfig fragments in "help"

2023-09-01 Thread Masahiro Yamada
On Sat, Sep 2, 2023 at 4:50 AM Kees Cook wrote: > > On Fri, Sep 01, 2023 at 04:58:37PM +0900, Masahiro Yamada wrote: > > On Fri, Sep 1, 2023 at 4:13 AM Kees Cook wrote: > > > > > > Currently the Kconfig fragments in kernel/configs and arch/*/configs > >

Re: [PATCH v3] kbuild: Show marked Kconfig fragments in "help"

2023-09-01 Thread Masahiro Yamada
.@vger.kernel.org > Cc: linux-kbu...@vger.kernel.org > Cc: linux-harden...@vger.kernel.org > Signed-off-by: Kees Cook > Co-developed-by: Masahiro Yamada > --- > v3: > - Use Makefile logic from Masahiro Yamada > - Use "# Help: " prefix, but only on desired f

Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

2023-08-31 Thread Masahiro Yamada
On Thu, Aug 31, 2023 at 9:03 AM Kees Cook wrote: > > On Tue, Aug 29, 2023 at 11:57:19PM +0900, Masahiro Yamada wrote: > > The attached patch will work too. > > > > I dropped the "in the first line" restriction > > because SPDX might be placed in the firs

Re: [PATCH] kbuild: single-quote the format string of printf

2023-08-30 Thread Masahiro Yamada
On Wed, Aug 30, 2023 at 10:00 AM Nicolas Schier wrote: > > On Tue 29 Aug 2023 20:35:31 GMT, Masahiro Yamada wrote: > > Use single-quotes to avoid escape sequences (\\n). > > > > Signed-off-by: Masahiro Yamada > > --- > > Is this really necessary? Testing w/

Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

2023-08-29 Thread Masahiro Yamada
On Tue, Aug 29, 2023 at 3:55 PM Nicolas Schier wrote: > > On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote: > > Masahiro Yamada writes: > > > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook wrote: > > >> > > >> Hi, > > >> > > >

[PATCH] kbuild: single-quote the format string of printf

2023-08-29 Thread Masahiro Yamada
Use single-quotes to avoid escape sequences (\\n). Signed-off-by: Masahiro Yamada --- Makefile | 8 arch/powerpc/Makefile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 87a9eef3fb4b..d09600f7a036 100644 --- a/Makefile

Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

2023-08-27 Thread Masahiro Yamada
owerpc/configs/{guest.config => guest.fragment} (85%) > delete mode 100644 arch/powerpc/configs/le.config > create mode 100644 arch/powerpc/configs/le.fragment > rename arch/powerpc/configs/{mpc85xx_base.config => mpc85xx_base.fragment} > (94%) > rename arch/powerpc/configs/{mpc86xx_base.config => mpc86xx_base.fragment} > (86%) > rename arch/powerpc/configs/{ppc64le.config => ppc64le.fragment} (65%) > rename {kernel => arch/x86}/configs/x86_debug.config (90%) > delete mode 100644 kernel/configs/tiny-base.config > create mode 100644 kernel/configs/tiny-base.fragment > > -- > 2.34.1 > -- Best Regards Masahiro Yamada

Re: [PATCH 02/17] [RESEND] irq_work: consolidate arch_irq_work_raise prototypes

2023-08-11 Thread Masahiro Yamada
rk.h | 2 +- > arch/s390/include/asm/irq_work.h| 2 -- > arch/x86/include/asm/irq_work.h | 1 - > include/linux/irq_work.h | 3 +++ > 8 files changed, 5 insertions(+), 10 deletions(-) > -- Best Regards Masahiro Yamada

[PATCH 3/3] powerpc: remove

2023-08-06 Thread Masahiro Yamada
All *.S files under arch/powerpc/ have been converted to include instead of . Remove . Signed-off-by: Masahiro Yamada --- arch/powerpc/include/asm/Kbuild | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index 419319c4963c

[PATCH 1/3] powerpc: remove unneeded #include

2023-08-06 Thread Masahiro Yamada
There is no EXPORT_SYMBOL line there, hence #include is unneeded. Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/entry_32.S | 1 - arch/powerpc/kernel/head_40x.S | 1 - arch/powerpc/kernel/head_44x.S | 1 - arch/powerpc/kernel/head_64.S

[PATCH 2/3] powerpc: replace #include with #include

2023-08-06 Thread Masahiro Yamada
Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost") deprecated , which is now a wrapper of . Replace #include with #include . After all the lines are converted, and will be removed. Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/epapr_hcalls.S |

Re: [PATCH] powerpc: remove checks for binutils older than 2.25

2023-06-25 Thread Masahiro Yamada
On Mon, Jun 26, 2023 at 10:58 AM Nicholas Piggin wrote: > > On Sun Jun 25, 2023 at 6:02 PM AEST, Masahiro Yamada wrote: > > On Thu, Jan 19, 2023 at 9:37 PM Masahiro Yamada > > wrote: > > > > > > On Thu, Jan 19, 2023 at 9:12 PM Joel Stanley wrote: > >

Re: [PATCH] powerpc: remove checks for binutils older than 2.25

2023-06-25 Thread Masahiro Yamada
On Thu, Jan 19, 2023 at 9:37 PM Masahiro Yamada wrote: > > On Thu, Jan 19, 2023 at 9:12 PM Joel Stanley wrote: > > > > On Thu, 19 Jan 2023 at 08:24, Masahiro Yamada wrote: > > > > > > Commit e4412739472b ("Documentation: raise minimum supported version

Re: [PATCH] powerpc/32: Include thread_info.h in head_booke.h

2023-04-10 Thread Masahiro Yamada
; in head_booke.h, so it is possible for THREAD_SHIFT to be undefined. Add > the include to ensure that THREAD_SHIFT is always defined. > > Reported-by: kernel test robot > Link: https://lore.kernel.org/202304050954.yskldczh-...@intel.com/ > Signed-off-by: Nathan Chancellor > -

Re: [PATCH] modpost: support arbitrary symbol length in modversion

2023-03-15 Thread Masahiro Yamada
o in this direction in the former discussion. I am not sure how much effort is needed to track down the issue in this version. If we add new sections to keep the backward compatibility for the current "__versions", this issue may not exist. > In general I think it'd be more reliable to add a dummy NULL entry at > the end of the modversion array. > > Moreover, I think we also need to enforce struct modversion_info to be > __packed, just to make sure that no extra padding is added (otherwise it > may break our logic to determine the offset of the next entry). > > > @@ -2062,16 +2066,25 @@ static void add_versions(struct buffer *b, struct > > module *mod) > > s->name, mod->name); > > continue; > > } > > - if (strlen(s->name) >= MODULE_NAME_LEN) { > > - error("too long symbol \"%s\" [%s.ko]\n", > > - s->name, mod->name); > > - break; > > - } > > - buf_printf(b, "\t{ %#8x, \"%s\" },\n", > > -s->crc, s->name); > > + name_len = strlen(s->name); > > + name_len_padded = (name_len + 1 + 3) & ~3; > > + > > + /* Offset to next entry */ > > + tmp = TO_NATIVE(8 + name_len_padded); > > ^ Here's another issue that I found, you can't use TO_NATIVE() in this > way, some compilers are complaining (like on s390x this doesn't build). > > So we need to do something like: > > /* Offset to next entry */ > tmp = 8 + name_len_padded > tmp = TO_NATIVE(tmp); > > I'll do some additional tests with these changes and send an updated > patch (for those that are interested). > > -Andrea -- Best Regards Masahiro Yamada

Re: PPC64 TOC. warnings

2023-02-04 Thread Masahiro Yamada
; | sed -n -e '/^$/!p' | # Remove the dot prefix for ppc64; symbol names with a dot (.) hold entry # point addresses. -sed -e 's/^\.//' | +sed -e 's/^\.//g' | sort -u | # Ignore __this_module. It's not an exported symbol, and will be resolved # when the final .ko's are linked. -- Best Regards Masahiro Yamada

Re: [PATCH] powerpc/vdso: Filter clang's auto var init zero enabler when linking

2023-01-25 Thread Masahiro Yamada
7;-Qunused-arguments' with clang") Link: https://github.com/llvm/llvm-project/commit/ca6d5813d17598cd180995fb3bdfca00f364475f Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada -- Best Regards Masahiro Yamada

Re: [PATCH v2 05/14] powerpc: Remove linker flag from KBUILD_AFLAGS

2023-01-25 Thread Masahiro Yamada
On Thu, Jan 26, 2023 at 11:07 AM Nathan Chancellor wrote: > > On Thu, Jan 26, 2023 at 10:29:54AM +0900, Masahiro Yamada wrote: > > On Wed, Jan 25, 2023 at 1:11 PM Michael Ellerman > > wrote: > > > > > > Nathan Chancellor writes: > > > >

Re: [PATCH v2 05/14] powerpc: Remove linker flag from KBUILD_AFLAGS

2023-01-25 Thread Masahiro Yamada
t; > > > $ clang --target=powerpc64-linux-gnu -fno-integrated-as -m64 -### \ > > -x assembler-with-cpp -c -o /dev/null /dev/null &| grep gnu-as > >"/usr/bin/powerpc64-linux-gnu-as" "-a32" "-mppc" "-many" "-o" > > "/dev/null" "/tmp/null-ab8f8d.s" > > > > Remove this flag altogether to avoid future issues. > > > > Fixes: 1421dc6d4829 ("powerpc/kbuild: Use flags variables rather than > > overriding LD/CC/AS") > > Signed-off-by: Nathan Chancellor > > Reviewed-by: Nick Desaulniers > > --- > > Cc: m...@ellerman.id.au > > Acked-by: Michael Ellerman (powerpc) > > cheers -- Best Regards Masahiro Yamada

Re: [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS

2023-01-22 Thread Masahiro Yamada
h/s390/kernel/vdso64/Makefile| 4 +-- > arch/s390/purgatory/Makefile| 2 +- > arch/x86/boot/compressed/Makefile | 2 +- > drivers/gpu/drm/amd/display/dc/dml/Makefile | 3 ++- > scripts/Kconfig.include | 2 +- > scripts/Makefile.clang | 2 ++ > scripts/Makefile.compiler | 8 +++--- > scripts/as-version.sh | 2 +- > 21 files changed, 74 insertions(+), 98 deletions(-) > --- > base-commit: 88603b6dc419445847923fcb7fe5080067a30f98 > change-id: 20221228-drop-qunused-arguments-0c5c7dae54fb > > Best regards, > -- > Nathan Chancellor > -- Best Regards Masahiro Yamada

Re: [PATCH v2 07/14] powerpc/vdso: Improve linker flags

2023-01-22 Thread Masahiro Yamada
lter %.lds,$^) $(filter %.o,$^); > > > $(cmd_vdso_check) > > > > If no CC64FLAGS := xxx is set, this can go? > > Good catch! CC64FLAGS can be removed. Masahiro, I am happy to send a v3 > when I am back online next week but if you are able to fix it up during > application, please feel free to do so (once the PowerPC folks give > their Acks of course). I removed CC64FLAGS locally. Just two comments. - Is 7f3d349065d0c643f7f7013fbf9bc9f2c90b675f applicable to powerpc too? Maybe, as a follow-up cleanup, use $(LD) and remove -Wl, prefixes. - ldflags-y still pulls $(KBUILD_CFLAGS). Potentially, a new flag addition to KBUILD_CFLAGS may trigger a new -Wunused-command-line-argument warning. I hope somebody takes a closer look at which flags are really needed for the linker. > > > quiet_cmd_vdso64as = VDSO64A $@ > > >cmd_vdso64as = $(VDSOCC) $(a_flags) $(CC64FLAGS) $(AS64FLAGS) -c > > > -o $@ $< > > > > > > > > > -- > > > 2.39.0 > > > > > Thanks for the review, cheers! > Nathan -- Best Regards Masahiro Yamada

Re: [PATCH] powerpc: remove checks for binutils older than 2.25

2023-01-19 Thread Masahiro Yamada
On Thu, Jan 19, 2023 at 9:12 PM Joel Stanley wrote: > > On Thu, 19 Jan 2023 at 08:24, Masahiro Yamada wrote: > > > > Commit e4412739472b ("Documentation: raise minimum supported version of > > binutils to 2.25") allows us to remove the checks for old binutils.

[PATCH] powerpc: add crtsavres.o to always-y instead of extra-y

2023-01-19 Thread Masahiro Yamada
ip] LD [M] arch/powerpc/platforms/cell/spufs/spufs.ko ld.lld: error: cannot open arch/powerpc/lib/crtsavres.o: No such file or directory make[1]: *** [scripts/Makefile.modfinal:61: arch/powerpc/platforms/cell/spufs/spufs.ko] Error 1 make: *** [Makefile:1924: modules] Error 2 Signed-off

[PATCH] powerpc: remove checks for binutils older than 2.25

2023-01-19 Thread Masahiro Yamada
Commit e4412739472b ("Documentation: raise minimum supported version of binutils to 2.25") allows us to remove the checks for old binutils. There is no more user for ld-ifversion. Remove it as well. Signed-off-by: Masahiro Yamada --- arch/powerpc/Makefile | 22 +-

Re: [PATCH] modpost: support arbitrary symbol length in modversion

2023-01-17 Thread Masahiro Yamada
symbol names. section __version_crc: 0x12345678 0x23456789 0x34567890 section __version_sym: "very_very_very_very_long_symbol" "another_very_very_very_very_very_long_symbol" "yet_another_very_very_very_very_very_long_symbol" You can iterate in each section with this: crc += sizeof(u32); name += strlen(name) + 1; Benefits: - No next pointer - No padding - *.mod.c is kept human readable. BTW, the following is impossible because the pointer reference to .rodata is not available at this point? struct modversion_info { u32 crc; const char *name: }; -- Best Regards Masahiro Yamada

[PATCH 3/5] kbuild: do not print extra logs for V=2

2022-12-22 Thread Masahiro Yamada
Some scripts increase the verbose level when V=1, but others when not V=0. I think the former is correct because V=2 is not a log level but a switch to print the reason for rebuilding. Signed-off-by: Masahiro Yamada --- Documentation/Makefile | 2 +- arch/powerpc/kernel

Re: [PATCH 2/3] powerpc/book3e: remove #include

2022-11-29 Thread Masahiro Yamada
_VERSION. > > > > Could the maintainers fix this up when applying? > > I also changed it locally so it will be fixed for v2. > > I'll take this patch, but not the others. > > cheers Okay, I applied 1/3 and 3/3 to the kbuild tree. -- Best Regards Masahiro Yamada

Re: [PATCH 3/3] init/version.c: remove #include

2022-11-29 Thread Masahiro Yamada
On Sun, Nov 27, 2022 at 7:18 AM Masahiro Yamada wrote: > > On Sat, Nov 26, 2022 at 2:10 PM Thomas Weißschuh wrote: > > > > Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved > > the usage of the define UTS_VERSION to the file version-t

Re: [PATCH 1/3] firmware_loader: remove #include

2022-11-29 Thread Masahiro Yamada
um fw_opt - options to control firmware loading behaviour > > * > > > > base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536 > Applied to linux-kbuild. Thanks. -- Best Regards Masahiro Yamada

Re: [PATCH 3/3] init/version.c: remove #include

2022-11-26 Thread Masahiro Yamada
On Sat, Nov 26, 2022 at 2:10 PM Thomas Weißschuh wrote: > > Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved > the usage of the define UTS_VERSION to the file version-timestamp.c. With s/UTS_VERSION/UTS_RELEASE/, Reviewed-by: Masahiro Yamada > &g

Re: [PATCH 2/3] powerpc/book3e: remove #include

2022-11-26 Thread Masahiro Yamada
nclude > ") > Signed-off-by: Thomas Weißschuh > --- Assuming you will fix the commit description, Reviewed-by: Masahiro Yamada > arch/powerpc/mm/nohash/kaslr_booke.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/powerpc/mm/nohash/kaslr_booke.c

Re: [PATCH 1/3] firmware_loader: remove #include

2022-11-26 Thread Masahiro Yamada
On Sat, Nov 26, 2022 at 2:10 PM Thomas Weißschuh wrote: > > utsrelease.h is potentially generated on each build. > By removing this unused include we can get rid of some spurious > recompilations. > > Signed-off-by: Thomas Weißschuh > --- Reviewed-by: Masahiro Yama

Re: build failure in linux-next: offb missing fb helpers

2022-11-19 Thread Masahiro Yamada
perhaps "depends on DRM_OFDRM = n" I do not know the intention of this dependency. Recommendation is to use "depends on" instead of "select" though. BTW, this is similar to what you asked before. https://lore.kernel.org/linux-kbuild/e1a6228d-1341-6264-d97a-e2bd52a65...@infradead.org/ I tried to fix it in the past, but the issue was not as shallow as I had expected. I did not get around to revisiting this topic. https://patchwork.kernel.org/project/linux-kbuild/patch/1543216969-2227-1-git-send-email-yamada.masah...@socionext.com/ -- Best Regards Masahiro Yamada

Re: [PATCH v8 27/31] Kbuild: add Rust support

2022-09-06 Thread Masahiro Yamada
XT > + string > + depends on RUST > + default $(shell,command -v $(RUSTC) >/dev/null 2>&1 && $(RUSTC) > --version || echo n) > + > +config BINDGEN_VERSION_TEXT > + string > + depends on RUST > + default $(shell,command -v $(BINDGEN) >/dev/null 2>&1 && $(BINDGEN) > --version || echo n) > + Where are these config options used? I grep'ed but no hit. masahiro@zoe:~/ref/linux-next$ git grep RUSTC_VERSION_TEXT init/Kconfig:config RUSTC_VERSION_TEXT masahiro@zoe:~/ref/linux-next$ git grep BINDGEN_VERSION_TEXT init/Kconfig:config BINDGEN_VERSION_TEXT > -- > 2.37.1 > -- Best Regards Masahiro Yamada

[PATCH 2/2] powerpc: remove old code for binutils < 2.25

2022-08-30 Thread Masahiro Yamada
The minimum supported version of binutils has been raised to 2.25.1. Drop the old code. PPC is the last user of ld-ifversion. With all the callers removed, the macro definition in scripts/Makefile.compiler can go away. Signed-off-by: Masahiro Yamada --- arch/powerpc/Makefile | 21

[PATCH 1/2] Documentation: raise minimum supported version of binutils to 2.25.1

2022-08-30 Thread Masahiro Yamada
Binutils 2.23 was released in 2012. Almost 10 years old. We already require GCC 5.1, which was released in 2015. Bump the binutils version to 2.25.1, which was also released in 2015. Suggested-by: Nick Desaulniers Signed-off-by: Masahiro Yamada --- Documentation/process/changes.rst | 4

Re: [PATCH] powerpc: clean up binutils version check

2022-08-30 Thread Masahiro Yamada
On Tue, Aug 30, 2022 at 7:44 PM Michael Ellerman wrote: > > Christophe Leroy writes: > > Le 27/08/2022 à 20:03, Masahiro Yamada a écrit : > >> On Sun, Aug 28, 2022 at 2:37 AM Christophe Leroy > >> wrote: > >>> Le 27/08/2022 à 18:40, Masahiro Yamada a é

Re: [PATCH] powerpc: clean up binutils version check

2022-08-27 Thread Masahiro Yamada
On Sun, Aug 28, 2022 at 2:37 AM Christophe Leroy wrote: > > > > Le 27/08/2022 à 18:40, Masahiro Yamada a écrit : > > The checkbin in arch/powerpc/Makefile errors out if ld <= 2.24. > > So, the requirement on PPC is binutils >= 2.25. It is cleaner to > > speci

[PATCH] powerpc: clean up binutils version check

2022-08-27 Thread Masahiro Yamada
gt;= 2.25 is already required, another version test for --save-restore-funcs on PPC64 is always met. PPC is the last user of ld-ifversion. With all the callers removed, the macro definition in scripts/Makefile.compiler can go away. Signed-off-by: Masahiro Yamada --- arch/powerpc/Makefil

Re: [PATCH] powerpc: align syscall table for ppc32

2022-08-25 Thread Masahiro Yamada
On Thu, Aug 25, 2022 at 4:53 PM Michael Ellerman wrote: > > Masahiro Yamada writes: > > Christophe Leroy reported that commit 7b4537199a4a ("kbuild: link > > symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS") broke > > mpc85xx_defconfig + CO

Re: Build/boot problem with 7b4537199a4a (Re: [PATCH v6 02/10] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS)

2022-08-20 Thread Masahiro Yamada
On Sat, Aug 20, 2022 at 11:15 PM Christophe Leroy wrote: > > > > Le 20/08/2022 à 14:51, Masahiro Yamada a écrit : > > On Sat, Aug 20, 2022 at 7:02 PM Christophe Leroy > > wrote: > >> > >> Hi, > >> > >> Le 13/05/2022 à 13:39, Masahiro

[PATCH] powerpc: align syscall table for ppc32

2022-08-20 Thread Masahiro Yamada
not giving Fixes tag because I do not know since when it has been broken, but presumably it has been for a long while. Link: https://lore.kernel.org/lkml/38605f6a-a568-f884-f06f-ea4da5b21...@csgroup.eu/ Reported-by: Christophe Leroy Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/systbl.S

Re: Build/boot problem with 7b4537199a4a (Re: [PATCH v6 02/10] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS)

2022-08-20 Thread Masahiro Yamada
On Sat, Aug 20, 2022 at 7:02 PM Christophe Leroy wrote: > > Hi, > > Le 13/05/2022 à 13:39, Masahiro Yamada a écrit : > > include/{linux,asm-generic}/export.h defines a weak symbol, __crc_* > > as a placeholder. > > > > Genksyms writes the version CRCs i

Re: [PATCH] powerpc/purgatory: Omit use of bin2c

2022-07-24 Thread Masahiro Yamada
On Mon, Jul 25, 2022 at 10:42 AM Segher Boessenkool wrote: > > On Sun, Jun 26, 2022 at 07:40:37AM +0900, Masahiro Yamada wrote: > > The .incbin assembler directive is much faster than bin2c + $(CC). > > And perhaps more importantly it is simpler and less clumsy. > > > -

[PATCH v2] powerpc/purgatory: Omit use of bin2c

2022-07-24 Thread Masahiro Yamada
bit kernel. (KEXEC_FILE depends on PPC64). Signed-off-by: Masahiro Yamada Reviewed-by: Segher Boessenkool --- Changes in v2: - Fix a typo (kexec_purgatroy_end -> kexec_purgatory_end) arch/powerpc/Kconfig | 1 - arch/powerpc/purgatory/.gitignore| 1 - arch/powerpc/purga

Re: [PATCH] powerpc/purgatory: Omit use of bin2c

2022-07-24 Thread Masahiro Yamada
On Sun, Jun 26, 2022 at 7:42 AM Masahiro Yamada wrote: > > The .incbin assembler directive is much faster than bin2c + $(CC). > > Do similar refactoring as in commit 4c0f032d4963 ("s390/purgatory: > Omit use of bin2c"). > > Please note the .quad directive matc

Re: [PATCH v7 21/25] Kbuild: add Rust support

2022-07-16 Thread Masahiro Yamada
> +# Rust targets > +# --- > + > +# "Is Rust available?" target > +PHONY += rustavailable > +rustavailable: > + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust-is-available.sh -v && > echo >&2 "Rust is available!" > + Is it intentional to print the successful message to stderr? -- Best Regards Masahiro Yamada

[PATCH] powerpc/purgatory: Omit use of bin2c

2022-06-25 Thread Masahiro Yamada
bit kernel. (KEXEC_FILE depends on PPC64). Signed-off-by: Masahiro Yamada --- arch/powerpc/Kconfig | 1 - arch/powerpc/purgatory/.gitignore| 1 - arch/powerpc/purgatory/Makefile | 8 ++-- arch/powerpc/purgatory/kexec-purgatory.S | 14 ++ scripts/re

[PATCH] powerpc: get rid of #include

2022-06-04 Thread Masahiro Yamada
init/version.c Let's copy the solution from MIPS. (get_random_boot() in arch/mips/kernel/relocate.c) Fixes: 6a38ea1d7b94 ("powerpc/fsl_booke/32: randomize the kernel image offset") Signed-off-by: Masahiro Yamada --- If this gets into the mainline before -rc2 or -rc3, I will base m

[PATCH 0/3] asm-generic: fix misconversion of {uid,gid}_t

2022-06-01 Thread Masahiro Yamada
I accidentally broke android binder.h: https://lore.kernel.org/all/20220601010017.2639048-1-cmlla...@google.com/ I checked my previous conversions, and found some more. (at least, the sparc one seems fatal.) Masahiro Yamada (3): mips: use __kernel_{uid,gid}32_t in uapi/asm/stat.h powerpc

[PATCH 2/3] powerpc: use __kernel_{uid,gid}32_t in uapi/asm/stat.h

2022-06-01 Thread Masahiro Yamada
x/types.h. A similar issue was reported for the android binder. [1] [1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmlla...@google.com/ Fixes: c01013a2f8dd ("powerpc: add asm/stat.h to UAPI compile-test coverage") Signed-off-by: Masahiro Yamada --- arch/powerpc/include/uap

Re: [PATCH v4 02/14] modpost: change the license of EXPORT_SYMBOL to bool type

2022-05-11 Thread Masahiro Yamada
On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > There were more EXPORT_SYMBOL types in the past. The following commits > removed unused ones. > > - f1c3d73e973c ("module: remove EXPORT_SYMBOL_GPL_FUTURE") > - 367948220fce ("module: remove EXPORT

Re: [PATCH v4 01/14] modpost: remove left-over cross_compile declaration

2022-05-11 Thread Masahiro Yamada
On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > This is a remnant of commit 6543becf26ff ("mod/file2alias: make > modalias generation safe for cross compiling"). > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild. > > Changes in v4

Re: [PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c

2022-05-11 Thread Masahiro Yamada
On Thu, May 12, 2022 at 3:48 AM Nick Desaulniers wrote: > > On Mon, May 9, 2022 at 11:57 PM Masahiro Yamada wrote: > > > > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > > > index a78b75f0eeb0..e7e2c70a98f5 100644 > > > > --- a

Re: [PATCH v4 10/14] kbuild: check static EXPORT_SYMBOL* by script instead of modpost

2022-05-10 Thread Masahiro Yamada
On Tue, May 10, 2022 at 3:05 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > diff --git a/scripts/check-local-export b/scripts/check-local-export > > new file mode 100755 > > index

Re: [PATCH v4 06/14] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS

2022-05-10 Thread Masahiro Yamada
On Tue, May 10, 2022 at 2:51 AM Nick Desaulniers wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h > > index 07a36a874dca..51ce72ce80fa 100644 > > --- a/include/

Re: [PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c

2022-05-09 Thread Masahiro Yamada
On Tue, May 10, 2022 at 2:20 AM Nick Desaulniers wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > modpost.c is too big, and the half of the code is for section checks. > > Split it. > > > > I fixed some style issues in the moved code

Re: [PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h)

2022-05-09 Thread Masahiro Yamada
On Tue, May 10, 2022 at 7:13 AM Nathan Chancellor wrote: > > On Mon, May 09, 2022 at 01:24:33PM +0900, Masahiro Yamada wrote: > > On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > > > > > This is the third batch of cleanups in this development cycle. &

Re: [PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h)

2022-05-08 Thread Masahiro Yamada
On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > This is the third batch of cleanups in this development cycle. > > Major changes in v4: > - Move static EXPORT_SYMBOL check to a script > - Some refactoring > > Major changes in v3: > > - Generate sym

[PATCH v4 14/14] kbuild: rebuild multi-object modules when objtool is updated

2022-05-08 Thread Masahiro Yamada
When CONFIG_LTO_CLANG or CONFIG_X86_KERNEL_IBT is enabled, objtool for multi-object modules is postponed until the objects are linked together. Make sure to re-run objtool and re-link multi-object modules when objtool is updated. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Acked-by

[PATCH v4 13/14] kbuild: add cmd_and_savecmd macro

2022-05-08 Thread Masahiro Yamada
Separate out the command execution part of if_changed, as we did for if_changed_dep. This allows us to reuse it in if_changed_rule. define rule_foo $(call cmd_and_savecmd,foo) $(call cmd,bar) endef Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in

[PATCH v4 07/14] kbuild: stop merging *.symversions

2022-05-08 Thread Masahiro Yamada
Now modpost reads symbol versions from .*.cmd files. The merged *.symversions are no longer needed. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v1) scripts/Makefile.build | 21 ++--- scripts/link-vmlinux.sh

[PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c

2022-05-08 Thread Masahiro Yamada
modpost.c is too big, and the half of the code is for section checks. Split it. I fixed some style issues in the moved code. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/mod/Makefile|2 +- scripts/mod/modpost.c | 1202

  1   2   3   4   5   >