Cover image for Query the earliest introduced version of a kernel API

Query the earliest introduced version of a kernel API

Words 84
Views
Visitors

Timeline

Timeline

2026-05-21

init

This article introduces how to query the earliest introduced version of a specific kernel API, and illustrates the query method with specific examples.

How to check which version a kernel API was introduced in? Takearray_index_nospecas an example

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

# Find the header file where it is defined: include/linux/nospec.h
git blame include/linux/nospec.h

# Find the commit id
git show f3804203306e0

# View all tags containing this commit id
git tag --contains f3804203306e0