时间轴

2026-05-21

init


如何查看内核某个API是在哪个版本引入的呢?

1
2
3
4
5
6
7
8
9
10
11
git clone https://github.com/torvalds/linux.git

# 以array_index_nospec为例
# 找到其定义在include/linux/nospec
git blame include/linux/nospec.h

# 找到commit id号
git show f3804203306e0

# 查看包含这个commit id的所有tag
git tag contains f3804203306e0