userfaultfd.2: Add Linux container migration use-case to NOTES
[man-pages.git] / man7 / thread-keyring.7
blob93f0630a4acfd92c03fb59c327be189ffa092fda
1 .\"
2 .\" Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
3 .\" Written by David Howells (dhowells@redhat.com)
4 .\"
5 .\" %%%LICENSE_START(GPLv2+_SW_ONEPARA)
6 .\" This program is free software; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License
8 .\" as published by the Free Software Foundation; either version
9 .\" 2 of the License, or (at your option) any later version.
10 .\" %%%LICENSE_END
11 .\"
12 .TH "THREAD-KEYRING" 7 2017-03-13 Linux "Linux Programmer's Manual"
13 .SH NAME
14 thread-keyring \- per-thread keyring
15 .SH DESCRIPTION
16 The thread keyring is a keyring used to anchor keys on behalf of a process.
17 It is created only when a thread requests it.
18 The thread keyring has the name (description)
19 .IR _tid .
21 A special serial number value,
22 .BR KEY_SPEC_THREAD_KEYRING ,
23 is defined that can be used in lieu of the actual serial number of
24 the calling thread's thread keyring.
26 From the
27 .BR keyctl (1)
28 utility, '\fB@t\fP' can be used instead of a numeric key ID in
29 much the same way, but as
30 .BR keyctl (1)
31 is a program run after forking, this is of no utility.
33 Thread keyrings are not inherited across
34 .BR clone (2)
35 and
36 .BR fork (2)
37 and are cleared by
38 .BR execve (2).
39 A thread keyring is destroyed when the thread that refers to it terminates.
41 Initially, a thread does not have a thread keyring.
42 If a thread doesn't have a thread keyring when it is accessed,
43 then it will be created if it is to be modified;
44 otherwise the operation will fail with the error
45 .BR ENOKEY .
46 .SH SEE ALSO
47 .ad l
48 .nh
49 .BR keyctl (1),
50 .BR keyctl (3),
51 .BR keyrings (7),
52 .BR persistent\-keyring (7),
53 .BR process\-keyring (7),
54 .BR session\-keyring (7),
55 .BR user\-keyring (7),
56 .BR user\-session\-keyring (7)