.gitignore: prefix local generated files with a slashThe pattern prefixed with '/' matches files in the same directory,but not ones in sub-directories.Signed-off-by: Masahiro Yamada <masahiroy@k
.gitignore: prefix local generated files with a slashThe pattern prefixed with '/' matches files in the same directory,but not ones in sub-directories.Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>Acked-by: Miguel Ojeda <ojeda@kernel.org>Acked-by: Rob Herring <robh@kernel.org>Acked-by: Andra Paraschiv <andraprs@amazon.com>Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>Acked-by: Gabriel Krisman Bertazi <krisman@collabora.com>
show more ...
kbuild: introduce hostprogs-always-y and userprogs-always-yTo build host programs, you need to add the program names to 'hostprogs'to use the necessary build rule, but it is not enough to build th
kbuild: introduce hostprogs-always-y and userprogs-always-yTo build host programs, you need to add the program names to 'hostprogs'to use the necessary build rule, but it is not enough to build thembecause there is no dependency.There are two types of host programs: built as the prerequisite ofanother (e.g. gen_crc32table in lib/Makefile), or always built whenKbuild visits the Makefile (e.g. genksyms in scripts/genksyms/Makefile).The latter is typical in Makefiles under scripts/, which contains hostprograms globally used during the kernel build. To build them, you needto add them to both 'hostprogs' and 'always-y'.This commit adds hostprogs-always-y as a shorthand.The same applies to user programs. net/bpfilter/Makefile buildsbpfilter_umh on demand, hence always-y is unneeded. In contrast,programs under samples/ are added to both 'userprogs' and 'always-y'so they are always built when Kbuild visits the Makefiles.userprogs-always-y works as a shorthand.Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
samples/vfs: avoid warning in statx overrideSomething changed recently to uncover this warning: samples/vfs/test-statx.c:24:15: warning: `struct foo' declared inside parameter list will not be v
samples/vfs: avoid warning in statx overrideSomething changed recently to uncover this warning: samples/vfs/test-statx.c:24:15: warning: `struct foo' declared inside parameter list will not be visible outside of this definition or declaration 24 | #define statx foo | ^~~Which is due the use of "struct statx" (here, "struct foo") in a functionprototype argument list before it has been defined: int # 56 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" foo # 56 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 3 4 (int __dirfd, const char *__restrict __path, int __flags, unsigned int __mask, struct # 57 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" foo # 57 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 3 4 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5)));Add explicit struct before #include to avoid warning.Fixes: f1b5618e013a ("vfs: Add a sample program for the new mount API")Signed-off-by: Kees Cook <keescook@chromium.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Cc: Miklos Szeredi <mszeredi@redhat.com>Cc: Al Viro <viro@zeniv.linux.org.uk>Cc: David Howells <dhowells@redhat.com>Link: http://lkml.kernel.org/r/202006282213.C516EA6@keescookSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge tag 'kbuild-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuildPull Kbuild updates from Masahiro Yamada: - fix warnings in 'make clean' for ARCH=um, hexagon, h8300
Merge tag 'kbuild-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuildPull Kbuild updates from Masahiro Yamada: - fix warnings in 'make clean' for ARCH=um, hexagon, h8300, unicore32 - ensure to rebuild all objects when the compiler is upgraded - exclude system headers from dependency tracking and fixdep processing - fix potential bit-size mismatch between the kernel and BPF user-mode helper - add the new syntax 'userprogs' to build user-space programs for the target architecture (the same arch as the kernel) - compile user-space sample code under samples/ for the target arch instead of the host arch - make headers_install fail if a CONFIG option is leaked to user-space - sanitize the output format of scripts/checkstack.pl - handle ARM 'push' instruction in scripts/checkstack.pl - error out before modpost if a module name conflict is found - error out when multiple directories are passed to M= because this feature is broken for a long time - add CONFIG_DEBUG_INFO_COMPRESSED to support compressed debug info - a lot of cleanups of modpost - dump vmlinux symbols out into vmlinux.symvers, and reuse it in the second pass of modpost - do not run the second pass of modpost if nothing in modules is updated - install modules.builtin(.modinfo) by 'make install' as well as by 'make modules_install' because it is useful even when CONFIG_MODULES=n - add new command line variables, GZIP, BZIP2, LZOP, LZMA, LZ4, and XZ to allow users to use alternatives such as pigz, pbzip2, etc.* tag 'kbuild-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (96 commits) kbuild: add variables for compression tools Makefile: install modules.builtin even if CONFIG_MODULES=n mksysmap: Fix the mismatch of '.L' symbols in System.map kbuild: doc: rename LDFLAGS to KBUILD_LDFLAGS modpost: change elf_info->size to size_t modpost: remove is_vmlinux() helper modpost: strip .o from modname before calling new_module() modpost: set have_vmlinux in new_module() modpost: remove mod->skip struct member modpost: add mod->is_vmlinux struct member modpost: remove is_vmlinux() call in check_for_{gpl_usage,unused}() modpost: remove mod->is_dot_o struct member modpost: move -d option in scripts/Makefile.modpost modpost: remove -s option modpost: remove get_next_text() and make {grab,release_}file static modpost: use read_text_file() and get_line() for reading text files modpost: avoid false-positive file open error modpost: fix potential mmap'ed file overrun in get_src_version() modpost: add read_text_file() and get_line() helpers modpost: do not call get_modinfo() for vmlinux(.o) ...
samples: vfs: build sample programs for target architectureThese userspace programs include UAPI headers exported to usr/include/.'make headers' always works for the target architecture (i.e. the
samples: vfs: build sample programs for target architectureThese userspace programs include UAPI headers exported to usr/include/.'make headers' always works for the target architecture (i.e. the samearchitecture as the kernel), so the sample programs should be built forthe target as well. Kbuild now supports 'userprogs' for that.I also guarded the CONFIG option by 'depends on CC_CAN_LINK' because$(CC) may not provide libc.Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>Acked-by: Sam Ravnborg <sam@ravnborg.org>
uapi: deprecate STATX_ALLConstants of the *_ALL type can be actively harmful due to the fact thatdevelopers will usually fail to consider the possible effects of futurechanges to the definition.
uapi: deprecate STATX_ALLConstants of the *_ALL type can be actively harmful due to the fact thatdevelopers will usually fail to consider the possible effects of futurechanges to the definition.Deprecate STATX_ALL in the uapi, while no damage has been done yet.We could keep something like this around in the kernel, but there'sactually no point, since all filesystems should be explicitly checkingflags that they support and not rely on the VFS masking unknown ones out: aflag could be known to the VFS, yet not known to the filesystem.Cc: David Howells <dhowells@redhat.com>Cc: linux-api@vger.kernel.orgCc: linux-man@vger.kernel.orgSigned-off-by: Miklos Szeredi <mszeredi@redhat.com>Reviewed-by: Christoph Hellwig <hch@lst.de>
.gitignore: add SPDX License IdentifierAdd SPDX License Identifier to all .gitignore files.Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfou
.gitignore: add SPDX License IdentifierAdd SPDX License Identifier to all .gitignore files.Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild: rename hostprogs-y/always to hostprogs/always-yIn old days, the "host-progs" syntax was used for specifying hostprograms. It was renamed to the current "hostprogs-y" in 2004.It is typica
kbuild: rename hostprogs-y/always to hostprogs/always-yIn old days, the "host-progs" syntax was used for specifying hostprograms. It was renamed to the current "hostprogs-y" in 2004.It is typically useful in scripts/Makefile because it allows Kbuild toselectively compile host programs based on the kernel configuration.This commit renames like follows: always -> always-y hostprogs-y -> hostprogsSo, scripts/Makefile will look like this: always-$(CONFIG_BUILD_BIN2C) += ... always-$(CONFIG_KALLSYMS) += ... ... hostprogs := $(always-y) $(always-m)I think this makes more sense because a host program is always a hostprogram, irrespective of the kernel configuration. We want to specifywhich ones to compile by CONFIG options, so always-y will be handier.The "always", "hostprogs-y", "hostprogs-m" will be kept for backwardcompatibility for a while.Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public licence as published by the free software foundation either version 2 of the licence or at your option any later versionextracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-laterhas been chosen to replace the boilerplate/reference in 114 file(s).Signed-off-by: Thomas Gleixner <tglx@linutronix.de>Reviewed-by: Allison Randal <allison@lohutok.net>Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>Cc: linux-spdx@vger.kernel.orgLink: https://lkml.kernel.org/r/20190520170857.552531963@linutronix.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
treewide: Add SPDX license identifier - Makefile/KconfigAdd SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any formThese files fall under the project
treewide: Add SPDX license identifier - Makefile/KconfigAdd SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any formThese files fall under the project license, GPL v2 only. The resulting SPDXlicense identifier is: GPL-2.0-onlySigned-off-by: Thomas Gleixner <tglx@linutronix.de>Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
samples: guard sub-directories with CONFIG optionsDo not descend to sub-directories when unneeded.I used subdir-$(CONFIG_...) for hidraw, seccomp, and vfs becausethey only contain host programs.
samples: guard sub-directories with CONFIG optionsDo not descend to sub-directories when unneeded.I used subdir-$(CONFIG_...) for hidraw, seccomp, and vfs becausethey only contain host programs.While we are here, let's add SPDX License tag, and sort the directoriesalphabetically.Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Add gitignore file for samples/vfs/ generated filesCommit f1b5618e013a ("vfs: Add a sample program for the new mount API")added sample programs that get built during the kernel build, but thencau
Add gitignore file for samples/vfs/ generated filesCommit f1b5618e013a ("vfs: Add a sample program for the new mount API")added sample programs that get built during the kernel build, but thencause 'git status' to worry about whether the resulting binaries shouldbe managed by git.Tell git not to worry, and to ignore the sample binaries.Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
vfs: Add a sample program for the new mount APIAdd a sample program to demonstrate fsopen/fsmount/move_mount to mountsomething.To make it compile on all arches, irrespective of whether or not sy
vfs: Add a sample program for the new mount APIAdd a sample program to demonstrate fsopen/fsmount/move_mount to mountsomething.To make it compile on all arches, irrespective of whether or not syscallnumbers are assigned, define the syscall number to -1 if it isn't to causethe kernel to return -ENOSYS.Signed-off-by: David Howells <dhowells@redhat.com>Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>