| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
kbuild: prevent exported headers from including <stdlib.h>, <stdbool.h> Some UAPI headers included <stdlib.h>, like this: #ifndef __KERNEL__ #include <stdlib.h> #endif As it turned out, they just included it for no good reason. After some fixes, now I can compile-test UAPI headers (CONFIG_UAPI_HEADER_TEST=y) without including <stdlib.h> from the system header search paths. To avoid somebody getting it back again, this commit adds the dummy header, usr/dummy-include/stdlib.h I added $(srctree)/usr/dummy-include to the header search paths. Because it is searched before the system directories, if someone tries to include <stdlib.h>, they will see the error message. While I am here, I also replaced $(objtree)/usr/include with $(obj), but it has no functional change. If we can make kernel headers self-contained (that is, none of exported kernel headers includes system headers), we will be able to add the -nostdinc flag, but that is much far from where we stand now. As a realistic solution, we can ban header inclusion individually by putting a dummy header into usr/dummy-include/. Currently, no header include <stdbool.h>. I put it as well before somebody attempts to use it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 4 年前 | |
kbuild: uapi: Strip comments before size type check stable inclusion from stable-v6.6.117 commit 32df8c333071f34e056c553d2e718a9300ff23ae category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8763 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=32df8c333071f34e056c553d2e718a9300ff23ae -------------------------------- [ Upstream commit 66128f4287b04aef4d4db9bf5035985ab51487d5 ] On m68k, check_sizetypes in headers_check reports: ./usr/include/asm/bootinfo-amiga.h:17: found __[us]{8,16,32,64} type without #include <linux/types.h> This header file does not use any of the Linux-specific integer types, but merely refers to them from comments, so this is a false positive. As of commit c3a9d74ee413bdb3 ("kbuild: uapi: upgrade check_sizetypes() warning to error"), this check was promoted to an error, breaking m68k all{mod,yes}config builds. Fix this by stripping simple comments before looking for Linux-specific integer types. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/949f096337e28d50510e970ae3ba3ec9c1342ec0.1759753998.git.geert@linux-m68k.org [nathan: Adjust comment and remove unnecessary escaping from slashes in regex] Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 32df8c333071f34e056c553d2e718a9300ff23ae) Signed-off-by: Wentao Guan <guanwentao@uniontech.com> | 3 个月前 | |
.gitignore: prefix local generated files with a slash The 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> | 5 年前 | |
gen_init_cpio: add support for file metadata euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I91FSN CVE: NA ------------------------------------------------- This patch adds support for file metadata (only TYPE_XATTR metadata type). gen_init_cpio has been modified to read xattrs from files that will be added to the image and to include file metadata as separate files with the special name 'METADATA!!!'. This behavior can be selected by setting the desired file metadata type as value for CONFIG_INITRAMFS_FILE_METADATA. v4: - context adapt usr/Makefile, usr/gen_initramfs.sh for 6.6 kernel (zhangguangzhi) - del duplicate code in usr/Makefile (zhangguangzhi) - fix checkpatch waring STATIC_CONST_CHAR_ARRAY in usr/gen_init_cpio.c:38 (zhangguangzhi) Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Tianxing Zhang <zhangtianxing3@huawei.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: zhoushuiqing <zhoushuiqing2@huawei.com> Signed-off-by: zhangguangzhi <zhangguangzhi3@huawei.com> | 2 年前 | |
gen_init_cpio: add support for file metadata euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I91FSN CVE: NA ------------------------------------------------- This patch adds support for file metadata (only TYPE_XATTR metadata type). gen_init_cpio has been modified to read xattrs from files that will be added to the image and to include file metadata as separate files with the special name 'METADATA!!!'. This behavior can be selected by setting the desired file metadata type as value for CONFIG_INITRAMFS_FILE_METADATA. v4: - context adapt usr/Makefile, usr/gen_initramfs.sh for 6.6 kernel (zhangguangzhi) - del duplicate code in usr/Makefile (zhangguangzhi) - fix checkpatch waring STATIC_CONST_CHAR_ARRAY in usr/gen_init_cpio.c:38 (zhangguangzhi) Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Tianxing Zhang <zhangtianxing3@huawei.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: zhoushuiqing <zhoushuiqing2@huawei.com> Signed-off-by: zhangguangzhi <zhangguangzhi3@huawei.com> | 2 年前 | |
initramfs: add default_cpio_list, and delete -d option support When CONFIG_INITRAMFS_SOURCE is empty, the Makefile passes the -d option to gen_initramfs.sh to create the default initramfs, which contains /dev, /dev/console, and /root. This commit simplifies the default behavior; remove the -d option, and add the default cpio list. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 6 年前 | |
gen_init_cpio: add support for file metadata euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I91FSN CVE: NA ------------------------------------------------- This patch adds support for file metadata (only TYPE_XATTR metadata type). gen_init_cpio has been modified to read xattrs from files that will be added to the image and to include file metadata as separate files with the special name 'METADATA!!!'. This behavior can be selected by setting the desired file metadata type as value for CONFIG_INITRAMFS_FILE_METADATA. v4: - context adapt usr/Makefile, usr/gen_initramfs.sh for 6.6 kernel (zhangguangzhi) - del duplicate code in usr/Makefile (zhangguangzhi) - fix checkpatch waring STATIC_CONST_CHAR_ARRAY in usr/gen_init_cpio.c:38 (zhangguangzhi) Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Tianxing Zhang <zhangtianxing3@huawei.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: zhoushuiqing <zhoushuiqing2@huawei.com> Signed-off-by: zhangguangzhi <zhangguangzhi3@huawei.com> | 2 年前 | |
gen_init_cpio: add support for file metadata euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I91FSN CVE: NA ------------------------------------------------- This patch adds support for file metadata (only TYPE_XATTR metadata type). gen_init_cpio has been modified to read xattrs from files that will be added to the image and to include file metadata as separate files with the special name 'METADATA!!!'. This behavior can be selected by setting the desired file metadata type as value for CONFIG_INITRAMFS_FILE_METADATA. v4: - context adapt usr/Makefile, usr/gen_initramfs.sh for 6.6 kernel (zhangguangzhi) - del duplicate code in usr/Makefile (zhangguangzhi) - fix checkpatch waring STATIC_CONST_CHAR_ARRAY in usr/gen_init_cpio.c:38 (zhangguangzhi) Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Tianxing Zhang <zhangtianxing3@huawei.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: zhoushuiqing <zhoushuiqing2@huawei.com> Signed-off-by: zhangguangzhi <zhangguangzhi3@huawei.com> | 2 年前 | |
initramfs: refactor the initramfs build rules Currently, usr/gen_initramfs.sh takes care of all the use-cases: [1] generates a cpio file unless CONFIG_INITRAMFS_SOURCE points to a single cpio archive [2] If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, use it as-is. [3] Compress the cpio file according to CONFIG_INITRAMFS_COMPRESSION_* unless it is passed a compressed archive. To simplify the script, move [2] and [3] to usr/Makefile. If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, there is no need to run this shell script. For the cpio archive compression, you can re-use the rules from scripts/Makefile.lib . Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 6 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 3 个月前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 6 年前 |