xref: /linux/Documentation/ABI/README (revision 8d2b0853add1d7534dc0794e3c8e0b9e8c4ec640)
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:	(Optional) Kernel version this feature first showed up in.
50		Note: git history often provides more accurate version
51		info, so this field may be omitted.
52Contact:	Primary contact for this interface (may be a mailing list)
53Description:	Long description of the interface and how to use it.
54Users:		All users of this interface who wish to be notified when
55		it changes.  This is very important for interfaces in
56		the "testing" stage, so that kernel developers can work
57		with userspace developers to ensure that things do not
58		break in ways that are unacceptable.  It is also
59		important to get feedback for these interfaces to make
60		sure they are working in a proper way and do not need to
61		be changed further.
62
63
64Note:
65   The fields should be use a simple notation, compatible with ReST markup.
66   Also, the file **should not** have a top-level index, like::
67
68	===
69	foo
70	===
71
72How things move between levels:
73
74Interfaces in stable may move to obsolete, as long as the proper
75notification is given.
76
77Interfaces may be removed from obsolete and the kernel as long as the
78documented amount of time has gone by.
79
80Interfaces in the testing state can move to the stable state when the
81developers feel they are finished.  They cannot be removed from the
82kernel tree without going through the obsolete state first.
83
84It's up to the developer to place their interfaces in the category they
85wish for it to start out in.
86
87
88Notable bits of non-ABI, which should not under any circumstances be considered
89stable:
90
91- Kconfig.  Userspace should not rely on the presence or absence of any
92  particular Kconfig symbol, in /proc/config.gz, in the copy of .config
93  commonly installed to /boot, or in any invocation of the kernel build
94  process.
95
96- Kernel-internal symbols.  Do not rely on the presence, absence, location, or
97  type of any kernel symbol, either in System.map files or the kernel binary
98  itself.  See Documentation/process/stable-api-nonsense.rst.
99