forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/…
…jmorris/linux-security Pull security subsystem updates from James Morris: "Highlights: - TPM core and driver updates/fixes - IPv6 security labeling (CALIPSO) - Lots of Apparmor fixes - Seccomp: remove 2-phase API, close hole where ptrace can change syscall #" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (156 commits) apparmor: fix SECURITY_APPARMOR_HASH_DEFAULT parameter handling tpm: Add TPM 2.0 support to the Nuvoton i2c driver (NPCT6xx family) tpm: Factor out common startup code tpm: use devm_add_action_or_reset tpm2_i2c_nuvoton: add irq validity check tpm: read burstcount from TPM_STS in one 32-bit transaction tpm: fix byte-order for the value read by tpm2_get_tpm_pt tpm_tis_core: convert max timeouts from msec to jiffies apparmor: fix arg_size computation for when setprocattr is null terminated apparmor: fix oops, validate buffer size in apparmor_setprocattr() apparmor: do not expose kernel stack apparmor: fix module parameters can be changed after policy is locked apparmor: fix oops in profile_unpack() when policy_db is not present apparmor: don't check for vmalloc_addr if kvzalloc() failed apparmor: add missing id bounds check on dfa verification apparmor: allow SYS_CAP_RESOURCE to be sufficient to prlimit another task apparmor: use list_next_entry instead of list_entry_next apparmor: fix refcount race when finding a child profile apparmor: fix ref count leak when profile sha1 hash is read apparmor: check that xindex is in trans_table bounds ...
- Loading branch information
Showing
126 changed files
with
7,281 additions
and
2,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Documentation/devicetree/bindings/security/tpm/tpm_tis_spi.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Required properties: | ||
- compatible: should be one of the following | ||
"st,st33htpm-spi" | ||
"infineon,slb9670" | ||
"tcg,tpm_tis-spi" | ||
- spi-max-frequency: Maximum SPI frequency (depends on TPMs). | ||
|
||
Optional SoC Specific Properties: | ||
- pinctrl-names: Contains only one value - "default". | ||
- pintctrl-0: Specifies the pin control groups used for this controller. | ||
|
||
Example (for ARM-based BeagleBoard xM with TPM_TIS on SPI4): | ||
|
||
&mcspi4 { | ||
|
||
status = "okay"; | ||
|
||
tpm_tis@0 { | ||
|
||
compatible = "tcg,tpm_tis-spi"; | ||
|
||
spi-max-frequency = <10000000>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -303,6 +303,7 @@ Code Seq#(hex) Include File Comments | |
<mailto:[email protected]> | ||
0xA0 all linux/sdp/sdp.h Industrial Device Project | ||
<mailto:[email protected]> | ||
0xA1 0 linux/vtpm_proxy.h TPM Emulator Proxy Driver | ||
0xA2 00-0F arch/tile/include/asm/hardwall.h | ||
0xA3 80-8F Port ACL in development: | ||
<mailto:[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
Virtual TPM Proxy Driver for Linux Containers | ||
|
||
Authors: Stefan Berger (IBM) | ||
|
||
This document describes the virtual Trusted Platform Module (vTPM) | ||
proxy device driver for Linux containers. | ||
|
||
INTRODUCTION | ||
------------ | ||
|
||
The goal of this work is to provide TPM functionality to each Linux | ||
container. This allows programs to interact with a TPM in a container | ||
the same way they interact with a TPM on the physical system. Each | ||
container gets its own unique, emulated, software TPM. | ||
|
||
|
||
DESIGN | ||
------ | ||
|
||
To make an emulated software TPM available to each container, the container | ||
management stack needs to create a device pair consisting of a client TPM | ||
character device /dev/tpmX (with X=0,1,2...) and a 'server side' file | ||
descriptor. The former is moved into the container by creating a character | ||
device with the appropriate major and minor numbers while the file descriptor | ||
is passed to the TPM emulator. Software inside the container can then send | ||
TPM commands using the character device and the emulator will receive the | ||
commands via the file descriptor and use it for sending back responses. | ||
|
||
To support this, the virtual TPM proxy driver provides a device /dev/vtpmx | ||
that is used to create device pairs using an ioctl. The ioctl takes as | ||
an input flags for configuring the device. The flags for example indicate | ||
whether TPM 1.2 or TPM 2 functionality is supported by the TPM emulator. | ||
The result of the ioctl are the file descriptor for the 'server side' | ||
as well as the major and minor numbers of the character device that was created. | ||
Besides that the number of the TPM character device is return. If for | ||
example /dev/tpm10 was created, the number (dev_num) 10 is returned. | ||
|
||
The following is the data structure of the TPM_PROXY_IOC_NEW_DEV ioctl: | ||
|
||
struct vtpm_proxy_new_dev { | ||
__u32 flags; /* input */ | ||
__u32 tpm_num; /* output */ | ||
__u32 fd; /* output */ | ||
__u32 major; /* output */ | ||
__u32 minor; /* output */ | ||
}; | ||
|
||
Note that if unsupported flags are passed to the device driver, the ioctl will | ||
fail and errno will be set to EOPNOTSUPP. Similarly, if an unsupported ioctl is | ||
called on the device driver, the ioctl will fail and errno will be set to | ||
ENOTTY. | ||
|
||
See /usr/include/linux/vtpm_proxy.h for definitions related to the public interface | ||
of this vTPM device driver. | ||
|
||
Once the device has been created, the driver will immediately try to talk | ||
to the TPM. All commands from the driver can be read from the file descriptor | ||
returned by the ioctl. The commands should be responded to immediately. | ||
|
||
Depending on the version of TPM the following commands will be sent by the | ||
driver: | ||
|
||
- TPM 1.2: | ||
- the driver will send a TPM_Startup command to the TPM emulator | ||
- the driver will send commands to read the command durations and | ||
interface timeouts from the TPM emulator | ||
- TPM 2: | ||
- the driver will send a TPM2_Startup command to the TPM emulator | ||
|
||
The TPM device /dev/tpmX will only appear if all of the relevant commands | ||
were responded to properly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2837,7 +2837,7 @@ F: include/uapi/linux/can/error.h | |
F: include/uapi/linux/can/netlink.h | ||
|
||
CAPABILITIES | ||
M: Serge Hallyn <serge.hallyn@canonical.com> | ||
M: Serge Hallyn <serge@hallyn.com> | ||
L: [email protected] | ||
S: Supported | ||
F: include/linux/capability.h | ||
|
@@ -10675,7 +10675,7 @@ SMACK SECURITY MODULE | |
M: Casey Schaufler <[email protected]> | ||
L: [email protected] | ||
W: http://schaufler-ca.com | ||
T: git git://git.gitorious.org/smack-next/kernel.git | ||
T: git git://github.com/cschaufler/smack-next | ||
S: Maintained | ||
F: Documentation/security/Smack.txt | ||
F: security/smack/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.