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