1 From 682a04488e7b3bd6c3448ab60599566eb7c6177a Mon Sep 17 00:00:00 2001
2 From: Ian Jackson <ian.jackson@eu.citrix.com>
3 Date: Fri, 14 Jun 2013 16:43:16 +0100
4 Subject: [PATCH 06/23] libelf: move include of <asm/guest_access.h> to top of file
6 libelf-loader.c #includes <asm/guest_access.h>, when being compiled
7 for Xen. Currently it does this in the middle of the file.
9 Move this #include to the top of the file, before libelf-private.h.
10 This is necessary because in forthcoming patches we will introduce
11 private #defines of memcpy etc. which would interfere with definitions
12 in headers #included from guest_access.h.
14 No semantic or functional change in this patch.
16 This is part of the fix to a security issue, XSA-55.
18 Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
19 Acked-by: Ian Campbell <ian.campbell@citrix.com>
20 Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
22 xen/common/libelf/libelf-loader.c | 5 ++++-
23 1 files changed, 4 insertions(+), 1 deletions(-)
25 diff --git a/xen/common/libelf/libelf-loader.c b/xen/common/libelf/libelf-loader.c
26 index 0559d88..ec0706b 100644
27 --- a/xen/common/libelf/libelf-loader.c
28 +++ b/xen/common/libelf/libelf-loader.c
30 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
34 +#include <asm/guest_access.h>
37 #include "libelf-private.h"
39 /* ------------------------------------------------------------------------ */
40 @@ -116,7 +120,6 @@ static int elf_load_image(struct elf_binary *elf,
44 -#include <asm/guest_access.h>
46 void elf_set_verbose(struct elf_binary *elf)