[PATCH 1/2] kconfig: qconf: use delete[] instead of delete to free array (again)

2020-09-08 Thread Masahiro Yamada
x27;new[]' here char *data = new char[count + 1]; ^ Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again") Fixes: c9b09a9249e6 ("kconfig: qconf: use delete[] instead of delete to free array") Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 2

[PATCH 2/2] kconfig: fix incomplete type 'struct gstr' warning

2020-09-08 Thread Masahiro Yamada
clarations of menu.c functions below. BTW, some are declared in lkc.h and some in lkc_proto.h, but the difference is unclear. I guess some refactoring is needed. Signed-off-by: Masahiro Yamada --- scripts/kconfig/lkc.h | 47 +++-- scripts/kconfig/lkc_pro

[PATCH] kbuild: do not create built-in objects for external module builds

2020-09-08 Thread Masahiro Yamada
k equivalently. Signed-off-by: Masahiro Yamada --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec2330ce0fc5..29878033f9d6 100644 --- a/Makefile +++ b/Makefile @@ -1692,7 +1692,8 @@ else # KBUILD_EXTMOD # Install t

[PATCH v2] kbuild: preprocess module linker script

2020-09-07 Thread Masahiro Yamada
pts/module.lds.S. scripts/module.lds is fine because 'make clean' keeps all the build artifacts under scripts/. You can add arch-specific sections in . Signed-off-by: Masahiro Yamada Tested-by: Jessica Yu Acked-by: Will Deacon --- Changes in v2: - Fix the race between the

Please revert kbuild commit for today's linux-next

2020-09-07 Thread Masahiro Yamada
Hi Stephen, As 0-day bot detected, the following commit in my kbuild tree turned out to be problematic. commit 8d77c9acc14a49e4175d7e0d3ce1e256cd31c5a5 (origin/kbuild, kbuild) Author: Masahiro Yamada Date: Fri Sep 4 22:31:21 2020 +0900 kbuild: preprocess module linker script Could

Re: [PATCH v2 09/28] kbuild: add support for Clang LTO

2020-09-07 Thread Masahiro Yamada
; +++ b/scripts/Makefile.modpost > @@ -102,12 +102,32 @@ $(input-symdump): > @echo >&2 'WARNING: Symbol version dump "$@" is missing.' > @echo >&2 ' Modules may not have dependencies or modversions.' > > +ifdef CONFIG_LTO_CLANG > +# With CONFIG_LTO_CLANG, .o files might be LLVM bitcode, or, .o files might be even thin archives. For example, $ file net/ipv6/netfilter/nf_defrag_ipv6.o net/ipv6/netfilter/nf_defrag_ipv6.o: thin archive with 6 symbol entries Now we have 3 possibilities for .o files: - ELF (real .o) - LLVM bitcode (.bc) - Thin archive (.a) Let me discuss how to proceed with this... -- Best Regards Masahiro Yamada

Re: [PATCH v2 13/28] kbuild: lto: merge module sections

2020-09-07 Thread Masahiro Yamada
} > + > + .rodata : { > + *(.rodata .rodata.[0-9a-zA-Z_]*) > + *(.rodata..L*) > + } > + > + .text : { *(.text .text.[0-9a-zA-Z_]*) } > +} > -- > 2.28.0.402.g5ffc5be6b7-goog > After I apply https://patchwork.kernel.org/patch/11757323/, is it possible to do like this ? #ifdef CONFIG_LTO SECTIONS { ... }; #endif in scripts/module.lds.S -- Best Regards Masahiro Yamada

Re: [PATCH] arch: vdso: add vdso linker script to 'targets' instead of extra-y

2020-09-07 Thread Masahiro Yamada
On Tue, Sep 1, 2020 at 3:23 AM Masahiro Yamada wrote: > > The vdso linker script is preprocessed on demand. > Adding it to 'targets' is enough to include the .cmd file. > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild. > arch/arm64/kernel/v

Re: [PATCH v2 00/28] Add support for Clang LTO

2020-09-05 Thread Masahiro Yamada
. Nothing was dropped. The situation is the same for build-in because LTO is run against vmlinux.o, which is relocatable as well. -- Best Regards Masahiro Yamada From c1dc646f73bd948edbf0c4a7f1baa93ecf8c208e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 6 Sep 2020 08:11:32 +0900 Su

Re: [PATCH v2 09/28] kbuild: add support for Clang LTO

2020-09-05 Thread Masahiro Yamada
o-cache > +else > +CC_FLAGS_LTO_CLANG := -flto > +endif > +CC_FLAGS_LTO_CLANG += -fvisibility=default > +endif > + > +ifdef CONFIG_LTO > +CC_FLAGS_LTO := $(CC_FLAGS_LTO_CLANG) $(CC_FLAGS_LTO_CLANG) is not used elsewhere. Why didn't you add the flags to CC_FLAGS_LTO directly? Will it be useful if LTO_GCC is supported ? > +KBUILD_CFLAGS += $(CC_FLAGS_LTO) > +export CC_FLAGS_LTO > +endif -- Best Regards Masahiro Yamada

Re: [PATCH v2 09/28] kbuild: add support for Clang LTO

2020-09-05 Thread Masahiro Yamada
\ > - ${@}" > + if [ -n "${CONFIG_LTO_CLANG}" ]; then > + # Use vmlinux.o instead of performing the slow LTO > + # link again. > + objects="--whole-archive\ > + vmlinux.o \ > + --no-whole-archive \ > + ${@}" > + else > + objects="--whole-archive\ > + ${KBUILD_VMLINUX_OBJS} \ > + --no-whole-archive \ > + --start-group \ > + ${KBUILD_VMLINUX_LIBS} \ > + --end-group \ > + ${@}" > + fi > > ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} \ > ${strip_debug#-Wl,} \ > @@ -274,7 +291,6 @@ fi; > ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 > > #link vmlinux.o > -info LD vmlinux.o > modpost_link vmlinux.o > objtool_link vmlinux.o > > -- > 2.28.0.402.g5ffc5be6b7-goog > -- Best Regards Masahiro Yamada

Re: [PATCH 1/2] ARM: makefile: Drop GZFLAGS definition and export

2020-09-05 Thread Masahiro Yamada
On Sat, Sep 5, 2020 at 5:14 AM Denis Efremov wrote: > > Drop the definition and export of GZFLAGS, because it's > not used. GZFLAGS was dropped from arm64 in commit > 4cf234943dcf ("arm64: drop GZFLAGS definition and export"). > > Signed-off-by: Denis Efremo

Re: [PATCH 2/2] csky: Drop GZFLAGS definition

2020-09-05 Thread Masahiro Yamada
ky/Makefile > index 37f593a4bf53..715b839bf998 100644 > --- a/arch/csky/Makefile > +++ b/arch/csky/Makefile > @@ -1,6 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0-only > OBJCOPYFLAGS :=-O binary > -GZFLAGS :=-9 Reviewed-by: Masahiro Yamada &g

[PATCH] kbuild: preprocess module linker script

2020-09-04 Thread Masahiro Yamada
s/module.lds is fine because 'make clean' keeps all the build artifacts under scripts/. You can add arch-specific sections in . Signed-off-by: Masahiro Yamada Tested-by: Jessica Yu --- Makefile | 1 - arch/arm/Makefile

[GIT PULL] Kbuild fixes for v5.9-rc4

2020-09-04 Thread Masahiro Yamada
ig/nconf.c | 1 - scripts/kconfig/streamline_config.pl | 5 - 4 files changed, 26 insertions(+), 24 deletions(-) -- Best Regards Masahiro Yamada

Re: [PATCH] kconfig: streamline_config.pl: check defined(ENV variable) before using it

2020-09-02 Thread Masahiro Yamada
; though. OK, I will drop your tag. -- Best Regards Masahiro Yamada

Re: [PATCH] kconfig: streamline_config.pl: check defined(ENV variable) before using it

2020-09-02 Thread Masahiro Yamada
On Thu, Sep 3, 2020 at 3:22 AM Nathan Royce wrote: > > Thanks, but I'd just as soon not be acknowledged/credited. All I did > was submit a report. > > On Wed, Sep 2, 2020 at 11:47 AM Masahiro Yamada wrote: > > > > Applied to linux-kbuild/fixes with Nathan's

Re: [PATCH -v2] scipts/tags.sh: Add custom sort order

2020-09-02 Thread Masahiro Yamada
On Thu, Sep 3, 2020 at 1:26 AM wrote: > > On Thu, Sep 03, 2020 at 12:58:14AM +0900, Masahiro Yamada wrote: > > > Sorry for the long delay. > > > > First, this patch breaks 'make TAGS' > > if 'etags' is a symlink to exuberant ctags. &g

Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-09-02 Thread Masahiro Yamada
On Thu, Sep 3, 2020 at 7:40 AM Nick Desaulniers wrote: > > On Fri, Aug 21, 2020 at 10:14 PM Masahiro Yamada wrote: > > > > On Fri, Aug 21, 2020 at 7:10 AM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > > > While moving Androi

Re: [PATCH] kconfig: streamline_config.pl: check defined(ENV variable) before using it

2020-09-02 Thread Masahiro Yamada
defined before trying > to use it. > > Fixes: c027b02d89fd ("streamline_config.pl: add LMC_KEEP to preserve some > kconfigs") > Signed-off-by: Randy Dunlap > Cc: Changbin Du > Cc: Steven Rostedt (VMware) > Cc: Masahiro Yamada > Acked-by: Steven Rostedt (VMwar

Re: localmodconfig - "intel_rapl_perf config not found!!"

2020-09-02 Thread Masahiro Yamada
including FAQ lists, should be found on > this system using "man perl" or "perldoc perl". If you have access to the > Internet, point your browser at http://www.perl.org/, the Perl Home Page. > > > > Changing email address for Changbin. > > Plus I made

Re: [PATCH -v2] scipts/tags.sh: Add custom sort order

2020-09-02 Thread Masahiro Yamada
On Thu, Sep 3, 2020 at 12:58 AM Masahiro Yamada wrote: > > On Fri, Aug 7, 2020 at 2:28 AM wrote: > > > > > > One long standing annoyance I have with using vim-tags is that our tags > > file is not properly sorted. That is, the sorting exhuberant Ctags does

Re: [PATCH -v2] scipts/tags.sh: Add custom sort order

2020-09-02 Thread Masahiro Yamada
masahiro@oscar:~/ref/linux$ make TAGS GEN TAGS etags: Warning: include/linux/seqlock.h:738: null expansion of name pattern "\2" sed: can't read TAGS: No such file or directory make: *** [Makefile:1820: TAGS] Error 2 The reason is the hard-coded ' > tags', and e

[PATCH] arch: vdso: add vdso linker script to 'targets' instead of extra-y

2020-08-31 Thread Masahiro Yamada
The vdso linker script is preprocessed on demand. Adding it to 'targets' is enough to include the .cmd file. Signed-off-by: Masahiro Yamada --- arch/arm64/kernel/vdso/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- arch/nds32/kernel/vdso/Makefile | 2 +- ar

Re: [PATCH] microblaze: fix kbuild redundant file warning

2020-08-31 Thread Masahiro Yamada
the rebased result. You can replace the tag with: Fixes: 630f289b7114 ("asm-generic: make more kernel-space headers mandatory") -- Best Regards Masahiro Yamada

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-31 Thread Masahiro Yamada
On Mon, Aug 31, 2020 at 10:25 PM Ard Biesheuvel wrote: > > On Mon, 31 Aug 2020 at 13:43, Masahiro Yamada wrote: > > > > On Mon, Aug 31, 2020 at 6:47 PM Jessica Yu wrote: > > > > > > +++ Will Deacon [21/08/20 13:30 +0100]: > > > [snipped] >

Re: [PATCH] kconfig: remove redundant assignment prompt = prompt

2020-08-31 Thread Masahiro Yamada
prompt = prompt; > if (single_menu_mode) { > item_make(menu, 'm', > "%s%*c%s", > -- > 2.26.2 > -- Best Regards Masahiro Yamada

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-31 Thread Masahiro Yamada
odule_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr > *sechdrs, > mod->arch.core.plt_shndx = i; > else if (!strcmp(secstrings + sechdrs[i].sh_name, > ".init.plt")) > mod->arch.init.plt_shndx = i;

[PATCH] MAINTAINERS: step down as maintainer of UniPhier SoCs and Denali driver

2020-08-30 Thread Masahiro Yamada
I am leaving Socionext. Orphan the UniPhier platform and Denali NAND driver until somebody takes the role. Signed-off-by: Masahiro Yamada --- I hope this can be applied to the ARM-SOC tree. MAINTAINERS | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS b

Re: [PATCH 06/11] kconfig: qconf: allow to edit "int", "hex", "string" menus in-place

2020-08-30 Thread Masahiro Yamada
On Sun, Aug 30, 2020 at 1:54 PM Randy Dunlap wrote: > > On 8/29/20 1:14 AM, Masahiro Yamada wrote: > > Previously, when you double-clicked the "int", "hex", or "string" menus, > > a line-edit gadget showed up to allow you to input the value, whi

Re: [PATCH 05/11] kconfig: qconf: show data column all the time

2020-08-30 Thread Masahiro Yamada
On Sun, Aug 30, 2020 at 1:54 PM Randy Dunlap wrote: > > On 8/29/20 1:14 AM, Masahiro Yamada wrote: > > The next commit will allow users to edit "int", "hex", "string" > > menus in-place from the data column. > > > > The data column

[PATCH 11/11] kconfig: qconf: create QApplication after option checks

2020-08-29 Thread Masahiro Yamada
'scripts/kconfig/qconf -h' just calls usage() and exits, with QApplication unused. There is no need to construct QApplication so early. Do it after the parse stage. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 04/11] kconfig: qconf: move ConfigView::updateList(All) to ConfigList class

2020-08-29 Thread Masahiro Yamada
iew::updateListAll() -> ConfigList::updateListAllForAll() I used QList to contain all ConfigList instances. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 70 +++- scripts/kconfig/qconf.h | 11 +++ 2 files changed, 39 insertions(+), 42 del

[PATCH 05/11] kconfig: qconf: show data column all the time

2020-08-29 Thread Masahiro Yamada
The next commit will allow users to edit "int", "hex", "string" menus in-place from the data column. The data column should be always displayed. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 29 + scripts/kconfig/qconf.

[PATCH 03/11] kconfig: qconf: remove unused ConfigItem::okRename()

2020-08-29 Thread Masahiro Yamada
the empty stub, but it seems useless. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 8 scripts/kconfig/qconf.h | 1 - 2 files changed, 9 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 30a58aa6507a..278c04de11ec 100644 --- a/scri

[PATCH 06/11] kconfig: qconf: allow to edit "int", "hex", "string" menus in-place

2020-08-29 Thread Masahiro Yamada
the list windows. Otherwise, (the reason for the failure is possibly the input data was out of range), set the old value back to the editor. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 93 scripts/kconfig/qconf.h | 15 +++ 2 fi

[PATCH 01/11] kconfig: qconf: reformat the intro message

2020-08-29 Thread Masahiro Yamada
The introduction message displayed by 'Help -> Introduction' does not look nice due to excessive new lines. Reformat the message. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-)

[PATCH 09/11] kconfig: qconf: remove ConfigView class

2020-08-29 Thread Masahiro Yamada
Now that ConfigView only contains ConfigList, we can remove ConfigView and just use ConfigList. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 43 ++-- scripts/kconfig/qconf.h | 21 ++-- 2 files changed, 17 insertions(+), 47

[PATCH 10/11] kconfig: qconf: remove Y, M, N columns

2020-08-29 Thread Masahiro Yamada
There are so many ways to toggle bool / tristate options. I do not know how useful these columns are. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 59 ++-- scripts/kconfig/qconf.h | 6 ++-- 2 files changed, 4 insertions(+), 61 deletions

[PATCH 07/11] kconfig: qconf: remove ConfigLineEdit class

2020-08-29 Thread Masahiro Yamada
Now that "int", "hex", "string" menus are edited in-place, this class is no longer needed. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 39 --- scripts/kconfig/qconf.h | 18 -- 2 files changed,

[PATCH 02/11] kconfig: qconf: update the intro message to match to the current code

2020-08-29 Thread Masahiro Yamada
I do not think "Although there is no cross reference yet ..." is valid any longer. The cross reference is supported via hyperlinks enabled by the "show Debug Info" option. Update the message. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 8 ---

[PATCH 08/11] kconfig: qconf: move setShowName/Range() to ConfigList from ConfigView

2020-08-29 Thread Masahiro Yamada
ConfigView::setShowName/Range() only get access to the 'list' member. Move them to the more relevant ConfigList class. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 53 +--- scripts/kconfig/qconf.h | 12 +++-- 2 files c

Re: [PATCH] microblaze: fix kbuild redundant file warning

2020-08-28 Thread Masahiro Yamada
uild: hw_irq.h > > Fixes: 7e8f54cd4e26 ("microblaze: Remove empty headers") > Signed-off-by: Randy Dunlap > Cc: Michal Simek > Cc: Michal Simek > Cc: Masahiro Yamada Reviewed-by: Masahiro Yamada > --- > arch/microblaze/include/asm/Kbuild |1 - > 1 file

[PATCH 2/3] ia64: remove unneeded header includes from

2020-08-28 Thread Masahiro Yamada
included 436 headers, and now it includes only 138. I confirmed is still self-contained. Signed-off-by: Masahiro Yamada --- arch/ia64/include/asm/mca.h | 9 +++-- arch/ia64/kernel/efi.c | 1 + arch/ia64/kernel/mca.c | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff

[PATCH 0/3] ia64: clean-up header dependency and build process, fix build warning

2020-08-28 Thread Masahiro Yamada
s, but not prerequisites for 3/3. Anyway I believe they are nice cleanups and folded in this patch set. 3/3 is the important one to fix the false positive warning, and it is a nice cleanup too. Masahiro Yamada (3): ia64: do not typedef struct pal_min_state_area_s ia64: remove unneeded header includes fr

[PATCH 3/3] ia64: remove generated/nr-irqs.h generation to fix build warning

2020-08-28 Thread Masahiro Yamada
cause the header inclusion has been consolidated to make asm-offsets.c independent of . Reported-by: Randy Dunlap Signed-off-by: Masahiro Yamada --- arch/ia64/Makefile | 6 -- arch/ia64/include/asm/irq.h | 4 +++- arch/ia64/kernel/Makefile | 5 - ar

[PATCH 1/3] ia64: do not typedef struct pal_min_state_area_s

2020-08-28 Thread Masahiro Yamada
it with (struct pal_min_state_area *) will relax the header dependency since it is enough to tell it is a pointer to a structure, and to resolve the size of struct pal_min_state_area. It will make independent of . typedef's a lot of structures, but it is trivial to convert the others in the same way. Si

Re: [PATCH] Documentation/llvm: Improve formatting of commands, variables, and arguments

2020-08-28 Thread Masahiro Yamada
t; \\ > > + make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \ > > + OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \ > > + READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \ > > HOSTLD=ld.lld > > > > Currently, the integrated assembler is disabled by default. You can pass > > -`LLVM_IAS=1` to enable it. > > +``LLVM_IAS=1`` to enable it. > > > > Getting Help > > > > > > base-commit: abb3438d69fb6dd5baa4ae23eafbf5b87945eff1 > > -- Applied to linux-kbuild/fixes. Thanks. -- Best Regards Masahiro Yamada

Re: [PATCH v2] Documentation: add minimum clang/llvm version

2020-08-27 Thread Masahiro Yamada
version Command to check the version > == === > > GNU C 4.9 gcc --version > +Clang/LLVM (optional) 10.0.1 clang --version Just playing a nitpick: Supporting Clang makes GCC optional, so now "GNU C (optional)" :-) Reviewed-by: Masahiro Yamada -- Best Regards Masahiro Yamada

Re: [PATCH v3] lib/string.c: implement stpcpy

2020-08-26 Thread Masahiro Yamada
On Thu, Aug 27, 2020 at 1:58 AM Nick Desaulniers wrote: > > On Wed, Aug 26, 2020 at 9:57 AM Joe Perches wrote: > > > > On Thu, 2020-08-27 at 01:49 +0900, Masahiro Yamada wrote: > > > I do not have time to keep track of the discussion fully, > > > but could y

Re: [PATCH v3] lib/string.c: implement stpcpy

2020-08-26 Thread Masahiro Yamada
Link: https://bugs.llvm.org/show_bug.cgi?id=47280 > Link: https://github.com/ClangBuiltLinux/linux/issues/1126 > Link: https://man7.org/linux/man-pages/man3/stpcpy.3.html > Link: https://pubs.opengroup.org/onlinepubs/9699919799/functions/stpcpy.html > Link: https://reviews.llvm.org/D85963

Re: [PATCH v2] h8300: Replace by

2020-08-26 Thread Masahiro Yamada
kernel_size_t etc. to posix_types.h These types should be defined in posix_types.h, not in bitsperlong.h . With these defines moved, h8300-specific bitsperlong.h is no longer needed since Kbuild will automatically create a wrapper of include/uapi/asm-generic/bitsperlong.h S

Re: [PATCH v3] lib/string.c: implement stpcpy

2020-08-26 Thread Masahiro Yamada
Link: https://bugs.llvm.org/show_bug.cgi?id=47280 > Link: https://github.com/ClangBuiltLinux/linux/issues/1126 > Link: https://man7.org/linux/man-pages/man3/stpcpy.3.html > Link: https://pubs.opengroup.org/onlinepubs/9699919799/functions/stpcpy.html > Link: https://reviews.llvm.org/D85963

Re: [PATCH] kbuild: hide commands to run Kconfig, and show short log for syncconfig

2020-08-26 Thread Masahiro Yamada
On Fri, Aug 21, 2020 at 11:44 AM Masahiro Yamada wrote: > > Some targets (localyesconfig, localmodconfig, defconfig) hide the > command running, but the others do not. > > Users know which Kconfig flavor they are running, so it is OK to hide > the command. Add $(Q) to all com

Re: [PATCH] kbuild: Simplify DEBUG_INFO Kconfig handling

2020-08-26 Thread Masahiro Yamada
> > [1] https://patchwork.kernel.org/patch/11716107/ Applied to linux-kbuild. Sorry for the delay. -- Best Regards Masahiro Yamada

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-26 Thread Masahiro Yamada
On Tue, Aug 25, 2020 at 11:02 PM Nick Desaulniers wrote: > > On Tue, Aug 25, 2020 at 5:30 AM Masahiro Yamada wrote: > > > > On Tue, Aug 25, 2020 at 4:10 PM Nick Desaulniers > > wrote: > > > > > > Masahiro, are you implying that we shouldn't ta

Re: [PATCH v3 00/10] kbuild: clang-tidy

2020-08-26 Thread Masahiro Yamada
On Sat, Aug 22, 2020 at 11:56 PM Masahiro Yamada wrote: > > I improved gen_compile_commands.py, > then rebased Nathan's v7 [1] on top of them. > To save time, I modified the Makefile part. > No change for run-clang-tools.py > > "make clang-tidy" should work i

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-25 Thread Masahiro Yamada
On Tue, Aug 25, 2020 at 4:10 PM Nick Desaulniers wrote: > > On Mon, Aug 24, 2020 at 10:34 AM Arvind Sankar wrote: > > > > On Tue, Aug 25, 2020 at 12:57:22AM +0900, Masahiro Yamada wrote: > > > > > > > > > To prevent transformation from foo() into b

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-24 Thread Masahiro Yamada
ipts as well? > > Thanks, > > Jessica If you want to generate $(objtree)/arch/arm64/kernel/module.lds, you need to tell it to the build system. The following seems to work, but please do NOT do this: ->8 diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index b45f0124cc16..4ae398c2 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -116,7 +116,7 @@ endif CHECKFLAGS += -D__aarch64__ ifeq ($(CONFIG_ARM64_MODULE_PLTS),y) -KBUILD_LDS_MODULE += $(srctree)/arch/arm64/kernel/module.lds +KBUILD_LDS_MODULE += arch/arm64/kernel/module.lds endif ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y) diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index a561cbb91d4d..693797e6db01 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -71,3 +71,5 @@ extra-y += $(head-y) vmlinux.lds ifeq ($(CONFIG_DEBUG_EFI),y) AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\"" endif + +always-$(CONFIG_MODULES) += module.lds diff --git a/arch/arm64/kernel/module.lds b/arch/arm64/kernel/module.lds.S similarity index 100% rename from arch/arm64/kernel/module.lds rename to arch/arm64/kernel/module.lds.S ->8 The difference between arch/arm64/kernel/vmlinux.lds and arch/arm64/kernel/module.lds is that we must keep the latter for external module builds. 'make clean' cannot remove any build artifact used for external modules, but 'make mrproper' must remove them. Let me think about it. -- Best Regards Masahiro Yamada

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-24 Thread Masahiro Yamada
foo, but it can still generate new calls > to foo while optimizing something else. Which means that > -fno-builtin-{bcmp,stpcpy} only solves things for clang, not gcc. It's > just that gcc doesn't seem to have implemented those optimizations. To prevent transformation from foo() into bar(), there are two ways in Clang to do that; -fno-builtin-foo, and -fno-builtin-bar. There is only one in GCC; -fno-buitin-foo. Is this correct? I just played the optimization from printf("helloworld\n") to puts("helloworld"). https://godbolt.org/z/5s4ded -fno-builtin-puts cannot prevent clang from emitting puts. Is it because clang does not support -fno-builtin-puts? It is not clear to find out which -fno-builtin-* is supported because compilation succeeds anyway... -- Best Regards Masahiro Yamada

[PATCH v3 08/10] kbuild: wire up the build rule of compile_commands.json to Makefile

2020-08-22 Thread Masahiro Yamada
ce tree is monitored and the violation may be reported. See the commit log of 8ef14c2c41d9. So, the only possible way is to create compile_commands.json in the object tree, then specify '-p ' when you use clang-check, clang-tidy, etc. Signed-off-by: Masahiro Yamada Acked-by: Nick Desaulni

[PATCH v3 01/10] gen_compile_commands: parse only the first line of .*.cmd files

2020-08-22 Thread Masahiro Yamada
. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers --- (no changes since v2) Changes in v2: - Remove the unneeded variable 'line' scripts/gen_compile_commands.py | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH v3 09/10] gen_compile_commands: remove the warning about too few .cmd files

2020-08-22 Thread Masahiro Yamada
s in a single module. Signed-off-by: Masahiro Yamada --- Changes in v3: - New patch scripts/gen_compile_commands.py | 10 -- 1 file changed, 10 deletions(-) diff --git a/scripts/gen_compile_commands.py b/scripts/gen_compile_commands.py index f370375b2f70..1de745577e6d

[PATCH v3 07/10] gen_compile_commands: support *.o, *.a, modules.order in positional argument

2020-08-22 Thread Masahiro Yamada
, they are parsed to collect associated .cmd files. I added a generator helper for each of them. This feature is useful to get the list of active .cmd files from the last build, and will be used by the next commit to wire up the compile_commands.json rule to the Makefile. Signed-off-by: Masah

[PATCH v3 04/10] gen_compile_commands: reword the help message of -d option

2020-08-22 Thread Masahiro Yamada
ompile_commands.json. Reword the help message. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers --- Changes in v3: - Add the missing punctuation to the comment Changes in v2: - New patch scripts/gen_compile_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH v3 00/10] kbuild: clang-tidy

2020-08-22 Thread Masahiro Yamada
, there is 3 % loss of the coverage. If you need the full compilation database that covers all the compiled C files, please run the script manually. [1] https://patchwork.kernel.org/patch/11687833/ Masahiro Yamada (9): gen_compile_commands: parse only the first line of .*.cmd files ge

[PATCH v3 06/10] gen_compile_commands: move directory walk to a generator function

2020-08-22 Thread Masahiro Yamada
and return a huge list at once. I used a generator so it works in the for-loop with less memory. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers --- Changes in v3: - Add the missing punctuation in the comment Changes in v2: - New patch scripts/gen_compile_commands.py | 44

[PATCH v3 05/10] gen_compile_commands: make -o option independent of -d option

2020-08-22 Thread Masahiro Yamada
Clang Tools search for the compilation database. Also, move the default parameter to the default= argument of the .add_argument(). Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers --- (no changes since v2) Changes in v2: - New patch scripts/gen_compile_commands.py | 18

[PATCH v3 02/10] gen_compile_commands: use choices for --log_levels option

2020-08-22 Thread Masahiro Yamada
case, "the level of log ..." in order to be consistent with the -h option: -h, --helpshow this help message and exit The message "show this help ..." comes from the ArgumentParser library code, and I do not know how to change it. So, I changed our code. Signed-of

[PATCH v3 03/10] gen_compile_commands: do not support .cmd files under tools/ directory

2020-08-22 Thread Masahiro Yamada
produces a cleaner commands_database.json. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers --- Changes in v3: - Add a comment about why I used os.path.abspath() Changes in v2: - New patch scripts/gen_compile_commands.py | 32 1 file change

[PATCH v3 10/10] Makefile: Add clang-tidy and static analyzer support to makefile

2020-08-22 Thread Masahiro Yamada
ly familiar with the kernel codebase. Signed-off-by: Nathan Huckleberry Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Tested-by: Lukas Bulwahn Signed-off-by: Masahiro Yamada --- (no changes since v1) MAINTAINERS

[GIT PULL] Kbuild fixes for v5.9-rc2

2020-08-22 Thread Masahiro Yamada
__restrict not _restrict Masahiro Yamada (8): extract-cert: add static to local data kbuild: remove redundant patterns in filter/filter-out kconfig: qconf: fix signal connection to invalid slots kconfig: qconf: fix the popup menu in the ConfigInfoView window kconfig: qconf

Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-08-21 Thread Masahiro Yamada
ILE)ld > -- > 2.28.0.297.g1956fa8f8d-goog > > -- > You received this message because you are subscribed to the Google Groups > "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clang-built-linux+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clang-built-linux/20200820220955.332-1-ndesaulniers%40google.com. -- Best Regards Masahiro Yamada

Re: [PATCH v2 6/9] gen_compile_commands: move directory walk to a generator function

2020-08-21 Thread Masahiro Yamada
; group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clang-built-linux+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clang-built-linux/CAKwvOdn9ZfvC4dzuVnxc_a52JFn_q1ewOWwZZD5b9%3DizeEayKQ%40mail.gmail.com. -- Best Regards Masahiro Yamada

Re: [PATCH v2 7/9] gen_compile_commands: support *.o, *.a, modules.order in positional argument

2020-08-21 Thread Masahiro Yamada
On Sat, Aug 22, 2020 at 9:59 AM Nick Desaulniers wrote: > > On Fri, Aug 21, 2020 at 12:02 PM Masahiro Yamada wrote: > > > > This script currently searches the specified directory for .cmd files. > > One drawback is it may contain stale .cmd files after you rebuild the

Re: [PATCH v2 4/9] gen_compile_commands: reword the help message of -d option

2020-08-21 Thread Masahiro Yamada
On Sat, Aug 22, 2020 at 9:29 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Fri, Aug 21, 2020 at 12:02 PM Masahiro Yamada wrote: > > > > I think the help message of the -d option is somewhat misleading. > > > > Path to the kernel source dire

[PATCH v2 1/9] gen_compile_commands: parse only the first line of .*.cmd files

2020-08-21 Thread Masahiro Yamada
. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers --- Changes in v2: - Remove the unneeded variable 'line' scripts/gen_compile_commands.py | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/gen_compile_com

[PATCH v2 8/9] kbuild: wire up the build rule of compile_commands.json to Makefile

2020-08-21 Thread Masahiro Yamada
is monitored and the violation may be reported. See the commit log of 8ef14c2c41d9. So, the only possible way is to create compile_commands.json in the object tree, then specify '-p ' when you use clang-check, clang-tidy, etc. Signed-off-by: Masahiro Yamada --- (no cha

[PATCH v2 6/9] gen_compile_commands: move directory walk to a generator function

2020-08-21 Thread Masahiro Yamada
and return a huge list at once. I used a generator so it works in the for-loop with less memory. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch scripts/gen_compile_commands.py | 44 - 1 file changed, 32 insertions(+), 12 deletions(-) diff --git

[PATCH v2 5/9] gen_compile_commands: make -o option independent of -d option

2020-08-21 Thread Masahiro Yamada
Clang Tools search for the compilation database. Also, move the default parameter to the default= argument of the .add_argument(). Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch scripts/gen_compile_commands.py | 18 +- 1 file changed, 9 insertions(+), 9 deletions

[PATCH v2 3/9] gen_compile_commands: do not support .cmd files under tools/ directory

2020-08-21 Thread Masahiro Yamada
file_path is already absolute, it returns it as-is. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch scripts/gen_compile_commands.py | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/scripts/gen_compile_commands.py b/scripts/gen

[PATCH v2 4/9] gen_compile_commands: reword the help message of -d option

2020-08-21 Thread Masahiro Yamada
ompile_commands.json. Reword the help message. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch scripts/gen_compile_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gen_compile_commands.py b/scripts/gen_compile_commands.py index 1b9899

[PATCH v2 0/9] kbuild: clang-tidy

2020-08-21 Thread Masahiro Yamada
iled C files, please run the script manually. [1] https://patchwork.kernel.org/patch/11687833/ Masahiro Yamada (8): gen_compile_commands: parse only the first line of .*.cmd files gen_compile_commands: use choices for --log_levels option gen_compile_commands: do not suppor

[PATCH v2 7/9] gen_compile_commands: support *.o, *.a, modules.order in positional argument

2020-08-21 Thread Masahiro Yamada
, they are parsed to collect associated .cmd files. I added a generator helper for each of them. This feature is useful to get the list of active .cmd files from the last build, and will be used by the next commit to wire up the compile_commands.json rule to the Makefile. Signed-off-by: Masah

[PATCH v2 9/9] Makefile: Add clang-tidy and static analyzer support to makefile

2020-08-21 Thread Masahiro Yamada
ly familiar with the kernel codebase. Signed-off-by: Nathan Huckleberry Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Tested-by: Lukas Bulwahn Signed-off-by: Masahiro Yamada --- (no changes since v1) MAINTAINERS

[PATCH v2 2/9] gen_compile_commands: use choices for --log_levels option

2020-08-21 Thread Masahiro Yamada
Use 'choices' instead of the own code to check if the given parameter is valid. I also simplified the help message because, with 'choices', --help shows the list of valid parameters: --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} Signed-off-by: Masahiro Yamada --- Ch

Re: [PATCH 2/2] kconfig: qconf: replace depreacated QString::sprintf() with QTextStream

2020-08-20 Thread Masahiro Yamada
I will fix the typo in the subject. "depreacated" -> "deprecated" -- Best Regards Masahiro Yamada

Re: [PATCH] kbuild: Run syncconfig with -s

2020-08-20 Thread Masahiro Yamada
ll targets need include/generated/autoconf.h > # and include/config/auto.conf but do not care if they are up-to-date. -- Best Regards Masahiro Yamada

[PATCH] kbuild: hide commands to run Kconfig, and show short log for syncconfig

2020-08-20 Thread Masahiro Yamada
command line. syncconfig is the exceptional case, which occurs without explicit command invocation by the user. Display the Kbuild-style log for it. The ugly bare log will go away. [Before] scripts/kconfig/conf --syncconfig Kconfig [After] SYNCinclude/config/auto.conf Signed-off-by: Masahiro

[PATCH 1/2] kconfig: qconf: remove redundant help in the info view

2020-08-20 Thread Masahiro Yamada
The same information is repeated in the info view. Remove the second one. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 3a8f6251a727..4c5688a845f8

[PATCH 2/2] kconfig: qconf: replace depreacated QString::sprintf() with QTextStream

2020-08-20 Thread Masahiro Yamada
^~~ The documentation also says: "Warning: We do not recommend using QString::asprintf() in new Qt code. Instead, consider using QTextStream or arg(), both of which support Unicode strings seamlessly and are type-safe." Do as suggested. Reported-by: Robert Crawford Signed-

Re: BUG with 5.8.x and make xconfig

2020-08-20 Thread Masahiro Yamada
On Fri, Aug 21, 2020 at 12:46 AM Ronald Warsow wrote: > > On 20.08.20 13:33, Masahiro Yamada wrote: > > On Thu, Aug 20, 2020 at 4:19 AM Ronald Warsow wrote: > >> > ... > > > > > > I think you are using Qt4 > > (dnf install qt4-devel). > >

[PATCH] kconfig: qconf: remove qInfo() to get back Qt4 support

2020-08-20 Thread Masahiro Yamada
ould be unreachable. qInfo() is not the right one to use, at least. Link: https://lkml.org/lkml/2020/8/19/1096 Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again") Reported-by: Ronald Warsow Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 2 -- 1 file ch

Re: BUG with 5.8.x and make xconfig

2020-08-20 Thread Masahiro Yamada
606: xconfig] Error 2 > > > > I have never seen this with kernel 5.7.x. > > I haven't found a solution to the above, yet. > - apart from the workaround: "make menuconfig", etc.- > > > pointers/hints/ideas ? I think you are using Qt4 (dnf install qt4-devel). If you install Qt5 (dnf install qt5-devel), you will be able to do "make xconfig". I will consider what to do about this. -- Best Regards Masahiro Yamada

Re: -Werror for `make W=0`

2020-08-19 Thread Masahiro Yamada
means the kernel build is suddenly broken with new compilers, correct? -- Best Regards Masahiro Yamada

Re: [PATCH 2/3] gen_compile_commands: wire up build rule to Makefile

2020-08-18 Thread Masahiro Yamada
Hi Nick, On Fri, Aug 14, 2020 at 2:10 AM Masahiro Yamada wrote: > > On Thu, Aug 13, 2020 at 7:30 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > On Wed, Aug 12, 2020 at 10:40 AM Masahiro Yamada > > wrote: > > > >

Re: Kernel build system broken in 5.8?

2020-08-18 Thread Masahiro Yamada
Hi. On Wed, Aug 19, 2020 at 5:50 AM Martin Burnicki wrote: > > Hello Masahiro, > > Masahiro Yamada wrote: > > On Wed, Aug 19, 2020 at 1:14 AM Martin Burnicki > > wrote: > [...] > >> I usually build the kernel module as standard user, and only inst

Re: Kernel build system broken in 5.8?

2020-08-18 Thread Masahiro Yamada
Can someone please shed some light on what's going on here? > > > Thanks, > > Martin > -- > Martin Burnicki > > Senior Software Engineer > > MEINBERG Funkuhren GmbH & Co. KG > Email: martin.burni...@meinberg.de > Phone: +49 5281 9309-414 > Linkedin: https://www.linkedin.com/in/martinburnicki/ > > Lange Wand 9, 31812 Bad Pyrmont, Germany > Amtsgericht Hannover 17HRA 100322 > Geschäftsführer/Managing Directors: Günter Meinberg, Werner Meinberg, > Andre Hartmann, Heiko Gerstung > Websites: https://www.meinberg.de https://www.meinbergglobal.com > Training: https://www.meinberg.academy > -- Best Regards Masahiro Yamada

Re: [PATCH] genksyms: keywords: Use __restrict not _restrict

2020-08-18 Thread Masahiro Yamada
On Tue, Aug 18, 2020 at 12:32 PM Randy Dunlap wrote: > > On 8/17/20 6:05 PM, Masahiro Yamada wrote: > > On Sun, Aug 16, 2020 at 7:46 AM Randy Dunlap wrote: > >> > >> On 8/14/20 8:17 PM, Joe Perches wrote: > >>> On Fri, 2020-08-14 at 20:05 -0700, Linus T

Re: [PATCH] genksyms: keywords: Use __restrict not _restrict

2020-08-17 Thread Masahiro Yamada
trying to pick up this patch. I take patches from patchwork, but it looks like the server (https://lore.kernel.org/patchwork/project/lkml/list/) has been down for a while... -- Best Regards Masahiro Yamada

<    4   5   6   7   8   9   10   11   12   13   >