diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 23:25:11 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 23:25:11 -0500 |
| commit | 8cc748aa76c921d8834ef00f762f31acd2c93aa8 (patch) | |
| tree | 764b0ba9b9c16658bbb1077458605dc3faac0411 /lib/mpi | |
| parent | 7184487f14eb7c2fcf8337bb16c6a63b6db1252e (diff) | |
| parent | 04f81f0154e4bf002be6f4d85668ce1257efa4d9 (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security layer updates from James Morris:
"Highlights:
- Smack adds secmark support for Netfilter
- /proc/keys is now mandatory if CONFIG_KEYS=y
- TPM gets its own device class
- Added TPM 2.0 support
- Smack file hook rework (all Smack users should review this!)"
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (64 commits)
cipso: don't use IPCB() to locate the CIPSO IP option
SELinux: fix error code in policydb_init()
selinux: add security in-core xattr support for pstore and debugfs
selinux: quiet the filesystem labeling behavior message
selinux: Remove unused function avc_sidcmp()
ima: /proc/keys is now mandatory
Smack: Repair netfilter dependency
X.509: silence asn1 compiler debug output
X.509: shut up about included cert for silent build
KEYS: Make /proc/keys unconditional if CONFIG_KEYS=y
MAINTAINERS: email update
tpm/tpm_tis: Add missing ifdef CONFIG_ACPI for pnp_acpi_device
smack: fix possible use after frees in task_security() callers
smack: Add missing logging in bidirectional UDS connect check
Smack: secmark support for netfilter
Smack: Rework file hooks
tpm: fix format string error in tpm-chip.c
char/tpm/tpm_crb: fix build error
smack: Fix a bidirectional UDS connect check typo
smack: introduce a special case for tmpfs in smack_d_instantiate()
...
Diffstat (limited to 'lib/mpi')
| -rw-r--r-- | lib/mpi/mpi-cmp.c | 10 | ||||
| -rw-r--r-- | lib/mpi/mpi-internal.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/mpi/mpi-cmp.c b/lib/mpi/mpi-cmp.c index 1871e7b61ca0..d25e9e96c310 100644 --- a/lib/mpi/mpi-cmp.c +++ b/lib/mpi/mpi-cmp.c | |||
| @@ -57,14 +57,12 @@ int mpi_cmp(MPI u, MPI v) | |||
| 57 | if (usize != vsize && !u->sign && !v->sign) | 57 | if (usize != vsize && !u->sign && !v->sign) |
| 58 | return usize - vsize; | 58 | return usize - vsize; |
| 59 | if (usize != vsize && u->sign && v->sign) | 59 | if (usize != vsize && u->sign && v->sign) |
| 60 | return vsize + usize; | 60 | return vsize - usize; |
| 61 | if (!usize) | 61 | if (!usize) |
| 62 | return 0; | 62 | return 0; |
| 63 | cmp = mpihelp_cmp(u->d, v->d, usize); | 63 | cmp = mpihelp_cmp(u->d, v->d, usize); |
| 64 | if (!cmp) | 64 | if (u->sign) |
| 65 | return 0; | 65 | return -cmp; |
| 66 | if ((cmp < 0 ? 1 : 0) == (u->sign ? 1 : 0)) | 66 | return cmp; |
| 67 | return 1; | ||
| 68 | return -1; | ||
| 69 | } | 67 | } |
| 70 | EXPORT_SYMBOL_GPL(mpi_cmp); | 68 | EXPORT_SYMBOL_GPL(mpi_cmp); |
diff --git a/lib/mpi/mpi-internal.h b/lib/mpi/mpi-internal.h index 60cf765628e9..c65dd1bff45a 100644 --- a/lib/mpi/mpi-internal.h +++ b/lib/mpi/mpi-internal.h | |||
| @@ -84,7 +84,7 @@ static inline int RESIZE_IF_NEEDED(MPI a, unsigned b) | |||
| 84 | do { \ | 84 | do { \ |
| 85 | mpi_size_t _i; \ | 85 | mpi_size_t _i; \ |
| 86 | for (_i = 0; _i < (n); _i++) \ | 86 | for (_i = 0; _i < (n); _i++) \ |
| 87 | (d)[_i] = (d)[_i]; \ | 87 | (d)[_i] = (s)[_i]; \ |
| 88 | } while (0) | 88 | } while (0) |
| 89 | 89 | ||
| 90 | #define MPN_COPY_DECR(d, s, n) \ | 90 | #define MPN_COPY_DECR(d, s, n) \ |
