This is a note to let you know that I've just added the patch titled [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit to the 3.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: i2o-hide-unsafe-ioctl-on-64-bit.patch and it can be found in the queue-3.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From arnd@xxxxxxxx Fri May 5 13:07:16 2017 From: Arnd Bergmann <arnd@xxxxxxxx> Date: Fri, 5 May 2017 21:46:49 +0200 Subject: [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit To: Ben Hutchings <ben@xxxxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx, Arnd Bergmann <arnd@xxxxxxxx> Message-ID: <20170505194745.3627137-32-arnd@xxxxxxxx> From: Arnd Bergmann <arnd@xxxxxxxx> We get a warning about a broken pointer conversion on 64-bit architectures: drivers/message/i2o/i2o_config.c: In function 'i2o_cfg_passthru': drivers/message/i2o/i2o_config.c:893:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] (p->virt, (void __user *)sg[i].addr_bus, ^ drivers/message/i2o/i2o_config.c:953:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] ((void __user *)sg[j].addr_bus, sg_list[j].virt, ^ This has clearly never worked right, so we can add an #ifdef around the code. The driver was moved to staging in linux-4.0 and finally removed in 4.2, so upstream does not have a fix for it. The driver originally got this mostly right, though probably by accident. Fixes: f4c2c15b930b ("[PATCH] Convert i2o to compat_ioctl") Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/message/i2o/i2o_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c @@ -772,7 +772,7 @@ static long i2o_cfg_compat_ioctl(struct #endif -#ifdef CONFIG_I2O_EXT_ADAPTEC +#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT) static int i2o_cfg_passthru(unsigned long arg) { struct i2o_cmd_passthru __user *cmd = @@ -1045,7 +1045,7 @@ static long i2o_cfg_ioctl(struct file *f ret = i2o_cfg_evt_get(arg, fp); break; -#ifdef CONFIG_I2O_EXT_ADAPTEC +#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT) case I2OPASSTHRU: ret = i2o_cfg_passthru(arg); break; Patches currently in stable-queue which might be from arnd@xxxxxxxx are queue-3.18/ib-iser-fix-sparse-warnings.patch queue-3.18/i2o-hide-unsafe-ioctl-on-64-bit.patch queue-3.18/cred-userns-define-current_user_ns-as-a-function.patch queue-3.18/mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch queue-3.18/pci-xilinx-fix-harmless-format-string-warning.patch queue-3.18/arm64-build-vdso-without-libgcov.patch queue-3.18/arm64-provide-a-namespace-to-ncaps.patch queue-3.18/alsa-ppc-awacs-shut-up-maybe-uninitialized-warning.patch queue-3.18/mips-jz4740-fix-build-error-in-irq.h.patch queue-3.18/modpost-don-t-emit-section-mismatch-warnings-for-compiler-optimizations.patch queue-3.18/net-tg3-avoid-uninitialized-variable-warning.patch queue-3.18/tty-isicom-fix-big-endian-compile-warning.patch queue-3.18/mtd-avoid-stack-overflow-in-mtd-cfi-code.patch queue-3.18/cpumask_set_cpu_local_first-cpumask_local_spread-lament.patch queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch queue-3.18/modpost-expand-pattern-matching-to-support-substring-matches.patch queue-3.18/ips-remove-pointless-warning.patch queue-3.18/powerpc-ptrace-fix-out-of-bounds-array-access-warning.patch queue-3.18/scsi-advansys-remove-warning-message.patch queue-3.18/staging-imx-drm-fix-indentation-warning.patch queue-3.18/mlx5-avoid-build-warnings-on-32-bit.patch queue-3.18/mm-cma-silence-warnings-due-to-max-usage.patch queue-3.18/misdn-avoid-arch-specific-__builtin_return_address-call.patch queue-3.18/staging-bcm-add-32-bit-host-dependency.patch queue-3.18/e1000e-fix-call-to-do_div-to-use-u64-arg.patch queue-3.18/gfs2-remove-is_err_value-abuse.patch queue-3.18/staging-vt6655-fix-overly-large-stack-usage.patch queue-3.18/drbd-avoid-redefinition-of-bits_per_page.patch queue-3.18/infiniband-mlx5-avoid-a-compile-time-warning.patch queue-3.18/kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch queue-3.18/mips-elf2ecoff-fix-warning-due-to-dead-code.patch queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch