Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a1e8b80 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents a867d734 7616ac70
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -126,6 +126,7 @@ national,lm80 Serial Interface ACPI-Compatible Microprocessor System Hardware M
national,lm85		Temperature sensor with integrated fan control
national,lm85		Temperature sensor with integrated fan control
national,lm92		±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator with Two-Wire Interface
national,lm92		±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator with Two-Wire Interface
nuvoton,npct501		i2c trusted platform module (TPM)
nuvoton,npct501		i2c trusted platform module (TPM)
nuvoton,npct601		i2c trusted platform module (TPM2)
nxp,pca9556		Octal SMBus and I2C registered interface
nxp,pca9556		Octal SMBus and I2C registered interface
nxp,pca9557		8-bit I2C-bus and SMBus I/O port with reset
nxp,pca9557		8-bit I2C-bus and SMBus I/O port with reset
nxp,pcf8563		Real-time clock/calendar
nxp,pcf8563		Real-time clock/calendar
+24 −0
Original line number Original line Diff line number Diff line
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>;
        };
};
+2 −0
Original line number Original line Diff line number Diff line
@@ -128,6 +128,7 @@ idt Integrated Device Technologies, Inc.
ifi	Ingenieurburo Fur Ic-Technologie (I/F/I)
ifi	Ingenieurburo Fur Ic-Technologie (I/F/I)
iom	Iomega Corporation
iom	Iomega Corporation
img	Imagination Technologies Ltd.
img	Imagination Technologies Ltd.
infineon Infineon Technologies
inforce	Inforce Computing
inforce	Inforce Computing
ingenic	Ingenic Semiconductor
ingenic	Ingenic Semiconductor
innolux	Innolux Corporation
innolux	Innolux Corporation
@@ -255,6 +256,7 @@ syna Synaptics Inc.
synology	Synology, Inc.
synology	Synology, Inc.
SUNW	Sun Microsystems, Inc
SUNW	Sun Microsystems, Inc
tbs	TBS Technologies
tbs	TBS Technologies
tcg	Trusted Computing Group
tcl	Toby Churchill Ltd.
tcl	Toby Churchill Ltd.
technexion	TechNexion
technexion	TechNexion
technologic	Technologic Systems
technologic	Technologic Systems
+1 −0
Original line number Original line Diff line number Diff line
@@ -303,6 +303,7 @@ Code Seq#(hex) Include File Comments
					<mailto:buk@buks.ipn.de>
					<mailto:buk@buks.ipn.de>
0xA0	all	linux/sdp/sdp.h		Industrial Device Project
0xA0	all	linux/sdp/sdp.h		Industrial Device Project
					<mailto:kenji@bitgate.com>
					<mailto:kenji@bitgate.com>
0xA1	0	linux/vtpm_proxy.h	TPM Emulator Proxy Driver
0xA2	00-0F	arch/tile/include/asm/hardwall.h
0xA2	00-0F	arch/tile/include/asm/hardwall.h
0xA3	80-8F	Port ACL		in development:
0xA3	80-8F	Port ACL		in development:
					<mailto:tlewis@mindspring.com>
					<mailto:tlewis@mindspring.com>
+71 −0
Original line number Original line Diff line number Diff line
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.
Loading