diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 23:36:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 23:36:37 -0500 |
commit | 67e2c3883828b39548cee2091b36656787775d95 (patch) | |
tree | 975a0f546a604beda30d4ede34f8e9cca9a88b71 /Documentation | |
parent | 6ae840e7cc4be0be3aa40d9f67c35c75cfc67d83 (diff) | |
parent | b2d1965dcea148100ffc4e7199470bf5fad13871 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security layer updates from James Morris:
"In terms of changes, there's general maintenance to the Smack,
SELinux, and integrity code.
The IMA code adds a new kconfig option, IMA_APPRAISE_SIGNED_INIT,
which allows IMA appraisal to require signatures. Support for reading
keys from rootfs before init is call is also added"
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (23 commits)
selinux: Remove security_ops extern
security: smack: fix out-of-bounds access in smk_parse_smack()
VFS: refactor vfs_read()
ima: require signature based appraisal
integrity: provide a hook to load keys when rootfs is ready
ima: load x509 certificate from the kernel
integrity: provide a function to load x509 certificate from the kernel
integrity: define a new function integrity_read_file()
Security: smack: replace kzalloc with kmem_cache for inode_smack
Smack: Lock mode for the floor and hat labels
ima: added support for new kernel cmdline parameter ima_template_fmt
ima: allocate field pointers array on demand in template_desc_init_fields()
ima: don't allocate a copy of template_fmt in template_desc_init_fields()
ima: display template format in meas. list if template name length is zero
ima: added error messages to template-related functions
ima: use atomic bit operations to protect policy update interface
ima: ignore empty and with whitespaces policy lines
ima: no need to allocate entry for comment
ima: report policy load status
ima: use path names cache
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | Documentation/security/IMA-templates.txt | 29 |
2 files changed, 18 insertions, 15 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4a337daf0c09..1de833556d22 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1376,6 +1376,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1376 | Formats: { "ima" | "ima-ng" } | 1376 | Formats: { "ima" | "ima-ng" } |
1377 | Default: "ima-ng" | 1377 | Default: "ima-ng" |
1378 | 1378 | ||
1379 | ima_template_fmt= | ||
1380 | [IMA] Define a custom template format. | ||
1381 | Format: { "field1|...|fieldN" } | ||
1382 | |||
1379 | ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage | 1383 | ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage |
1380 | Format: <min_file_size> | 1384 | Format: <min_file_size> |
1381 | Set the minimal file size for using asynchronous hash. | 1385 | Set the minimal file size for using asynchronous hash. |
diff --git a/Documentation/security/IMA-templates.txt b/Documentation/security/IMA-templates.txt index a4e102dddfea..839b5dad9226 100644 --- a/Documentation/security/IMA-templates.txt +++ b/Documentation/security/IMA-templates.txt | |||
@@ -27,25 +27,22 @@ Managing templates with these structures is very simple. To support | |||
27 | a new data type, developers define the field identifier and implement | 27 | a new data type, developers define the field identifier and implement |
28 | two functions, init() and show(), respectively to generate and display | 28 | two functions, init() and show(), respectively to generate and display |
29 | measurement entries. Defining a new template descriptor requires | 29 | measurement entries. Defining a new template descriptor requires |
30 | specifying the template format, a string of field identifiers separated | 30 | specifying the template format (a string of field identifiers separated |
31 | by the '|' character. While in the current implementation it is possible | 31 | by the '|' character) through the 'ima_template_fmt' kernel command line |
32 | to define new template descriptors only by adding their definition in the | 32 | parameter. At boot time, IMA initializes the chosen template descriptor |
33 | template specific code (ima_template.c), in a future version it will be | 33 | by translating the format into an array of template fields structures taken |
34 | possible to register a new template on a running kernel by supplying to IMA | 34 | from the set of the supported ones. |
35 | the desired format string. In this version, IMA initializes at boot time | ||
36 | all defined template descriptors by translating the format into an array | ||
37 | of template fields structures taken from the set of the supported ones. | ||
38 | 35 | ||
39 | After the initialization step, IMA will call ima_alloc_init_template() | 36 | After the initialization step, IMA will call ima_alloc_init_template() |
40 | (new function defined within the patches for the new template management | 37 | (new function defined within the patches for the new template management |
41 | mechanism) to generate a new measurement entry by using the template | 38 | mechanism) to generate a new measurement entry by using the template |
42 | descriptor chosen through the kernel configuration or through the newly | 39 | descriptor chosen through the kernel configuration or through the newly |
43 | introduced 'ima_template=' kernel command line parameter. It is during this | 40 | introduced 'ima_template' and 'ima_template_fmt' kernel command line parameters. |
44 | phase that the advantages of the new architecture are clearly shown: | 41 | It is during this phase that the advantages of the new architecture are |
45 | the latter function will not contain specific code to handle a given template | 42 | clearly shown: the latter function will not contain specific code to handle |
46 | but, instead, it simply calls the init() method of the template fields | 43 | a given template but, instead, it simply calls the init() method of the template |
47 | associated to the chosen template descriptor and store the result (pointer | 44 | fields associated to the chosen template descriptor and store the result |
48 | to allocated data and data length) in the measurement entry structure. | 45 | (pointer to allocated data and data length) in the measurement entry structure. |
49 | 46 | ||
50 | The same mechanism is employed to display measurements entries. | 47 | The same mechanism is employed to display measurements entries. |
51 | The functions ima[_ascii]_measurements_show() retrieve, for each entry, | 48 | The functions ima[_ascii]_measurements_show() retrieve, for each entry, |
@@ -86,4 +83,6 @@ currently the following methods are supported: | |||
86 | - select a template descriptor among those supported in the kernel | 83 | - select a template descriptor among those supported in the kernel |
87 | configuration ('ima-ng' is the default choice); | 84 | configuration ('ima-ng' is the default choice); |
88 | - specify a template descriptor name from the kernel command line through | 85 | - specify a template descriptor name from the kernel command line through |
89 | the 'ima_template=' parameter. | 86 | the 'ima_template=' parameter; |
87 | - register a new template descriptor with custom format through the kernel | ||
88 | command line parameter 'ima_template_fmt='. | ||