[alsa-devel] [BACKPORT 4.4.y 00/25] candidates from spreadtrum 4.4 product kernel
I took a scripted approach to look at some product kernels for patches backported into vendor kernels. This is a set of (mostly) bugfixes I found in Spreadtrum's linux-4.4 kernel that are missing in 4.4.176:
ffedbd2210f2 mmc: pwrseq: constify mmc_pwrseq_ops structures c10368897e10 ALSA: compress: add support for 32bit calls in a 64bit kernel 64a67d4762ce mmc: pwrseq_simple: Make reset-gpios optional to match doc 4ec0ef3a8212 USB: iowarrior: fix oops with malicious USB descriptors e5905ff1281f mmc: debugfs: Add a restriction to mmc debugfs clock setting 4ec96b4cbde8 mmc: make MAN_BKOPS_EN message a debug ed9feec72fc1 mmc: sanitize 'bus width' in debug output 10a16a01d8f7 mmc: core: shut up "voltage-ranges unspecified" pr_info() 9772b47a4c29 usb: dwc3: gadget: Fix suspend/resume during device mode 6afedcd23cfd arm64: mm: Add trace_irqflags annotations to do_debug_exception() 437db4c6e798 mmc: mmc: Attempt to flush cache before reset e51534c80660 mmc: core: fix using wrong io voltage if mmc_select_hs200 fails e4c5800a3991 mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON 04c080080855 extcon: usb-gpio: Don't miss event during suspend/resume 78283edf2c01 kbuild: setlocalversion: print error to STDERR c526c62d565e usb: gadget: composite: fix dereference after null check coverify warning 511a36d2f357 usb: gadget: Add the gserial port checking in gs_start_tx() 1712c9373f98 mmc: core: don't try to switch block size for dual rate mode 5ea8ea2cb7f1 tcp/dccp: drop SYN packets if accept queue is full e1dc9b08051a serial: sprd: adjust TIMEOUT to a big value 81be24d263db Hang/soft lockup in d_invalidate with simultaneous calls 6f44a0bacb79 arm64: traps: disable irq in die() b7d44c36a6f6 usb: renesas_usbhs: gadget: fix unused-but-set-variable warning 4350782570b9 serial: sprd: clear timeout interrupt only rather than all interrupts 3f3295709ede lib/int_sqrt: optimize small argument 32fd87b3bbf5 USB: core: only clean up what we allocated
Al Viro (1): Hang/soft lockup in d_invalidate with simultaneous calls
Andrey Konovalov (1): USB: core: only clean up what we allocated
Baolin Wang (1): usb: gadget: Add the gserial port checking in gs_start_tx()
Chuanxiao Dong (1): mmc: debugfs: Add a restriction to mmc debugfs clock setting
Dong Aisheng (1): mmc: core: fix using wrong io voltage if mmc_select_hs200 fails
Eric Dumazet (1): tcp/dccp: drop SYN packets if accept queue is full
James Morse (1): arm64: mm: Add trace_irqflags annotations to do_debug_exception()
Josh Boyer (1): USB: iowarrior: fix oops with malicious USB descriptors
Julia Lawall (1): mmc: pwrseq: constify mmc_pwrseq_ops structures
Konstantin Khlebnikov (1): mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON
Lanqing Liu (1): serial: sprd: clear timeout interrupt only rather than all interrupts
Martin Fuzzey (1): mmc: pwrseq_simple: Make reset-gpios optional to match doc
Peter Chen (1): usb: gadget: composite: fix dereference after null check coverify warning
Peter Zijlstra (1): lib/int_sqrt: optimize small argument
Qiao Zhou (1): arm64: traps: disable irq in die()
Ravindra Lokhande (1): ALSA: compress: add support for 32bit calls in a 64bit kernel
Roger Quadros (2): usb: dwc3: gadget: Fix suspend/resume during device mode extcon: usb-gpio: Don't miss event during suspend/resume
Russell King (1): mmc: core: shut up "voltage-ranges unspecified" pr_info()
Wei Qiao (1): serial: sprd: adjust TIMEOUT to a big value
Wolfram Sang (3): mmc: make MAN_BKOPS_EN message a debug mmc: sanitize 'bus width' in debug output kbuild: setlocalversion: print error to STDERR
Yoshihiro Shimoda (1): usb: renesas_usbhs: gadget: fix unused-but-set-variable warning
Ziyuan Xu (1): mmc: core: don't try to switch block size for dual rate mode
arch/arm64/kernel/traps.c | 8 +++++-- arch/arm64/mm/fault.c | 33 ++++++++++++++++++-------- drivers/extcon/extcon-usb-gpio.c | 3 +++ drivers/mmc/core/core.c | 13 ++++++---- drivers/mmc/core/debugfs.c | 2 +- drivers/mmc/core/mmc.c | 16 +++++++++---- drivers/mmc/core/pwrseq.h | 2 +- drivers/mmc/core/pwrseq_emmc.c | 2 +- drivers/mmc/core/pwrseq_simple.c | 24 ++++++++++++------- drivers/tty/serial/sprd_serial.c | 6 +++-- drivers/usb/core/config.c | 9 ++++--- drivers/usb/dwc3/gadget.c | 6 +++++ drivers/usb/gadget/composite.c | 2 ++ drivers/usb/gadget/function/u_serial.c | 7 +++++- drivers/usb/misc/iowarrior.c | 6 +++++ drivers/usb/renesas_usbhs/mod_gadget.c | 5 +--- fs/dcache.c | 10 ++++---- include/net/inet_connection_sock.h | 5 ---- lib/int_sqrt.c | 3 +++ mm/rmap.c | 2 +- net/dccp/ipv4.c | 8 +------ net/dccp/ipv6.c | 2 +- net/ipv4/tcp_input.c | 8 +------ scripts/setlocalversion | 2 +- sound/core/compress_offload.c | 13 ++++++++++ 25 files changed, 126 insertions(+), 71 deletions(-)
From: Ravindra Lokhande rlokhande@nvidia.com
Compress offload does not support ioctl calls from a 32bit userspace in a 64 bit kernel. This patch adds support for ioctls from a 32bit userspace in a 64bit kernel
Signed-off-by: Ravindra Lokhande rlokhande@nvidia.com Acked-by: Vinod Koul vinod.koul@intel.com Signed-off-by: Takashi Iwai tiwai@suse.de (cherry picked from commit c10368897e104c008c610915a218f0fe5fa4ec96) Signed-off-by: Arnd Bergmann arnd@arndb.de --- sound/core/compress_offload.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 6163bf3e8177..33d40d6fa3f1 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -38,6 +38,7 @@ #include <linux/uio.h> #include <linux/uaccess.h> #include <linux/module.h> +#include <linux/compat.h> #include <sound/core.h> #include <sound/initval.h> #include <sound/compress_params.h> @@ -858,6 +859,15 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg) return retval; }
+/* support of 32bit userspace on 64bit platforms */ +#ifdef CONFIG_COMPAT +static long snd_compr_ioctl_compat(struct file *file, unsigned int cmd, + unsigned long arg) +{ + return snd_compr_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); +} +#endif + static const struct file_operations snd_compr_file_ops = { .owner = THIS_MODULE, .open = snd_compr_open, @@ -865,6 +875,9 @@ static const struct file_operations snd_compr_file_ops = { .write = snd_compr_write, .read = snd_compr_read, .unlocked_ioctl = snd_compr_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = snd_compr_ioctl_compat, +#endif .mmap = snd_compr_mmap, .poll = snd_compr_poll, };
On Fri, Mar 22, 2019 at 04:43:53PM +0100, Arnd Bergmann wrote:
From: Ravindra Lokhande rlokhande@nvidia.com
Compress offload does not support ioctl calls from a 32bit userspace in a 64 bit kernel. This patch adds support for ioctls from a 32bit userspace in a 64bit kernel
Signed-off-by: Ravindra Lokhande rlokhande@nvidia.com Acked-by: Vinod Koul vinod.koul@intel.com Signed-off-by: Takashi Iwai tiwai@suse.de (cherry picked from commit c10368897e104c008c610915a218f0fe5fa4ec96) Signed-off-by: Arnd Bergmann arnd@arndb.de
sound/core/compress_offload.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
How is this not a "new feature"? What bug does this fix? Has this ever worked in the past?
thanks,
greg k-h
On Tue, Mar 26, 2019 at 2:23 AM Greg KH gregkh@linuxfoundation.org wrote:
On Fri, Mar 22, 2019 at 04:43:53PM +0100, Arnd Bergmann wrote:
From: Ravindra Lokhande rlokhande@nvidia.com
Compress offload does not support ioctl calls from a 32bit userspace in a 64 bit kernel. This patch adds support for ioctls from a 32bit userspace in a 64bit kernel
Signed-off-by: Ravindra Lokhande rlokhande@nvidia.com Acked-by: Vinod Koul vinod.koul@intel.com Signed-off-by: Takashi Iwai tiwai@suse.de (cherry picked from commit c10368897e104c008c610915a218f0fe5fa4ec96) Signed-off-by: Arnd Bergmann arnd@arndb.de
sound/core/compress_offload.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
How is this not a "new feature"? What bug does this fix? Has this ever worked in the past?
It has never worked in the past, but I consider it a bug for the compat layer to behave differently from native code. In this case, any 32-bit application using the SNDRV_COMPRESS_* ioctls will just fail to do anything on a 64-bit kernel at all without the trivial fix that should have been there when the driver was originally merged.
Arnd
On Tue, Mar 26, 2019 at 08:55:14AM +0100, Arnd Bergmann wrote:
On Tue, Mar 26, 2019 at 2:23 AM Greg KH gregkh@linuxfoundation.org wrote:
On Fri, Mar 22, 2019 at 04:43:53PM +0100, Arnd Bergmann wrote:
From: Ravindra Lokhande rlokhande@nvidia.com
Compress offload does not support ioctl calls from a 32bit userspace in a 64 bit kernel. This patch adds support for ioctls from a 32bit userspace in a 64bit kernel
Signed-off-by: Ravindra Lokhande rlokhande@nvidia.com Acked-by: Vinod Koul vinod.koul@intel.com Signed-off-by: Takashi Iwai tiwai@suse.de (cherry picked from commit c10368897e104c008c610915a218f0fe5fa4ec96) Signed-off-by: Arnd Bergmann arnd@arndb.de
sound/core/compress_offload.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
How is this not a "new feature"? What bug does this fix? Has this ever worked in the past?
It has never worked in the past, but I consider it a bug for the compat layer to behave differently from native code. In this case, any 32-bit application using the SNDRV_COMPRESS_* ioctls will just fail to do anything on a 64-bit kernel at all without the trivial fix that should have been there when the driver was originally merged.
Ok, fair enough, now queued up.
greg k-h
On Fri, Mar 22, 2019 at 04:43:51PM +0100, Arnd Bergmann wrote:
I took a scripted approach to look at some product kernels for patches backported into vendor kernels. This is a set of (mostly) bugfixes I found in Spreadtrum's linux-4.4 kernel that are missing in 4.4.176:
ffedbd2210f2 mmc: pwrseq: constify mmc_pwrseq_ops structures c10368897e10 ALSA: compress: add support for 32bit calls in a 64bit kernel 64a67d4762ce mmc: pwrseq_simple: Make reset-gpios optional to match doc 4ec0ef3a8212 USB: iowarrior: fix oops with malicious USB descriptors e5905ff1281f mmc: debugfs: Add a restriction to mmc debugfs clock setting 4ec96b4cbde8 mmc: make MAN_BKOPS_EN message a debug ed9feec72fc1 mmc: sanitize 'bus width' in debug output 10a16a01d8f7 mmc: core: shut up "voltage-ranges unspecified" pr_info() 9772b47a4c29 usb: dwc3: gadget: Fix suspend/resume during device mode 6afedcd23cfd arm64: mm: Add trace_irqflags annotations to do_debug_exception() 437db4c6e798 mmc: mmc: Attempt to flush cache before reset e51534c80660 mmc: core: fix using wrong io voltage if mmc_select_hs200 fails e4c5800a3991 mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON 04c080080855 extcon: usb-gpio: Don't miss event during suspend/resume 78283edf2c01 kbuild: setlocalversion: print error to STDERR c526c62d565e usb: gadget: composite: fix dereference after null check coverify warning 511a36d2f357 usb: gadget: Add the gserial port checking in gs_start_tx() 1712c9373f98 mmc: core: don't try to switch block size for dual rate mode 5ea8ea2cb7f1 tcp/dccp: drop SYN packets if accept queue is full e1dc9b08051a serial: sprd: adjust TIMEOUT to a big value 81be24d263db Hang/soft lockup in d_invalidate with simultaneous calls 6f44a0bacb79 arm64: traps: disable irq in die() b7d44c36a6f6 usb: renesas_usbhs: gadget: fix unused-but-set-variable warning 4350782570b9 serial: sprd: clear timeout interrupt only rather than all interrupts 3f3295709ede lib/int_sqrt: optimize small argument 32fd87b3bbf5 USB: core: only clean up what we allocated
All now queued up, except for the exceptions I have responded to.
thanks,
greg k-h
participants (3)
-
Arnd Bergmann
-
Greg KH
-
Greg KH