diff options
| author | Chris Patterson <pattersonc@ainfosec.com> | 2016-03-23 16:49:11 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-03-24 11:31:53 -0400 |
| commit | af49562964228c90e556d3493e81ddc8bac6c5ff (patch) | |
| tree | e94880740c177c093d8ac7ce68a416a678ec8aac | |
| parent | 9128134535d670387c1707815a6d60958ee47586 (diff) | |
| download | meta-virtualization-af49562964228c90e556d3493e81ddc8bac6c5ff.tar.gz | |
xen: uprev to 4.6.1
Drop xsm fix backport, no longer required.
Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
| -rw-r--r-- | recipes-extended/xen/files/xen-xsm-Make-p-policyvers-be-a-local-variable-ver-to.patch | 122 | ||||
| -rw-r--r-- | recipes-extended/xen/xen_4.6.0.bb | 11 | ||||
| -rw-r--r-- | recipes-extended/xen/xen_4.6.1.bb | 10 |
3 files changed, 10 insertions, 133 deletions
diff --git a/recipes-extended/xen/files/xen-xsm-Make-p-policyvers-be-a-local-variable-ver-to.patch b/recipes-extended/xen/files/xen-xsm-Make-p-policyvers-be-a-local-variable-ver-to.patch deleted file mode 100644 index efe6e748..00000000 --- a/recipes-extended/xen/files/xen-xsm-Make-p-policyvers-be-a-local-variable-ver-to.patch +++ /dev/null | |||
| @@ -1,122 +0,0 @@ | |||
| 1 | From 6a2f81459e1455d65a9a6f78dd2a0d0278619680 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | ||
| 3 | Date: Wed, 16 Sep 2015 15:57:27 -0400 | ||
| 4 | Subject: [PATCH] xen/xsm: Make p->policyvers be a local variable (ver) to shut | ||
| 5 | up GCC 5.1.1 warnings. | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | policydb.c: In function ‘user_read’: | ||
| 11 | policydb.c:1443:26: error: ‘buf[2]’ may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
| 12 | usrdatum->bounds = le32_to_cpu(buf[2]); | ||
| 13 | ^ | ||
| 14 | cc1: all warnings being treated as errors | ||
| 15 | |||
| 16 | Which (as Andrew mentioned) is because GCC cannot assume | ||
| 17 | that 'p->policyvers' has the same value between checks. | ||
| 18 | |||
| 19 | We make it local, optimize the name to 'ver' and the warnings go away. | ||
| 20 | We also update another call site with this modification to | ||
| 21 | make it more inline with the rest of the functions. | ||
| 22 | |||
| 23 | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | ||
| 24 | Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> | ||
| 25 | --- | ||
| 26 | xen/xsm/flask/ss/policydb.c | 17 ++++++++++------- | ||
| 27 | 1 file changed, 10 insertions(+), 7 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c | ||
| 30 | index a1060b1..eebfe9c 100644 | ||
| 31 | --- a/xen/xsm/flask/ss/policydb.c | ||
| 32 | +++ b/xen/xsm/flask/ss/policydb.c | ||
| 33 | @@ -1258,6 +1258,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 34 | int rc; | ||
| 35 | __le32 buf[3]; | ||
| 36 | u32 len; | ||
| 37 | + u32 ver = p->policyvers; | ||
| 38 | |||
| 39 | role = xzalloc(struct role_datum); | ||
| 40 | if ( !role ) | ||
| 41 | @@ -1266,7 +1267,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 42 | goto out; | ||
| 43 | } | ||
| 44 | |||
| 45 | - if ( p->policyvers >= POLICYDB_VERSION_BOUNDARY ) | ||
| 46 | + if ( ver >= POLICYDB_VERSION_BOUNDARY ) | ||
| 47 | rc = next_entry(buf, fp, sizeof(buf[0]) * 3); | ||
| 48 | else | ||
| 49 | rc = next_entry(buf, fp, sizeof(buf[0]) * 2); | ||
| 50 | @@ -1276,7 +1277,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 51 | |||
| 52 | len = le32_to_cpu(buf[0]); | ||
| 53 | role->value = le32_to_cpu(buf[1]); | ||
| 54 | - if ( p->policyvers >= POLICYDB_VERSION_BOUNDARY ) | ||
| 55 | + if ( ver >= POLICYDB_VERSION_BOUNDARY ) | ||
| 56 | role->bounds = le32_to_cpu(buf[2]); | ||
| 57 | |||
| 58 | key = xmalloc_array(char, len + 1); | ||
| 59 | @@ -1328,6 +1329,7 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 60 | int rc; | ||
| 61 | __le32 buf[4]; | ||
| 62 | u32 len; | ||
| 63 | + u32 ver = p->policyvers; | ||
| 64 | |||
| 65 | typdatum = xzalloc(struct type_datum); | ||
| 66 | if ( !typdatum ) | ||
| 67 | @@ -1336,7 +1338,7 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 68 | return rc; | ||
| 69 | } | ||
| 70 | |||
| 71 | - if ( p->policyvers >= POLICYDB_VERSION_BOUNDARY ) | ||
| 72 | + if ( ver >= POLICYDB_VERSION_BOUNDARY ) | ||
| 73 | rc = next_entry(buf, fp, sizeof(buf[0]) * 4); | ||
| 74 | else | ||
| 75 | rc = next_entry(buf, fp, sizeof(buf[0]) * 3); | ||
| 76 | @@ -1346,7 +1348,7 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 77 | |||
| 78 | len = le32_to_cpu(buf[0]); | ||
| 79 | typdatum->value = le32_to_cpu(buf[1]); | ||
| 80 | - if ( p->policyvers >= POLICYDB_VERSION_BOUNDARY ) | ||
| 81 | + if ( ver >= POLICYDB_VERSION_BOUNDARY ) | ||
| 82 | { | ||
| 83 | u32 prop = le32_to_cpu(buf[2]); | ||
| 84 | |||
| 85 | @@ -1421,6 +1423,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 86 | int rc; | ||
| 87 | __le32 buf[3]; | ||
| 88 | u32 len; | ||
| 89 | + u32 ver = p->policyvers; | ||
| 90 | |||
| 91 | usrdatum = xzalloc(struct user_datum); | ||
| 92 | if ( !usrdatum ) | ||
| 93 | @@ -1429,7 +1432,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 94 | goto out; | ||
| 95 | } | ||
| 96 | |||
| 97 | - if ( p->policyvers >= POLICYDB_VERSION_BOUNDARY ) | ||
| 98 | + if ( ver >= POLICYDB_VERSION_BOUNDARY ) | ||
| 99 | rc = next_entry(buf, fp, sizeof(buf[0]) * 3); | ||
| 100 | else | ||
| 101 | rc = next_entry(buf, fp, sizeof(buf[0]) * 2); | ||
| 102 | @@ -1439,7 +1442,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 103 | |||
| 104 | len = le32_to_cpu(buf[0]); | ||
| 105 | usrdatum->value = le32_to_cpu(buf[1]); | ||
| 106 | - if ( p->policyvers >= POLICYDB_VERSION_BOUNDARY ) | ||
| 107 | + if ( ver >= POLICYDB_VERSION_BOUNDARY ) | ||
| 108 | usrdatum->bounds = le32_to_cpu(buf[2]); | ||
| 109 | |||
| 110 | key = xmalloc_array(char, len + 1); | ||
| 111 | @@ -1457,7 +1460,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp) | ||
| 112 | if ( rc ) | ||
| 113 | goto bad; | ||
| 114 | |||
| 115 | - if ( p->policyvers >= POLICYDB_VERSION_MLS ) | ||
| 116 | + if ( ver >= POLICYDB_VERSION_MLS ) | ||
| 117 | { | ||
| 118 | rc = mls_read_range_helper(&usrdatum->range, fp); | ||
| 119 | if ( rc ) | ||
| 120 | -- | ||
| 121 | 2.1.0 | ||
| 122 | |||
diff --git a/recipes-extended/xen/xen_4.6.0.bb b/recipes-extended/xen/xen_4.6.0.bb deleted file mode 100644 index 7650e463..00000000 --- a/recipes-extended/xen/xen_4.6.0.bb +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | require xen.inc | ||
| 2 | |||
| 3 | SRC_URI = " \ | ||
| 4 | http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \ | ||
| 5 | file://xen-xsm-Make-p-policyvers-be-a-local-variable-ver-to.patch \ | ||
| 6 | " | ||
| 7 | |||
| 8 | SRC_URI[md5sum] = "48e232f90927c08326a7b52bb06f49bc" | ||
| 9 | SRC_URI[sha256sum] = "6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909" | ||
| 10 | |||
| 11 | S = "${WORKDIR}/xen-${PV}" | ||
diff --git a/recipes-extended/xen/xen_4.6.1.bb b/recipes-extended/xen/xen_4.6.1.bb new file mode 100644 index 00000000..0adf8adb --- /dev/null +++ b/recipes-extended/xen/xen_4.6.1.bb | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | require xen.inc | ||
| 2 | |||
| 3 | SRC_URI = " \ | ||
| 4 | http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \ | ||
| 5 | " | ||
| 6 | |||
| 7 | SRC_URI[md5sum] = "df2d854c3c90ffeefaf71e7f868fb326" | ||
| 8 | SRC_URI[sha256sum] = "44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589" | ||
| 9 | |||
| 10 | S = "${WORKDIR}/xen-${PV}" | ||
