diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 17:04:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 17:04:58 -0400 |
commit | f39d420f672f99ad9a0fe7deb951a0030d4f0d9e (patch) | |
tree | 450e229a4305362f72cc5461aab8af4f2f5d023e /drivers/char | |
parent | fe489bf4505ae26d3c6d6a1f1d3064c2a9c5cd85 (diff) | |
parent | 572e5b018ba68d634f30aef71cf04d85c884aa05 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"In this update, Smack learns to love IPv6 and to mount a filesystem
with a transmutable hierarchy (i.e. security labels are inherited
from parent directory upon creation rather than creating process).
The rest of the changes are maintenance"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (37 commits)
tpm/tpm_i2c_infineon: Remove unused header file
tpm: tpm_i2c_infinion: Don't modify i2c_client->driver
evm: audit integrity metadata failures
integrity: move integrity_audit_msg()
evm: calculate HMAC after initializing posix acl on tmpfs
maintainers: add Dmitry Kasatkin
Smack: Fix the bug smackcipso can't set CIPSO correctly
Smack: Fix possible NULL pointer dereference at smk_netlbl_mls()
Smack: Add smkfstransmute mount option
Smack: Improve access check performance
Smack: Local IPv6 port based controls
tpm: fix regression caused by section type conflict of tpm_dev_release() in ppc builds
maintainers: Remove Kent from maintainers
tpm: move TPM_DIGEST_SIZE defintion
tpm_tis: missing platform_driver_unregister() on error in init_tis()
security: clarify cap_inode_getsecctx description
apparmor: no need to delay vfree()
apparmor: fix fully qualified name parsing
apparmor: fix setprocattr arg processing for onexec
apparmor: localize getting the security context to a few macros
...
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm.h | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_i2c_infineon.c | 4 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 17 |
4 files changed, 14 insertions, 11 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 7c3b3dcbfbc8..e3c974a6c522 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -1472,7 +1472,7 @@ EXPORT_SYMBOL_GPL(tpm_dev_vendor_release); | |||
1472 | * Once all references to platform device are down to 0, | 1472 | * Once all references to platform device are down to 0, |
1473 | * release all allocated structures. | 1473 | * release all allocated structures. |
1474 | */ | 1474 | */ |
1475 | static void tpm_dev_release(struct device *dev) | 1475 | void tpm_dev_release(struct device *dev) |
1476 | { | 1476 | { |
1477 | struct tpm_chip *chip = dev_get_drvdata(dev); | 1477 | struct tpm_chip *chip = dev_get_drvdata(dev); |
1478 | 1478 | ||
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 0770d1d79366..a7bfc176ed43 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h | |||
@@ -272,7 +272,6 @@ typedef union { | |||
272 | struct tpm_output_header out; | 272 | struct tpm_output_header out; |
273 | } tpm_cmd_header; | 273 | } tpm_cmd_header; |
274 | 274 | ||
275 | #define TPM_DIGEST_SIZE 20 | ||
276 | struct tpm_pcrread_out { | 275 | struct tpm_pcrread_out { |
277 | u8 pcr_result[TPM_DIGEST_SIZE]; | 276 | u8 pcr_result[TPM_DIGEST_SIZE]; |
278 | } __packed; | 277 | } __packed; |
@@ -333,6 +332,7 @@ extern struct tpm_chip* tpm_register_hardware(struct device *, | |||
333 | const struct tpm_vendor_specific *); | 332 | const struct tpm_vendor_specific *); |
334 | extern int tpm_open(struct inode *, struct file *); | 333 | extern int tpm_open(struct inode *, struct file *); |
335 | extern int tpm_release(struct inode *, struct file *); | 334 | extern int tpm_release(struct inode *, struct file *); |
335 | extern void tpm_dev_release(struct device *dev); | ||
336 | extern void tpm_dev_vendor_release(struct tpm_chip *); | 336 | extern void tpm_dev_vendor_release(struct tpm_chip *); |
337 | extern ssize_t tpm_write(struct file *, const char __user *, size_t, | 337 | extern ssize_t tpm_write(struct file *, const char __user *, size_t, |
338 | loff_t *); | 338 | loff_t *); |
diff --git a/drivers/char/tpm/tpm_i2c_infineon.c b/drivers/char/tpm/tpm_i2c_infineon.c index 37d5dcc10ea7..b8735de8ce95 100644 --- a/drivers/char/tpm/tpm_i2c_infineon.c +++ b/drivers/char/tpm/tpm_i2c_infineon.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/moduleparam.h> | ||
28 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
29 | #include "tpm.h" | 28 | #include "tpm.h" |
30 | 29 | ||
@@ -74,7 +73,6 @@ struct tpm_inf_dev { | |||
74 | }; | 73 | }; |
75 | 74 | ||
76 | static struct tpm_inf_dev tpm_dev; | 75 | static struct tpm_inf_dev tpm_dev; |
77 | static struct i2c_driver tpm_tis_i2c_driver; | ||
78 | 76 | ||
79 | /* | 77 | /* |
80 | * iic_tpm_read() - read from TPM register | 78 | * iic_tpm_read() - read from TPM register |
@@ -744,11 +742,9 @@ static int tpm_tis_i2c_probe(struct i2c_client *client, | |||
744 | return -ENODEV; | 742 | return -ENODEV; |
745 | } | 743 | } |
746 | 744 | ||
747 | client->driver = &tpm_tis_i2c_driver; | ||
748 | tpm_dev.client = client; | 745 | tpm_dev.client = client; |
749 | rc = tpm_tis_i2c_init(&client->dev); | 746 | rc = tpm_tis_i2c_init(&client->dev); |
750 | if (rc != 0) { | 747 | if (rc != 0) { |
751 | client->driver = NULL; | ||
752 | tpm_dev.client = NULL; | 748 | tpm_dev.client = NULL; |
753 | rc = -ENODEV; | 749 | rc = -ENODEV; |
754 | } | 750 | } |
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 8a41b6be23a0..4519cb332987 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -884,12 +884,19 @@ static int __init init_tis(void) | |||
884 | rc = platform_driver_register(&tis_drv); | 884 | rc = platform_driver_register(&tis_drv); |
885 | if (rc < 0) | 885 | if (rc < 0) |
886 | return rc; | 886 | return rc; |
887 | if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0))) | 887 | pdev = platform_device_register_simple("tpm_tis", -1, NULL, 0); |
888 | return PTR_ERR(pdev); | 888 | if (IS_ERR(pdev)) { |
889 | if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) { | 889 | rc = PTR_ERR(pdev); |
890 | platform_device_unregister(pdev); | 890 | goto err_dev; |
891 | platform_driver_unregister(&tis_drv); | ||
892 | } | 891 | } |
892 | rc = tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0); | ||
893 | if (rc) | ||
894 | goto err_init; | ||
895 | return 0; | ||
896 | err_init: | ||
897 | platform_device_unregister(pdev); | ||
898 | err_dev: | ||
899 | platform_driver_unregister(&tis_drv); | ||
893 | return rc; | 900 | return rc; |
894 | } | 901 | } |
895 | 902 | ||