Re: [PATCH v3 4/6] module: script to generate offset ranges for builtin modules

2024-05-20 Thread Masahiro Yamada
&& NF == 4 && $3 != "0x0" { > + type = $1; > + if (!(type in sect_addend)) > + next; This assumes sections are 1:1 mapping between vmlinux.o and vmlinux. How far does this assumption work? CONFIG_LD_DEAD_CODE_DATA_ELIMINATION will not work at least. As I said in the previous review, gawk is not documented in Documentation/process/changes.rst Please add it if you go with gawk. > + > + sub(addr_prefix, "0x", $2); > + addr = strtonum($2) + sect_addend[type]; > + > + mod = get_module_info($4); > +# printf "[%s, %08x] %s [%s] %08x\n", mod_name, mod_start, $4, mod, addr; > + if (mod == mod_name) > + next; > + > + if (mod_name) { > + idx = mod_start + sect_base[type] + sect_addend[type]; > + entries[idx] = sprintf("%s %08x-%08x %s", type, mod_start, > addr, mod_name); > + count[type]++; > + } > +# if (mod == "") > +# printf "ENTRY WITHOUT MOD - MODULE MAY END AT %08x\n", addr > + > + mod_name = mod; > + mod_start = addr; > +} > + > +END { > + for (type in count) { > + if (type in sect_anchor) > + entries[sect_base[type]] = sect_anchor[type]; > + } > + > + n = asorti(entries, indices); > + for (i = 1; i <= n; i++) > + print entries[indices[i]]; > +} > -- > 2.43.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v3 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option

2024-05-20 Thread Masahiro Yamada
UX_MAP' to 'depends on VMLINUX_MAP'. BTW, do you need to put this inside 'if FTRACE'? FTRACE is not required to generate the ranges file. -- Best Regards Masahiro Yamada

Re: [PATCH v3 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option

2024-05-20 Thread Masahiro Yamada
ection. > + > + It is fully compatible with CONFIG_RANDOMIZE_BASE and similar late- > + address-modification options. > + > config BOOTTIME_TRACING > bool "Boot-time Tracing support" > depends on TRACING > -- > 2.43.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v3 6/6] module: add install target for modules.builtin.ranges

2024-05-20 Thread Masahiro Yamada
es.builtin.modinfo > modules.builtin.ranges): $(MODLIB)/%: % FORCE > $(call cmd,install) > > endif > -- > 2.43.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v2 0/6] Generate address range data for built-in modules

2024-05-15 Thread Masahiro Yamada
On Thu, May 16, 2024 at 1:50 AM Kris Van Hees wrote: > > On Mon, May 13, 2024 at 01:43:15PM +0900, Masahiro Yamada wrote: > > On Sun, May 12, 2024 at 7:42???AM Kris Van Hees > > wrote: > > > > > > Especially for tracing applications, it is convenient to be a

Re: [PATCH] modules: Drop the .export_symbol section from the final modules

2024-05-13 Thread Masahiro Yamada
le.lds.S > > +++ b/scripts/module.lds.S > > @@ -13,6 +13,7 @@ SECTIONS { > > /DISCARD/ : { > > *(.discard) > > *(.discard.*) > > + *(.export_symbol) > > } > > > > __ksymtab 0 : { *(SORT(___ksymtab+*)) } > > -- > > 2.27.0 > > -- Best Regards Masahiro Yamada

Re: [PATCH v2 6/6] module: add install target for modules.builtin.ranges

2024-05-13 Thread Masahiro Yamada
On Mon, May 13, 2024 at 2:22 PM Masahiro Yamada wrote: > > On Sun, May 12, 2024 at 7:59 AM Kris Van Hees > wrote: > > > > When CONFIG_BUILTIN_MODULE_RANGES is enabled, the modules.builtin.ranges > > file should be installed in the module install location. > >

Re: [PATCH v2 6/6] module: add install target for modules.builtin.ranges

2024-05-12 Thread Masahiro Yamada
$(call cmd,install) > > +install-$(CONFIG_BUILTIN_MODULE_RANGES) += $(MODLIB)/modules.builtin.ranges > + > +$(MODLIB)/modules.builtin.ranges: modules.builtin.ranges FORCE > + $(call cmd,install) > + Why add this to $(addprefix ...) part? > endif > > modules := $(call read-file, $(MODORDER)) > -- > 2.43.0 > > -- Best Regards Masahiro Yamada

Re: [PATCH v2 5/6] kbuild: generate modules.builtin.ranges when linking the kernel

2024-05-12 Thread Masahiro Yamada
> +targets += modules.builtin.ranges > +modules.builtin.ranges: modules.builtin.objs vmlinux.map vmlinux.o.map FORCE > + $(call if_changed,modules_builtin_ranges) > +endif > + > # Add FORCE to the prequisites of a target to force it to be always rebuilt. > # ------- > > -- > 2.43.0 > > -- Best Regards Masahiro Yamada

Re: [PATCH v2 0/6] Generate address range data for built-in modules

2024-05-12 Thread Masahiro Yamada
| 5 +- > scripts/Makefile.modinst| 11 ++- > scripts/Makefile.vmlinux| 17 > scripts/Makefile.vmlinux_o | 18 - > scripts/generate_builtin_ranges.awk | 149 > > 11 files changed, 228 insertions(+), 10 deletions(-) > create mode 100755 scripts/generate_builtin_ranges.awk > > > base-commit: dd5a440a31fae6e459c0d627162825505361 > -- > 2.42.0 > > -- Best Regards Masahiro Yamada

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-21 Thread Masahiro Yamada
On Wed, Feb 21, 2024 at 6:01 PM John Garry wrote: > > On 08/02/2024 10:08, John Garry wrote: > > On 05/02/2024 23:10, Masahiro Yamada wrote: > >>>> I think what you can contribute are: > >>>> > >>>>- Explore the UTS_RELEASE users,

[PATCH] kbuild: remove EXPERT and !COMPILE_TEST guarding from TRIM_UNUSED_KSYMS

2024-02-15 Thread Masahiro Yamada
;) solved the build time issue. Signed-off-by: Masahiro Yamada --- kernel/module/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig index 0ea1b2970a23..c3ced519e14b 100644 --- a/kernel/module/Kconfig +++ b/kernel/module/Kcon

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-05 Thread Masahiro Yamada
On Mon, Feb 5, 2024 at 5:25 PM John Garry wrote: > > On 02/02/2024 15:01, Masahiro Yamada wrote: > >> -- > >> 2.35.3 > > > > As you see, several drivers store UTS_RELEASE in their driver data, > > and even print it in debug print. > > > &g

Re: [PATCH v2 0/3] modules: few of alignment fixes

2024-02-02 Thread Masahiro Yamada
hat the alignment must be added to individual asm code, not to the linker script. I am surprised that you came back to this. -- Best Regards Masahiro Yamada

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-02 Thread Masahiro Yamada
_uts_ns.name.release So, is your uts_release a shorthand of init_uts_ns.name.release? I think what you can contribute are: - Explore the UTS_RELEASE users, and check if you can get rid of it. - Where UTS_RELEASE is useful, consider if it is possible to replace it with init_uts_ns.name.release -- Best Regards Masahiro Yamada

Re: [PATCH v7] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms

2024-01-02 Thread Masahiro Yamada
On Mon, Jan 1, 2024 at 8:11 PM Alessandro Carminati wrote: > > Hello, > > > > Il giorno dom 31 dic 2023 alle ore 06:35 Masahiro Yamada > ha scritto: > > > > On Tue, Dec 5, 2023 at 6:48 AM Alessandro Carminati (Red Hat) > > wrote: > > > > &

Re: [PATCH v7] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms

2023-12-30 Thread Masahiro Yamada
debug_print(config, DebugLevel.INFO.value, f"Save > name_occurrences data: {config.symbol_frequency_file}") > +with open(config.symbol_frequency_file, 'w') as file: > +

Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries

2023-12-23 Thread Masahiro Yamada
On Sat, Dec 23, 2023 at 5:11 AM Luis Chamberlain wrote: > > On Fri, Dec 22, 2023 at 04:01:30PM +0900, Masahiro Yamada wrote: > > On Fri, Dec 22, 2023 at 3:08 PM Luis Chamberlain wrote: > > > > > > On Thu, Dec 21, 2023 at 10:07:13PM -0800, Luis Chamberlain wrote: &g

Re: [PATCH 3/4] vmlinux.lds.h: Fix alignment for __ksymtab*, __kcrctab_* and .pci_fixup sections

2023-12-22 Thread Masahiro Yamada
On Fri, Dec 22, 2023 at 6:02 PM Helge Deller wrote: > > On 12/21/23 14:07, Masahiro Yamada wrote: > > On Thu, Nov 23, 2023 at 7:18 AM wrote: > >> > >> From: Helge Deller > >> > >> On 64-bit architectures without CONFIG_HAVE_ARCH_PREL32_RELO

Re: [PATCH 0/4] Section alignment issues?

2023-12-22 Thread Masahiro Yamada
On Fri, Dec 22, 2023 at 5:23 PM Helge Deller wrote: > > On 12/21/23 16:42, Masahiro Yamada wrote: > > On Thu, Dec 21, 2023 at 10:40 PM Masahiro Yamada > > wrote: > >> > >> On Thu, Nov 23, 2023 at 7:18 AM wrote: > >>> > >>> From:

Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries

2023-12-21 Thread Masahiro Yamada
inline assembler, but it hard-codes ".balign 4". -- Best Regards Masahiro Yamada

Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries

2023-12-21 Thread Masahiro Yamada
On Thu, Dec 21, 2023 at 7:22 PM Masahiro Yamada wrote: > > On Thu, Nov 23, 2023 at 7:18 AM wrote: > > > > From: Helge Deller > > > > An alignment of 4 bytes is wrong for 64-bit platforms which don't define > > CONFIG_HAVE_ARCH_PREL32_RELOCATIONS (which

Re: [PATCH 0/4] Section alignment issues?

2023-12-21 Thread Masahiro Yamada
On Thu, Dec 21, 2023 at 10:40 PM Masahiro Yamada wrote: > > On Thu, Nov 23, 2023 at 7:18 AM wrote: > > > > From: Helge Deller > > > > While working on the 64-bit parisc kernel, I noticed that the __ksymtab[] > > table was not correctly 64-bit aligned in man

Re: [PATCH 0/4] Section alignment issues?

2023-12-21 Thread Masahiro Yamada
s to be > 4-byte aligned */ > - should_shalign = 4; > else if (match(sec, byte_sec_list)) /* any alignment is OK. */ > continue; > + else if (strstr(sec, "text")) /* assume text segments to be > 4-byte aligned */ > + should_shalign = 4; > else { > /* search in list with special alignment */ > - k = 0; > - while (special_list[k].align && strstarts(sec, > special_list[k].name)) { > - should_shalign = special_list[k].align; > - break; > + for (k = 0; special_list[k].align; k++) { > + if (strstarts(sec, special_list[k].name)) { > + should_shalign = > special_list[k].align; > + break; > + } > } > } > > Helge Deller (4): > linux/export: Fix alignment for 64-bit ksymtab entries > modules: Ensure 64-bit alignment on __ksymtab_* sections > vmlinux.lds.h: Fix alignment for __ksymtab*, __kcrctab_* and > .pci_fixup sections > modules: Add missing entry for __ex_table > > include/asm-generic/vmlinux.lds.h | 5 + > include/linux/export-internal.h | 5 - > scripts/module.lds.S | 9 + > 3 files changed, 14 insertions(+), 5 deletions(-) > > -- > 2.41.0 > -- Best Regards Masahiro Yamada

Re: [PATCH 3/4] vmlinux.lds.h: Fix alignment for __ksymtab*, __kcrctab_* and .pci_fixup sections

2023-12-21 Thread Masahiro Yamada
gt; __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \ > __start___kcrctab_gpl = .; \ > KEEP(*(SORT(___kcrctab_gpl+*))) \ > -- > 2.41.0 > -- Best Regards Masahiro Yamada

Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries

2023-12-21 Thread Masahiro Yamada
ned-off-by: Helge Deller This is correct. Acked-by: Masahiro Yamada Please add Fixes: ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost") > --- > include/linux/export-internal.h | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/inclu

Re: [PATCH 0/2] kmod /usr support

2023-12-19 Thread Masahiro Yamada
ledir) at least for depmod. (Perhaps modinfo too, as it also supports --basedir) Then, we can change scripts/depmod.sh so that Kbuild can propagate KERNEL_MODULE_DIRECTORY to depmod. if ; then set -- "$@" --moduledir "${KERNEL_MODULE_DIRECTORY}" fi Does it make sense? -- Best Regards Masahiro Yamada

Re: [PATCH v6 2/2] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-12-18 Thread Masahiro Yamada
On Tue, Dec 12, 2023 at 10:12 PM Michal Suchánek wrote: > > On Mon, Dec 11, 2023 at 01:33:23PM +0900, Masahiro Yamada wrote: > > On Mon, Dec 11, 2023 at 6:09 AM Michal Suchánek wrote: > > > > > > On Mon, Dec 11, 2023 at 03:44:35AM +0900, Masahiro Yamada wrote: >

Re: [PATCH v6 1/2] depmod: Handle installing modules under a different directory

2023-12-18 Thread Masahiro Yamada
On Tue, Dec 12, 2023 at 10:03 PM Michal Suchánek wrote: > > On Mon, Dec 11, 2023 at 01:29:15PM +0900, Masahiro Yamada wrote: > > On Mon, Dec 11, 2023 at 6:07 AM Michal Suchánek wrote: > > > > > > Hello! > > > > > > On Mon, Dec 11, 2023 at 03:43:4

Re: Building signed debs

2023-12-11 Thread Masahiro Yamada
On Mon, Dec 11, 2023 at 7:19 PM Tom Cook wrote: > > On Sat, Dec 9, 2023 at 6:18 PM Masahiro Yamada wrote: > > On Fri, Dec 8, 2023 at 8:14 PM Tom Cook wrote: > > > > > > I'm trying to build a signed .deb kernel package of > > > https://github.com

Re: [PATCH v6 2/2] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-12-10 Thread Masahiro Yamada
On Mon, Dec 11, 2023 at 6:09 AM Michal Suchánek wrote: > > On Mon, Dec 11, 2023 at 03:44:35AM +0900, Masahiro Yamada wrote: > > On Thu, Dec 7, 2023 at 4:48 AM Michal Suchanek wrote: > > > > > > The default MODLIB value is composed of three variables > >

Re: [PATCH v6 1/2] depmod: Handle installing modules under a different directory

2023-12-10 Thread Masahiro Yamada
On Mon, Dec 11, 2023 at 6:07 AM Michal Suchánek wrote: > > Hello! > > On Mon, Dec 11, 2023 at 03:43:44AM +0900, Masahiro Yamada wrote: > > On Thu, Dec 7, 2023 at 4:48 AM Michal Suchanek wrote: > > > > > > Some distributions aim at shipping all files in /u

Re: [PATCH v6 2/2] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-12-10 Thread Masahiro Yamada
cripts/package/mkspec > @@ -24,6 +24,7 @@ fi > cat< %define ARCH ${ARCH} > %define KERNELRELEASE ${KERNELRELEASE} > +%define KERNEL_MODULE_DIRECTORY ${KERNEL_MODULE_DIRECTORY} > %define pkg_release $("${srctree}/init/build-version") > EOF > > -- > 2.42.0 > > -- Best Regards Masahiro Yamada

Re: [PATCH v6 1/2] depmod: Handle installing modules under a different directory

2023-12-10 Thread Masahiro Yamada
t can be passed to make if needed. > # > > -MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) > +export KERNEL_MODULE_DIRECTORY ?= $(or $(shell pkg-config > --variable=module_directory kmod 2>/dev/null),/lib/modules) > + > +MODLIB = $(INSTALL_MOD_PATH)$(KERNEL_MODULE_DIRECTORY)/$(KERNELRELEASE) > export MODLIB > > PHONY += prepare0 > -- > 2.42.0 > > -- Best Regards Masahiro Yamada

Re: [PATCH] init: move THIS_MODULE from to

2023-12-09 Thread Masahiro Yamada
On Tue, Dec 5, 2023 at 2:54 PM Luis Chamberlain wrote: > > On Sun, Nov 26, 2023 at 04:19:14PM +0900, Masahiro Yamada wrote: > > Commit f50169324df4 ("module.h: split out the EXPORT_SYMBOL into > > export.h") appropriately separated EXPORT_SYMBOL into > >

Re: Building signed debs

2023-12-09 Thread Masahiro Yamada
inary-arch] Error 2 > dpkg-buildpackage: error: make -f debian/rules binary subprocess > returned exit status 2 > make[2]: *** [scripts/Makefile.package:146: bindeb-pkg] Error 2 > make[1]: *** [/home/tkcook/git/linux/v6.6/Makefile:1538: bindeb-pkg] Error 2 > make: *** [Makefile:234: __sub-make] Error 2 -- Best Regards Masahiro Yamada

Re: [PATCH] init: move THIS_MODULE from to

2023-12-03 Thread Masahiro Yamada
On Sun, Nov 26, 2023 at 4:19 PM Masahiro Yamada wrote: > > Commit f50169324df4 ("module.h: split out the EXPORT_SYMBOL into > export.h") appropriately separated EXPORT_SYMBOL into > because modules and EXPORT_SYMBOL are orthogonal; modules are symbol > consumers, whi

[PATCH] init: move THIS_MODULE from to

2023-11-25 Thread Masahiro Yamada
The reason for choosing is to make self-contained without relying on incorrectly including . With this adjustment, the role of becomes clearer as it only defines EXPORT_SYMBOL. Signed-off-by: Masahiro Yamada --- include/linux/export.h | 18 -- include/linux/init.h | 7

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 rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Masahiro Yamada
On Tue, Oct 17, 2023 at 9:27 PM Michal Suchánek wrote: > > On Tue, Oct 17, 2023 at 09:05:29PM +0900, Masahiro Yamada wrote: > > On Tue, Oct 17, 2023 at 7:44 PM Michal Suchánek wrote: > > > > > > On Tue, Oct 17, 2023 at 07:15:50PM +0900, Masahiro Yamada wrote: >

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Masahiro Yamada
On Tue, Oct 17, 2023 at 7:44 PM Michal Suchánek wrote: > > On Tue, Oct 17, 2023 at 07:15:50PM +0900, Masahiro Yamada wrote: > > > > > > > > Let me add more context to my question. > > > > > > > > > > > > I am interested in

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Masahiro Yamada
why you inserted "--print-variables kmod 2>/dev/null | grep '^module_directory$$' >/dev/null" but I guess the reason is the same. "pkg-config --variable=module_directory kmod" always succeeds, so "|| echo /lib/modules" is never processed. I do not know why you parsed kmod.pc instead of libkmod.pc [2] [1] https://lore.kernel.org/linux-kbuild/20230718120348.383-1-msucha...@suse.de/ [2] https://github.com/kmod-project/kmod/blob/v31/configure.ac#L295 -- Best Regards Masahiro Yamada

[PATCH v2 1/2] kbuild: unify vdso_install rules

2023-10-14 Thread Masahiro Yamada
ile. vdso-install-$(CONFIG_COMPAT_VDSO) += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so This will rename vdso.so.dbg to vdso32.so during installation. If such architectures change their implementation so that the base names match, this workaround will go away. Signed-off-by: Masahiro Yamada Ack

[PATCH v2 2/2] kbuild: unify no-compiler-targets and no-sync-config-targets

2023-10-14 Thread Masahiro Yamada
Now that vdso_install does not depend on any in-tree build artifact, it no longer needs a compiler, making no-compiler-targets the same as no-sync-config-targets. Signed-off-by: Masahiro Yamada --- Changes in v2: - Revive need-compiler flag Makefile | 13 ++--- 1 file changed, 2

Re: [PATCH 1/5] csky: remove unused cmd_vdso_install

2023-10-14 Thread Masahiro Yamada
On Tue, Oct 10, 2023 at 12:16 AM Guo Ren wrote: > > On Mon, Oct 9, 2023 at 8:42 PM Masahiro Yamada wrote: > > > > You cannot run this code because arch/csky/Makefile does not define the > > vdso_install target. > > > > It appears that this code was blindly cop

Re: [PATCH 5/5] kbuild: unify no-compiler-targets and no-sync-config-targets

2023-10-14 Thread Masahiro Yamada
On Tue, Oct 10, 2023 at 1:44 AM Nathan Chancellor wrote: > > On Mon, Oct 09, 2023 at 09:42:10PM +0900, Masahiro Yamada wrote: > > Now that vdso_install does not depend on any in-tree build artifact, > > it no longer invokes a compiler, making no-compiler-targets the same >

Re: [PATCH 4/5] kbuild: unify vdso_install rules

2023-10-11 Thread Masahiro Yamada
On Wed, Oct 11, 2023 at 11:24 AM Guo Ren wrote: > > On Mon, Oct 9, 2023 at 8:42 PM Masahiro Yamada wrote: > > --- a/arch/riscv/Makefile > > +++ b/arch/riscv/Makefile > > @@ -131,12 +131,6 @@ endif > > libs-y += arch/riscv/lib/ > > libs-$(CONFIG_EFI_STUB

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-09 Thread Masahiro Yamada
On Mon, Oct 9, 2023 at 11:07 PM Michal Suchánek wrote: > > On Mon, Oct 09, 2023 at 09:34:10PM +0900, Masahiro Yamada wrote: > > On Mon, Oct 9, 2023 at 5:52 PM Michal Suchánek wrote: > > > > > > Hello, > > > > > > On Mon, Oct 09, 2023 at 05:31:0

[PATCH 5/5] kbuild: unify no-compiler-targets and no-sync-config-targets

2023-10-09 Thread Masahiro Yamada
Now that vdso_install does not depend on any in-tree build artifact, it no longer invokes a compiler, making no-compiler-targets the same as no-sync-config-targets. Signed-off-by: Masahiro Yamada --- Makefile | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git

[PATCH 4/5] kbuild: unify vdso_install rules

2023-10-09 Thread Masahiro Yamada
karound will go away. Signed-off-by: Masahiro Yamada --- Makefile | 9 ++ arch/arm/Makefile | 7 +--- arch/arm/vdso/Makefile | 25 -- arch/arm64/Makefile| 9 ++ arch/arm64/kernel/vdso/

[PATCH 3/5] parisc: remove broken vdso_install

2023-10-09 Thread Masahiro Yamada
not define CONFIG_COMPAT_VDSO. It appears that this code was copied from another architecture without proper adaptation. Remove the broken code. Signed-off-by: Masahiro Yamada --- arch/parisc/Makefile | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/parisc/Makefile b/arch/parisc

[PATCH 2/5] UML: remove unused cmd_vdso_install

2023-10-09 Thread Masahiro Yamada
You cannot run this code because arch/um/Makefile does not define the vdso_install target. It appears that this code was blindly copied from another architecture. Remove the dead code. Signed-off-by: Masahiro Yamada --- arch/x86/um/vdso/Makefile | 12 1 file changed, 12

[PATCH 1/5] csky: remove unused cmd_vdso_install

2023-10-09 Thread Masahiro Yamada
You cannot run this code because arch/csky/Makefile does not define the vdso_install target. It appears that this code was blindly copied from another architecture. Remove the dead code. Signed-off-by: Masahiro Yamada --- arch/csky/kernel/vdso/Makefile | 10 -- 1 file changed, 10

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-09 Thread Masahiro Yamada
On Mon, Oct 9, 2023 at 5:52 PM Michal Suchánek wrote: > > Hello, > > On Mon, Oct 09, 2023 at 05:31:02PM +0900, Masahiro Yamada wrote: > > On Fri, Oct 6, 2023 at 12:49 AM Michal Suchanek wrote: > > > > > > The default MODLIB value is composed of two variables

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-09 Thread Masahiro Yamada
pec b/scripts/package/mkspec > index d41608efb747..d41b2e5304ac 100755 > --- a/scripts/package/mkspec > +++ b/scripts/package/mkspec > @@ -18,6 +18,7 @@ fi > cat< %define ARCH ${ARCH} > %define KERNELRELEASE ${KERNELRELEASE} > +%define MODLIB ${MODLIB} > %define pkg_release $("${srctree}/init/build-version") > EOF > > -- > 2.42.0 > -- Best Regards Masahiro Yamada

[PATCH v2] kbuild: deb-pkg: change the source package name to linux-upstream

2021-04-19 Thread Masahiro Yamada
Suggested-by: Ben Hutchings Signed-off-by: Masahiro Yamada --- Changes in v2: - Use 'linux-upstream' for the package name scripts/Makefile.package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index f952fb64789d..b74c65284

[PATCH] kbuild: deb-pkg: change the source package name to 'linux'

2021-04-19 Thread Masahiro Yamada
Signed-off-by: Masahiro Yamada --- scripts/Makefile.package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index f952fb64789d..c5834a480545 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -25,7 +25,7

Re: [PATCH 1/2] kconfig: highlight gconfig 'comment' lines with '***'

2021-04-19 Thread Masahiro Yamada
vide a menu > "sub-heading" for groups of similar config items. > > This also makes the comments be presented in a way that is > similar to menuconfig and nconfig. > > Signed-off-by: Randy Dunlap > Cc: Masahiro Yamada > Cc: linux-kbu...@vger.kernel.org > --- Both applied to linux-kbuild. Thanks. -- Best Regards Masahiro Yamada

Re: [PATCH 1/2] kconfig: remove unused PACKAGE definition

2021-04-19 Thread Masahiro Yamada
On Sat, Apr 17, 2021 at 11:51 PM Masahiro Yamada wrote: > > Commit 3b9fa0931dd8 ("[PATCH] Kconfig i18n support") added this code, > and then commit ("kconfig: drop localization support") removed the > i18n support entirely. > > Remove the left-over. > >

Re: [PATCH 04/13] Kbuild: Rust support

2021-04-17 Thread Masahiro Yamada
V=1 - make KBUILD_VERBOSE=1 - KBUILD_VERBOSE=1 make Not work: - V=1 make The behavior is like that before I became the maintainer. In my best guess, the reason is, V=1 is a useful shorthand of KBUILD_VERBOSE=1, but it is too short. It should not accidentally pick up an unintended environment variable. -- Best Regards Masahiro Yamada

Re: [PATCH v2] tools: do not include scripts/Kbuild.include

2021-04-17 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 10:01 PM Masahiro Yamada wrote: > > Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > scripts/Makefile.compiler"), some kselftests fail to build. > > The tools/ directory opted out Kbuild, and went in a different > direction.

[PATCH 2/2] kconfig: gconf: remove unused code

2021-04-17 Thread Masahiro Yamada
Remove the unused inclusion, and commented out lines. Signed-off-by: Masahiro Yamada --- scripts/kconfig/gconf.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 5527482c3077..7698eea6fb6e 100644 --- a/scripts/kconfig/gconf.c

[PATCH 1/2] kconfig: remove unused PACKAGE definition

2021-04-17 Thread Masahiro Yamada
Commit 3b9fa0931dd8 ("[PATCH] Kconfig i18n support") added this code, and then commit ("kconfig: drop localization support") removed the i18n support entirely. Remove the left-over. Signed-off-by: Masahiro Yamada --- scripts/kconfig/lkc.h | 4 1 file changed, 4 dele

[PATCH v2] tools: do not include scripts/Kbuild.include

2021-04-16 Thread Masahiro Yamada
f7-a5ac-cb8c-64966d2f4...@linux.ibm.com/ Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler") Reported-by: Janosch Frank Reported-by: Christian Borntraeger Signed-off-by: Masahiro Yamada --- Changes in v2: - copy macros to tools/bu

Re: [PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-16 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 2:56 PM Christian Borntraeger wrote: > > > On 15.04.21 10:06, Christian Borntraeger wrote: > > > > On 15.04.21 09:27, Masahiro Yamada wrote: > >> Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > >> scrip

Re: [PATCH v2] kconfig: redo fake deps at include/config/*.h

2021-04-15 Thread Masahiro Yamada
,8 @@ static void usage(void) /* * In the intended usage of this program, the stdout is redirected to .*.cmd - * files. The return value of printf() and putchar() must be checked to catch - * any error, e.g. "No space left on device". + * files. The return value of printf() must be checked to catch any error, + * e.g. "No space left on device". */ static void xprintf(const char *format, ...) { -- Best Regards Masahiro Yamada

Re: [PATCH v2] uml: fix W=1 missing-include-dirs warnings

2021-04-15 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 4:14 AM Masahiro Yamada wrote: > > On Fri, Apr 16, 2021 at 2:14 AM Randy Dunlap wrote: > > > > Currently when using "W=1" with UML builds, there are over 700 warnings > > like so: > > > > CC arch/um/drivers/stderr_cons

Re: [PATCH v3] kconfig: nconf: stop endless search loops

2021-04-15 Thread Masahiro Yamada
rs... and naturally fails. > > My original implementation added another check for -1 before wrapping > the running index variable around, but Masahiro Yamada pointed out that > the actual issue is that the comparison point (starting point) exceeds > bounds (i.e., the [0,n-1] inter

Re: [PATCH] clk: uniphier: Fix potential infinite loop

2021-04-15 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 3:19 AM Dan Carpenter wrote: > > On Fri, Apr 09, 2021 at 03:46:47PM +0900, Masahiro Yamada wrote: > > On Thu, Apr 8, 2021 at 12:25 AM Colin King wrote: > > > > > > From: Colin Ian King > > > > > > The for-loo

Re: [PATCH v2] uml: fix W=1 missing-include-dirs warnings

2021-04-15 Thread Masahiro Yamada
g-include-dirs] > > but arch/um/ does not have include/uapi/ at all, so add that > subdir and put one Kbuild file into it (since git does not track > empty subdirs). > > Signed-off-by: Randy Dunlap > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: linux-kbu...@vger.kernel.

Re: [PATCH] kconfig: split menu.c out of parser.y

2021-04-15 Thread Masahiro Yamada
On Thu, Apr 15, 2021 at 7:54 PM Boris Kolpackov wrote: > > Masahiro Yamada writes: > > > --- /dev/null > > +++ b/scripts/kconfig/internal.h > > @@ -0,0 +1,9 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +#ifndef INTERNAL_H > &g

Re: [PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-15 Thread Masahiro Yamada
On Thu, Apr 15, 2021 at 4:40 PM Paolo Bonzini wrote: > > On 15/04/21 09:27, Masahiro Yamada wrote: > > Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > > scripts/Makefile.compiler"), some kselftests fail to build. > > > > The too

Re: [PATCH 3/4] kbuild: spilt cc-option and friends to scripts/Makefile.compiler

2021-04-15 Thread Masahiro Yamada
On Tue, Apr 13, 2021 at 10:11 PM Christian Borntraeger wrote: > > > > On 13.04.21 14:51, Janosch Frank wrote: > > On 2/28/21 7:10 AM, Masahiro Yamada wrote: > >> scripts/Kbuild.include is included everywhere, but macros such as > >> cc-opt

[PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-15 Thread Masahiro Yamada
66d2f4...@linux.ibm.com/ Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler") Reported-by: Janosch Frank Reported-by: Christian Borntraeger Signed-off-by: Masahiro Yamada --- tools/testing/selftests/bpf/Makefile | 3 ++- tools/testing/se

[PATCH 1/2] kbuild: remove TMPO from try-run

2021-04-15 Thread Masahiro Yamada
TMPO is only used by arch/x86/Makefile. Change arch/x86/Makefile to use $$TMPO.o and remove TMPO from scripts/Makefile.compiler. Signed-off-by: Masahiro Yamada --- arch/x86/Makefile | 4 ++-- scripts/Makefile.compiler | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] uml: fix W=1 missing-include-dirs warnings

2021-04-15 Thread Masahiro Yamada
On Thu, Apr 15, 2021 at 4:02 PM Randy Dunlap wrote: > > On 4/14/21 11:52 PM, Masahiro Yamada wrote: > > On Thu, Apr 15, 2021 at 4:27 AM Randy Dunlap wrote: > >> > >> Currently when using "W=1" with UML builds, there are over 700 warnings > >

Re: [PATCH] uml: fix W=1 missing-include-dirs warnings

2021-04-15 Thread Masahiro Yamada
g-include-dirs] > > but arch/um/ does not have include/uapi/ at all, so don't > include arch/um/include/uapi/ in USERINCLUDE for UML. > > Signed-off-by: Randy Dunlap > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: linux-kbu...@vger.kernel.org > Cc: Jeff Dike

Re: [PATCH] kconfig: redo fake deps at include/config/*.h

2021-04-14 Thread Masahiro Yamada
gt; * If CONFIG_FOO previously existed in > * auto.conf but it is missing now, > - * include/config/foo.h must be > touched. > +* include/config/FOO must be touched. > */ > conf_touch_dep(line + > strlen(CONFIG_)); > else -- Best Regards Masahiro Yamada

[PATCH] kconfig: split menu.c out of parser.y

2021-04-13 Thread Masahiro Yamada
Compile menu.c as an independent compilation unit. Signed-off-by: Masahiro Yamada --- scripts/kconfig/Makefile | 4 ++-- scripts/kconfig/internal.h | 9 + scripts/kconfig/menu.c | 1 + scripts/kconfig/parser.y | 5 ++--- 4 files changed, 14 insertions(+), 5 deletions(-) create

Re: [PATCH] kbuild: use ?= to assign CROSS_COMPILE by arch-Makefile

2021-04-12 Thread Masahiro Yamada
On Mon, Apr 12, 2021 at 5:15 PM Masahiro Yamada wrote: > > On Mon, Apr 12, 2021 at 4:44 PM Geert Uytterhoeven > wrote: > > > > Hi Yamada-san, > > > > On Sun, Apr 11, 2021 at 3:56 PM Masahiro Yamada > > wrote: > > > Use ?= operator to let arch/*/

Re: [PATCH] kbuild: use ?= to assign CROSS_COMPILE by arch-Makefile

2021-04-12 Thread Masahiro Yamada
On Mon, Apr 12, 2021 at 4:44 PM Geert Uytterhoeven wrote: > > Hi Yamada-san, > > On Sun, Apr 11, 2021 at 3:56 PM Masahiro Yamada wrote: > > Use ?= operator to let arch/*/Makefile to assign CROSS_COMPILE only > > when CROSS_COMPILE is undefined. > > > > This al

[PATCH 3/3] kconfig: nconf: refactor in print_in_middle()

2021-04-11 Thread Masahiro Yamada
with the prototype, 'int wattrset(WINDOW *win, int attrs);' I also slightly cleaned up the indentation style. [1]: https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html Signed-off-by: Masahiro Yamada --- scripts/kconfig/nconf.c | 2 +- scripts/kconfig/nconf.gui.c | 31

[PATCH 1/3] kconfig: nconf: change set_config_filename() to void function

2021-04-11 Thread Masahiro Yamada
No one uses the return value of this function. Signed-off-by: Masahiro Yamada --- scripts/kconfig/nconf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index e86d3511b939..d8a6ab5fb521 100644 --- a/scripts/kconfig

[PATCH 2/3] kconfig: nconf: remove meaningless wattrset() call from show_menu()

2021-04-11 Thread Masahiro Yamada
This attribute is not used because it will be overridden some lines below: wattrset(main_window, attr_main_menu_box); Signed-off-by: Masahiro Yamada --- scripts/kconfig/nconf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index

[PATCH] kbuild: use ?= to assign CROSS_COMPILE by arch-Makefile

2021-04-11 Thread Masahiro Yamada
been made empty via an environment variable as in 'export CROSS_COMPILE='. With this commit, arch-Makefle will respect the user's environment set-up, which seems to be a more correct behavior. Signed-off-by: Masahiro Yamada --- arch/arc/Makefile| 4 +--- arch/h8300/Makefile | 4 +--- arch

Re: [PATCH 1/2] ia64: syscalls: switch to generic syscalltbl.sh

2021-04-11 Thread Masahiro Yamada
On Mon, Mar 1, 2021 at 11:20 PM Masahiro Yamada wrote: > > Many architectures duplicate similar shell scripts. > > This commit converts ia64 to use scripts/syscalltbl.sh. > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild. > > arch/ia64/kernel/

Re: [PATCH 1/2] alpha: syscalls: switch to generic syscalltbl.sh

2021-04-11 Thread Masahiro Yamada
On Mon, Mar 1, 2021 at 11:18 PM Masahiro Yamada wrote: > > Many architectures duplicate similar shell scripts. > > This commit converts alpha to use scripts/syscalltbl.sh. > > Signed-off-by: Masahiro Yamada Applied to linux-kbuild. > --- > > arch/alpha/kernel/

Re: [PATCH] sysctl: use min() helper for namecmp()

2021-04-11 Thread Masahiro Yamada
On Tue, Mar 2, 2021 at 8:47 AM Kees Cook wrote: > > On Sun, Feb 28, 2021 at 04:44:22PM +0900, Masahiro Yamada wrote: > > (CC: Andrew Morton) > > > > A friendly reminder. > > > > > > This is just a minor clean-up. > > > > If nobody

Re: [PATCH 1/2] sparc: syscalls: switch to generic syscalltbl.sh

2021-04-11 Thread Masahiro Yamada
On Mon, Mar 1, 2021 at 11:51 PM Masahiro Yamada wrote: > > Many architectures duplicate similar shell scripts. > > This commit converts sparc to use scripts/syscalltbl.sh. This also > unifies syscall_table_64.h and syscall_table_c32.h. > > Signed-off-by: Masahiro Yam

Re: [PATCH 1/2] powerpc: syscalls: switch to generic syscalltbl.sh

2021-04-11 Thread Masahiro Yamada
Hi Michael, On Tue, Mar 2, 2021 at 12:31 AM Masahiro Yamada wrote: > > Many architectures duplicate similar shell scripts. > > This commit converts powerpc to use scripts/syscalltbl.sh. This also > unifies syscall_table_32.h and syscall_table_c32.h. > > Signed-off-by: Mas

Re: [PATCH 2/2] MAINTAINERS: add pattern for dummy-tools.

2021-04-11 Thread Masahiro Yamada
s/dummy-tools/ > F: scripts/mk* > F: scripts/mod/ > F: scripts/package/ > -- > 2.26.2 > -- Best Regards Masahiro Yamada

Re: [PATCH 1/2] kbuild: dummy-tools: Add elfedit.

2021-04-11 Thread Masahiro Yamada
On Sun, Apr 11, 2021 at 7:18 PM Michal Suchánek wrote: > > On Sun, Apr 11, 2021 at 03:12:40AM +0900, Masahiro Yamada wrote: > > On Fri, Apr 9, 2021 at 6:31 AM Michal Suchanek wrote: > > > > > > elfedit is used in Makefile > > > > > > M

[PATCH 4/5] kconfig: nconf: remove unneeded default for menu prompt

2021-04-10 Thread Masahiro Yamada
The rootmenu always has a prompt even if the 'mainmenu' statement is missing in the top Kconfig file. conf_parse() calls menu_add_prompt(P_MENU, "Main menu", NULL) in this case. So, every 'menu' has a prompt. Signed-off-by: Masahiro Yamada --- scripts/kconfig/nconf.c | 6 ++--

[PATCH 3/5] kconfig: nconf: get rid of (void) casts from wattrset() calls

2021-04-10 Thread Masahiro Yamada
if somebody will claim the issue. [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889 Signed-off-by: Masahiro Yamada --- scripts/kconfig/nconf.c | 14 +++--- scripts/kconfig/nconf.gui.c | 20 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sc

[PATCH 5/5] kconfig: nconf: refactor attributes setup code

2021-04-10 Thread Masahiro Yamada
in attributes_t. The current code is horribly screwed up. Rewrite it. Signed-off-by: Masahiro Yamada --- scripts/kconfig/nconf.c | 22 ++-- scripts/kconfig/nconf.gui.c | 253 scripts/kconfig/nconf.h | 44 +++ 3 files changed, 144 insertions

[PATCH 2/5] kconfig: nconf: fix NORMAL attributes

2021-04-10 Thread Masahiro Yamada
The lower 8-bit of attributes should be 0, but this code wrongly sets it to NORMAL (=1). The correct one is A_NORMAL. Signed-off-by: Masahiro Yamada --- scripts/kconfig/nconf.gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/nconf.gui.c b/scripts

[PATCH 1/5] kconfig: mconf,nconf: remove unneeded '\0' termination after snprintf()

2021-04-10 Thread Masahiro Yamada
snprintf() always terminates the destination buffer with '\0' even if the buffer is not long enough. (In this case, the last element of the buffer becomes '\0'.) The explicit termination is unneeded. Signed-off-by: Masahiro Yamada --- scripts/kconfig/mconf.c | 11 +++ scripts/kconfig

Re: [PATCH 1/2] kbuild: dummy-tools: Add elfedit.

2021-04-10 Thread Masahiro Yamada
ff --git a/scripts/dummy-tools/elfedit b/scripts/dummy-tools/elfedit > new file mode 12 > index ..c0648b38dd42 > --- /dev/null > +++ b/scripts/dummy-tools/elfedit > @@ -0,0 +1 @@ > +ld > \ No newline at end of file > -- > 2.26.2 > -- Best Regards Masahiro Yamada

[PATCH] kconfig: use /boot/config-* etc. as DEFCONFIG_LIST only for native build

2021-04-10 Thread Masahiro Yamada
-* from the build host. It should default to arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). UML previously did not use DEFCONFIG_LIST at all, but it should be able to use arch/um/configs/$(KBUILD_DEFCONFIG) as a base config file. Signed-off-by: Masahiro Yamada --- Makefile | 5

  1   2   3   4   5   6   7   8   9   10   >