Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316039
b: refs/heads/master
c: 6264307
h: refs/heads/master
i:
  316037: d3561ec
  316035: aa50f1b
  316031: 27ec30c
v: v3
  • Loading branch information
Yufeng Shen authored and Jiri Kosina committed Jul 4, 2012
1 parent 3bf4024 commit dc3e0fd
Show file tree
Hide file tree
Showing 627 changed files with 3,604 additions and 5,754 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b94e3c94aae04a911d61f620f4ff5b575fc196ad
refs/heads/master: 6264307ed090cc41a47a1e55be713d75e81f1b27
21 changes: 21 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-block-rssd
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
What: /sys/block/rssd*/registers
Date: March 2012
KernelVersion: 3.3
Contact: Asai Thambi S P <asamymuthupa@micron.com>
Description: This is a read-only file. Dumps below driver information and
hardware registers.
- S ACTive
- Command Issue
- Completed
- PORT IRQ STAT
- HOST IRQ STAT
- Allocated
- Commands in Q

What: /sys/block/rssd*/status
Date: April 2012
KernelVersion: 3.4
Contact: Asai Thambi S P <asamymuthupa@micron.com>
Description: This is a read-only file. Indicates the status of the device.

What: /sys/block/rssd*/flags
Date: May 2012
KernelVersion: 3.5
Contact: Asai Thambi S P <asamymuthupa@micron.com>
Description: This is a read-only file. Dumps the flags in port and driver
data structure
17 changes: 8 additions & 9 deletions trunk/Documentation/ABI/testing/sysfs-class-mtd
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,13 @@ KernelVersion: 3.4
Contact: linux-mtd@lists.infradead.org
Description:
This allows the user to examine and adjust the criteria by which
mtd returns -EUCLEAN from mtd_read() and mtd_read_oob(). If the
maximum number of bit errors that were corrected on any single
region comprising an ecc step (as reported by the driver) equals
or exceeds this value, -EUCLEAN is returned. Otherwise, absent
an error, 0 is returned. Higher layers (e.g., UBI) use this
return code as an indication that an erase block may be
degrading and should be scrutinized as a candidate for being
marked as bad.
mtd returns -EUCLEAN from mtd_read(). If the maximum number of
bit errors that were corrected on any single region comprising
an ecc step (as reported by the driver) equals or exceeds this
value, -EUCLEAN is returned. Otherwise, absent an error, 0 is
returned. Higher layers (e.g., UBI) use this return code as an
indication that an erase block may be degrading and should be
scrutinized as a candidate for being marked as bad.

The initial value may be specified by the flash device driver.
If not, then the default value is ecc_strength.
Expand All @@ -168,7 +167,7 @@ Description:
block degradation, but high enough to avoid the consequences of
a persistent return value of -EUCLEAN on devices where sticky
bitflips occur. Note that if bitflip_threshold exceeds
ecc_strength, -EUCLEAN is never returned by the read operations.
ecc_strength, -EUCLEAN is never returned by mtd_read().
Conversely, if bitflip_threshold is zero, -EUCLEAN is always
returned, absent a hard error.

Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/media/v4l/controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3988,7 +3988,7 @@ interface and may change in the future.</para>
from RGB to Y'CbCr color space.
</entry>
</row>
<row>
<row id = "v4l2-jpeg-chroma-subsampling">
<entrytbl spanname="descr" cols="2">
<tbody valign="top">
<row>
Expand Down
7 changes: 7 additions & 0 deletions trunk/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ These controls are described in <xref
processing controls. These controls are described in <xref
linkend="image-process-controls" />.</entry>
</row>
<row>
<entry><constant>V4L2_CTRL_CLASS_JPEG</constant></entry>
<entry>0x9d0000</entry>
<entry>The class containing JPEG compression controls.
These controls are described in <xref
linkend="jpeg-controls" />.</entry>
</row>
</tbody>
</tgroup>
</table>
Expand Down
131 changes: 85 additions & 46 deletions trunk/Documentation/device-mapper/verity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@ This target is read-only.

Construction Parameters
=======================
<version> <dev> <hash_dev>
<version> <dev> <hash_dev> <hash_start>
<data_block_size> <hash_block_size>
<num_data_blocks> <hash_start_block>
<algorithm> <digest> <salt>

<version>
This is the type of the on-disk hash format.
This is the version number of the on-disk format.

0 is the original format used in the Chromium OS.
The salt is appended when hashing, digests are stored continuously and
the rest of the block is padded with zeros.
The salt is appended when hashing, digests are stored continuously and
the rest of the block is padded with zeros.

1 is the current format that should be used for new devices.
The salt is prepended when hashing and each digest is
padded with zeros to the power of two.
The salt is prepended when hashing and each digest is
padded with zeros to the power of two.

<dev>
This is the device containing data, the integrity of which needs to be
This is the device containing the data the integrity of which needs to be
checked. It may be specified as a path, like /dev/sdaX, or a device number,
<major>:<minor>.

<hash_dev>
This is the device that supplies the hash tree data. It may be
This is the device that that supplies the hash tree data. It may be
specified similarly to the device path and may be the same device. If the
same device is used, the hash_start should be outside the configured
dm-verity device.
same device is used, the hash_start should be outside of the dm-verity
configured device size.

<data_block_size>
The block size on a data device in bytes.
Each block corresponds to one digest on the hash device.
The block size on a data device. Each block corresponds to one digest on
the hash device.

<hash_block_size>
The size of a hash block in bytes.
The size of a hash block.

<num_data_blocks>
The number of data blocks on the data device. Additional blocks are
Expand All @@ -65,28 +65,28 @@ Construction Parameters
Theory of operation
===================

dm-verity is meant to be set up as part of a verified boot path. This
dm-verity is meant to be setup as part of a verified boot path. This
may be anything ranging from a boot using tboot or trustedgrub to just
booting from a known-good device (like a USB drive or CD).

When a dm-verity device is configured, it is expected that the caller
has been authenticated in some way (cryptographic signatures, etc).
After instantiation, all hashes will be verified on-demand during
disk access. If they cannot be verified up to the root node of the
tree, the root hash, then the I/O will fail. This should detect
tree, the root hash, then the I/O will fail. This should identify
tampering with any data on the device and the hash data.

Cryptographic hashes are used to assert the integrity of the device on a
per-block basis. This allows for a lightweight hash computation on first read
into the page cache. Block hashes are stored linearly, aligned to the nearest
block size.
per-block basis. This allows for a lightweight hash computation on first read
into the page cache. Block hashes are stored linearly-aligned to the nearest
block the size of a page.

Hash Tree
---------

Each node in the tree is a cryptographic hash. If it is a leaf node, the hash
of some data block on disk is calculated. If it is an intermediary node,
the hash of a number of child nodes is calculated.
is of some block data on disk. If it is an intermediary node, then the hash is
of a number of child nodes.

Each entry in the tree is a collection of neighboring nodes that fit in one
block. The number is determined based on block_size and the size of the
Expand All @@ -110,46 +110,85 @@ alg = sha256, num_blocks = 32768, block_size = 4096
On-disk format
==============

The verity kernel code does not read the verity metadata on-disk header.
It only reads the hash blocks which directly follow the header.
It is expected that a user-space tool will verify the integrity of the
verity header.
Below is the recommended on-disk format. The verity kernel code does not
read the on-disk header. It only reads the hash blocks which directly
follow the header. It is expected that a user-space tool will verify the
integrity of the verity_header and then call dmsetup with the correct
parameters. Alternatively, the header can be omitted and the dmsetup
parameters can be passed via the kernel command-line in a rooted chain
of trust where the command-line is verified.

Alternatively, the header can be omitted and the dmsetup parameters can
be passed via the kernel command-line in a rooted chain of trust where
the command-line is verified.
The on-disk format is especially useful in cases where the hash blocks
are on a separate partition. The magic number allows easy identification
of the partition contents. Alternatively, the hash blocks can be stored
in the same partition as the data to be verified. In such a configuration
the filesystem on the partition would be sized a little smaller than
the full-partition, leaving room for the hash blocks.

struct superblock {
uint8_t signature[8]
"verity\0\0";

uint8_t version;
1 - current format

uint8_t data_block_bits;
log2(data block size)

uint8_t hash_block_bits;
log2(hash block size)

uint8_t pad1[1];
zero padding

uint16_t salt_size;
big-endian salt size

uint8_t pad2[2];
zero padding

uint32_t data_blocks_hi;
big-endian high 32 bits of the 64-bit number of data blocks

uint32_t data_blocks_lo;
big-endian low 32 bits of the 64-bit number of data blocks

uint8_t algorithm[16];
cryptographic algorithm

uint8_t salt[384];
salt (the salt size is specified above)

uint8_t pad3[88];
zero padding to 512-byte boundary
}

Directly following the header (and with sector number padded to the next hash
block boundary) are the hash blocks which are stored a depth at a time
(starting from the root), sorted in order of increasing index.

The full specification of kernel parameters and on-disk metadata format
is available at the cryptsetup project's wiki page
http://code.google.com/p/cryptsetup/wiki/DMVerity

Status
======
V (for Valid) is returned if every check performed so far was valid.
If any check failed, C (for Corruption) is returned.

Example
=======
Set up a device:
# dmsetup create vroot --readonly --table \
"0 2097152 verity 1 /dev/sda1 /dev/sda2 4096 4096 262144 1 sha256 "\

Setup a device:
dmsetup create vroot --table \
"0 2097152 "\
"verity 1 /dev/sda1 /dev/sda2 4096 4096 2097152 1 "\
"4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 "\
"1234000000000000000000000000000000000000000000000000000000000000"

A command line tool veritysetup is available to compute or verify
the hash tree or activate the kernel device. This is available from
the cryptsetup upstream repository http://code.google.com/p/cryptsetup/
(as a libcryptsetup extension).

Create hash on the device:
# veritysetup format /dev/sda1 /dev/sda2
...
Root hash: 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076

Activate the device:
# veritysetup create vroot /dev/sda1 /dev/sda2 \
4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076
the hash tree or activate the kernel driver. This is available from
the LVM2 upstream repository and may be supplied as a package called
device-mapper-verity-tools:
git://sources.redhat.com/git/lvm2
http://sourceware.org/git/?p=lvm2.git
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/verity?cvsroot=lvm2

veritysetup -a vroot /dev/sda1 /dev/sda2 \
4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

Required properties:
- compatible : "fsl,mma8450".
- reg: the I2C address of MMA8450

Example:

Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/devicetree/bindings/mfd/mc13xxx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Examples:

ecspi@70010000 { /* ECSPI1 */
fsl,spi-num-chipselects = <2>;
cs-gpios = <&gpio4 24 0>, /* GPIO4_24 */
<&gpio4 25 0>; /* GPIO4_25 */
cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */
<&gpio3 25 0>; /* GPIO4_25 */
status = "okay";

pmic: mc13892@0 {
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ esdhc@70008000 {
compatible = "fsl,imx51-esdhc";
reg = <0x70008000 0x4000>;
interrupts = <2>;
cd-gpios = <&gpio1 6 0>; /* GPIO1_6 */
wp-gpios = <&gpio1 5 0>; /* GPIO1_5 */
cd-gpios = <&gpio0 6 0>; /* GPIO1_6 */
wp-gpios = <&gpio0 5 0>; /* GPIO1_5 */
};
2 changes: 1 addition & 1 deletion trunk/Documentation/devicetree/bindings/net/fsl-fec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ ethernet@83fec000 {
reg = <0x83fec000 0x4000>;
interrupts = <87>;
phy-mode = "mii";
phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */
phy-reset-gpios = <&gpio1 14 0>; /* GPIO2_14 */
local-mac-address = [00 04 9F 01 1B B9];
};
Original file line number Diff line number Diff line change
Expand Up @@ -1626,5 +1626,3 @@ MX6Q_PAD_SD2_DAT3__PCIE_CTRL_MUX_11 1587
MX6Q_PAD_SD2_DAT3__GPIO_1_12 1588
MX6Q_PAD_SD2_DAT3__SJC_DONE 1589
MX6Q_PAD_SD2_DAT3__ANATOP_TESTO_3 1590
MX6Q_PAD_ENET_RX_ER__ANATOP_USBOTG_ID 1591
MX6Q_PAD_GPIO_1__ANATOP_USBOTG_ID 1592
4 changes: 2 additions & 2 deletions trunk/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ ecspi@70010000 {
reg = <0x70010000 0x4000>;
interrupts = <36>;
fsl,spi-num-chipselects = <2>;
cs-gpios = <&gpio3 24 0>, /* GPIO3_24 */
<&gpio3 25 0>; /* GPIO3_25 */
cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */
<&gpio3 25 0>; /* GPIO4_25 */
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Device tree binding vendor prefix registry. Keep list in alphabetical order.
This isn't an exhaustive list, but you should add new prefixes to it before
using them to avoid name-space collisions.

ad Avionic Design GmbH
adi Analog Devices, Inc.
amcc Applied Micro Circuits Corporation (APM, formally AMCC)
apm Applied Micro Circuits Corporation (APM)
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/kdump/kdump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ There is also a gitweb interface available at
http://www.kernel.org/git/?p=utils/kernel/kexec/kexec-tools.git

More information about kexec-tools can be found at
http://horms.net/projects/kexec/
http://www.kernel.org/pub/linux/utils/kernel/kexec/README.html

3) Unpack the tarball with the tar command, as follows:

Expand Down
Loading

0 comments on commit dc3e0fd

Please sign in to comment.