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
-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
X86_KERNEL_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(-)

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

2024-02-16 Thread Masahiro Yamada
place 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
ut 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
ave 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

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
efile: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(-) diff --

[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 | 3 --- arch/riscv

[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 | 3 --- arch/x86

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

2023-09-02 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
nel.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 fragment ta

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
+- > 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 vers

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

2023-04-10 Thread Masahiro Yamada
ed > 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
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
/^$/!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
ithub.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
-### \ > > -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
sed/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
> 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 binut

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

2023-01-19 Thread Masahiro Yamada
[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-by: Masah

[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
_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
enum 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 >

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
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
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
s >= 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
s 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 | 1 + 1 file

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 versio

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
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 my kbuild work on top of t

[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
es.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/uapi/asm

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-10 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-10 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

[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

[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

[PATCH v4 11/14] kbuild: make built-in.a rule robust against too long argument error

2022-05-08 Thread Masahiro Yamada
drivers/gpu/drm/i915/.built-in.a.cmd with/without this commit. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - New patch scripts/Makefile.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

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

2022-05-08 Thread Masahiro Yamada
}. This works for CONFIG_LTO_CLANG=y because llvm-nm can dump symbols of LLVM bitcode. Revert 15bfc2348d54. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/Makefile.build | 4 scripts/check-local-export | 48 ++ scripts/mod/modpos

[PATCH v4 12/14] kbuild: make *.mod rule robust against too long argument error

2022-05-08 Thread Masahiro Yamada
reported before [1]. [1] https://lore.kernel.org/linux-kbuild/4c02050c4e95e4cb8cc04282695f8...@codeaurora.org/ Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - New patch scripts/Makefile.build | 4 ++-- 1 file

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

2022-05-08 Thread Masahiro Yamada
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 Tested

[PATCH v4 08/14] genksyms: adjust the output format to modpost

2022-05-08 Thread Masahiro Yamada
Make genksyms output symbol versions in the format modpost expects, so the 'sed' is unneeded. This commit makes *.symversions completely unneeded. I will keep *.symversions in .gitignore and 'make clean' for a while. Otherwise, 'git status' might be surprising. Signed-off-by: Masahiro Yamada

[PATCH v4 09/14] kbuild: do not create *.prelink.o for Clang LTO or IBT

2022-05-08 Thread Masahiro Yamada
---/ | (LLVM bitcode) foo.mod.o --/ Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - replace the chain of $(if ...) with $(and ) scripts/Kbuild.include

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

2022-05-08 Thread Masahiro Yamada
s can use it. I removed the orphan comment, "How a symbol is exported", which is unrelated to sec_mismatch_count. It is about enum export. See commit bd5cbcedf446 ("kbuild: export-type enhancement to modpost.c") Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested

[PATCH v4 05/14] modpost: extract symbol versions from *.cmd files

2022-05-08 Thread Masahiro Yamada
nstead of from ELF objects. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - Simplify the implementation (parse .cmd files after ELF) scripts/mod/modpost.c | 177 ++

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

2022-05-08 Thread Masahiro Yamada
with CONFIG_MODULE_REL_CRCS. I fixed this for v2. - Reflect some review comments in v1 - Refactor the code more - Avoid too long argument error Masahiro Yamada (14): modpost: remove left-over cross_compile declaration modpost: change the license of EXPORT_SYMBOL to bool type modpost: split

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

2022-05-08 Thread Masahiro Yamada
This is a remnant of commit 6543becf26ff ("mod/file2alias: make modalias generation safe for cross compiling"). Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/mod/modpost.h | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/mod/modpost.h b/s

[PATCH v4 04/14] modpost: add sym_find_with_module() helper

2022-05-08 Thread Masahiro Yamada
as the second argument. It is equivalent to find_module() if NULL is passed as the module pointer. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- Changes in v4: - Only takes the new helper from https://patchwork.kernel.org/project/linux-kbuild

Re: [PATCH v3 00/15] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS)

2022-05-08 Thread Masahiro Yamada
On Thu, May 5, 2022 at 4:24 PM Masahiro Yamada wrote: > > > This is the third batch of cleanups in this development cycle. > > Major changes in v3: > > - Generate symbol CRCs as C code, and remove CONFIG_MODULE_REL_CRCS. > > Major changes in v2: > > - V1 did not

Re: [PATCH] crypto: vmx - Align the short log with Makefile cleanups

2022-05-06 Thread Masahiro Yamada
On Sat, May 7, 2022 at 11:02 AM Herbert Xu wrote: > > On Sat, May 07, 2022 at 12:25:32AM +0900, Masahiro Yamada wrote: > > > > Sorry, I just noticed the 0day bot had reported the error. > > > > I sent v2.(CONFIG_LITTLE_ENDIAN --> CONFIG_CPU_LITTLE_ENDIAN) >

[PATCH] crypto: vmx - Fix build error

2022-05-06 Thread Masahiro Yamada
When I refactored this Makefile, I accidentally changed the CONFIG option. Fixes: b52455a73db9 ("crypto: vmx - Align the short log with Makefile cleanups") Reported-by: kernel test robot Signed-off-by: Masahiro Yamada --- drivers/crypto/vmx/Makefile | 2 +- 1 file changed, 1 inser

Re: [PATCH] crypto: vmx - Align the short log with Makefile cleanups

2022-05-06 Thread Masahiro Yamada
Hi Herbert, On Fri, May 6, 2022 at 7:23 PM Herbert Xu wrote: > > On Sun, May 01, 2022 at 10:07:49PM +0900, Masahiro Yamada wrote: > > I notieced the log is not properly aligned: > > > > PERL drivers/crypto/vmx/aesp8-ppc.S > > CC [M] fs/xfs/xfs_reflink.o

[PATCH v2] crypto: vmx - Align the short log with Makefile cleanups

2022-05-06 Thread Masahiro Yamada
- Remove redundant 'clean-files' (Having 'targets' is enough) - Move the flavour into the build command This still avoids the build failures fixed by commit 4ee812f6143d ("crypto: vmx - Avoid weird build failures"). Signed-off-by: Masahiro Yamada --- Changes in v

Re: [PATCH v3 00/15] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS)

2022-05-05 Thread Masahiro Yamada
On Thu, May 5, 2022 at 4:24 PM Masahiro Yamada wrote: > > > This is the third batch of cleanups in this development cycle. This series is available at: git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git lto-cleanup-v3 -- Best Regards Masahiro Yamada

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

2022-05-05 Thread Masahiro Yamada
On Thu, May 5, 2022 at 4:24 PM Masahiro Yamada wrote: > > Currently, enum export is tristate, but export_unknown does not make > sense in any way. > > If the symbol name starts with "__ksymtab_", but the section name > does not start with &quo

[PATCH v3 14/15] kbuild: make built-in.a rule robust against too long argument error

2022-05-05 Thread Masahiro Yamada
drivers/gpu/drm/i915/.built-in.a.cmd with/without this commit. Signed-off-by: Masahiro Yamada --- (no changes since v2) Changes in v2: - New patch scripts/Makefile.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build

[PATCH v3 10/15] genksyms: adjust the output format to modpost

2022-05-05 Thread Masahiro Yamada
-by: Masahiro Yamada --- (no changes since v2) Changes in v2: - New patch scripts/Makefile.build | 6 -- scripts/genksyms/genksyms.c | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index dff9220135c4..461998a2ad2b 100644

[PATCH v3 06/15] kbuild: record symbol versions in *.cmd files

2022-05-05 Thread Masahiro Yamada
-by: Masahiro Yamada Tested-by: Nicolas Schier Reviewed-by: Nicolas Schier --- (no changes since v2) Changes in v2: - Fix CONFIG_MODULE_REL_CRCS=y case scripts/Makefile.build | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index

[PATCH v3 07/15] modpost: extract symbol versions from *.cmd files

2022-05-05 Thread Masahiro Yamada
es instead of from ELF objects. Signed-off-by: Masahiro Yamada --- (no changes since v2) Changes in v2: - Simplify the implementation (parse .cmd files after ELF) scripts/mod/modpost.c | 177 ++ 1 file changed, 129 insertions(+), 48 deletions(-) diff

  1   2   3   4   5   >