Re: [GIT PULL] asm-generic updates for 6.11
On Wed, Jul 17, 2024, at 07:08, Linus Torvalds wrote: > On Tue, 16 Jul 2024 at 21:57, Linus Torvalds > wrote: > > ./arch/arm64/include/generated/uapi/asm/unistd_64.h > ./arch/arm64/include/generated/asm/syscall_table_32.h > ./arch/arm64/include/generated/asm/syscall_table_64.h > ./arch/arm64/include/generated/asm/unistd_32.h > ./arch/arm64/include/generated/asm/unistd_compat_32.h > ./include/generated/autoconf.h > ./usr/include/asm/unistd_64.h > I've tried to come up with a patch that avoids including asm/unistd.h in most files, which would give some relief and hopefully let you get through the merge window in case we can't figure out my Makefile bug quickly. It's only a small drop in the ocean of excessive header inclusions, but it's still a step in the right direction I think. I'll do some more testing on other architectures with this patch so I can send you something that works. You can also just revert the three arm64 commits for now d2a4a07190f4 arm64: rework compat syscall macros e632bca07c8e arm64: generate 64-bit syscall.tbl 7fe33e9f662c arm64: convert unistd_32.h to syscall.tbl format since the patch to remove uapi/asm-generic/unistd.h wasn't part of the 6.11 series yet and nothing else depends on the arm64 conversion. Arnd extern const unsigned long sys_call_table[]; diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c index f08408b6e826..274b67f02f3e 100644 --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/fs/proc/base.c b/fs/proc/base.c index 72a1acd03675..9a535916dc03 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -92,6 +92,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index e6c00e860951..5144b80027be 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -3,7 +3,6 @@ #define _LINUX_BINFMTS_H #include -#include #include #include diff --git a/include/linux/compat.h b/include/linux/compat.h index 56cebaff0c91..89c307da6e5d 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -17,7 +17,6 @@ #include #include /* for aio_context_t */ #include -#include #include #include diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 90507d4afcd6..f1ddc1eb9290 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -9,13 +9,6 @@ #include /* For BUG_ON. */ #include/* For task_active_pid_ns. */ #include -#include - -/* Add sp to seccomp_data, as seccomp is user API, we don't want to modify it */ -struct syscall_info { - __u64 sp; - struct seccomp_data data; -}; extern int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, unsigned int gup_flags); @@ -397,8 +390,6 @@ static inline void user_single_step_report(struct pt_regs *regs) #define exception_ip(x) instruction_pointer(x) #endif -extern int task_current_syscall(struct task_struct *target, struct syscall_info *info); - extern void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact); /* diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index fff820c3e93e..2613b8f264bb 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -86,7 +86,6 @@ struct mnt_id_req; #include #include #include -#include #include #include #include diff --git a/include/linux/syscalls_api.h b/include/linux/syscalls_api.h index 23e012b04db4..bf997576453f 100644 --- a/include/linux/syscalls_api.h +++ b/include/linux/syscalls_api.h @@ -1 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef _LINUX_SYSCALLS_API_H +#define _LINUX_SYSCALLS_API_H + #include +#include +#include + +/* Add sp to seccomp_data, as seccomp is user API, we don't want to modify it */ +struct syscall_info { + __u64 sp; + struct seccomp_data data; +}; + +extern int task_current_syscall(struct task_struct *target, struct syscall_info *info); + +#endif diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 8e193f3a33b3..0dfe926e70df 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h @@ -3,7 +3,6 @@ #define _TRACE_SYSCALL_H #include -#include #include #include diff --git a/include/uapi/linux/lsm.h b/include/uapi/linux/lsm.h index 33d8c9f4aa6b..523a53f12d4f 100644 --- a/include/uapi/linux/lsm.h +++ b/include/uapi/linux/lsm.h @@ -11,7 +11,6 @@ #include #include -#include /** * struct lsm_ctx - LSM context information diff --git a/kernel/exit.c b/kernel/exit.c index be81342caf1b..a78a6e97615a 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/kernel/ptrace.c b/kernel/ptrace.c index d5f89f9ef
Re: [GIT PULL] asm-generic updates for 6.11
On Wed, Jul 17, 2024, at 08:41, Johan Hovold wrote: > On Wed, Jul 17, 2024 at 08:01:43AM +0200, Arnd Bergmann wrote: >> On Wed, Jul 17, 2024, at 07:08, Linus Torvalds wrote: >> > On Tue, 16 Jul 2024 at 21:57, Linus Torvalds >> > wrote: >> >> >> >> Note, it really might be just 'allmodconfig'. We've had things that >> >> depend on config entries in the past, eg the whole >> >> CONFIG_HEADERS_INSTALL etc could affect things. >> >> I had tried a partial allmodconfig build earlier to save time, >> did a full build again now, still nothing: > > FWIW, I noticed this last Friday as well when I did a few builds of > linux-next and every change I made triggered what appeared to be a full > rebuild of the tree. > > This was with a trimmed config [1] and separate build tree (tmpfs). Thanks, that makes it quicker to try out. I'm now using your config to do more testing. I still don't see it with a normal build though. I do see that setting the timestamp of syscall.tbl to a future date does result in always rebuilding everything, but I don't think that is what you are seeing, since that also produces a warning from make: arnd@studio:~/arm-soc/build/bisect$ touch -t 20250101 arch/x86/entry/syscalls/syscall_64.tbl arnd@studio:~/arm-soc/build/bisect$ make ARCH=x86 CROSS_COMPILE=x86_64-linux- make[2]: Warning: File 'arch/x86/entry/syscalls/syscall_64.tbl' has modification time 14483017 s in the future SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h SYSTBL arch/x86/include/generated/asm/syscalls_64.h make[2]: warning: Clock skew detected. Your build may be incomplete. Arnd ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [GIT PULL] asm-generic updates for 6.11
On Wed, Jul 17, 2024 at 10:01:10AM +0200, Arnd Bergmann wrote: > On Wed, Jul 17, 2024, at 08:41, Johan Hovold wrote: > > FWIW, I noticed this last Friday as well when I did a few builds of > > linux-next and every change I made triggered what appeared to be a full > > rebuild of the tree. > > > > This was with a trimmed config [1] and separate build tree (tmpfs). > > Thanks, that makes it quicker to try out. I'm now using > your config to do more testing. I still don't see it with > a normal build though. > > I do see that setting the timestamp of syscall.tbl to > a future date does result in always rebuilding everything, > but I don't think that is what you are seeing, since that > also produces a warning from make: > > arnd@studio:~/arm-soc/build/bisect$ touch -t 20250101 > arch/x86/entry/syscalls/syscall_64.tbl > arnd@studio:~/arm-soc/build/bisect$ make ARCH=x86 CROSS_COMPILE=x86_64-linux- > make[2]: Warning: File 'arch/x86/entry/syscalls/syscall_64.tbl' has > modification time 14483017 s in the future > SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h > SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h > SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h > SYSTBL arch/x86/include/generated/asm/syscalls_64.h > make[2]: warning: Clock skew detected. Your build may be incomplete. Yeah, that's not something I noticed at least (and I assume I would have). And I only did aarch64 builds on a 6.9 x86_64 host (make 4.4.1). Johan ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [GIT PULL] asm-generic updates for 6.11
On Wed, Jul 17, 2024, at 10:17, Johan Hovold wrote: > On Wed, Jul 17, 2024 at 10:01:10AM +0200, Arnd Bergmann wrote: > > Yeah, that's not something I noticed at least (and I assume I would > have). And I only did aarch64 builds on a 6.9 x86_64 host (make 4.4.1). Ok, I can reproduce the problem now: I installed a Fedora VM guest and chroot mount and I see the same issue in there. My normal Debian host has make 4.3, so I'll see if I can figure if a specific change in make does it. Arnd ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [GIT PULL] asm-generic updates for 6.11
On Wed, Jul 17, 2024, at 11:36, Arnd Bergmann wrote: > On Wed, Jul 17, 2024, at 10:17, Johan Hovold wrote: >> On Wed, Jul 17, 2024 at 10:01:10AM +0200, Arnd Bergmann wrote: >> >> Yeah, that's not something I noticed at least (and I assume I would >> have). And I only did aarch64 builds on a 6.9 x86_64 host (make 4.4.1). > > Ok, I can reproduce the problem now: I installed a Fedora > VM guest and chroot mount and I see the same issue in there. > > My normal Debian host has make 4.3, so I'll see if I can figure > if a specific change in make does it. I see that there is a version check in scripts/Makefile.include from commit 875ef1a57f32 ("kbuild: use .NOTINTERMEDIATE for future GNU Make versions") that detects Fedora's make 4.4.1 as newer than 4.4, so for the first time enables this logic that I did not see on Debian. In my scripts/Makefile.asm-headers, I had copied the 'FORCE' from the existing rules in arch/x86/entry/syscalls/Makefile etc without fully understanding what that does. It looks like this does not make a difference for make-4.3 but is actually wrong for make-4.4 on the generic rule. This makes it work for me with both versions of make: --- a/scripts/Makefile.asm-headers +++ b/scripts/Makefile.asm-headers @@ -77,14 +77,14 @@ all: $(generic-y) $(syscall-y) $(obj)/%.h: $(srctree)/$(generic)/%.h $(call cmd,wrap) -$(obj)/unistd_%.h: $(syscalltbl) $(syshdr) FORCE +$(obj)/unistd_%.h: $(syscalltbl) $(syshdr) $(call if_changed,syshdr) $(obj)/unistd_compat_%.h: syscall_compat:=1 -$(obj)/unistd_compat_%.h: $(syscalltbl) $(syshdr) FORCE +$(obj)/unistd_compat_%.h: $(syscalltbl) $(syshdr) $(call if_changed,syshdr) -$(obj)/syscall_table_%.h: $(syscalltbl) $(systbl) FORCE +$(obj)/syscall_table_%.h: $(syscalltbl) $(systbl) $(call if_changed,systbl) # Create output directory. Skip it if at least one old header exists Masahiro, does that make sense to you? I assume you can explain this properly, but I'll already send a patch with this version. Arnd ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [GIT PULL] asm-generic updates for 6.11
On Wed, Jul 17, 2024, at 12:54, Arnd Bergmann wrote: > > -$(obj)/syscall_table_%.h: $(syscalltbl) $(systbl) FORCE > +$(obj)/syscall_table_%.h: $(syscalltbl) $(systbl) > $(call if_changed,systbl) > > # Create output directory. Skip it if at least one old header exists > > Masahiro, does that make sense to you? I assume you can > explain this properly, but I'll already send a patch with > this version. This was not quite right either, but I sent a patch now that works with both old and new versions of make and has appears to have the intended behavior for incremental builds with or without changes to syscall.tbl: https://lore.kernel.org/lkml/20240717124253.2275084-1-a...@kernel.org/T/ Arnd ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc