diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-03 00:38:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-03 00:38:48 -0400 |
commit | 88265322c14cce39f7afbc416726ef4fac413298 (patch) | |
tree | e4956f905ef617971f87788d8f8a09dbb66b70a3 /arch/powerpc | |
parent | 65b99c74fdd325d1ffa2e5663295888704712604 (diff) | |
parent | bf5308344527d015ac9a6d2bda4ad4d40fd7d943 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"Highlights:
- Integrity: add local fs integrity verification to detect offline
attacks
- Integrity: add digital signature verification
- Simple stacking of Yama with other LSMs (per LSS discussions)
- IBM vTPM support on ppc64
- Add new driver for Infineon I2C TIS TPM
- Smack: add rule revocation for subject labels"
Fixed conflicts with the user namespace support in kernel/auditsc.c and
security/integrity/ima/ima_policy.c.
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (39 commits)
Documentation: Update git repository URL for Smack userland tools
ima: change flags container data type
Smack: setprocattr memory leak fix
Smack: implement revoking all rules for a subject label
Smack: remove task_wait() hook.
ima: audit log hashes
ima: generic IMA action flag handling
ima: rename ima_must_appraise_or_measure
audit: export audit_log_task_info
tpm: fix tpm_acpi sparse warning on different address spaces
samples/seccomp: fix 31 bit build on s390
ima: digital signature verification support
ima: add support for different security.ima data types
ima: add ima_inode_setxattr/removexattr function and calls
ima: add inode_post_setattr call
ima: replace iint spinblock with rwlock/read_lock
ima: allocating iint improvements
ima: add appraise action keywords and default rules
ima: integrity appraisal extension
vfs: move ima_file_free before releasing the file
...
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 0794a3017b1..e144498bcdd 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1624,6 +1624,63 @@ static void __init prom_instantiate_rtas(void) | |||
1624 | 1624 | ||
1625 | #ifdef CONFIG_PPC64 | 1625 | #ifdef CONFIG_PPC64 |
1626 | /* | 1626 | /* |
1627 | * Allocate room for and instantiate Stored Measurement Log (SML) | ||
1628 | */ | ||
1629 | static void __init prom_instantiate_sml(void) | ||
1630 | { | ||
1631 | phandle ibmvtpm_node; | ||
1632 | ihandle ibmvtpm_inst; | ||
1633 | u32 entry = 0, size = 0; | ||
1634 | u64 base; | ||
1635 | |||
1636 | prom_debug("prom_instantiate_sml: start...\n"); | ||
1637 | |||
1638 | ibmvtpm_node = call_prom("finddevice", 1, 1, ADDR("/ibm,vtpm")); | ||
1639 | prom_debug("ibmvtpm_node: %x\n", ibmvtpm_node); | ||
1640 | if (!PHANDLE_VALID(ibmvtpm_node)) | ||
1641 | return; | ||
1642 | |||
1643 | ibmvtpm_inst = call_prom("open", 1, 1, ADDR("/ibm,vtpm")); | ||
1644 | if (!IHANDLE_VALID(ibmvtpm_inst)) { | ||
1645 | prom_printf("opening vtpm package failed (%x)\n", ibmvtpm_inst); | ||
1646 | return; | ||
1647 | } | ||
1648 | |||
1649 | if (call_prom_ret("call-method", 2, 2, &size, | ||
1650 | ADDR("sml-get-handover-size"), | ||
1651 | ibmvtpm_inst) != 0 || size == 0) { | ||
1652 | prom_printf("SML get handover size failed\n"); | ||
1653 | return; | ||
1654 | } | ||
1655 | |||
1656 | base = alloc_down(size, PAGE_SIZE, 0); | ||
1657 | if (base == 0) | ||
1658 | prom_panic("Could not allocate memory for sml\n"); | ||
1659 | |||
1660 | prom_printf("instantiating sml at 0x%x...", base); | ||
1661 | |||
1662 | if (call_prom_ret("call-method", 4, 2, &entry, | ||
1663 | ADDR("sml-handover"), | ||
1664 | ibmvtpm_inst, size, base) != 0 || entry == 0) { | ||
1665 | prom_printf("SML handover failed\n"); | ||
1666 | return; | ||
1667 | } | ||
1668 | prom_printf(" done\n"); | ||
1669 | |||
1670 | reserve_mem(base, size); | ||
1671 | |||
1672 | prom_setprop(ibmvtpm_node, "/ibm,vtpm", "linux,sml-base", | ||
1673 | &base, sizeof(base)); | ||
1674 | prom_setprop(ibmvtpm_node, "/ibm,vtpm", "linux,sml-size", | ||
1675 | &size, sizeof(size)); | ||
1676 | |||
1677 | prom_debug("sml base = 0x%x\n", base); | ||
1678 | prom_debug("sml size = 0x%x\n", (long)size); | ||
1679 | |||
1680 | prom_debug("prom_instantiate_sml: end...\n"); | ||
1681 | } | ||
1682 | |||
1683 | /* | ||
1627 | * Allocate room for and initialize TCE tables | 1684 | * Allocate room for and initialize TCE tables |
1628 | */ | 1685 | */ |
1629 | static void __init prom_initialize_tce_table(void) | 1686 | static void __init prom_initialize_tce_table(void) |
@@ -2916,6 +2973,11 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2916 | prom_instantiate_opal(); | 2973 | prom_instantiate_opal(); |
2917 | #endif | 2974 | #endif |
2918 | 2975 | ||
2976 | #ifdef CONFIG_PPC64 | ||
2977 | /* instantiate sml */ | ||
2978 | prom_instantiate_sml(); | ||
2979 | #endif | ||
2980 | |||
2919 | /* | 2981 | /* |
2920 | * On non-powermacs, put all CPUs in spin-loops. | 2982 | * On non-powermacs, put all CPUs in spin-loops. |
2921 | * | 2983 | * |