diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 16:50:52 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 16:50:52 -0400 |
commit | cff6bf970965c98c62007fc8a36527fd147fe233 (patch) | |
tree | 2791f2208b54ade86625af416ff5342f11282f0c /Documentation | |
parent | 6cd7525a00f3b926e8bd2e402954ed3e09a8e924 (diff) | |
parent | 39ca371c45b04cd50d0974030ae051906fc516b6 (diff) |
Merge /home/trondmy/scm/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/Changes | 10 | ||||
-rw-r--r-- | Documentation/SubmittingPatches | 86 | ||||
-rw-r--r-- | Documentation/connector/connector.txt | 44 | ||||
-rw-r--r-- | Documentation/dell_rbu.txt | 38 | ||||
-rw-r--r-- | Documentation/keys-request-key.txt | 161 | ||||
-rw-r--r-- | Documentation/keys.txt | 92 | ||||
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 10 | ||||
-rw-r--r-- | Documentation/sparse.txt | 4 |
8 files changed, 403 insertions, 42 deletions
diff --git a/Documentation/Changes b/Documentation/Changes index 5eaab0441d7..27232be26e1 100644 --- a/Documentation/Changes +++ b/Documentation/Changes | |||
@@ -237,6 +237,12 @@ udev | |||
237 | udev is a userspace application for populating /dev dynamically with | 237 | udev is a userspace application for populating /dev dynamically with |
238 | only entries for devices actually present. udev replaces devfs. | 238 | only entries for devices actually present. udev replaces devfs. |
239 | 239 | ||
240 | FUSE | ||
241 | ---- | ||
242 | |||
243 | Needs libfuse 2.4.0 or later. Absolute minimum is 2.3.0 but mount | ||
244 | options 'direct_io' and 'kernel_cache' won't work. | ||
245 | |||
240 | Networking | 246 | Networking |
241 | ========== | 247 | ========== |
242 | 248 | ||
@@ -390,6 +396,10 @@ udev | |||
390 | ---- | 396 | ---- |
391 | o <http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html> | 397 | o <http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html> |
392 | 398 | ||
399 | FUSE | ||
400 | ---- | ||
401 | o <http://sourceforge.net/projects/fuse> | ||
402 | |||
393 | Networking | 403 | Networking |
394 | ********** | 404 | ********** |
395 | 405 | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 7f43b040311..237d54c44bc 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -301,8 +301,84 @@ now, but you can do this to mark internal company procedures or just | |||
301 | point out some special detail about the sign-off. | 301 | point out some special detail about the sign-off. |
302 | 302 | ||
303 | 303 | ||
304 | 12) The canonical patch format | ||
304 | 305 | ||
305 | 12) More references for submitting patches | 306 | The canonical patch subject line is: |
307 | |||
308 | Subject: [PATCH 001/123] subsystem: summary phrase | ||
309 | |||
310 | The canonical patch message body contains the following: | ||
311 | |||
312 | - A "from" line specifying the patch author. | ||
313 | |||
314 | - An empty line. | ||
315 | |||
316 | - The body of the explanation, which will be copied to the | ||
317 | permanent changelog to describe this patch. | ||
318 | |||
319 | - The "Signed-off-by:" lines, described above, which will | ||
320 | also go in the changelog. | ||
321 | |||
322 | - A marker line containing simply "---". | ||
323 | |||
324 | - Any additional comments not suitable for the changelog. | ||
325 | |||
326 | - The actual patch (diff output). | ||
327 | |||
328 | The Subject line format makes it very easy to sort the emails | ||
329 | alphabetically by subject line - pretty much any email reader will | ||
330 | support that - since because the sequence number is zero-padded, | ||
331 | the numerical and alphabetic sort is the same. | ||
332 | |||
333 | The "subsystem" in the email's Subject should identify which | ||
334 | area or subsystem of the kernel is being patched. | ||
335 | |||
336 | The "summary phrase" in the email's Subject should concisely | ||
337 | describe the patch which that email contains. The "summary | ||
338 | phrase" should not be a filename. Do not use the same "summary | ||
339 | phrase" for every patch in a whole patch series. | ||
340 | |||
341 | Bear in mind that the "summary phrase" of your email becomes | ||
342 | a globally-unique identifier for that patch. It propagates | ||
343 | all the way into the git changelog. The "summary phrase" may | ||
344 | later be used in developer discussions which refer to the patch. | ||
345 | People will want to google for the "summary phrase" to read | ||
346 | discussion regarding that patch. | ||
347 | |||
348 | A couple of example Subjects: | ||
349 | |||
350 | Subject: [patch 2/5] ext2: improve scalability of bitmap searching | ||
351 | Subject: [PATCHv2 001/207] x86: fix eflags tracking | ||
352 | |||
353 | The "from" line must be the very first line in the message body, | ||
354 | and has the form: | ||
355 | |||
356 | From: Original Author <author@example.com> | ||
357 | |||
358 | The "from" line specifies who will be credited as the author of the | ||
359 | patch in the permanent changelog. If the "from" line is missing, | ||
360 | then the "From:" line from the email header will be used to determine | ||
361 | the patch author in the changelog. | ||
362 | |||
363 | The explanation body will be committed to the permanent source | ||
364 | changelog, so should make sense to a competent reader who has long | ||
365 | since forgotten the immediate details of the discussion that might | ||
366 | have led to this patch. | ||
367 | |||
368 | The "---" marker line serves the essential purpose of marking for patch | ||
369 | handling tools where the changelog message ends. | ||
370 | |||
371 | One good use for the additional comments after the "---" marker is for | ||
372 | a diffstat, to show what files have changed, and the number of inserted | ||
373 | and deleted lines per file. A diffstat is especially useful on bigger | ||
374 | patches. Other comments relevant only to the moment or the maintainer, | ||
375 | not suitable for the permanent changelog, should also go here. | ||
376 | |||
377 | See more details on the proper patch format in the following | ||
378 | references. | ||
379 | |||
380 | |||
381 | 13) More references for submitting patches | ||
306 | 382 | ||
307 | Andrew Morton, "The perfect patch" (tpp). | 383 | Andrew Morton, "The perfect patch" (tpp). |
308 | <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt> | 384 | <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt> |
@@ -310,6 +386,14 @@ Andrew Morton, "The perfect patch" (tpp). | |||
310 | Jeff Garzik, "Linux kernel patch submission format." | 386 | Jeff Garzik, "Linux kernel patch submission format." |
311 | <http://linux.yyz.us/patch-format.html> | 387 | <http://linux.yyz.us/patch-format.html> |
312 | 388 | ||
389 | Greg KH, "How to piss off a kernel subsystem maintainer" | ||
390 | <http://www.kroah.com/log/2005/03/31/> | ||
391 | |||
392 | Kernel Documentation/CodingStyle | ||
393 | <http://sosdg.org/~coywolf/lxr/source/Documentation/CodingStyle> | ||
394 | |||
395 | Linus Torvald's mail on the canonical patch format: | ||
396 | <http://lkml.org/lkml/2005/4/7/183> | ||
313 | 397 | ||
314 | 398 | ||
315 | ----------------------------------- | 399 | ----------------------------------- |
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt index 54a0a14bfbe..57a314b14cf 100644 --- a/Documentation/connector/connector.txt +++ b/Documentation/connector/connector.txt | |||
@@ -131,3 +131,47 @@ Netlink itself is not reliable protocol, that means that messages can | |||
131 | be lost due to memory pressure or process' receiving queue overflowed, | 131 | be lost due to memory pressure or process' receiving queue overflowed, |
132 | so caller is warned must be prepared. That is why struct cn_msg [main | 132 | so caller is warned must be prepared. That is why struct cn_msg [main |
133 | connector's message header] contains u32 seq and u32 ack fields. | 133 | connector's message header] contains u32 seq and u32 ack fields. |
134 | |||
135 | /*****************************************/ | ||
136 | Userspace usage. | ||
137 | /*****************************************/ | ||
138 | 2.6.14 has a new netlink socket implementation, which by default does not | ||
139 | allow to send data to netlink groups other than 1. | ||
140 | So, if to use netlink socket (for example using connector) | ||
141 | with different group number userspace application must subscribe to | ||
142 | that group. It can be achieved by following pseudocode: | ||
143 | |||
144 | s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); | ||
145 | |||
146 | l_local.nl_family = AF_NETLINK; | ||
147 | l_local.nl_groups = 12345; | ||
148 | l_local.nl_pid = 0; | ||
149 | |||
150 | if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) { | ||
151 | perror("bind"); | ||
152 | close(s); | ||
153 | return -1; | ||
154 | } | ||
155 | |||
156 | { | ||
157 | int on = l_local.nl_groups; | ||
158 | setsockopt(s, 270, 1, &on, sizeof(on)); | ||
159 | } | ||
160 | |||
161 | Where 270 above is SOL_NETLINK, and 1 is a NETLINK_ADD_MEMBERSHIP socket | ||
162 | option. To drop multicast subscription one should call above socket option | ||
163 | with NETLINK_DROP_MEMBERSHIP parameter which is defined as 0. | ||
164 | |||
165 | 2.6.14 netlink code only allows to select a group which is less or equal to | ||
166 | the maximum group number, which is used at netlink_kernel_create() time. | ||
167 | In case of connector it is CN_NETLINK_USERS + 0xf, so if you want to use | ||
168 | group number 12345, you must increment CN_NETLINK_USERS to that number. | ||
169 | Additional 0xf numbers are allocated to be used by non-in-kernel users. | ||
170 | |||
171 | Due to this limitation, group 0xffffffff does not work now, so one can | ||
172 | not use add/remove connector's group notifications, but as far as I know, | ||
173 | only cn_test.c test module used it. | ||
174 | |||
175 | Some work in netlink area is still being done, so things can be changed in | ||
176 | 2.6.15 timeframe, if it will happen, documentation will be updated for that | ||
177 | kernel. | ||
diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt index 95d7f62e4db..941343a7a26 100644 --- a/Documentation/dell_rbu.txt +++ b/Documentation/dell_rbu.txt | |||
@@ -35,6 +35,7 @@ The driver load creates the following directories under the /sys file system. | |||
35 | /sys/class/firmware/dell_rbu/data | 35 | /sys/class/firmware/dell_rbu/data |
36 | /sys/devices/platform/dell_rbu/image_type | 36 | /sys/devices/platform/dell_rbu/image_type |
37 | /sys/devices/platform/dell_rbu/data | 37 | /sys/devices/platform/dell_rbu/data |
38 | /sys/devices/platform/dell_rbu/packet_size | ||
38 | 39 | ||
39 | The driver supports two types of update mechanism; monolithic and packetized. | 40 | The driver supports two types of update mechanism; monolithic and packetized. |
40 | These update mechanism depends upon the BIOS currently running on the system. | 41 | These update mechanism depends upon the BIOS currently running on the system. |
@@ -47,8 +48,26 @@ By default the driver uses monolithic memory for the update type. This can be | |||
47 | changed to packets during the driver load time by specifying the load | 48 | changed to packets during the driver load time by specifying the load |
48 | parameter image_type=packet. This can also be changed later as below | 49 | parameter image_type=packet. This can also be changed later as below |
49 | echo packet > /sys/devices/platform/dell_rbu/image_type | 50 | echo packet > /sys/devices/platform/dell_rbu/image_type |
50 | Also echoing either mono ,packet or init in to image_type will free up the | 51 | |
51 | memory allocated by the driver. | 52 | In packet update mode the packet size has to be given before any packets can |
53 | be downloaded. It is done as below | ||
54 | echo XXXX > /sys/devices/platform/dell_rbu/packet_size | ||
55 | In the packet update mechanism, the user neesd to create a new file having | ||
56 | packets of data arranged back to back. It can be done as follows | ||
57 | The user creates packets header, gets the chunk of the BIOS image and | ||
58 | placs it next to the packetheader; now, the packetheader + BIOS image chunk | ||
59 | added to geather should match the specified packet_size. This makes one | ||
60 | packet, the user needs to create more such packets out of the entire BIOS | ||
61 | image file and then arrange all these packets back to back in to one single | ||
62 | file. | ||
63 | This file is then copied to /sys/class/firmware/dell_rbu/data. | ||
64 | Once this file gets to the driver, the driver extracts packet_size data from | ||
65 | the file and spreads it accross the physical memory in contiguous packet_sized | ||
66 | space. | ||
67 | This method makes sure that all the packets get to the driver in a single operation. | ||
68 | |||
69 | In monolithic update the user simply get the BIOS image (.hdr file) and copies | ||
70 | to the data file as is without any change to the BIOS image itself. | ||
52 | 71 | ||
53 | Do the steps below to download the BIOS image. | 72 | Do the steps below to download the BIOS image. |
54 | 1) echo 1 > /sys/class/firmware/dell_rbu/loading | 73 | 1) echo 1 > /sys/class/firmware/dell_rbu/loading |
@@ -58,7 +77,10 @@ Do the steps below to download the BIOS image. | |||
58 | The /sys/class/firmware/dell_rbu/ entries will remain till the following is | 77 | The /sys/class/firmware/dell_rbu/ entries will remain till the following is |
59 | done. | 78 | done. |
60 | echo -1 > /sys/class/firmware/dell_rbu/loading. | 79 | echo -1 > /sys/class/firmware/dell_rbu/loading. |
61 | Until this step is completed the drivr cannot be unloaded. | 80 | Until this step is completed the driver cannot be unloaded. |
81 | Also echoing either mono ,packet or init in to image_type will free up the | ||
82 | memory allocated by the driver. | ||
83 | |||
62 | If an user by accident executes steps 1 and 3 above without executing step 2; | 84 | If an user by accident executes steps 1 and 3 above without executing step 2; |
63 | it will make the /sys/class/firmware/dell_rbu/ entries to disappear. | 85 | it will make the /sys/class/firmware/dell_rbu/ entries to disappear. |
64 | The entries can be recreated by doing the following | 86 | The entries can be recreated by doing the following |
@@ -66,15 +88,11 @@ echo init > /sys/devices/platform/dell_rbu/image_type | |||
66 | NOTE: echoing init in image_type does not change it original value. | 88 | NOTE: echoing init in image_type does not change it original value. |
67 | 89 | ||
68 | Also the driver provides /sys/devices/platform/dell_rbu/data readonly file to | 90 | Also the driver provides /sys/devices/platform/dell_rbu/data readonly file to |
69 | read back the image downloaded. This is useful in case of packet update | 91 | read back the image downloaded. |
70 | mechanism where the above steps 1,2,3 will repeated for every packet. | ||
71 | By reading the /sys/devices/platform/dell_rbu/data file all packet data | ||
72 | downloaded can be verified in a single file. | ||
73 | The packets are arranged in this file one after the other in a FIFO order. | ||
74 | 92 | ||
75 | NOTE: | 93 | NOTE: |
76 | This driver requires a patch for firmware_class.c which has the addition | 94 | This driver requires a patch for firmware_class.c which has the modified |
77 | of request_firmware_nowait_nohotplug function to wortk | 95 | request_firmware_nowait function. |
78 | Also after updating the BIOS image an user mdoe application neeeds to execute | 96 | Also after updating the BIOS image an user mdoe application neeeds to execute |
79 | code which message the BIOS update request to the BIOS. So on the next reboot | 97 | code which message the BIOS update request to the BIOS. So on the next reboot |
80 | the BIOS knows about the new image downloaded and it updates it self. | 98 | the BIOS knows about the new image downloaded and it updates it self. |
diff --git a/Documentation/keys-request-key.txt b/Documentation/keys-request-key.txt new file mode 100644 index 00000000000..5f2b9c5edbb --- /dev/null +++ b/Documentation/keys-request-key.txt | |||
@@ -0,0 +1,161 @@ | |||
1 | =================== | ||
2 | KEY REQUEST SERVICE | ||
3 | =================== | ||
4 | |||
5 | The key request service is part of the key retention service (refer to | ||
6 | Documentation/keys.txt). This document explains more fully how that the | ||
7 | requesting algorithm works. | ||
8 | |||
9 | The process starts by either the kernel requesting a service by calling | ||
10 | request_key(): | ||
11 | |||
12 | struct key *request_key(const struct key_type *type, | ||
13 | const char *description, | ||
14 | const char *callout_string); | ||
15 | |||
16 | Or by userspace invoking the request_key system call: | ||
17 | |||
18 | key_serial_t request_key(const char *type, | ||
19 | const char *description, | ||
20 | const char *callout_info, | ||
21 | key_serial_t dest_keyring); | ||
22 | |||
23 | The main difference between the two access points is that the in-kernel | ||
24 | interface does not need to link the key to a keyring to prevent it from being | ||
25 | immediately destroyed. The kernel interface returns a pointer directly to the | ||
26 | key, and it's up to the caller to destroy the key. | ||
27 | |||
28 | The userspace interface links the key to a keyring associated with the process | ||
29 | to prevent the key from going away, and returns the serial number of the key to | ||
30 | the caller. | ||
31 | |||
32 | |||
33 | =========== | ||
34 | THE PROCESS | ||
35 | =========== | ||
36 | |||
37 | A request proceeds in the following manner: | ||
38 | |||
39 | (1) Process A calls request_key() [the userspace syscall calls the kernel | ||
40 | interface]. | ||
41 | |||
42 | (2) request_key() searches the process's subscribed keyrings to see if there's | ||
43 | a suitable key there. If there is, it returns the key. If there isn't, and | ||
44 | callout_info is not set, an error is returned. Otherwise the process | ||
45 | proceeds to the next step. | ||
46 | |||
47 | (3) request_key() sees that A doesn't have the desired key yet, so it creates | ||
48 | two things: | ||
49 | |||
50 | (a) An uninstantiated key U of requested type and description. | ||
51 | |||
52 | (b) An authorisation key V that refers to key U and notes that process A | ||
53 | is the context in which key U should be instantiated and secured, and | ||
54 | from which associated key requests may be satisfied. | ||
55 | |||
56 | (4) request_key() then forks and executes /sbin/request-key with a new session | ||
57 | keyring that contains a link to auth key V. | ||
58 | |||
59 | (5) /sbin/request-key execs an appropriate program to perform the actual | ||
60 | instantiation. | ||
61 | |||
62 | (6) The program may want to access another key from A's context (say a | ||
63 | Kerberos TGT key). It just requests the appropriate key, and the keyring | ||
64 | search notes that the session keyring has auth key V in its bottom level. | ||
65 | |||
66 | This will permit it to then search the keyrings of process A with the | ||
67 | UID, GID, groups and security info of process A as if it was process A, | ||
68 | and come up with key W. | ||
69 | |||
70 | (7) The program then does what it must to get the data with which to | ||
71 | instantiate key U, using key W as a reference (perhaps it contacts a | ||
72 | Kerberos server using the TGT) and then instantiates key U. | ||
73 | |||
74 | (8) Upon instantiating key U, auth key V is automatically revoked so that it | ||
75 | may not be used again. | ||
76 | |||
77 | (9) The program then exits 0 and request_key() deletes key V and returns key | ||
78 | U to the caller. | ||
79 | |||
80 | This also extends further. If key W (step 5 above) didn't exist, key W would be | ||
81 | created uninstantiated, another auth key (X) would be created [as per step 3] | ||
82 | and another copy of /sbin/request-key spawned [as per step 4]; but the context | ||
83 | specified by auth key X will still be process A, as it was in auth key V. | ||
84 | |||
85 | This is because process A's keyrings can't simply be attached to | ||
86 | /sbin/request-key at the appropriate places because (a) execve will discard two | ||
87 | of them, and (b) it requires the same UID/GID/Groups all the way through. | ||
88 | |||
89 | |||
90 | ====================== | ||
91 | NEGATIVE INSTANTIATION | ||
92 | ====================== | ||
93 | |||
94 | Rather than instantiating a key, it is possible for the possessor of an | ||
95 | authorisation key to negatively instantiate a key that's under construction. | ||
96 | This is a short duration placeholder that causes any attempt at re-requesting | ||
97 | the key whilst it exists to fail with error ENOKEY. | ||
98 | |||
99 | This is provided to prevent excessive repeated spawning of /sbin/request-key | ||
100 | processes for a key that will never be obtainable. | ||
101 | |||
102 | Should the /sbin/request-key process exit anything other than 0 or die on a | ||
103 | signal, the key under construction will be automatically negatively | ||
104 | instantiated for a short amount of time. | ||
105 | |||
106 | |||
107 | ==================== | ||
108 | THE SEARCH ALGORITHM | ||
109 | ==================== | ||
110 | |||
111 | A search of any particular keyring proceeds in the following fashion: | ||
112 | |||
113 | (1) When the key management code searches for a key (keyring_search_aux) it | ||
114 | firstly calls key_permission(SEARCH) on the keyring it's starting with, | ||
115 | if this denies permission, it doesn't search further. | ||
116 | |||
117 | (2) It considers all the non-keyring keys within that keyring and, if any key | ||
118 | matches the criteria specified, calls key_permission(SEARCH) on it to see | ||
119 | if the key is allowed to be found. If it is, that key is returned; if | ||
120 | not, the search continues, and the error code is retained if of higher | ||
121 | priority than the one currently set. | ||
122 | |||
123 | (3) It then considers all the keyring-type keys in the keyring it's currently | ||
124 | searching. It calls key_permission(SEARCH) on each keyring, and if this | ||
125 | grants permission, it recurses, executing steps (2) and (3) on that | ||
126 | keyring. | ||
127 | |||
128 | The process stops immediately a valid key is found with permission granted to | ||
129 | use it. Any error from a previous match attempt is discarded and the key is | ||
130 | returned. | ||
131 | |||
132 | When search_process_keyrings() is invoked, it performs the following searches | ||
133 | until one succeeds: | ||
134 | |||
135 | (1) If extant, the process's thread keyring is searched. | ||
136 | |||
137 | (2) If extant, the process's process keyring is searched. | ||
138 | |||
139 | (3) The process's session keyring is searched. | ||
140 | |||
141 | (4) If the process has a request_key() authorisation key in its session | ||
142 | keyring then: | ||
143 | |||
144 | (a) If extant, the calling process's thread keyring is searched. | ||
145 | |||
146 | (b) If extant, the calling process's process keyring is searched. | ||
147 | |||
148 | (c) The calling process's session keyring is searched. | ||
149 | |||
150 | The moment one succeeds, all pending errors are discarded and the found key is | ||
151 | returned. | ||
152 | |||
153 | Only if all these fail does the whole thing fail with the highest priority | ||
154 | error. Note that several errors may have come from LSM. | ||
155 | |||
156 | The error priority is: | ||
157 | |||
158 | EKEYREVOKED > EKEYEXPIRED > ENOKEY | ||
159 | |||
160 | EACCES/EPERM are only returned on a direct search of a specific keyring where | ||
161 | the basal keyring does not grant Search permission. | ||
diff --git a/Documentation/keys.txt b/Documentation/keys.txt index 0321ded4b9a..4afe03a58c5 100644 --- a/Documentation/keys.txt +++ b/Documentation/keys.txt | |||
@@ -195,8 +195,8 @@ KEY ACCESS PERMISSIONS | |||
195 | ====================== | 195 | ====================== |
196 | 196 | ||
197 | Keys have an owner user ID, a group access ID, and a permissions mask. The mask | 197 | Keys have an owner user ID, a group access ID, and a permissions mask. The mask |
198 | has up to eight bits each for user, group and other access. Only five of each | 198 | has up to eight bits each for possessor, user, group and other access. Only |
199 | set of eight bits are defined. These permissions granted are: | 199 | five of each set of eight bits are defined. These permissions granted are: |
200 | 200 | ||
201 | (*) View | 201 | (*) View |
202 | 202 | ||
@@ -241,16 +241,16 @@ about the status of the key service: | |||
241 | type, description and permissions. The payload of the key is not available | 241 | type, description and permissions. The payload of the key is not available |
242 | this way: | 242 | this way: |
243 | 243 | ||
244 | SERIAL FLAGS USAGE EXPY PERM UID GID TYPE DESCRIPTION: SUMMARY | 244 | SERIAL FLAGS USAGE EXPY PERM UID GID TYPE DESCRIPTION: SUMMARY |
245 | 00000001 I----- 39 perm 1f0000 0 0 keyring _uid_ses.0: 1/4 | 245 | 00000001 I----- 39 perm 1f1f0000 0 0 keyring _uid_ses.0: 1/4 |
246 | 00000002 I----- 2 perm 1f0000 0 0 keyring _uid.0: empty | 246 | 00000002 I----- 2 perm 1f1f0000 0 0 keyring _uid.0: empty |
247 | 00000007 I----- 1 perm 1f0000 0 0 keyring _pid.1: empty | 247 | 00000007 I----- 1 perm 1f1f0000 0 0 keyring _pid.1: empty |
248 | 0000018d I----- 1 perm 1f0000 0 0 keyring _pid.412: empty | 248 | 0000018d I----- 1 perm 1f1f0000 0 0 keyring _pid.412: empty |
249 | 000004d2 I--Q-- 1 perm 1f0000 32 -1 keyring _uid.32: 1/4 | 249 | 000004d2 I--Q-- 1 perm 1f1f0000 32 -1 keyring _uid.32: 1/4 |
250 | 000004d3 I--Q-- 3 perm 1f0000 32 -1 keyring _uid_ses.32: empty | 250 | 000004d3 I--Q-- 3 perm 1f1f0000 32 -1 keyring _uid_ses.32: empty |
251 | 00000892 I--QU- 1 perm 1f0000 0 0 user metal:copper: 0 | 251 | 00000892 I--QU- 1 perm 1f000000 0 0 user metal:copper: 0 |
252 | 00000893 I--Q-N 1 35s 1f0000 0 0 user metal:silver: 0 | 252 | 00000893 I--Q-N 1 35s 1f1f0000 0 0 user metal:silver: 0 |
253 | 00000894 I--Q-- 1 10h 1f0000 0 0 user metal:gold: 0 | 253 | 00000894 I--Q-- 1 10h 001f0000 0 0 user metal:gold: 0 |
254 | 254 | ||
255 | The flags are: | 255 | The flags are: |
256 | 256 | ||
@@ -361,6 +361,8 @@ The main syscalls are: | |||
361 | /sbin/request-key will be invoked in an attempt to obtain a key. The | 361 | /sbin/request-key will be invoked in an attempt to obtain a key. The |
362 | callout_info string will be passed as an argument to the program. | 362 | callout_info string will be passed as an argument to the program. |
363 | 363 | ||
364 | See also Documentation/keys-request-key.txt. | ||
365 | |||
364 | 366 | ||
365 | The keyctl syscall functions are: | 367 | The keyctl syscall functions are: |
366 | 368 | ||
@@ -533,8 +535,8 @@ The keyctl syscall functions are: | |||
533 | 535 | ||
534 | (*) Read the payload data from a key: | 536 | (*) Read the payload data from a key: |
535 | 537 | ||
536 | key_serial_t keyctl(KEYCTL_READ, key_serial_t keyring, char *buffer, | 538 | long keyctl(KEYCTL_READ, key_serial_t keyring, char *buffer, |
537 | size_t buflen); | 539 | size_t buflen); |
538 | 540 | ||
539 | This function attempts to read the payload data from the specified key | 541 | This function attempts to read the payload data from the specified key |
540 | into the buffer. The process must have read permission on the key to | 542 | into the buffer. The process must have read permission on the key to |
@@ -555,9 +557,9 @@ The keyctl syscall functions are: | |||
555 | 557 | ||
556 | (*) Instantiate a partially constructed key. | 558 | (*) Instantiate a partially constructed key. |
557 | 559 | ||
558 | key_serial_t keyctl(KEYCTL_INSTANTIATE, key_serial_t key, | 560 | long keyctl(KEYCTL_INSTANTIATE, key_serial_t key, |
559 | const void *payload, size_t plen, | 561 | const void *payload, size_t plen, |
560 | key_serial_t keyring); | 562 | key_serial_t keyring); |
561 | 563 | ||
562 | If the kernel calls back to userspace to complete the instantiation of a | 564 | If the kernel calls back to userspace to complete the instantiation of a |
563 | key, userspace should use this call to supply data for the key before the | 565 | key, userspace should use this call to supply data for the key before the |
@@ -576,8 +578,8 @@ The keyctl syscall functions are: | |||
576 | 578 | ||
577 | (*) Negatively instantiate a partially constructed key. | 579 | (*) Negatively instantiate a partially constructed key. |
578 | 580 | ||
579 | key_serial_t keyctl(KEYCTL_NEGATE, key_serial_t key, | 581 | long keyctl(KEYCTL_NEGATE, key_serial_t key, |
580 | unsigned timeout, key_serial_t keyring); | 582 | unsigned timeout, key_serial_t keyring); |
581 | 583 | ||
582 | If the kernel calls back to userspace to complete the instantiation of a | 584 | If the kernel calls back to userspace to complete the instantiation of a |
583 | key, userspace should use this call mark the key as negative before the | 585 | key, userspace should use this call mark the key as negative before the |
@@ -637,6 +639,34 @@ call, and the key released upon close. How to deal with conflicting keys due to | |||
637 | two different users opening the same file is left to the filesystem author to | 639 | two different users opening the same file is left to the filesystem author to |
638 | solve. | 640 | solve. |
639 | 641 | ||
642 | Note that there are two different types of pointers to keys that may be | ||
643 | encountered: | ||
644 | |||
645 | (*) struct key * | ||
646 | |||
647 | This simply points to the key structure itself. Key structures will be at | ||
648 | least four-byte aligned. | ||
649 | |||
650 | (*) key_ref_t | ||
651 | |||
652 | This is equivalent to a struct key *, but the least significant bit is set | ||
653 | if the caller "possesses" the key. By "possession" it is meant that the | ||
654 | calling processes has a searchable link to the key from one of its | ||
655 | keyrings. There are three functions for dealing with these: | ||
656 | |||
657 | key_ref_t make_key_ref(const struct key *key, | ||
658 | unsigned long possession); | ||
659 | |||
660 | struct key *key_ref_to_ptr(const key_ref_t key_ref); | ||
661 | |||
662 | unsigned long is_key_possessed(const key_ref_t key_ref); | ||
663 | |||
664 | The first function constructs a key reference from a key pointer and | ||
665 | possession information (which must be 0 or 1 and not any other value). | ||
666 | |||
667 | The second function retrieves the key pointer from a reference and the | ||
668 | third retrieves the possession flag. | ||
669 | |||
640 | When accessing a key's payload contents, certain precautions must be taken to | 670 | When accessing a key's payload contents, certain precautions must be taken to |
641 | prevent access vs modification races. See the section "Notes on accessing | 671 | prevent access vs modification races. See the section "Notes on accessing |
642 | payload contents" for more information. | 672 | payload contents" for more information. |
@@ -660,12 +690,18 @@ payload contents" for more information. | |||
660 | If successful, the key will have been attached to the default keyring for | 690 | If successful, the key will have been attached to the default keyring for |
661 | implicitly obtained request-key keys, as set by KEYCTL_SET_REQKEY_KEYRING. | 691 | implicitly obtained request-key keys, as set by KEYCTL_SET_REQKEY_KEYRING. |
662 | 692 | ||
693 | See also Documentation/keys-request-key.txt. | ||
694 | |||
663 | 695 | ||
664 | (*) When it is no longer required, the key should be released using: | 696 | (*) When it is no longer required, the key should be released using: |
665 | 697 | ||
666 | void key_put(struct key *key); | 698 | void key_put(struct key *key); |
667 | 699 | ||
668 | This can be called from interrupt context. If CONFIG_KEYS is not set then | 700 | Or: |
701 | |||
702 | void key_ref_put(key_ref_t key_ref); | ||
703 | |||
704 | These can be called from interrupt context. If CONFIG_KEYS is not set then | ||
669 | the argument will not be parsed. | 705 | the argument will not be parsed. |
670 | 706 | ||
671 | 707 | ||
@@ -689,13 +725,17 @@ payload contents" for more information. | |||
689 | 725 | ||
690 | (*) If a keyring was found in the search, this can be further searched by: | 726 | (*) If a keyring was found in the search, this can be further searched by: |
691 | 727 | ||
692 | struct key *keyring_search(struct key *keyring, | 728 | key_ref_t keyring_search(key_ref_t keyring_ref, |
693 | const struct key_type *type, | 729 | const struct key_type *type, |
694 | const char *description) | 730 | const char *description) |
695 | 731 | ||
696 | This searches the keyring tree specified for a matching key. Error ENOKEY | 732 | This searches the keyring tree specified for a matching key. Error ENOKEY |
697 | is returned upon failure. If successful, the returned key will need to be | 733 | is returned upon failure (use IS_ERR/PTR_ERR to determine). If successful, |
698 | released. | 734 | the returned key will need to be released. |
735 | |||
736 | The possession attribute from the keyring reference is used to control | ||
737 | access through the permissions mask and is propagated to the returned key | ||
738 | reference pointer if successful. | ||
699 | 739 | ||
700 | 740 | ||
701 | (*) To check the validity of a key, this function can be called: | 741 | (*) To check the validity of a key, this function can be called: |
@@ -732,7 +772,7 @@ More complex payload contents must be allocated and a pointer to them set in | |||
732 | key->payload.data. One of the following ways must be selected to access the | 772 | key->payload.data. One of the following ways must be selected to access the |
733 | data: | 773 | data: |
734 | 774 | ||
735 | (1) Unmodifyable key type. | 775 | (1) Unmodifiable key type. |
736 | 776 | ||
737 | If the key type does not have a modify method, then the key's payload can | 777 | If the key type does not have a modify method, then the key's payload can |
738 | be accessed without any form of locking, provided that it's known to be | 778 | be accessed without any form of locking, provided that it's known to be |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index ab65714d95f..b433c8a27e2 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -355,10 +355,14 @@ ip_dynaddr - BOOLEAN | |||
355 | Default: 0 | 355 | Default: 0 |
356 | 356 | ||
357 | icmp_echo_ignore_all - BOOLEAN | 357 | icmp_echo_ignore_all - BOOLEAN |
358 | If set non-zero, then the kernel will ignore all ICMP ECHO | ||
359 | requests sent to it. | ||
360 | Default: 0 | ||
361 | |||
358 | icmp_echo_ignore_broadcasts - BOOLEAN | 362 | icmp_echo_ignore_broadcasts - BOOLEAN |
359 | If either is set to true, then the kernel will ignore either all | 363 | If set non-zero, then the kernel will ignore all ICMP ECHO and |
360 | ICMP ECHO requests sent to it or just those to broadcast/multicast | 364 | TIMESTAMP requests sent to it via broadcast/multicast. |
361 | addresses, respectively. | 365 | Default: 1 |
362 | 366 | ||
363 | icmp_ratelimit - INTEGER | 367 | icmp_ratelimit - INTEGER |
364 | Limit the maximal rates for sending ICMP packets whose type matches | 368 | Limit the maximal rates for sending ICMP packets whose type matches |
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 5df44dc894e..1829009db77 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt | |||
@@ -51,9 +51,9 @@ or you don't get any checking at all. | |||
51 | Where to get sparse | 51 | Where to get sparse |
52 | ~~~~~~~~~~~~~~~~~~~ | 52 | ~~~~~~~~~~~~~~~~~~~ |
53 | 53 | ||
54 | With BK, you can just get it from | 54 | With git, you can just get it from |
55 | 55 | ||
56 | bk://sparse.bkbits.net/sparse | 56 | rsync://rsync.kernel.org/pub/scm/devel/sparse/sparse.git |
57 | 57 | ||
58 | and DaveJ has tar-balls at | 58 | and DaveJ has tar-balls at |
59 | 59 | ||