]> git.pld-linux.org Git - packages/xen.git/commitdiff
- up to 4.6.5 auto/th/xen-4.6.5-1
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 14 Apr 2017 13:28:55 +0000 (15:28 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 14 Apr 2017 13:28:55 +0000 (15:28 +0200)
- add patches to fix building with gcc6 and Werror

deprecated-readdir_r.patch [new file with mode: 0644]
fix-misleading-indentation.patch [new file with mode: 0644]
ipxe-build.patch [new file with mode: 0644]
sysmacros.patch [new file with mode: 0644]
unused-function.patch [new file with mode: 0644]
xen-gnutls-3.4.patch [deleted file]
xen-grep-typo.patch [deleted file]
xen.spec

diff --git a/deprecated-readdir_r.patch b/deprecated-readdir_r.patch
new file mode 100644 (file)
index 0000000..6abad15
--- /dev/null
@@ -0,0 +1,174 @@
+From c2a17869d5dcd845d646bf4db122cad73596a2be Mon Sep 17 00:00:00 2001
+From: Chris Patterson <pattersonc@ainfosec.com>
+Date: Fri, 3 Jun 2016 12:50:10 -0400
+Subject: [PATCH] libfsimage: replace deprecated readdir_r() with readdir()
+
+Replace the usage of readdir_r() with readdir() to address a
+compilation error under glibc due to the deprecation of readdir_r
+for their next release (2.24) [1, 2].
+
+Add new error checking on readdir(), and fail if error occurs.
+
+--
+
+From the GNU libc manual [3]:
+"
+ It is expected that future versions of POSIX will obsolete readdir_r and
+ mandate the level of thread safety for readdir which is provided by the
+ GNU C Library and other implementations today.
+"
+
+There is a filed bug in the Austin Group Defect Tracker [4]  in which 'dalias'
+proposes (in comment 0001632) that:
+"
+   I would like to propose an alternate solution. For readdir, replace the text:
+    "The readdir() function need not be thread-safe."
+   with:
+    "If multiple threads call the readdir() function with the same directory
+    stream argument and without synchronization to preclude simultaneous
+    access, then the behavior is undefined."
+
+   With this change, the clunky readdir_r function is no longer needed or
+   useful, and should probably be deprecated. As the only reasonable way
+   to meet the implementation requirements for readdir is to have the dirent
+   buffer in the DIR structure, this change should not require any change to
+   existing implementations.
+"
+
+[1] https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html
+[2] https://sourceware.org/bugzilla/show_bug.cgi?id=19056
+[3] https://www.gnu.org/software/libc/manual/html_node/Reading_002fClosing-Directory.html
+[4] http://austingroupbugs.net/view.php?id=696
+
+Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
+Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
+Release-acked-by: Wei Liu <wei.liu2@citrix.com>
+---
+ tools/libfsimage/common/fsimage_plugin.c | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/tools/libfsimage/common/fsimage_plugin.c b/tools/libfsimage/common/fsimage_plugin.c
+index 3fa06c7..0744e7b 100644
+--- a/tools/libfsimage/common/fsimage_plugin.c
++++ b/tools/libfsimage/common/fsimage_plugin.c
+@@ -123,7 +123,6 @@ static int load_plugins(void)
+ {
+       const char *fsdir = getenv("FSIMAGE_FSDIR");
+       struct dirent *dp = NULL;
+-      struct dirent *dpp;
+       DIR *dir = NULL;
+       char *tmp = NULL;
+       size_t name_max;
+@@ -139,22 +138,26 @@ static int load_plugins(void)
+       if ((tmp = malloc(name_max + 1)) == NULL)
+               goto fail;
+-      if ((dp = malloc(sizeof (struct dirent) + name_max + 1)) == NULL)
+-              goto fail;
+-
+       if ((dir = opendir(fsdir)) == NULL)
+               goto fail;
+-      bzero(dp, sizeof (struct dirent) + name_max + 1);
++      for (;;) {
++              errno = 0;
++              dp = readdir(dir);
++
++              if (dp == NULL && errno != 0)
++                      goto fail;
++
++              if (dp == NULL)
++                      break;
+-      while (readdir_r(dir, dp, &dpp) == 0 && dpp != NULL) {
+-              if (strcmp(dpp->d_name, ".") == 0)
++              if (strcmp(dp->d_name, ".") == 0)
+                       continue;
+-              if (strcmp(dpp->d_name, "..") == 0)
++              if (strcmp(dp->d_name, "..") == 0)
+                       continue;
+               (void) snprintf(tmp, name_max, "%s/%s/fsimage.so", fsdir,
+-                      dpp->d_name);
++                      dp->d_name);
+               if (init_plugin(tmp) != 0)
+                       goto fail;
+-- 
+2.1.4
+
+From b9daff9d811285f1e40669bc621c2241793f7a95 Mon Sep 17 00:00:00 2001
+From: Chris Patterson <pattersonc@ainfosec.com>
+Date: Fri, 3 Jun 2016 12:50:09 -0400
+Subject: [PATCH] libxl: replace deprecated readdir_r() with readdir()
+
+Replace the usage of readdir_r() with readdir() to address a
+compilation error under glibc due to the deprecation of readdir_r
+for their next release (2.24) [1, 2].
+
+Remove code specific to usage of readdir_r which is no longer required,
+such as zalloc_dirent().
+
+--
+
+From the GNU libc manual [3]:
+"
+ It is expected that future versions of POSIX will obsolete readdir_r and
+ mandate the level of thread safety for readdir which is provided by the
+ GNU C Library and other implementations today.
+"
+
+There is a filed bug in the Austin Group Defect Tracker [4]  in which 'dalias'
+proposes (in comment 0001632) that:
+"
+   I would like to propose an alternate solution. For readdir, replace the text:
+    "The readdir() function need not be thread-safe."
+   with:
+    "If multiple threads call the readdir() function with the same directory
+    stream argument and without synchronization to preclude simultaneous
+    access, then the behavior is undefined."
+
+   With this change, the clunky readdir_r function is no longer needed or
+   useful, and should probably be deprecated. As the only reasonable way
+   to meet the implementation requirements for readdir is to have the dirent
+   buffer in the DIR structure, this change should not require any change to
+   existing implementations.
+"
+
+[1] https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html
+[2] https://sourceware.org/bugzilla/show_bug.cgi?id=19056
+[3] https://www.gnu.org/software/libc/manual/html_node/Reading_002fClosing-Directory.html
+[4] http://austingroupbugs.net/view.php?id=696
+
+Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
+Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
+Release-acked-by: Wei Liu <wei.liu2@citrix.com>
+---
+ tools/libxl/libxl_utils.c |  8 +++-----
+ 2 files changed, 9 insertions(+), 23 deletions(-)
+
+diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
+index ceb8825..4ca6bcb 100644
+--- a/tools/libxl/libxl_utils.c
++++ b/tools/libxl/libxl_utils.c
+@@ -548,14 +548,12 @@ int libxl__remove_directory(libxl__gc *gc, const char *dirpath)
+         goto out;
+     }
+-    size_t need = offsetof(struct dirent, d_name) +
+-        pathconf(dirpath, _PC_NAME_MAX) + 1;
+-    struct dirent *de_buf = libxl__zalloc(gc, need);
+     struct dirent *de;
+     for (;;) {
+-        int r = readdir_r(d, de_buf, &de);
+-        if (r) {
++        errno = 0;
++        de = readdir(d);
++        if (!de && errno) {
+             LOGE(ERROR, "failed to readdir %s for removal", dirpath);
+             rc = ERROR_FAIL;
+             break;
+-- 
+2.1.4
+
diff --git a/fix-misleading-indentation.patch b/fix-misleading-indentation.patch
new file mode 100644 (file)
index 0000000..c844446
--- /dev/null
@@ -0,0 +1,150 @@
+From ebdba150bff1d914805d60efa576337bbef0c305 Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ian.campbell@citrix.com>
+Date: Fri, 22 Jan 2016 14:27:28 +0000
+Subject: [PATCH] xenalyze: fix misleading indentation.
+
+gcc-6 adds -Wmisleading-indentation which found these issues.
+
+xenalyze.c: In function 'weighted_percentile':
+xenalyze.c:2136:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
+             L=I; L_weight = I_weight;
+                  ^~~~~~~~
+
+xenalyze.c:2135:9: note: ...this 'if' clause, but it is not
+         if(J_weight<K_weight)
+         ^~
+
+xenalyze.c:2138:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
+             R=J; R_weight = J_weight;
+                  ^~~~~~~~
+
+xenalyze.c:2137:9: note: ...this 'if' clause, but it is not
+         if(K_weight<I_weight)
+         ^~
+
+xenalyze.c: In function 'self_weighted_percentile':
+xenalyze.c:2215:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
+             L=I; L_weight = I_weight;
+                  ^~~~~~~~
+
+xenalyze.c:2214:9: note: ...this 'if' clause, but it is not
+         if(J_weight<K_weight)
+         ^~
+
+xenalyze.c:2217:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
+             R=J; R_weight = J_weight;
+                  ^~~~~~~~
+
+xenalyze.c:2216:9: note: ...this 'if' clause, but it is not
+         if(K_weight<I_weight)
+         ^~
+
+I've modified according to what I think the intention is, i.e. added braces
+rather than moving the line in question out a level.
+
+I have only build tested the result.
+
+Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
+Reviewed-by: George Dunlap <george.dunlap@citrix.com>
+---
+ tools/xentrace/xenalyze.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
+index 5a2735c..4bcaf83 100644
+--- a/tools/xentrace/xenalyze.c
++++ b/tools/xentrace/xenalyze.c
+@@ -2132,10 +2132,14 @@ float weighted_percentile(float * A, /* values */
+         } while (I <= J); /* Keep going until our pointers meet or pass */
+         /* Re-adjust L and R, based on which element we're looking for */
+-        if(J_weight<K_weight)
+-            L=I; L_weight = I_weight;
+-        if(K_weight<I_weight)
+-            R=J; R_weight = J_weight;
++        if(J_weight<K_weight) {
++            L=I;
++            L_weight = I_weight;
++        }
++        if(K_weight<I_weight) {
++            R=J;
++            R_weight = J_weight;
++        }
+     }
+     return A[L];
+@@ -2211,10 +2215,14 @@ long long self_weighted_percentile(long long * A,
+         } while (I <= J); /* Keep going until our pointers meet or pass */
+         /* Re-adjust L and R, based on which element we're looking for */
+-        if(J_weight<K_weight)
+-            L=I; L_weight = I_weight;
+-        if(K_weight<I_weight)
+-            R=J; R_weight = J_weight;
++        if(J_weight<K_weight) {
++            L=I;
++            L_weight = I_weight;
++        }
++        if(K_weight<I_weight) {
++            R=J;
++            R_weight = J_weight;
++        }
+     }
+     return A[L];
+-- 
+2.1.4
+
+From 9fdffbbab3ada427bac07076f042f0265e5ae05f Mon Sep 17 00:00:00 2001
+From: =?utf8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
+Date: Thu, 10 Nov 2016 10:23:31 +0100
+Subject: [PATCH] Fix misleading indentation warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Gcc6 build reports misleading indentation as warnings. Fix a few
+warnings in stubdom.
+
+Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
+Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
+Acked-by: Quan Xu <xuquan8@huawei.com>
+Release-acked-by: Wei Liu <wei.liu2@citrix.com>
+---
+ stubdom/vtpmmgr/disk_read.c | 8 ++++----
+ stubdom/vtpmmgr/log.c       | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/stubdom/vtpmmgr/disk_read.c b/stubdom/vtpmmgr/disk_read.c
+index 944d3ff..48cfbfe 100644
+--- a/stubdom/vtpmmgr/disk_read.c
++++ b/stubdom/vtpmmgr/disk_read.c
+@@ -123,10 +123,10 @@ static int parse_root_key(struct mem_tpm_mgr *dst, struct disk_seal_entry *src)
+       struct disk_root_sealed_data sealed;
+     /*TPM 2.0 unbind | TPM 1.x unseal*/
+-    if (hw_is_tpm2())
+-        rc = TPM2_disk_unbind(&sealed, &olen, src);
+-    else
+-        rc = TPM_disk_unseal(&sealed, sizeof(sealed), src);
++      if (hw_is_tpm2())
++              rc = TPM2_disk_unbind(&sealed, &olen, src);
++      else
++              rc = TPM_disk_unseal(&sealed, sizeof(sealed), src);
+       if (rc)
+               return rc;
+diff --git a/stubdom/vtpmmgr/log.c b/stubdom/vtpmmgr/log.c
+index a82c913..c1bc8f3 100644
+--- a/stubdom/vtpmmgr/log.c
++++ b/stubdom/vtpmmgr/log.c
+@@ -147,5 +147,5 @@ const char* tpm_get_error_name (TPM_RESULT code) {
+     if (code == error_msgs[i].code)
+       return error_msgs[i].code_name;
+-    return("Unknown Error Code");
++  return("Unknown Error Code");
+ }
+-- 
+2.1.4
+
diff --git a/ipxe-build.patch b/ipxe-build.patch
new file mode 100644 (file)
index 0000000..c07b728
--- /dev/null
@@ -0,0 +1,306 @@
+diff -urN xen-4.6.5/tools/firmware/etherboot/patches/drivers-fixes.patch xen-4.6.5.build/tools/firmware/etherboot/patches/drivers-fixes.patch
+--- xen-4.6.5/tools/firmware/etherboot/patches/drivers-fixes.patch     1970-01-01 01:00:00.000000000 +0100
++++ xen-4.6.5.build/tools/firmware/etherboot/patches/drivers-fixes.patch       2017-04-14 14:57:04.905408377 +0200
+@@ -0,0 +1,208 @@
++--- a/src/drivers/net/via-rhine.c~    2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/via-rhine.c     2017-04-14 14:19:52.286247054 +0200
++@@ -947,11 +947,10 @@
++             // if (tp->chip_id == 0x3065)
++             if( tp->chip_revision < 0x80 && tp->chip_revision >=0x40 )
++                 intr_status |= inb(nic->ioaddr + IntrStatus2) << 16;
++-                intr_status = (intr_status & ~DEFAULT_INTR);
++-                if ( action == ENABLE ) 
++-                    intr_status = intr_status | DEFAULT_INTR;
++-                    outw(intr_status, nic->ioaddr + IntrEnable);
++-                break;
+++            intr_status = (intr_status & ~DEFAULT_INTR);
+++            intr_status = intr_status | DEFAULT_INTR;
+++            outw(intr_status, nic->ioaddr + IntrEnable);
+++            break;
++         case FORCE :
++             outw(0x0010, nic->ioaddr + 0x84);
++            break;
++--- a/src/drivers/net/skge.c~ 2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/skge.c  2017-04-14 14:24:41.466448500 +0200
++@@ -83,9 +83,6 @@
++ /* Avoid conditionals by using array */
++ static const int txqaddr[] = { Q_XA1, Q_XA2 };
++ static const int rxqaddr[] = { Q_R1, Q_R2 };
++-static const u32 rxirqmask[] = { IS_R1_F, IS_R2_F };
++-static const u32 txirqmask[] = { IS_XA1_F, IS_XA2_F };
++-static const u32 napimask[] = { IS_R1_F|IS_XA1_F, IS_R2_F|IS_XA2_F };
++ static const u32 portmask[] = { IS_PORT_1, IS_PORT_2 };
++ 
++ /* Determine supported/advertised modes based on hardware.
++@@ -1921,8 +1918,6 @@
++      skge->tx_ring.to_clean = e;
++ }
++ 
++-static const u8 pause_mc_addr[ETH_ALEN] = { 0x1, 0x80, 0xc2, 0x0, 0x0, 0x1 };
++-
++ static inline u16 phy_length(const struct skge_hw *hw, u32 status)
++ {
++      if (hw->chip_id == CHIP_ID_GENESIS)
++--- a/src/drivers/net/sis190.c~       2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/sis190.c        2017-04-14 14:26:03.937456678 +0200
++@@ -72,12 +72,6 @@
++ static const u32 sis190_intr_mask =
++      RxQEmpty | RxQInt | TxQ1Int | TxQ0Int | RxHalt | TxHalt | LinkChange;
++ 
++-/*
++- * Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
++- * The chips use a 64 element hash table based on the Ethernet CRC.
++- */
++-static const int multicast_filter_limit = 32;
++-
++ static void __mdio_cmd(void *ioaddr, u32 ctl)
++ {
++      unsigned int i;
++--- a/src/drivers/net/via-velocity.c~ 2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/via-velocity.c  2017-04-14 14:29:33.906690274 +0200
++@@ -95,7 +95,7 @@
++    2: indicate the rxfifo threshold is 1024 bytes.
++    3: indicate the rxfifo threshold is store & forward.
++ */
++-VELOCITY_PARAM(rx_thresh, "Receive fifo threshold");
+++//VELOCITY_PARAM(rx_thresh, "Receive fifo threshold");
++ 
++ #define DMA_LENGTH_MIN  0
++ #define DMA_LENGTH_MAX  7
++--- a/src/drivers/net/e1000/e1000_phy.c~      2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/e1000/e1000_phy.c       2017-04-14 14:40:51.169290852 +0200
++@@ -167,18 +167,18 @@
++      if (!(phy->ops.read_reg))
++              goto out;
++ 
++-             ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
++-             if (ret_val)
++-                     goto out;
+++     ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
+++     if (ret_val)
+++             goto out;
++ 
++-             phy->id = (u32)(phy_id << 16);
++-             usec_delay(20);
++-             ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
++-             if (ret_val)
++-                     goto out;
+++     phy->id = (u32)(phy_id << 16);
+++     usec_delay(20);
+++     ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
+++     if (ret_val)
+++             goto out;
++ 
++-             phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
++-             phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
+++     phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
+++     phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
++ 
++ out:
++      return ret_val;
++--- a/src/drivers/net/igb/igb_phy.c~  2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/igb/igb_phy.c   2017-04-14 14:43:20.841332677 +0200
++@@ -91,18 +91,18 @@
++      if (!(phy->ops.read_reg))
++              goto out;
++ 
++-             ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
++-             if (ret_val)
++-                     goto out;
+++     ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
+++     if (ret_val)
+++             goto out;
++ 
++-             phy->id = (u32)(phy_id << 16);
++-             usec_delay(20);
++-             ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
++-             if (ret_val)
++-                     goto out;
+++     phy->id = (u32)(phy_id << 16);
+++     usec_delay(20);
+++     ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
+++     if (ret_val)
+++             goto out;
++ 
++-             phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
++-             phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
+++     phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
+++     phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
++ 
++ out:
++      return ret_val;
++--- a/src/drivers/net/ath/ath5k/ath5k_reset.c~        2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/ath/ath5k/ath5k_reset.c 2017-04-14 14:44:37.299026150 +0200
++@@ -135,13 +135,6 @@
++ }
++ 
++ 
++-/*
++- * index into rates for control rates, we can set it up like this because
++- * this is only used for AR5212 and we know it supports G mode
++- */
++-static const unsigned int control_rates[] =
++-     { 0, 1, 1, 1, 4, 4, 6, 6, 8, 8, 8, 8 };
++-
++ /**
++  * ath5k_hw_write_rate_duration - fill rate code to duration table
++  *
++--- a/src/drivers/net/ath/ath5k/ath5k.c~      2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/ath/ath5k/ath5k.c       2017-04-14 14:46:52.610822110 +0200
++@@ -85,6 +85,7 @@
++      PCI_ROM(0x168c, 0x001d, "ath2417", "Atheros 2417 Nala", AR5K_AR5212),
++ };
++ 
+++#if DBGLVL_MAX
++ /* Known SREVs */
++ static const struct ath5k_srev_name srev_names[] = {
++      { "5210",       AR5K_VERSION_MAC,       AR5K_SREV_AR5210 },
++@@ -124,6 +125,7 @@
++      { "5133",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_5133 },
++      { "xxxxx",      AR5K_VERSION_RAD,       AR5K_SREV_UNKNOWN },
++ };
+++#endif
++ 
++ #define ATH5K_SPMBL_NO   1
++ #define ATH5K_SPMBL_YES  2
++--- a/src/drivers/net/ath/ath5k/ath5k_phy.c~  2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/ath/ath5k/ath5k_phy.c   2017-04-14 14:50:38.760444548 +0200
++@@ -1219,12 +1219,12 @@
++ 
++      /* Update radio registers */
++      ath5k_hw_reg_write(ah, (phy_sig & ~(AR5K_PHY_SIG_FIRPWR)) |
++-             AR5K_REG_SM(-1, AR5K_PHY_SIG_FIRPWR), AR5K_PHY_SIG);
+++             AR5K_REG_SM(-1U, AR5K_PHY_SIG_FIRPWR), AR5K_PHY_SIG);
++ 
++      ath5k_hw_reg_write(ah, (phy_agc & ~(AR5K_PHY_AGCCOARSE_HI |
++                      AR5K_PHY_AGCCOARSE_LO)) |
++-             AR5K_REG_SM(-1, AR5K_PHY_AGCCOARSE_HI) |
++-             AR5K_REG_SM(-127, AR5K_PHY_AGCCOARSE_LO), AR5K_PHY_AGCCOARSE);
+++             AR5K_REG_SM(-1U, AR5K_PHY_AGCCOARSE_HI) |
+++             AR5K_REG_SM(-127U, AR5K_PHY_AGCCOARSE_LO), AR5K_PHY_AGCCOARSE);
++ 
++      ath5k_hw_reg_write(ah, (phy_sat & ~(AR5K_PHY_ADCSAT_ICNT |
++                      AR5K_PHY_ADCSAT_THR)) |
++--- a/src/drivers/net/ath/ath9k/ath9k_eeprom.c~       2011-12-11 03:28:04.000000000 +0100
+++++ b/src/drivers/net/ath/ath9k/ath9k_eeprom.c        2017-04-14 14:56:36.021706193 +0200
++@@ -371,7 +371,7 @@
++                      /* FIXME: array overrun? */
++                      for (i = 0; i < numXpdGains; i++) {
++                              minPwrT4[i] = data_9287[idxL].pwrPdg[i][0];
++-                             maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];
+++                             maxPwrT4[i] = data_9287[idxL].pwrPdg[i][intercepts - 1];
++                              ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
++                                              data_9287[idxL].pwrPdg[i],
++                                              data_9287[idxL].vpdPdg[i],
++@@ -381,7 +381,7 @@
++              } else if (eeprom_4k) {
++                      for (i = 0; i < numXpdGains; i++) {
++                              minPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
++-                             maxPwrT4[i] = data_4k[idxL].pwrPdg[i][4];
+++                             maxPwrT4[i] = data_4k[idxL].pwrPdg[i][intercepts - 1];
++                              ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
++                                              data_4k[idxL].pwrPdg[i],
++                                              data_4k[idxL].vpdPdg[i],
++@@ -391,7 +391,7 @@
++              } else {
++                      for (i = 0; i < numXpdGains; i++) {
++                              minPwrT4[i] = data_def[idxL].pwrPdg[i][0];
++-                             maxPwrT4[i] = data_def[idxL].pwrPdg[i][4];
+++                             maxPwrT4[i] = data_def[idxL].pwrPdg[i][intercepts - 1];
++                              ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
++                                              data_def[idxL].pwrPdg[i],
++                                              data_def[idxL].vpdPdg[i],
+diff -urN xen-4.6.5/tools/firmware/etherboot/patches/have-strtok.patch xen-4.6.5.build/tools/firmware/etherboot/patches/have-strtok.patch
+--- xen-4.6.5/tools/firmware/etherboot/patches/have-strtok.patch       1970-01-01 01:00:00.000000000 +0100
++++ xen-4.6.5.build/tools/firmware/etherboot/patches/have-strtok.patch 2017-04-14 14:07:35.483912837 +0200
+@@ -0,0 +1,11 @@
++--- a/src/core/stringextra.c~ 2011-12-11 03:28:04.000000000 +0100
+++++ b/src/core/stringextra.c  2017-04-14 14:07:03.470188756 +0200
++@@ -174,7 +174,7 @@
++ }
++ #endif
++ 
++-#ifndef __HAVE_ARCH_STRTOK
+++#if 0
++ /**
++  * strtok - Split a string into tokens
++  * @s: The string to be searched
+diff -urN xen-4.6.5/tools/firmware/etherboot/patches/mucurses-fix.patch xen-4.6.5.build/tools/firmware/etherboot/patches/mucurses-fix.patch
+--- xen-4.6.5/tools/firmware/etherboot/patches/mucurses-fix.patch      1970-01-01 01:00:00.000000000 +0100
++++ xen-4.6.5.build/tools/firmware/etherboot/patches/mucurses-fix.patch        2017-04-14 14:59:46.177462840 +0200
+@@ -0,0 +1,48 @@
++--- a/src/hci/mucurses/windows.c~     2011-12-11 03:28:04.000000000 +0100
+++++ b/src/hci/mucurses/windows.c      2017-04-14 14:59:23.907179591 +0200
++@@ -16,9 +16,6 @@
++  * @ret rc   return status code
++  */
++ int delwin ( WINDOW *win ) {
++-     if ( win == NULL )
++-             return ERR;
++-
++      /* I think we should blank the region covered by the window -
++         ncurses doesn't do this, but they have a buffer, so they
++         may just be deleting from an offscreen context whereas we
++@@ -49,8 +46,6 @@
++ WINDOW *derwin ( WINDOW *parent, int nlines, int ncols,
++                               int begin_y, int begin_x ) {
++      WINDOW *child;
++-     if ( parent == NULL )
++-             return NULL;
++      if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL )
++              return NULL;
++      if ( ( (unsigned)ncols > parent->width ) || 
++@@ -73,8 +68,6 @@
++  */
++ WINDOW *dupwin ( WINDOW *orig ) {
++      WINDOW *copy;
++-     if ( orig == NULL )
++-             return NULL;
++      if ( ( copy = malloc( sizeof( WINDOW ) ) ) == NULL )
++              return NULL;
++      copy->scr = orig->scr;
++@@ -97,8 +90,6 @@
++  * @ret rc   return status code
++  */
++ int mvwin ( WINDOW *win, int y, int x ) {
++-     if ( win == NULL )
++-             return ERR;
++      if ( ( ( (unsigned)y + win->height ) > LINES ) ||
++           ( ( (unsigned)x + win->width ) > COLS ) )
++              return ERR;
++@@ -147,8 +138,6 @@
++ WINDOW *subwin ( WINDOW *parent, int nlines, int ncols,
++                               int begin_y, int begin_x ) {
++      WINDOW *child;
++-     if ( parent == NULL )
++-             return NULL;
++      if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL )
++              return NULL;
++      child = newwin( nlines, ncols, begin_y, begin_x );
+diff -urN xen-4.6.5/tools/firmware/etherboot/patches/series xen-4.6.5.build/tools/firmware/etherboot/patches/series
+--- xen-4.6.5/tools/firmware/etherboot/patches/series  2017-03-07 17:19:05.000000000 +0100
++++ xen-4.6.5.build/tools/firmware/etherboot/patches/series    2017-04-14 14:59:51.384195712 +0200
+@@ -4,3 +4,7 @@
+ build_fix_3.patch
+ build-compare.patch
+ build_fix_4.patch
++have-strtok.patch
++unused-variable.patch
++drivers-fixes.patch
++mucurses-fix.patch
+diff -urN xen-4.6.5/tools/firmware/etherboot/patches/unused-variable.patch xen-4.6.5.build/tools/firmware/etherboot/patches/unused-variable.patch
+--- xen-4.6.5/tools/firmware/etherboot/patches/unused-variable.patch   1970-01-01 01:00:00.000000000 +0100
++++ xen-4.6.5.build/tools/firmware/etherboot/patches/unused-variable.patch     2017-04-14 14:15:17.032883274 +0200
+@@ -0,0 +1,12 @@
++--- a/src/include/nic.h~      2017-04-14 14:13:09.000000000 +0200
+++++ b/src/include/nic.h       2017-04-14 14:13:37.061661840 +0200
++@@ -199,7 +199,8 @@
++ 
++ #undef DRIVER
++ #define DRIVER(_name_text,_unused2,_unused3,_name,_probe,_disable)     \
++-     static const char _name ## _text[] = _name_text;                  \
+++     static  __attribute__ (( unused )) const char                     \
+++     _name ## _text[] = _name_text;                                    \
++      static inline int                                                 \
++      _name ## _probe ( struct nic *nic, void *hwdev ) {                \
++              return _probe ( nic, hwdev );                             \
diff --git a/sysmacros.patch b/sysmacros.patch
new file mode 100644 (file)
index 0000000..fec468b
--- /dev/null
@@ -0,0 +1,22 @@
+diff -urN xen-4.6.5/tools/blktap2/control/tap-ctl-allocate.c xen-4.6.5.build/tools/blktap2/control/tap-ctl-allocate.c
+--- xen-4.6.5/tools/blktap2/control/tap-ctl-allocate.c 2017-03-07 17:19:05.000000000 +0100
++++ xen-4.6.5.build/tools/blktap2/control/tap-ctl-allocate.c   2017-04-14 15:01:13.935244471 +0200
+@@ -36,6 +36,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
++#include <sys/sysmacros.h>
+ #include <linux/major.h>
+ #include "tap-ctl.h"
+diff -urN xen-4.6.5/tools/libxl/libxl_internal.h xen-4.6.5.build/tools/libxl/libxl_internal.h
+--- xen-4.6.5/tools/libxl/libxl_internal.h     2017-03-07 17:19:05.000000000 +0100
++++ xen-4.6.5.build/tools/libxl/libxl_internal.h       2017-04-14 15:05:55.088806418 +0200
+@@ -37,6 +37,7 @@
+ #include <unistd.h>
+ #include <ctype.h>
++#include <sys/sysmacros.h>
+ #include <sys/mman.h>
+ #include <sys/poll.h>
+ #include <sys/select.h>
diff --git a/unused-function.patch b/unused-function.patch
new file mode 100644 (file)
index 0000000..a114331
--- /dev/null
@@ -0,0 +1,20 @@
+--- xen-4.6.5/tools/xentrace/xenalyze.c~       2017-04-14 13:49:33.000000000 +0200
++++ xen-4.6.5/tools/xentrace/xenalyze.c        2017-04-14 13:53:51.117184985 +0200
+@@ -4128,7 +4128,7 @@
+     struct cr3_value_struct *p;
+     struct cr3_value_struct **qsort_array;
+     int i, N=0;
+-
++#if 0
+     int cr3_compare_total(const void *_a, const void *_b) {
+         struct cr3_value_struct *a=*(typeof(&a))_a;
+         struct cr3_value_struct *b=*(typeof(&a))_b;
+@@ -4145,7 +4145,7 @@
+         } else
+             return -1;
+     }
+-
++#endif
+     int cr3_compare_start(const void *_a, const void *_b) {
+         struct cr3_value_struct *a=*(typeof(&a))_a;
+         struct cr3_value_struct *b=*(typeof(&a))_b;
diff --git a/xen-gnutls-3.4.patch b/xen-gnutls-3.4.patch
deleted file mode 100644 (file)
index 9d2ed16..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- ./tools/qemu-xen-traditional/vnc.c.orig
-+++ ./tools/qemu-xen-traditional/vnc.c
-@@ -2137,10 +2137,6 @@
- static int vnc_start_tls(struct VncState *vs) {
--    static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 };
--    static const int protocol_priority[]= { GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 };
--    static const int kx_anon[] = {GNUTLS_KX_ANON_DH, 0};
--    static const int kx_x509[] = {GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0};
-     VNC_DEBUG("Do TLS setup\n");
-     if (vnc_tls_initialize() < 0) {
-@@ -2161,21 +2157,7 @@
-           return -1;
-       }
--      if (gnutls_kx_set_priority(vs->tls_session, NEED_X509_AUTH(vs) ? kx_x509 : kx_anon) < 0) {
--          gnutls_deinit(vs->tls_session);
--          vs->tls_session = NULL;
--          vnc_client_error(vs);
--          return -1;
--      }
--
--      if (gnutls_certificate_type_set_priority(vs->tls_session, cert_type_priority) < 0) {
--          gnutls_deinit(vs->tls_session);
--          vs->tls_session = NULL;
--          vnc_client_error(vs);
--          return -1;
--      }
--
--      if (gnutls_protocol_set_priority(vs->tls_session, protocol_priority) < 0) {
-+      if (gnutls_priority_set_direct(vs->tls_session, NEED_X509_AUTH(vs) ? "NORMAL" : "NORMAL:+ANON-DH", NULL) < 0) {
-           gnutls_deinit(vs->tls_session);
-           vs->tls_session = NULL;
-           vnc_client_error(vs);
diff --git a/xen-grep-typo.patch b/xen-grep-typo.patch
deleted file mode 100644 (file)
index 0ceb663..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-commit 3f293c7caaefc2c37b61e44e8ebd5a7f1c554afb
-Author: Dario Faggioli <dario.faggioli@citrix.com>
-Date:   Thu Feb 25 13:03:04 2016 +0100
-
-    public: typo: use ' as apostrophe in grant_table.h
-    
-    If grep 2.23 is installed, build fails like this:
-    ...
-    mkdir -p compat
-    grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' public/grant_table.h | \
-    python /home/SOURCES/xen/xen/xen.git/xen/tools/compat-build-source.py >compat/grant_table.c.new
-    mv -f compat/grant_table.c.new compat/grant_table.c
-    gcc  ... -o compat/grant_table.i compat/grant_table.c
-    compat/grant_table.c:33:1: error: unterminated comment
-     /*
-     ^
-    compat/grant_table.c:28:0: error: unterminated #ifndef
-     #ifndef __XEN_PUBLIC_GRANT_TABLE_H__
-     ^
-    Makefile:62: recipe for target 'compat/grant_table.i' failed
-    make[3]: *** [compat/grant_table.i] Error 1
-    rm compat/grant_table.c
-    make[3]: Leaving directory '/home/SOURCES/xen/xen/xen.git/xen/include'
-    ...
-    
-    This is because grant_table.h contains this (note the
-    apostrophe): "granter\92s memory", and `grep -v', in version
-    2.23, stops processing the file (while, for instance,
-    until 2.22, this was not happening).
-    
-    Although the above behavior is likely an issue in grep,
-    (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22461)
-    I think we better switch to using " ' " in that line
-    anyway, as we do basically everywhere else (even in
-    the same file).
-    
-    Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
-
-diff --git a/xen/include/public/grant_table.h b/xen/include/public/grant_table.h
-index e9393fd..e5f04ec 100644
---- a/xen/include/public/grant_table.h
-+++ b/xen/include/public/grant_table.h
-@@ -43,7 +43,7 @@
-  * table are identified by grant references. A grant reference is an
-  * integer, which indexes into the grant table. It acts as a
-  * capability which the grantee can use to perform operations on the
-- * granter’s memory.
-+ * granter's memory.
-  *
-  * This capability-based system allows shared-memory communications
-  * between unprivileged domains. A grant reference also encapsulates
index ad6fecfaa0d4d838a644ff3cea470eba2d6f9959..2cab02777771cb8464a19dd9e7f9cb553fe5c565 100644 (file)
--- a/xen.spec
+++ b/xen.spec
 Summary:       Xen - a virtual machine monitor
 Summary(pl.UTF-8):     Xen - monitor maszyny wirtualnej
 Name:          xen
-Version:       4.6.1
+Version:       4.6.5
 Release:       1
 License:       GPL v2, interface parts on BSD-like
 Group:         Applications/System
 Source0:       http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: df2d854c3c90ffeefaf71e7f868fb326
+# Source0-md5: 63c80317ee662fb237d709d6c4e161c8
 # used by stubdoms
 Source10:      %{xen_extfiles_url}/lwip-1.3.0.tar.gz
 # Source10-md5:        36cc57650cffda9a0269493be2a169bb
@@ -95,12 +95,14 @@ Patch15:    odd-glib2-fix.patch
 Patch16:       %{name}-gmp-abi.patch
 Patch18:       %{name}-make.patch
 Patch19:       %{name}-no_Werror.patch
-# http://git.alpinelinux.org/cgit/aports/plain/main/xen/gnutls-3.4.0.patch
-Patch20:       %{name}-gnutls-3.4.patch
-Patch21:       %{name}-grep-typo.patch
 Patch22:       %{name}-stubdom-build.patch
 Patch23:       link.patch
 Patch24:       %{name}-systemd.patch
+Patch25:       fix-misleading-indentation.patch
+Patch26:       deprecated-readdir_r.patch
+Patch27:       ipxe-build.patch
+Patch28:       sysmacros.patch
+Patch29:       unused-function.patch
 URL:           http://www.xen.org/products/xenhyp.html
 BuildRequires: autoconf >= 2.67
 %ifarch %{ix86} %{x8664}
@@ -395,11 +397,14 @@ Nadzorca Xen w postaci, która może być uruchomiona wprost z firmware
 %patch16 -p1
 %patch18 -p1
 %patch19 -p1
-%patch20 -p1
-%patch21 -p1
 %patch22 -p1
 %patch23 -p1
 %patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
 
 # stubdom sources
 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
This page took 0.203925 seconds and 4 git commands to generate.