Skip to content

Commit f6388c3

Browse files
Merge branch 'linux-6.6.y' into linux-6.6.y-2025-11-25-CVE-2025-39732
2 parents 6e80006 + eef9634 commit f6388c3

3,886 files changed

Lines changed: 184498 additions & 91782 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
REMOTE_NAME="${REMOTE_NAME:-torvalds}"
6+
REMOTE_URL="${REMOTE_URL:-https://github.com/torvalds/linux.git}"
7+
TARGET_BRANCH="${2:-master}"
8+
9+
log_info() { echo -e "\033[32m[INFO]\033[0m $*" >&2; }
10+
log_error() { echo -e "\033[31m[ERROR]\033[0m $*" >&2; }
11+
12+
main() {
13+
[ $# -lt 1 ] && { echo "Usage: $0 <range> [branch]" >&2; exit 1; }
14+
15+
local range="$1"
16+
17+
if ! git remote get-url torvalds >/dev/null 2>&1; then
18+
git remote add torvalds "${REMOTE_URL}"
19+
else
20+
git remote set-url torvalds "${REMOTE_URL}"
21+
fi
22+
23+
git fetch torvalds
24+
25+
if ! git rev-parse --verify "$TARGET_BRANCH^{commit}" >/dev/null 2>&1; then
26+
log_error "目标分支不存在: $TARGET_BRANCH"
27+
exit 1
28+
fi
29+
30+
local tmp_target=$(mktemp)
31+
32+
log_info "正在导出 $TARGET_BRANCH 标题..."
33+
git log --format="%s" "$TARGET_BRANCH" 2>/dev/null > "$tmp_target"
34+
local target_count=$(wc -l < "$tmp_target")
35+
log_info "目标分支共 $target_count 个标题"
36+
37+
local total=$(git rev-list --count "$range" 2>/dev/null || echo "0")
38+
log_info "检查范围 $range (共 $total 个提交)..."
39+
40+
log_info "开始筛选..."
41+
echo "========================================"
42+
43+
# 使用标准AWK(兼容mawk/gawk),避免match()数组捕获
44+
git log --format="%H%n%s%n%b%n---COMMIT_END---" --reverse "$range" 2>/dev/null | \
45+
awk -v target_file="$tmp_target" -v total="$total" '
46+
BEGIN {
47+
# 加载目标分支标题到数组
48+
while ((getline line < target_file) > 0) {
49+
if (length(line) > 0) target[line] = 1
50+
}
51+
close(target_file)
52+
53+
matched = 0
54+
dup = 0
55+
no_fixes = 0
56+
no_ref = 0
57+
processed = 0
58+
59+
# 读取状态:0=读hash, 1=读subject, 2=读body
60+
state = 0
61+
}
62+
63+
/---COMMIT_END---/ {
64+
# 处理完一个commit
65+
if (hash != "") {
66+
processed++
67+
68+
# 条件1:标题是否已存在?
69+
if (subject in target) {
70+
dup++
71+
} else {
72+
# 条件2:查找 Fixes: 行
73+
has_fixes = 0
74+
ref_found = 0
75+
76+
# 分割body行查找 Fixes:
77+
n = split(body, lines, /\n/)
78+
for (i=1; i<=n; i++) {
79+
if (lines[i] ~ /^Fixes:/) {
80+
has_fixes = 1
81+
82+
# 提取 ("...") 中的内容(兼容所有awk版本)
83+
line_content = lines[i]
84+
start_pos = index(line_content, "(\"")
85+
86+
if (start_pos > 0) {
87+
# 找到 (" 的位置,提取到 ") 结束
88+
temp = substr(line_content, start_pos + 2)
89+
end_pos = index(temp, "\")")
90+
91+
if (end_pos > 0) {
92+
ref_title = substr(temp, 1, end_pos - 1)
93+
94+
# 检查引用是否在目标分支
95+
if (ref_title in target) {
96+
ref_found = 1
97+
break
98+
}
99+
}
100+
}
101+
}
102+
}
103+
104+
if (!has_fixes) {
105+
no_fixes++
106+
} else if (!ref_found) {
107+
no_ref++
108+
} else {
109+
# 符合条件:有Fixes且引用存在,且标题不重复
110+
matched++
111+
print hash " " subject
112+
}
113+
}
114+
}
115+
116+
state = 0
117+
hash = ""
118+
subject = ""
119+
body = ""
120+
next
121+
}
122+
123+
state == 0 {
124+
hash = $0
125+
state = 1
126+
next
127+
}
128+
129+
state == 1 {
130+
subject = $0
131+
state = 2
132+
next
133+
}
134+
135+
state == 2 {
136+
# 累积body行
137+
if (body == "") body = $0
138+
else body = body "\n" $0
139+
next
140+
}
141+
142+
END {
143+
printf "\r\033[K" > "/dev/stderr"
144+
print "[INFO] 完成: 总计 " processed " | 匹配 " matched " | 重复 " dup " | 无Fixes " no_fixes " | 缺依赖 " no_ref > "/dev/stderr"
145+
}
146+
'
147+
148+
echo "========================================" >&2
149+
150+
rm -f "$tmp_target"
151+
}
152+
153+
main "$@"

.github/workflows/build-kernel-arm64.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
KBUILD_BUILD_HOST: deepin-kernel-builder
1010
email: support@deepin.org
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
permissions:
1317
pull-requests: read
1418

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: build kernel extra
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
env:
8+
KBUILD_BUILD_USER: deepin-kernel-sig
9+
KBUILD_BUILD_HOST: deepin-kernel-builder
10+
email: support@deepin.org
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
pull-requests: read
18+
19+
jobs:
20+
build-kernel-extra:
21+
runs-on: [self-hosted, linux, x64]
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: "Install Deps"
25+
run: |
26+
git config --global user.email $email
27+
git config --global user.name $KBUILD_BUILD_USER
28+
29+
- name: "Compile kernel i386_defconfig"
30+
run: |
31+
# .config
32+
make i386_defconfig
33+
make -j$(nproc)
34+
35+
- name: "Clang build kernel i386_defconfig"
36+
run: |
37+
# .config
38+
make LLVM=-18 i386_defconfig
39+
make LLVM=-18 -j$(nproc)
40+
41+
- name: "Compile kernel x86_64_defconfig"
42+
run: |
43+
# .config
44+
make x86_64_defconfig
45+
make -j$(nproc)
46+
47+
- name: "Clang build kernel x86_64_defconfig"
48+
run: |
49+
# .config
50+
make LLVM=-18 x86_64_defconfig
51+
make LLVM=-18 -j$(nproc)
52+
53+
- name: "Clang build kernel arm64 defconfig"
54+
run: |
55+
# .config
56+
make LLVM=-18 ARCH=arm64 defconfig
57+
make LLVM=-18 ARCH=arm64 -j$(nproc)
58+
59+
- name: "Clang build kernel loongarch loongson3_defconfig"
60+
run: |
61+
# .config
62+
make LLVM=-18 ARCH=loongarch loongson3_defconfig
63+
make LLVM=-18 ARCH=loongarch -j$(nproc)
64+
65+
- name: "Clang build kernel riscv rv32_defconfig"
66+
run: |
67+
# .config
68+
make LLVM=-18 ARCH=riscv rv32_defconfig
69+
make LLVM=-18 ARCH=riscv -j$(nproc)
70+

.github/workflows/build-kernel-loong64.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
KBUILD_BUILD_HOST: deepin-kernel-builder
1010
email: support@deepin.org
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
permissions:
1317
pull-requests: read
1418

.github/workflows/build-kernel-riscv64.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
KBUILD_BUILD_HOST: deepin-kernel-builder
1010
email: support@deepin.org
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
permissions:
1317
pull-requests: read
1418

.github/workflows/build-kernel-s390.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
KBUILD_BUILD_HOST: deepin-kernel-builder
1010
email: support@deepin.org
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
permissions:
1317
pull-requests: read
1418

.github/workflows/build-kernel-sw64.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
KBUILD_BUILD_HOST: deepin-kernel-builder
1010
email: support@deepin.org
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
permissions:
1317
pull-requests: read
1418

.github/workflows/build-kernel.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
KBUILD_BUILD_HOST: deepin-kernel-builder
1010
email: support@deepin.org
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
permissions:
1317
pull-requests: read
1418

@@ -28,8 +32,28 @@ jobs:
2832
make deepin_x86_desktop_defconfig
2933
make -j$(nproc)
3034
35+
- name: "Boot kernel Test"
36+
run: |
37+
# mkinitrd
38+
mkdir -p initrd/bin && cp /bin/busybox initrd/bin/
39+
for cmd in sh uname poweroff; do ln -sf busybox initrd/bin/$cmd; done
40+
echo -e '#!/bin/sh\nuname -a\npoweroff -f' > initrd/init && chmod +x initrd/init
41+
(cd initrd && find . | cpio -o -H newc | gzip > ../initrd.cpio.gz)
42+
# boot kernel and shutdown
43+
timeout 10 qemu-system-x86_64 -kernel arch/x86/boot/bzImage -initrd initrd.cpio.gz -append "console=ttyS0 loglevel=7" -serial stdio -display none && echo -e "\n[CI PASS]" || { echo -e "\n[CI FAIL]"; exit 1; }
44+
# boot kernel with kvm
45+
timeout 10 qemu-system-x86_64 --enable-kvm -kernel arch/x86/boot/bzImage -initrd initrd.cpio.gz -append "console=ttyS0 loglevel=7" -serial stdio -display none && echo -e "\n[CI PASS]" || { echo -e "\n[CI FAIL]"; exit 1; }
46+
3147
- name: "Clang build kernel"
3248
run: |
3349
# .config
3450
make LLVM=-18 deepin_x86_desktop_defconfig
3551
make LLVM=-18 -j$(nproc)
52+
53+
- name: "Boot kernel Test"
54+
run: |
55+
# reuse initrd and boot kernel and shutdown
56+
timeout 10 qemu-system-x86_64 -kernel arch/x86/boot/bzImage -initrd initrd.cpio.gz -append "console=ttyS0 loglevel=7" -serial stdio -display none && echo -e "\n[CI PASS]" || { echo -e "\n[CI FAIL]"; exit 1; }
57+
# boot kernel with kvm
58+
timeout 10 qemu-system-x86_64 --enable-kvm -kernel arch/x86/boot/bzImage -initrd initrd.cpio.gz -append "console=ttyS0 loglevel=7" -serial stdio -display none && echo -e "\n[CI PASS]" || { echo -e "\n[CI FAIL]"; exit 1; }
59+

.github/workflows/check-config-arm64.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
pull_request:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
check-defconfig:
913
runs-on: ubuntu-24.04-arm
@@ -72,4 +76,4 @@ jobs:
7276
exit_code=1
7377
fi
7478
done
75-
exit $exit_code
79+
exit $exit_code

.github/workflows/check-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
pull_request:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
check-defconfig:
913
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)