kernel_linux_5.10:基于Linux 5.10的内核开发项目

可用于OpenHarmony系统内核的开发与贡献,支持补丁提交、编译测试及代码风格检查,遵循统一补丁格式和DCO签名规范,助力内核功能优化与版本升级。【此简介由AI生成】

分支300Tags54
文件最后提交记录最后更新时间
net: sysfs: Fix /sys/class/net/<iface> path for statistics1 年前
LICENSES/deprecated: add Zlib license text5 年前
!1938 merge cve-fix-20260519-master into master15 天前
kernel: repair linux-5.10 CVE backport build1 个月前
certs: Add support for using elliptic curve keys for signing modules3 年前
CVE-2026-43078 crypto: af_alg - Fix page reassignment overflow in af_alg_pull_tsgl14 天前
drm/amdgpu: fix NULL pointer issue buffer funcs9 天前
fs/buffer: add alert in try_to_free_buffers() for pages without buffers9 天前
CVE-2026-43116 netfilter: ctnetlink: ensure safe access to master conntrack14 天前
start_kernel: Add __no_stack_protector function attribute7 个月前
io_uring/rw: ensure io->bytes_done is always initialized1 年前
ipc: fix to protect IPCS lookups using RCU10 个月前
perf: Fix __perf_event_overflow() vs perf_remove_from_context() race18 天前
crypto: lzo - Fix compression buffer overrun10 个月前
kernel: repair linux-5.10 CVE backport build1 个月前
fix(backport): CVE-2026-23395 key size check uses wrong function signature14 天前
samples/hw_breakpoint: fix building without module unloading2 年前
scripts/decode_stacktrace.sh: optionally use LLVM utilities1 年前
CVE-2026-23409: apparmor: fix differential encoding verification16 天前
!1944 merge cve-fix-20260522-kernel_linux_5.10-master into master23 天前
pm: cpupower: bench: Prevent NULL dereference on malloc failure11 个月前
usr/include/Makefile: add linux/nfc.h to the compile-test coverage3 年前
KVM: use __vcalloc for very large allocations1 年前
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma5 年前
scripts: add Linux .cocciconfig for coccinelle9 年前
Opt out of scripts/get_maintainer.pl6 年前
.gitattributes: use 'dts' diff driver for dts files6 年前
Revert "回退 'Pull Request !1416 : 支持 LoongArch 架构'"1 年前
mailmap: add two more addresses of Uwe Kleine-König5 年前
COPYING: state that all contributions really are covered by this file6 年前
MAINTAINERS: Move Jason Cooper to CREDITS5 年前
kbuild: rename hostprogs-y/always to hostprogs/always-y6 年前
kbuild: compile vendor in kernel3 年前
Revert "回退 'Pull Request !1416 : 支持 LoongArch 架构'"1 年前
Linux 5.10.2101 年前
Fix: binary file copyright alarm2 年前
Document: add guideline to submitting patches to OpenHarmony kernel4 年前
Kernel Version UPdate: v5.10.209=>v5.10.2101 年前

向 OpenHarmony Linux 内核项目贡献代码

签署 DCO

在向 OpenHarmony 内核提交任何贡献之前,您必须签署 DCO。

请参阅: https://dco.openharmony.io/sign-dco

提交补丁的步骤

1. 成功编译并测试您的补丁

您应在 OpenHarmony 支持的开发板(如 hi3516dv300 等)上测试您的补丁。

2. 生成补丁

您的补丁应以 OpenHarmony 最新分支为基础,并使用 git-format-patch 生成。如果是补丁集,建议使用 --cover-letter 选项来描述补丁集的作用。

使用 scripts/checkpatch.pl 确保不存在代码风格问题。

并确保您的补丁遵循以下统一的 OpenHarmony 补丁格式。

提示:了解更多关于 Linux 内核编码风格 英文: https://gitee.com/openharmony/kernel_linux/blob/master/Documentation/process/coding-style.rst 中文: https://gitee.com/openharmony/kernel_linux/blob/master/Documentation/translations/zh_CN/coding-style.rst

3. 将补丁发送至 OpenHarmony 邮件列表

使用以下命令将补丁发送至 OpenHarmony 内核邮件列表:

 git send-email *.patch -to="kernel@openharmony.io" --suppress-cc=all

注意:如果您使用 git send-email,必须添加 --suppress-cc=all 选项,否则邮件将抄送上游社区和邮件列表中的人员。

提示:订阅邮件列表 https://lists.openatom.io/postorius/lists/kernel.openharmony.io/

请参阅:如何使用 git-send-email 发送补丁 https://git-scm.com/docs/git-send-email

4. 如果您要发送多个版本的补丁,请在补丁主题中标记“v1, v2, v3 ...”

使用 --subject-prefix="PATCH v2" 选项为补丁集添加 v2 标签: git format-patch --subject-prefix="PATCH v2" -1

主题示例: Subject: [PATCH v2 01/27] fork: fix some -Wmissing-prototypes warnings Subject: [PATCH v3] ext2: improve scalability of bitmap searching

5. 强烈建议将您的内核补丁提交至内核社区上游

OpenHarmony 将及时与内核主线代码同步。

6. 签署您的工作——开发者原创声明(Developer's Certificate of Origin)

与上游内核社区相同,您也需要签署您的补丁。

请参阅: https://www.kernel.org/doc/html/latest/process/submitting-patches.html

签署行是补丁说明末尾的一行简单文字,用以证明您是该补丁的作者,或者有权将其作为开源补丁提交。规则非常简单:如果您能证明以下内容:

开发者原创声明 1.1

通过对本项目做出贡献,本人证明:

(a) 此贡献全部或部分由本人创作,并且本人有权根据文件中指明的开源许可进行提交;或者

(b) 此贡献基于本人所知的先前工作,该工作受适当的开源许可保护,并且本人有权根据该许可(除非允许在不同许可下提交)将全部或部分由本人修改的该工作,按照文件中指明的相同开源许可进行提交;或者

(c) 此贡献由其他个人直接提供给本人,该个人已证明其符合 (a)、(b) 或 (c),且本人未对其进行修改。

(d) 本人理解并同意本项目及本贡献均为公开内容,且本贡献的记录(包括本人提交的所有个人信息,包括本人的签署)将被永久保存,并可根据本项目或所涉及的开源许可进行再分发。

那么您只需添加如下一行:

 Signed-off-by: Random J Developer <random@developer.example.org>

请使用您的真实姓名(抱歉,不接受笔名或匿名贡献)。

使用统一补丁格式

原因:

  1. 长期可维护性 OpenHarmony 将合并大量补丁。如果所有补丁都以随意的变更日志格式合并,没有统一的格式,git 日志将会变得混乱,进而难以找到原始补丁。

  2. 内核升级 未来我们肯定会升级 OpenHarmony 内核,采用严格的补丁管理将减轻重大升级过程中迁移补丁的难度。

  3. 便于脚本解析 关键字高亮对于脚本解析是必要的。

补丁格式定义

[M] 代表“必填” [O] 代表“可选” $category 可以是:bug preparation、bugfix、perf、feature、doc、other...

如果类别是 feature,则还需要添加特性名称,如下所示: category: feature feature: YYY (特性名称)

如果补丁与 CVE 或 issue/bugzilla 相关,则需要添加相应的标签,如下所示(通常,至少应包含以下之一): CVE: $cve-id 或 NA issue: $issue-id 或 NA bugzilla: $bug-id 或 NA

issue: https://gitee.com/openharmony/kernel_linux/issues

附加变更日志应至少包含以下之一: 1) 为什么我们应该应用此补丁 2) 此补丁解决了产品中的什么实际问题 3) 如何复现此 bug 或如何测试 4) 其他有助于理解此补丁或问题的有用信息

详细信息对于将补丁移植到另一个内核分支非常有用。

  1. 稳定版补丁 stable inclusion [M] from $stable-version [M] commit $id [M] bugzilla: $bug-id [O] issue: $issue-id [O] CVE: $cve-id [O]

    additional changelog [O]


    original changelog

    Signed-off-by: yourname<your_name <your_mail> [M]

    ($stable-version 可以是 stable-4.19.156、stable-4.19.157 等…… $id 是稳定版提交 ID)

  2. 主线补丁:

    mainline inclusion [M] from $mainline-version [M] commit $id [M] category: $category [M] bugzilla: $bug-id [O] issue: $issue-id [O] CVE: $cve-id [O]

    additional changelog [O]


    original changelog

    Signed-off-by: yourname<your_name <your_mail> [M]

    ($mainline-version 可以是 mainline-5.6、mainline-5.10 等…… $id 是主线提交 ID)

  3. ohos 补丁 ohos inclusion [M] category: $category [M] bugzilla: $bug-id or NA [O] issue: $issue-id or NA [O] CVE: $cve-id or NA [O]


    changelog

    Signed-off-by: yourname<your_name <your_mail> [M]

示例

主线合入 源自主线-4.10 提交 0becc0ae5b42828785b589f686725ff5bc3b9b25 类别:错误修复 问题编号:1000 CVE:不适用

此补丁修复了产品中的一个 BUG_ON 问题:在系统启动前使用硬件注入工具向内存注入单比特 ECC 错误,这会导致系统启动期间出现大量 CMCI。

[ 1.146580] mce: [硬件错误]:已记录机器检查事件 [ 1.152908] ------------[ 在此处剪切 ]------------ [ 1.157751] kernel BUG at kernel/timer.c:951! [ 1.162321] invalid opcode: 0000 [#1] SMP ...


原始变更日志

Signed-off-by: Zhang San Tested-by: Li Si

电子邮件客户端 - Thunderbird 设置

如果您是内核社区的新开发人员,强烈建议使用 Thunderbird 邮件客户端。

  1. Thunderbird 安装 从 http://www.mozilla.org/ 获取英文版 Thunderbird 并在您的系统上安装。

    下载链接:https://www.thunderbird.net/en-US/thunderbird/all/

  2. 设置 2.1 使用纯文本格式而非 HTML 格式 选项 -> 账户设置 -> 撰写与地址,不要 勾选“以 HTML 格式撰写消息”。

    2.2 编辑器设置 工具 -> 选项 -> 高级 -> 配置编辑器。

    - 调出 Thunderbird 的注册表编辑器,并设置:
      “mailnews.send_plaintext_flowed” 为 “false”。
    - 禁用 HTML 格式:将 “mail.identity.id1.compose_html” 设置为 “false”。
    - 启用 UTF8:将 “prefs.converted-to-utf8” 设置为 “true”。
    - 以 UTF-8 查看消息:将 “mailnews.view_default_charset” 设置为 “UTF-8”。
    - 将 mailnews.wraplength 设置为 9999 以避免自动换行
    

Linux 内核

有多个面向内核开发人员和用户的指南。这些指南可以以多种格式呈现,如 HTML 和 PDF。请首先阅读 Documentation/admin-guide/README.rst。

要构建文档,请使用 make htmldocsmake pdfdocs。格式化的文档也可以在线阅读:

https://www.kernel.org/doc/html/latest/

Documentation/ 子目录中有各种文本文件,其中有几个使用了 reStructured Text 标记符号。

请阅读 Documentation/process/changes.rst 文件,其中包含构建和运行内核的要求,以及升级内核可能导致的问题的相关信息。

项目介绍

可用于OpenHarmony系统内核的开发与贡献,支持补丁提交、编译测试及代码风格检查,遵循统一补丁格式和DCO签名规范,助力内核功能优化与版本升级。【此简介由AI生成】

定制我的领域