aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-03 19:46:45 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-03 19:46:45 -0400
commit2b235826098bb653982894dfc3f70fd029f6c2e4 (patch)
treeec525ddba74f58017a3f145bb68cf94376648c1c /Documentation
parentb4b52db71529bbe46da914eda772fb574914c94d (diff)
parentc77054e518d9163578cfcad09826d7b959f95ece (diff)
Merge branch 'master'
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/Changes10
-rw-r--r--Documentation/SubmittingPatches70
-rw-r--r--Documentation/keys.txt74
3 files changed, 134 insertions, 20 deletions
diff --git a/Documentation/Changes b/Documentation/Changes
index 5eaab0441d76..27232be26e1a 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -237,6 +237,12 @@ udev
237udev is a userspace application for populating /dev dynamically with 237udev is a userspace application for populating /dev dynamically with
238only entries for devices actually present. udev replaces devfs. 238only entries for devices actually present. udev replaces devfs.
239 239
240FUSE
241----
242
243Needs libfuse 2.4.0 or later. Absolute minimum is 2.3.0 but mount
244options 'direct_io' and 'kernel_cache' won't work.
245
240Networking 246Networking
241========== 247==========
242 248
@@ -390,6 +396,10 @@ udev
390---- 396----
391o <http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html> 397o <http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html>
392 398
399FUSE
400----
401o <http://sourceforge.net/projects/fuse>
402
393Networking 403Networking
394********** 404**********
395 405
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 7f43b040311e..1d96efec5e8f 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -301,8 +301,68 @@ now, but you can do this to mark internal company procedures or just
301point out some special detail about the sign-off. 301point out some special detail about the sign-off.
302 302
303 303
30412) The canonical patch format
304 305
30512) More references for submitting patches 306The canonical patch subject line is:
307
308 Subject: [PATCH 001/123] [<area>:] <explanation>
309
310The 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
328The Subject line format makes it very easy to sort the emails
329alphabetically by subject line - pretty much any email reader will
330support that - since because the sequence number is zero-padded,
331the numerical and alphabetic sort is the same.
332
333See further details on how to phrase the "<explanation>" in the
334"Subject:" line in Andrew Morton's "The perfect patch", referenced
335below.
336
337The "from" line must be the very first line in the message body,
338and has the form:
339
340 From: Original Author <author@example.com>
341
342The "from" line specifies who will be credited as the author of the
343patch in the permanent changelog. If the "from" line is missing,
344then the "From:" line from the email header will be used to determine
345the patch author in the changelog.
346
347The explanation body will be committed to the permanent source
348changelog, so should make sense to a competent reader who has long
349since forgotten the immediate details of the discussion that might
350have led to this patch.
351
352The "---" marker line serves the essential purpose of marking for patch
353handling tools where the changelog message ends.
354
355One good use for the additional comments after the "---" marker is for
356a diffstat, to show what files have changed, and the number of inserted
357and deleted lines per file. A diffstat is especially useful on bigger
358patches. Other comments relevant only to the moment or the maintainer,
359not suitable for the permanent changelog, should also go here.
360
361See more details on the proper patch format in the following
362references.
363
364
36513) More references for submitting patches
306 366
307Andrew Morton, "The perfect patch" (tpp). 367Andrew Morton, "The perfect patch" (tpp).
308 <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt> 368 <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt>
@@ -310,6 +370,14 @@ Andrew Morton, "The perfect patch" (tpp).
310Jeff Garzik, "Linux kernel patch submission format." 370Jeff Garzik, "Linux kernel patch submission format."
311 <http://linux.yyz.us/patch-format.html> 371 <http://linux.yyz.us/patch-format.html>
312 372
373Greg KH, "How to piss off a kernel subsystem maintainer"
374 <http://www.kroah.com/log/2005/03/31/>
375
376Kernel Documentation/CodingStyle
377 <http://sosdg.org/~coywolf/lxr/source/Documentation/CodingStyle>
378
379Linus Torvald's mail on the canonical patch format:
380 <http://lkml.org/lkml/2005/4/7/183>
313 381
314 382
315----------------------------------- 383-----------------------------------
diff --git a/Documentation/keys.txt b/Documentation/keys.txt
index 0321ded4b9ae..b22e7c8d059a 100644
--- a/Documentation/keys.txt
+++ b/Documentation/keys.txt
@@ -195,8 +195,8 @@ KEY ACCESS PERMISSIONS
195====================== 195======================
196 196
197Keys have an owner user ID, a group access ID, and a permissions mask. The mask 197Keys have an owner user ID, a group access ID, and a permissions mask. The mask
198has up to eight bits each for user, group and other access. Only five of each 198has up to eight bits each for possessor, user, group and other access. Only
199set of eight bits are defined. These permissions granted are: 199five 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
@@ -637,6 +637,34 @@ call, and the key released upon close. How to deal with conflicting keys due to
637two different users opening the same file is left to the filesystem author to 637two different users opening the same file is left to the filesystem author to
638solve. 638solve.
639 639
640Note that there are two different types of pointers to keys that may be
641encountered:
642
643 (*) struct key *
644
645 This simply points to the key structure itself. Key structures will be at
646 least four-byte aligned.
647
648 (*) key_ref_t
649
650 This is equivalent to a struct key *, but the least significant bit is set
651 if the caller "possesses" the key. By "possession" it is meant that the
652 calling processes has a searchable link to the key from one of its
653 keyrings. There are three functions for dealing with these:
654
655 key_ref_t make_key_ref(const struct key *key,
656 unsigned long possession);
657
658 struct key *key_ref_to_ptr(const key_ref_t key_ref);
659
660 unsigned long is_key_possessed(const key_ref_t key_ref);
661
662 The first function constructs a key reference from a key pointer and
663 possession information (which must be 0 or 1 and not any other value).
664
665 The second function retrieves the key pointer from a reference and the
666 third retrieves the possession flag.
667
640When accessing a key's payload contents, certain precautions must be taken to 668When accessing a key's payload contents, certain precautions must be taken to
641prevent access vs modification races. See the section "Notes on accessing 669prevent access vs modification races. See the section "Notes on accessing
642payload contents" for more information. 670payload contents" for more information.
@@ -665,7 +693,11 @@ payload contents" for more information.
665 693
666 void key_put(struct key *key); 694 void key_put(struct key *key);
667 695
668 This can be called from interrupt context. If CONFIG_KEYS is not set then 696 Or:
697
698 void key_ref_put(key_ref_t key_ref);
699
700 These can be called from interrupt context. If CONFIG_KEYS is not set then
669 the argument will not be parsed. 701 the argument will not be parsed.
670 702
671 703
@@ -689,13 +721,17 @@ payload contents" for more information.
689 721
690(*) If a keyring was found in the search, this can be further searched by: 722(*) If a keyring was found in the search, this can be further searched by:
691 723
692 struct key *keyring_search(struct key *keyring, 724 key_ref_t keyring_search(key_ref_t keyring_ref,
693 const struct key_type *type, 725 const struct key_type *type,
694 const char *description) 726 const char *description)
695 727
696 This searches the keyring tree specified for a matching key. Error ENOKEY 728 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 729 is returned upon failure (use IS_ERR/PTR_ERR to determine). If successful,
698 released. 730 the returned key will need to be released.
731
732 The possession attribute from the keyring reference is used to control
733 access through the permissions mask and is propagated to the returned key
734 reference pointer if successful.
699 735
700 736
701(*) To check the validity of a key, this function can be called: 737(*) To check the validity of a key, this function can be called:
@@ -732,7 +768,7 @@ More complex payload contents must be allocated and a pointer to them set in
732key->payload.data. One of the following ways must be selected to access the 768key->payload.data. One of the following ways must be selected to access the
733data: 769data:
734 770
735 (1) Unmodifyable key type. 771 (1) Unmodifiable key type.
736 772
737 If the key type does not have a modify method, then the key's payload can 773 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 774 be accessed without any form of locking, provided that it's known to be