From febd6f7b36b4f65312b7fa8d1569204c2aa810ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=9D=B0?= Date: Sun, 4 Jun 2023 14:09:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E6=94=AF=E6=8C=81socket?= =?UTF-8?q?=20diag=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 徐杰 Change-Id: I5bfae64e67acd746774875dc15d303425064e878 --- linux-5.10/rk3568/arch/arm64_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-5.10/rk3568/arch/arm64_defconfig b/linux-5.10/rk3568/arch/arm64_defconfig index dde6fe9..74618a6 100644 --- a/linux-5.10/rk3568/arch/arm64_defconfig +++ b/linux-5.10/rk3568/arch/arm64_defconfig @@ -668,7 +668,9 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_DIAG is not set +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +CONFIG_INET_DIAG_DESTROY=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set From 2ac9920b70b7f4f87ee25bcb5a0489ee77c0cadc Mon Sep 17 00:00:00 2001 From: zhujiaxin Date: Sun, 11 Jun 2023 19:47:17 +0800 Subject: [PATCH 2/4] update linux config md Signed-off-by: zhujiaxin --- README_zh.md | 54 ++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/README_zh.md b/README_zh.md index a4f5a55..02d21ea 100644 --- a/README_zh.md +++ b/README_zh.md @@ -15,42 +15,38 @@ Linux社区LTS 4.19.y分支信息请查看[kernel官网](https://git.kernel.org/ Linux社区LTS 5.10.y分支信息请查看[kernel官网](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-5.10.y)。 -## 内核的Config组成模块 - -1. 通用配置文件 - - 针对不同的内核版本,config将给出不同内核版本的对应不同的系统的参考通用配置文件,如下: - - 针对标准系统给出对应的参考通用配置文件:standard\_common\_defconfig; - - 针对小型系统给出对应的参考通用配置文件:small\_common\_defconfig。 - -2. 开源开发板配置文件 - - 针对于标准系统开源开发板Hi3516DV300,给出对应的配置文件。 - ## 目录 +针对标准系统开源开发板rk3568,给出对应的config分层配置目录结构、文件示例: ``` kernel/linux/config -├── linux-4.19 -│   └── arch -│   └── arm -│   └── configs -│   ├── hi3516dv300_small_defconfig # 厂商Hisilicon对应的开源开发板Hi3516dv300小型系统的defconfig -│   ├── hi3516dv300_standard_defconfig # 厂商Hisilicon对应的开源开发板Hi3516dv300标准系统的defconfig -│   ├── small_common_defconfig # 小型系统的内核的common defconfig -│   └── standard_common_defconfig # 标准系统的内核的common defconfig └── linux-5.10 - └── arch - └── arm - └── configs -    ├── hi3516dv300_small_defconfig # 厂商Hisilicon对应的开源开发板Hi3516dv300小型系统的defconfig -    ├── hi3516dv300_standard_defconfig # 厂商Hisilicon对应的开源开发板Hi3516dv300标准系统的defconfig -    ├── small_common_defconfig # 小型系统的内核的common defconfig -    └── standard_common_defconfig # 标准系统的内核的common defconfig + ├── base_defconfig # 内核必选模块或安全红线特性配置 + ├── type # 形态配置目录 + │ ├── small_defconfig # 小型系统常用配置文件 + │ └── standard_defconfig # 标准系统常用配置文件 + ├── form # 版本配置目录 + │ └── debug_defconfig # 调试版本配置文件(示例目前无配置需求) + ├── rk3568 # 厂商平台配置目录 + │ └── arch + │ └── arm64_defconfig # 芯片单板64位版本相关配置文件 + └── product # 相关产品类型配置目录 + └── phone_defconfig # 手机类型产品相关配置文件 ``` +## 内核的Config组成模块 + +1. 基础通用配置文件(base):其中包含OpenHarmony特性依赖的内核必选模块以及安全红线特性等必须开启的配置项,其中配置不可被覆盖。如需新增、调整其中配置需上内核-sig例会进行评审。默认必选配置文件。 + +2. 系统形态配置文件(type):针对不同的内核版本,config将给出不同内核版本的对应不同的系统的参考通用配置文件。必选配置文件,通过build\_type编译参数确定文件。 + +3. 版本形态配置文件(form):用于区分版本类型的可选配置文件,通过build\_variant编译参数确定文件,如果文件不存在,则忽略该层配置文件。 + +4. 芯片平台配置文件(chip):由具体厂商提供的和芯片、单板相关的内核模块、驱动等配置,为必选配置文件,通过target\_cpu编译参数确定文件。 + +5. 产品类型配置文件(product):如同一芯片平台同时又多种产品形态时候,需要做区分配置可以配置使用该层配置。为可选配置层,通过device\_type编译参数确定文件 + + ## 使用说明 1. 合入HDF补丁 From 5b7705436c205d770f640abbd86d43cf0239ff89 Mon Sep 17 00:00:00 2001 From: Ywenrui44091 Date: Tue, 20 Jun 2023 19:18:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=BC=80=E5=90=AFCONFIG=5FSECURITY=5FDMESG?= =?UTF-8?q?=5FRESTRICT=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ywenrui44091 --- linux-5.10/arch/arm64/configs/rk3568_standard_defconfig | 2 +- linux-5.10/rk3568/arch/arm64_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig b/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig index 4efcc6f..6fa7cd1 100644 --- a/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig +++ b/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig @@ -6199,7 +6199,7 @@ CONFIG_KEYS=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY_DMESG_RESTRICT=y CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y diff --git a/linux-5.10/rk3568/arch/arm64_defconfig b/linux-5.10/rk3568/arch/arm64_defconfig index 74618a6..01499a4 100644 --- a/linux-5.10/rk3568/arch/arm64_defconfig +++ b/linux-5.10/rk3568/arch/arm64_defconfig @@ -5603,7 +5603,7 @@ CONFIG_IO_WQ=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY_DMESG_RESTRICT=y # CONFIG_SECURITY_NETWORK_XFRM is not set CONFIG_LSM_MMAP_MIN_ADDR=32768 # CONFIG_FORTIFY_SOURCE is not set From 06f8c60b756c1cfc652fa361aa7f3cc9dd51044f Mon Sep 17 00:00:00 2001 From: Ywenrui44091 Date: Mon, 26 Jun 2023 19:51:13 +0800 Subject: [PATCH 4/4] =?UTF-8?q?CONFIG=5FSECURITY=5FDMESG=5FRESTRICT=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B9=E8=BF=81=E7=A7=BB=E8=87=B3base=5Fde?= =?UTF-8?q?fconfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ywenrui44091 --- .../arch/arm/configs/hispark_phoenix_standard_defconfig | 1 - linux-5.10/arch/arm/configs/hispark_taurus_small_defconfig | 1 - .../arch/arm/configs/hispark_taurus_standard_defconfig | 1 - .../arch/arm/configs/qemu-arm-linux_standard_defconfig | 1 - linux-5.10/arch/arm/configs/small_common_defconfig | 1 - linux-5.10/arch/arm/configs/standard_common_defconfig | 1 - linux-5.10/arch/arm64/configs/rk3399_standard_defconfig | 1 - linux-5.10/arch/arm64/configs/rk3568_standard_defconfig | 1 - .../arch/arm64/configs/unionpi_tiger_standard_defconfig | 1 - .../arch/x86/configs/qemu-x86_64-linux_standard_defconfig | 1 - linux-5.10/base_defconfig | 7 +++++-- linux-5.10/hispark_taurus/arch/arm_defconfig | 1 - linux-5.10/qemu/arch/arm64_defconfig | 1 - linux-5.10/qemu/arch/arm_defconfig | 1 - linux-5.10/rk3399/arch/arm64_defconfig | 1 - linux-5.10/rk3568/arch/arm64_defconfig | 1 - linux-5.10/unionpi_tige/arch/arm64_defconfig | 1 - 17 files changed, 5 insertions(+), 18 deletions(-) diff --git a/linux-5.10/arch/arm/configs/hispark_phoenix_standard_defconfig b/linux-5.10/arch/arm/configs/hispark_phoenix_standard_defconfig index 92b8044..b00a92b 100755 --- a/linux-5.10/arch/arm/configs/hispark_phoenix_standard_defconfig +++ b/linux-5.10/arch/arm/configs/hispark_phoenix_standard_defconfig @@ -3810,7 +3810,6 @@ CONFIG_KEYS=y # CONFIG_PERSISTENT_KEYRINGS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITY_WRITABLE_HOOKS=y # CONFIG_SECURITYFS is not set diff --git a/linux-5.10/arch/arm/configs/hispark_taurus_small_defconfig b/linux-5.10/arch/arm/configs/hispark_taurus_small_defconfig index 3dfc2a6..b0ccd33 100755 --- a/linux-5.10/arch/arm/configs/hispark_taurus_small_defconfig +++ b/linux-5.10/arch/arm/configs/hispark_taurus_small_defconfig @@ -3177,7 +3177,6 @@ CONFIG_KEYS=y # CONFIG_PERSISTENT_KEYRINGS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y diff --git a/linux-5.10/arch/arm/configs/hispark_taurus_standard_defconfig b/linux-5.10/arch/arm/configs/hispark_taurus_standard_defconfig index f9e9464..ccff75d 100755 --- a/linux-5.10/arch/arm/configs/hispark_taurus_standard_defconfig +++ b/linux-5.10/arch/arm/configs/hispark_taurus_standard_defconfig @@ -2950,7 +2950,6 @@ CONFIG_KEYS=y # CONFIG_BIG_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y diff --git a/linux-5.10/arch/arm/configs/qemu-arm-linux_standard_defconfig b/linux-5.10/arch/arm/configs/qemu-arm-linux_standard_defconfig index ad3e842..b36fde6 100755 --- a/linux-5.10/arch/arm/configs/qemu-arm-linux_standard_defconfig +++ b/linux-5.10/arch/arm/configs/qemu-arm-linux_standard_defconfig @@ -5936,7 +5936,6 @@ CONFIG_KEYS=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set CONFIG_SECURITYFS=y CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y diff --git a/linux-5.10/arch/arm/configs/small_common_defconfig b/linux-5.10/arch/arm/configs/small_common_defconfig index 0c9b44a..9f55199 100644 --- a/linux-5.10/arch/arm/configs/small_common_defconfig +++ b/linux-5.10/arch/arm/configs/small_common_defconfig @@ -2781,7 +2781,6 @@ CONFIG_KEYS=y # CONFIG_BIG_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y diff --git a/linux-5.10/arch/arm/configs/standard_common_defconfig b/linux-5.10/arch/arm/configs/standard_common_defconfig index c6abf76..6d87404 100644 --- a/linux-5.10/arch/arm/configs/standard_common_defconfig +++ b/linux-5.10/arch/arm/configs/standard_common_defconfig @@ -2819,7 +2819,6 @@ CONFIG_KEYS=y # CONFIG_BIG_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y diff --git a/linux-5.10/arch/arm64/configs/rk3399_standard_defconfig b/linux-5.10/arch/arm64/configs/rk3399_standard_defconfig index 0f3635b..ef2e52d 100644 --- a/linux-5.10/arch/arm64/configs/rk3399_standard_defconfig +++ b/linux-5.10/arch/arm64/configs/rk3399_standard_defconfig @@ -6125,7 +6125,6 @@ CONFIG_KEYS=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y diff --git a/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig b/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig index 6fa7cd1..cf80d8a 100644 --- a/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig +++ b/linux-5.10/arch/arm64/configs/rk3568_standard_defconfig @@ -6199,7 +6199,6 @@ CONFIG_KEYS=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -CONFIG_SECURITY_DMESG_RESTRICT=y CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y diff --git a/linux-5.10/arch/arm64/configs/unionpi_tiger_standard_defconfig b/linux-5.10/arch/arm64/configs/unionpi_tiger_standard_defconfig index 318dd23..ba9bda5 100755 --- a/linux-5.10/arch/arm64/configs/unionpi_tiger_standard_defconfig +++ b/linux-5.10/arch/arm64/configs/unionpi_tiger_standard_defconfig @@ -6046,7 +6046,6 @@ CONFIG_KEYS=y # CONFIG_BIG_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y diff --git a/linux-5.10/arch/x86/configs/qemu-x86_64-linux_standard_defconfig b/linux-5.10/arch/x86/configs/qemu-x86_64-linux_standard_defconfig index f7d112f..7da3bcf 100644 --- a/linux-5.10/arch/x86/configs/qemu-x86_64-linux_standard_defconfig +++ b/linux-5.10/arch/x86/configs/qemu-x86_64-linux_standard_defconfig @@ -4271,7 +4271,6 @@ CONFIG_KEYS=y # CONFIG_PERSISTENT_KEYRINGS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set CONFIG_SECURITYFS=y # CONFIG_INTEL_TXT is not set diff --git a/linux-5.10/base_defconfig b/linux-5.10/base_defconfig index 202d225..d6e9a19 100644 --- a/linux-5.10/base_defconfig +++ b/linux-5.10/base_defconfig @@ -74,5 +74,8 @@ CONFIG_PROC_FS=y CONFIG_SECURITY=y # end of Security options - - +# +#Security DMESG restrict +# +CONFIG_SECURITY_DMESG_RESTRICT=y +# end of Security DMESG restrict \ No newline at end of file diff --git a/linux-5.10/hispark_taurus/arch/arm_defconfig b/linux-5.10/hispark_taurus/arch/arm_defconfig index d0e1e36..048bae5 100644 --- a/linux-5.10/hispark_taurus/arch/arm_defconfig +++ b/linux-5.10/hispark_taurus/arch/arm_defconfig @@ -3161,7 +3161,6 @@ CONFIG_KEYS=y # CONFIG_BIG_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y diff --git a/linux-5.10/qemu/arch/arm64_defconfig b/linux-5.10/qemu/arch/arm64_defconfig index 860777d..a708287 100644 --- a/linux-5.10/qemu/arch/arm64_defconfig +++ b/linux-5.10/qemu/arch/arm64_defconfig @@ -5509,7 +5509,6 @@ CONFIG_IO_WQ=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set # CONFIG_HARDENED_USERCOPY is not set # CONFIG_FORTIFY_SOURCE is not set diff --git a/linux-5.10/qemu/arch/arm_defconfig b/linux-5.10/qemu/arch/arm_defconfig index 860777d..a708287 100644 --- a/linux-5.10/qemu/arch/arm_defconfig +++ b/linux-5.10/qemu/arch/arm_defconfig @@ -5509,7 +5509,6 @@ CONFIG_IO_WQ=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set # CONFIG_HARDENED_USERCOPY is not set # CONFIG_FORTIFY_SOURCE is not set diff --git a/linux-5.10/rk3399/arch/arm64_defconfig b/linux-5.10/rk3399/arch/arm64_defconfig index 6963b65..d68576b 100644 --- a/linux-5.10/rk3399/arch/arm64_defconfig +++ b/linux-5.10/rk3399/arch/arm64_defconfig @@ -5542,7 +5542,6 @@ CONFIG_IO_WQ=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY_NETWORK_XFRM is not set CONFIG_LSM_MMAP_MIN_ADDR=32768 # CONFIG_HARDENED_USERCOPY is not set diff --git a/linux-5.10/rk3568/arch/arm64_defconfig b/linux-5.10/rk3568/arch/arm64_defconfig index 01499a4..c7d598e 100644 --- a/linux-5.10/rk3568/arch/arm64_defconfig +++ b/linux-5.10/rk3568/arch/arm64_defconfig @@ -5603,7 +5603,6 @@ CONFIG_IO_WQ=y # CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -CONFIG_SECURITY_DMESG_RESTRICT=y # CONFIG_SECURITY_NETWORK_XFRM is not set CONFIG_LSM_MMAP_MIN_ADDR=32768 # CONFIG_FORTIFY_SOURCE is not set diff --git a/linux-5.10/unionpi_tige/arch/arm64_defconfig b/linux-5.10/unionpi_tige/arch/arm64_defconfig index 0f678a0..b722d6f 100644 --- a/linux-5.10/unionpi_tige/arch/arm64_defconfig +++ b/linux-5.10/unionpi_tige/arch/arm64_defconfig @@ -5474,7 +5474,6 @@ CONFIG_UNICODE=y # CONFIG_BIG_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY_NETWORK_XFRM is not set CONFIG_LSM_MMAP_MIN_ADDR=32768 # CONFIG_HARDENED_USERCOPY is not set