From fa372379e40a7c046ffc31825e0af9a723f88756a26cba8eeb37c72761f22d53 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 13 Jun 2012 08:19:32 +0000 Subject: [PATCH] - Add fix for bogus losetup ioctl to not warn us about it OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=80 --- ...-linux-user-ARM-Ignore-immediate-val.patch | 3 +- ...-use-libexecdir-instead-of-ignoring-.patch | 5 +- ...-linux-user-Ignore-broken-loop-ioctl.patch | 72 +++++++++++++++++++ qemu.changes | 5 ++ qemu.spec | 2 + 5 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 0023-linux-user-Ignore-broken-loop-ioctl.patch diff --git a/0019-linux-user-ARM-Ignore-immediate-val.patch b/0019-linux-user-ARM-Ignore-immediate-val.patch index 052a4b97..2cdbfe5c 100644 --- a/0019-linux-user-ARM-Ignore-immediate-val.patch +++ b/0019-linux-user-ARM-Ignore-immediate-val.patch @@ -1,8 +1,7 @@ From 8cc5120497695e7ea8dde9b096eb6c8cb9b6ac35 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 29 May 2012 17:28:07 +0200 -Subject: [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb - mode +Subject: [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb mode When running in thumb mode, Linux doesn't evaluate the immediate value of the svc instruction, but instead just always assumes the syscall number diff --git a/0022-use-libexecdir-instead-of-ignoring-.patch b/0022-use-libexecdir-instead-of-ignoring-.patch index 6ef17ae0..370a6b9f 100644 --- a/0022-use-libexecdir-instead-of-ignoring-.patch +++ b/0022-use-libexecdir-instead-of-ignoring-.patch @@ -1,10 +1,9 @@ From 57fd4d50146ef90693d569ee799f7e9e9d606e05 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Thu, 7 Jun 2012 01:11:00 +0400 -Subject: [PATCH] use --libexecdir instead of ignoring it first and - reinventing it later +Subject: [PATCH] use --libexecdir instead of ignoring it first and reinventing it later MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Commit 7b93fadf3a38d1ed65ea5536a52efc2772c6e3b8 "Add basic version diff --git a/0023-linux-user-Ignore-broken-loop-ioctl.patch b/0023-linux-user-Ignore-broken-loop-ioctl.patch new file mode 100644 index 00000000..1789f106 --- /dev/null +++ b/0023-linux-user-Ignore-broken-loop-ioctl.patch @@ -0,0 +1,72 @@ +From fa3ea9d74060806eb6fc0792483d41c3a684e2d0 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Tue, 12 Jun 2012 04:41:10 +0200 +Subject: [PATCH] linux-user: Ignore broken loop ioctl + +During invocations of losetup, we run into an ioctl that doesn't +exist. However, because of that we output an error, which then +screws up the kiwi logic around that call. + +So let's silently ignore that bogus ioctl. + +Signed-off-by: Alexander Graf +--- + linux-user/ioctls.h | 1 + + linux-user/linux_loop.h | 1 + + linux-user/syscall.c | 7 +++++++ + linux-user/syscall_defs.h | 1 + + 4 files changed, 10 insertions(+), 0 deletions(-) + +diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h +index e8c1c69..97c3f10 100644 +--- a/linux-user/ioctls.h ++++ b/linux-user/ioctls.h +@@ -328,6 +328,7 @@ + IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64))) + IOCTL(LOOP_GET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64))) + IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT) ++ IOCTL_SPECIAL(LOOP_BOGUS_CMD, 0, do_ioctl_fail, TYPE_INT) + + IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop))) + IOCTL(MTIOCGET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtget))) +diff --git a/linux-user/linux_loop.h b/linux-user/linux_loop.h +index 8974caa..810ae61 100644 +--- a/linux-user/linux_loop.h ++++ b/linux-user/linux_loop.h +@@ -91,5 +91,6 @@ struct loop_info64 { + #define LOOP_SET_STATUS64 0x4C04 + #define LOOP_GET_STATUS64 0x4C05 + #define LOOP_CHANGE_FD 0x4C06 ++#define LOOP_BOGUS_CMD 0x4C82 + + #endif +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 06408bd..46e964b 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -3580,6 +3580,13 @@ out: + return ret; + } + ++static abi_long do_ioctl_fail(const IOCTLEntry *ie, uint8_t *buf_temp, int fd, ++ abi_long cmd, abi_long arg) ++{ ++ /* Fail silently */ ++ return -EINVAL; ++} ++ + static IOCTLEntry ioctl_entries[] = { + #define IOCTL(cmd, access, ...) \ + { TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } }, +diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h +index be8760c..b76f64a 100644 +--- a/linux-user/syscall_defs.h ++++ b/linux-user/syscall_defs.h +@@ -968,6 +968,7 @@ struct target_pollfd { + #define TARGET_LOOP_SET_STATUS64 0x4C04 + #define TARGET_LOOP_GET_STATUS64 0x4C05 + #define TARGET_LOOP_CHANGE_FD 0x4C06 ++#define TARGET_LOOP_BOGUS_CMD 0x4C82 + + /* fb ioctls */ + #define TARGET_FBIOGET_VSCREENINFO 0x4600 diff --git a/qemu.changes b/qemu.changes index 312ab6e3..2ed7a5d5 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 13 08:19:01 UTC 2012 - agraf@suse.com + +- Add fix for bogus losetup ioctl to not warn us about it + ------------------------------------------------------------------- Sat Jun 9 19:09:39 UTC 2012 - brogers@suse.com diff --git a/qemu.spec b/qemu.spec index fcfb581e..1303f92e 100644 --- a/qemu.spec +++ b/qemu.spec @@ -46,6 +46,7 @@ Patch0019: 0019-linux-user-ARM-Ignore-immediate-val.patch Patch0020: 0020-linux-user-arm-no-tb_flush-on-reset.patch Patch0021: 0021-linux-user-fix-multi-threaded-proc-.patch Patch0022: 0022-use-libexecdir-instead-of-ignoring-.patch +Patch0023: 0023-linux-user-Ignore-broken-loop-ioctl.patch # this is to make lint happy Source300: rpmlintrc Source301: qemu-tools-rpmlintrc @@ -161,6 +162,7 @@ run cross-architecture builds. %patch0020 -p1 %patch0021 -p1 %patch0022 -p1 +%patch0023 -p1 %build # build QEMU