aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-block-rssd21
-rw-r--r--Documentation/device-mapper/verity.txt131
-rw-r--r--Documentation/devicetree/bindings/input/fsl-mma8450.txt1
-rw-r--r--Documentation/devicetree/bindings/mfd/mc13xxx.txt4
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt4
-rw-r--r--Documentation/devicetree/bindings/net/fsl-fec.txt2
-rw-r--r--Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt4
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt1
-rw-r--r--Documentation/prctl/no_new_privs.txt50
-rw-r--r--Documentation/virtual/kvm/api.txt17
10 files changed, 122 insertions, 113 deletions
diff --git a/Documentation/ABI/testing/sysfs-block-rssd b/Documentation/ABI/testing/sysfs-block-rssd
index 679ce3543122..beef30c046b0 100644
--- a/Documentation/ABI/testing/sysfs-block-rssd
+++ b/Documentation/ABI/testing/sysfs-block-rssd
@@ -1,26 +1,5 @@
1What: /sys/block/rssd*/registers
2Date: March 2012
3KernelVersion: 3.3
4Contact: Asai Thambi S P <asamymuthupa@micron.com>
5Description: This is a read-only file. Dumps below driver information and
6 hardware registers.
7 - S ACTive
8 - Command Issue
9 - Completed
10 - PORT IRQ STAT
11 - HOST IRQ STAT
12 - Allocated
13 - Commands in Q
14
15What: /sys/block/rssd*/status 1What: /sys/block/rssd*/status
16Date: April 2012 2Date: April 2012
17KernelVersion: 3.4 3KernelVersion: 3.4
18Contact: Asai Thambi S P <asamymuthupa@micron.com> 4Contact: Asai Thambi S P <asamymuthupa@micron.com>
19Description: This is a read-only file. Indicates the status of the device. 5Description: This is a read-only file. Indicates the status of the device.
20
21What: /sys/block/rssd*/flags
22Date: May 2012
23KernelVersion: 3.5
24Contact: Asai Thambi S P <asamymuthupa@micron.com>
25Description: This is a read-only file. Dumps the flags in port and driver
26 data structure
diff --git a/Documentation/device-mapper/verity.txt b/Documentation/device-mapper/verity.txt
index 32e48797a14f..9884681535ee 100644
--- a/Documentation/device-mapper/verity.txt
+++ b/Documentation/device-mapper/verity.txt
@@ -7,39 +7,39 @@ This target is read-only.
7 7
8Construction Parameters 8Construction Parameters
9======================= 9=======================
10 <version> <dev> <hash_dev> <hash_start> 10 <version> <dev> <hash_dev>
11 <data_block_size> <hash_block_size> 11 <data_block_size> <hash_block_size>
12 <num_data_blocks> <hash_start_block> 12 <num_data_blocks> <hash_start_block>
13 <algorithm> <digest> <salt> 13 <algorithm> <digest> <salt>
14 14
15<version> 15<version>
16 This is the version number of the on-disk format. 16 This is the type of the on-disk hash format.
17 17
18 0 is the original format used in the Chromium OS. 18 0 is the original format used in the Chromium OS.
19 The salt is appended when hashing, digests are stored continuously and 19 The salt is appended when hashing, digests are stored continuously and
20 the rest of the block is padded with zeros. 20 the rest of the block is padded with zeros.
21 21
22 1 is the current format that should be used for new devices. 22 1 is the current format that should be used for new devices.
23 The salt is prepended when hashing and each digest is 23 The salt is prepended when hashing and each digest is
24 padded with zeros to the power of two. 24 padded with zeros to the power of two.
25 25
26<dev> 26<dev>
27 This is the device containing the data the integrity of which needs to be 27 This is the device containing data, the integrity of which needs to be
28 checked. It may be specified as a path, like /dev/sdaX, or a device number, 28 checked. It may be specified as a path, like /dev/sdaX, or a device number,
29 <major>:<minor>. 29 <major>:<minor>.
30 30
31<hash_dev> 31<hash_dev>
32 This is the device that that supplies the hash tree data. It may be 32 This is the device that supplies the hash tree data. It may be
33 specified similarly to the device path and may be the same device. If the 33 specified similarly to the device path and may be the same device. If the
34 same device is used, the hash_start should be outside of the dm-verity 34 same device is used, the hash_start should be outside the configured
35 configured device size. 35 dm-verity device.
36 36
37<data_block_size> 37<data_block_size>
38 The block size on a data device. Each block corresponds to one digest on 38 The block size on a data device in bytes.
39 the hash device. 39 Each block corresponds to one digest on the hash device.
40 40
41<hash_block_size> 41<hash_block_size>
42 The size of a hash block. 42 The size of a hash block in bytes.
43 43
44<num_data_blocks> 44<num_data_blocks>
45 The number of data blocks on the data device. Additional blocks are 45 The number of data blocks on the data device. Additional blocks are
@@ -65,7 +65,7 @@ Construction Parameters
65Theory of operation 65Theory of operation
66=================== 66===================
67 67
68dm-verity is meant to be setup as part of a verified boot path. This 68dm-verity is meant to be set up as part of a verified boot path. This
69may be anything ranging from a boot using tboot or trustedgrub to just 69may be anything ranging from a boot using tboot or trustedgrub to just
70booting from a known-good device (like a USB drive or CD). 70booting from a known-good device (like a USB drive or CD).
71 71
@@ -73,20 +73,20 @@ When a dm-verity device is configured, it is expected that the caller
73has been authenticated in some way (cryptographic signatures, etc). 73has been authenticated in some way (cryptographic signatures, etc).
74After instantiation, all hashes will be verified on-demand during 74After instantiation, all hashes will be verified on-demand during
75disk access. If they cannot be verified up to the root node of the 75disk access. If they cannot be verified up to the root node of the
76tree, the root hash, then the I/O will fail. This should identify 76tree, the root hash, then the I/O will fail. This should detect
77tampering with any data on the device and the hash data. 77tampering with any data on the device and the hash data.
78 78
79Cryptographic hashes are used to assert the integrity of the device on a 79Cryptographic hashes are used to assert the integrity of the device on a
80per-block basis. This allows for a lightweight hash computation on first read 80per-block basis. This allows for a lightweight hash computation on first read
81into the page cache. Block hashes are stored linearly-aligned to the nearest 81into the page cache. Block hashes are stored linearly, aligned to the nearest
82block the size of a page. 82block size.
83 83
84Hash Tree 84Hash Tree
85--------- 85---------
86 86
87Each node in the tree is a cryptographic hash. If it is a leaf node, the hash 87Each node in the tree is a cryptographic hash. If it is a leaf node, the hash
88is of some block data on disk. If it is an intermediary node, then the hash is 88of some data block on disk is calculated. If it is an intermediary node,
89of a number of child nodes. 89the hash of a number of child nodes is calculated.
90 90
91Each entry in the tree is a collection of neighboring nodes that fit in one 91Each entry in the tree is a collection of neighboring nodes that fit in one
92block. The number is determined based on block_size and the size of the 92block. The number is determined based on block_size and the size of the
@@ -110,63 +110,23 @@ alg = sha256, num_blocks = 32768, block_size = 4096
110On-disk format 110On-disk format
111============== 111==============
112 112
113Below is the recommended on-disk format. The verity kernel code does not 113The verity kernel code does not read the verity metadata on-disk header.
114read the on-disk header. It only reads the hash blocks which directly 114It only reads the hash blocks which directly follow the header.
115follow the header. It is expected that a user-space tool will verify the 115It is expected that a user-space tool will verify the integrity of the
116integrity of the verity_header and then call dmsetup with the correct 116verity header.
117parameters. Alternatively, the header can be omitted and the dmsetup
118parameters can be passed via the kernel command-line in a rooted chain
119of trust where the command-line is verified.
120 117
121The on-disk format is especially useful in cases where the hash blocks 118Alternatively, the header can be omitted and the dmsetup parameters can
122are on a separate partition. The magic number allows easy identification 119be passed via the kernel command-line in a rooted chain of trust where
123of the partition contents. Alternatively, the hash blocks can be stored 120the command-line is verified.
124in the same partition as the data to be verified. In such a configuration
125the filesystem on the partition would be sized a little smaller than
126the full-partition, leaving room for the hash blocks.
127
128struct superblock {
129 uint8_t signature[8]
130 "verity\0\0";
131
132 uint8_t version;
133 1 - current format
134
135 uint8_t data_block_bits;
136 log2(data block size)
137
138 uint8_t hash_block_bits;
139 log2(hash block size)
140
141 uint8_t pad1[1];
142 zero padding
143
144 uint16_t salt_size;
145 big-endian salt size
146
147 uint8_t pad2[2];
148 zero padding
149
150 uint32_t data_blocks_hi;
151 big-endian high 32 bits of the 64-bit number of data blocks
152
153 uint32_t data_blocks_lo;
154 big-endian low 32 bits of the 64-bit number of data blocks
155
156 uint8_t algorithm[16];
157 cryptographic algorithm
158
159 uint8_t salt[384];
160 salt (the salt size is specified above)
161
162 uint8_t pad3[88];
163 zero padding to 512-byte boundary
164}
165 121
166Directly following the header (and with sector number padded to the next hash 122Directly following the header (and with sector number padded to the next hash
167block boundary) are the hash blocks which are stored a depth at a time 123block boundary) are the hash blocks which are stored a depth at a time
168(starting from the root), sorted in order of increasing index. 124(starting from the root), sorted in order of increasing index.
169 125
126The full specification of kernel parameters and on-disk metadata format
127is available at the cryptsetup project's wiki page
128 http://code.google.com/p/cryptsetup/wiki/DMVerity
129
170Status 130Status
171====== 131======
172V (for Valid) is returned if every check performed so far was valid. 132V (for Valid) is returned if every check performed so far was valid.
@@ -174,21 +134,22 @@ If any check failed, C (for Corruption) is returned.
174 134
175Example 135Example
176======= 136=======
177 137Set up a device:
178Setup a device: 138 # dmsetup create vroot --readonly --table \
179 dmsetup create vroot --table \ 139 "0 2097152 verity 1 /dev/sda1 /dev/sda2 4096 4096 262144 1 sha256 "\
180 "0 2097152 "\
181 "verity 1 /dev/sda1 /dev/sda2 4096 4096 2097152 1 "\
182 "4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 "\ 140 "4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 "\
183 "1234000000000000000000000000000000000000000000000000000000000000" 141 "1234000000000000000000000000000000000000000000000000000000000000"
184 142
185A command line tool veritysetup is available to compute or verify 143A command line tool veritysetup is available to compute or verify
186the hash tree or activate the kernel driver. This is available from 144the hash tree or activate the kernel device. This is available from
187the LVM2 upstream repository and may be supplied as a package called 145the cryptsetup upstream repository http://code.google.com/p/cryptsetup/
188device-mapper-verity-tools: 146(as a libcryptsetup extension).
189 git://sources.redhat.com/git/lvm2 147
190 http://sourceware.org/git/?p=lvm2.git 148Create hash on the device:
191 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/verity?cvsroot=lvm2 149 # veritysetup format /dev/sda1 /dev/sda2
192 150 ...
193veritysetup -a vroot /dev/sda1 /dev/sda2 \ 151 Root hash: 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076
194 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 152
153Activate the device:
154 # veritysetup create vroot /dev/sda1 /dev/sda2 \
155 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076
diff --git a/Documentation/devicetree/bindings/input/fsl-mma8450.txt b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
index a00c94ccbdee..0b96e5737d3a 100644
--- a/Documentation/devicetree/bindings/input/fsl-mma8450.txt
+++ b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
@@ -2,6 +2,7 @@
2 2
3Required properties: 3Required properties:
4- compatible : "fsl,mma8450". 4- compatible : "fsl,mma8450".
5- reg: the I2C address of MMA8450
5 6
6Example: 7Example:
7 8
diff --git a/Documentation/devicetree/bindings/mfd/mc13xxx.txt b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
index 19f6af47a792..baf07987ae68 100644
--- a/Documentation/devicetree/bindings/mfd/mc13xxx.txt
+++ b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
@@ -46,8 +46,8 @@ Examples:
46 46
47ecspi@70010000 { /* ECSPI1 */ 47ecspi@70010000 { /* ECSPI1 */
48 fsl,spi-num-chipselects = <2>; 48 fsl,spi-num-chipselects = <2>;
49 cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */ 49 cs-gpios = <&gpio4 24 0>, /* GPIO4_24 */
50 <&gpio3 25 0>; /* GPIO4_25 */ 50 <&gpio4 25 0>; /* GPIO4_25 */
51 status = "okay"; 51 status = "okay";
52 52
53 pmic: mc13892@0 { 53 pmic: mc13892@0 {
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index c7e404b3ef05..fea541ee8b34 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -29,6 +29,6 @@ esdhc@70008000 {
29 compatible = "fsl,imx51-esdhc"; 29 compatible = "fsl,imx51-esdhc";
30 reg = <0x70008000 0x4000>; 30 reg = <0x70008000 0x4000>;
31 interrupts = <2>; 31 interrupts = <2>;
32 cd-gpios = <&gpio0 6 0>; /* GPIO1_6 */ 32 cd-gpios = <&gpio1 6 0>; /* GPIO1_6 */
33 wp-gpios = <&gpio0 5 0>; /* GPIO1_5 */ 33 wp-gpios = <&gpio1 5 0>; /* GPIO1_5 */
34}; 34};
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
index 7ab9e1a2d8be..4616fc28ee86 100644
--- a/Documentation/devicetree/bindings/net/fsl-fec.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -19,6 +19,6 @@ ethernet@83fec000 {
19 reg = <0x83fec000 0x4000>; 19 reg = <0x83fec000 0x4000>;
20 interrupts = <87>; 20 interrupts = <87>;
21 phy-mode = "mii"; 21 phy-mode = "mii";
22 phy-reset-gpios = <&gpio1 14 0>; /* GPIO2_14 */ 22 phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */
23 local-mac-address = [00 04 9F 01 1B B9]; 23 local-mac-address = [00 04 9F 01 1B B9];
24}; 24};
diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
index 9841057d112b..4256a6df9b79 100644
--- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
+++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
@@ -17,6 +17,6 @@ ecspi@70010000 {
17 reg = <0x70010000 0x4000>; 17 reg = <0x70010000 0x4000>;
18 interrupts = <36>; 18 interrupts = <36>;
19 fsl,spi-num-chipselects = <2>; 19 fsl,spi-num-chipselects = <2>;
20 cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */ 20 cs-gpios = <&gpio3 24 0>, /* GPIO3_24 */
21 <&gpio3 25 0>; /* GPIO4_25 */ 21 <&gpio3 25 0>; /* GPIO3_25 */
22}; 22};
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6eab91747a86..db4d3af3643c 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -3,6 +3,7 @@ Device tree binding vendor prefix registry. Keep list in alphabetical order.
3This isn't an exhaustive list, but you should add new prefixes to it before 3This isn't an exhaustive list, but you should add new prefixes to it before
4using them to avoid name-space collisions. 4using them to avoid name-space collisions.
5 5
6ad Avionic Design GmbH
6adi Analog Devices, Inc. 7adi Analog Devices, Inc.
7amcc Applied Micro Circuits Corporation (APM, formally AMCC) 8amcc Applied Micro Circuits Corporation (APM, formally AMCC)
8apm Applied Micro Circuits Corporation (APM) 9apm Applied Micro Circuits Corporation (APM)
diff --git a/Documentation/prctl/no_new_privs.txt b/Documentation/prctl/no_new_privs.txt
new file mode 100644
index 000000000000..cb705ec69abe
--- /dev/null
+++ b/Documentation/prctl/no_new_privs.txt
@@ -0,0 +1,50 @@
1The execve system call can grant a newly-started program privileges that
2its parent did not have. The most obvious examples are setuid/setgid
3programs and file capabilities. To prevent the parent program from
4gaining these privileges as well, the kernel and user code must be
5careful to prevent the parent from doing anything that could subvert the
6child. For example:
7
8 - The dynamic loader handles LD_* environment variables differently if
9 a program is setuid.
10
11 - chroot is disallowed to unprivileged processes, since it would allow
12 /etc/passwd to be replaced from the point of view of a process that
13 inherited chroot.
14
15 - The exec code has special handling for ptrace.
16
17These are all ad-hoc fixes. The no_new_privs bit (since Linux 3.5) is a
18new, generic mechanism to make it safe for a process to modify its
19execution environment in a manner that persists across execve. Any task
20can set no_new_privs. Once the bit is set, it is inherited across fork,
21clone, and execve and cannot be unset. With no_new_privs set, execve
22promises not to grant the privilege to do anything that could not have
23been done without the execve call. For example, the setuid and setgid
24bits will no longer change the uid or gid; file capabilities will not
25add to the permitted set, and LSMs will not relax constraints after
26execve.
27
28Note that no_new_privs does not prevent privilege changes that do not
29involve execve. An appropriately privileged task can still call
30setuid(2) and receive SCM_RIGHTS datagrams.
31
32There are two main use cases for no_new_privs so far:
33
34 - Filters installed for the seccomp mode 2 sandbox persist across
35 execve and can change the behavior of newly-executed programs.
36 Unprivileged users are therefore only allowed to install such filters
37 if no_new_privs is set.
38
39 - By itself, no_new_privs can be used to reduce the attack surface
40 available to an unprivileged user. If everything running with a
41 given uid has no_new_privs set, then that uid will be unable to
42 escalate its privileges by directly attacking setuid, setgid, and
43 fcap-using binaries; it will need to compromise something without the
44 no_new_privs bit set first.
45
46In the future, other potentially dangerous kernel features could become
47available to unprivileged tasks if no_new_privs is set. In principle,
48several options to unshare(2) and clone(2) would be safe when
49no_new_privs is set, and no_new_privs + chroot is considerable less
50dangerous than chroot by itself.
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 930126698a0f..2c9948379469 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1930,6 +1930,23 @@ The "pte_enc" field provides a value that can OR'ed into the hash
1930PTE's RPN field (ie, it needs to be shifted left by 12 to OR it 1930PTE's RPN field (ie, it needs to be shifted left by 12 to OR it
1931into the hash PTE second double word). 1931into the hash PTE second double word).
1932 1932
19334.75 KVM_IRQFD
1934
1935Capability: KVM_CAP_IRQFD
1936Architectures: x86
1937Type: vm ioctl
1938Parameters: struct kvm_irqfd (in)
1939Returns: 0 on success, -1 on error
1940
1941Allows setting an eventfd to directly trigger a guest interrupt.
1942kvm_irqfd.fd specifies the file descriptor to use as the eventfd and
1943kvm_irqfd.gsi specifies the irqchip pin toggled by this event. When
1944an event is tiggered on the eventfd, an interrupt is injected into
1945the guest using the specified gsi pin. The irqfd is removed using
1946the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd
1947and kvm_irqfd.gsi.
1948
1949
19335. The kvm_run structure 19505. The kvm_run structure
1934------------------------ 1951------------------------
1935 1952