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
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,
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
> > >
> > >
> - | 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
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
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
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
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
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
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
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
++
> 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 +-
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
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
> }
>
> # 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
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
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
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
> 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
; 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
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
> >
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
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
_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
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
+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
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
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
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
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
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
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
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
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
: *** [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(-
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
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
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
> >
.@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
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
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/
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,
> > >>
> > >
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
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
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
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
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
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 |
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:
> >
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
; 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
> -
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
; | 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
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
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:
> > > >
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
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
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
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.
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
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 +-
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
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
_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
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
um fw_opt - options to control firmware loading behaviour
> > *
> >
> > base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536
>
Applied to linux-kbuild.
Thanks.
--
Best Regards
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
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
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
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
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
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
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
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 é
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
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
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
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
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
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
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.
>
> > -
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
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
> +# 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
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
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
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
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
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
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
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
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
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/
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
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.
&
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
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
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
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
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 - 100 of 473 matches
Mail list logo