xref: /linux/Documentation/ABI/README (revision 1260ed77798502de9c98020040d2995008de10cc)
1This part of the documentation inside Documentation/ABI directory
2attempts to document the ABI between the Linux kernel and
3userspace, and the relative stability of these interfaces.  Due to the
4everchanging nature of Linux, and the differing maturity levels, these
5interfaces should be used by userspace programs in different ways.
6
7We have four different levels of ABI stability, as shown by the four
8different subdirectories in this location.  Interfaces may change levels
9of stability according to the rules described below.
10
11The different levels of stability are:
12
13  stable/
14	This directory documents the interfaces that the developer has
15	defined to be stable.  Userspace programs are free to use these
16	interfaces with no restrictions, and backward compatibility for
17	them will be guaranteed for at least 2 years.  Most interfaces
18	(like syscalls) are expected to never change and always be
19	available.
20
21  testing/
22	This directory documents interfaces that are felt to be stable,
23	as the main development of this interface has been completed.
24	The interface can be changed to add new features, but the
25	current interface will not break by doing this, unless grave
26	errors or security problems are found in them.  Userspace
27	programs can start to rely on these interfaces, but they must be
28	aware of changes that can occur before these interfaces move to
29	be marked stable.  Programs that use these interfaces are
30	strongly encouraged to add their name to the description of
31	these interfaces, so that the kernel developers can easily
32	notify them if any changes occur (see the description of the
33	layout of the files below for details on how to do this.)
34
35  obsolete/
36	This directory documents interfaces that are still remaining in
37	the kernel, but are marked to be removed at some later point in
38	time.  The description of the interface will document the reason
39	why it is obsolete and when it can be expected to be removed.
40
41  removed/
42	This directory contains a list of the old interfaces that have
43	been removed from the kernel.
44
45Every file in these directories will contain the following information:
46
47What:		Short description of the interface
48Date:		Date created
49KernelVersion:	Kernel version this feature first showed up in.
50Contact:	Primary contact for this interface (may be a mailing list)
51Description:	Long description of the interface and how to use it.
52Users:		All users of this interface who wish to be notified when
53		it changes.  This is very important for interfaces in
54		the "testing" stage, so that kernel developers can work
55		with userspace developers to ensure that things do not
56		break in ways that are unacceptable.  It is also
57		important to get feedback for these interfaces to make
58		sure they are working in a proper way and do not need to
59		be changed further.
60
61
62Note:
63   The fields should be use a simple notation, compatible with ReST markup.
64   Also, the file **should not** have a top-level index, like::
65
66	===
67	foo
68	===
69
70How things move between levels:
71
72Interfaces in stable may move to obsolete, as long as the proper
73notification is given.
74
75Interfaces may be removed from obsolete and the kernel as long as the
76documented amount of time has gone by.
77
78Interfaces in the testing state can move to the stable state when the
79developers feel they are finished.  They cannot be removed from the
80kernel tree without going through the obsolete state first.
81
82It's up to the developer to place their interfaces in the category they
83wish for it to start out in.
84
85
86Notable bits of non-ABI, which should not under any circumstances be considered
87stable:
88
89- Kconfig.  Userspace should not rely on the presence or absence of any
90  particular Kconfig symbol, in /proc/config.gz, in the copy of .config
91  commonly installed to /boot, or in any invocation of the kernel build
92  process.
93
94- Kernel-internal symbols.  Do not rely on the presence, absence, location, or
95  type of any kernel symbol, either in System.map files or the kernel binary
96  itself.  See Documentation/process/stable-api-nonsense.rst.
97