]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2014 05:58:31 +0000 (22:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2014 05:58:31 +0000 (22:58 -0700)
added patches:
asoc-wm8962-update-register-class_d_control_1-to-be-non-volatile.patch
x86-64-modify_ldt-make-support-for-16-bit-segments-a-runtime-option.patch

queue-3.4/asoc-wm8962-update-register-class_d_control_1-to-be-non-volatile.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/x86-64-modify_ldt-make-support-for-16-bit-segments-a-runtime-option.patch [new file with mode: 0644]

diff --git a/queue-3.4/asoc-wm8962-update-register-class_d_control_1-to-be-non-volatile.patch b/queue-3.4/asoc-wm8962-update-register-class_d_control_1-to-be-non-volatile.patch
new file mode 100644 (file)
index 0000000..e3d92a1
--- /dev/null
@@ -0,0 +1,86 @@
+From 44330ab516c15dda8a1e660eeaf0003f84e43e3f Mon Sep 17 00:00:00 2001
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Date: Tue, 13 May 2014 13:45:15 +0100
+Subject: ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile
+
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+
+commit 44330ab516c15dda8a1e660eeaf0003f84e43e3f upstream.
+
+The register CLASS_D_CONTROL_1 is marked as volatile because it contains
+a bit, DAC_MUTE, which is also mirrored in the ADC_DAC_CONTROL_1
+register. This causes problems for the "Speaker Switch" control, which
+will report an error if the CODEC is suspended because it relies on a
+volatile register.
+
+To resolve this issue mark CLASS_D_CONTROL_1 as non-volatile and
+manually keep the register cache in sync by updating both bits when
+changing the mute status.
+
+Reported-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Tested-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/wm8962.c |   15 ++++++++++++---
+ sound/soc/codecs/wm8962.h |    4 ++++
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+--- a/sound/soc/codecs/wm8962.c
++++ b/sound/soc/codecs/wm8962.c
+@@ -153,6 +153,7 @@ static struct reg_default wm8962_reg[] =
+       { 40, 0x0000 },   /* R40    - SPKOUTL volume */
+       { 41, 0x0000 },   /* R41    - SPKOUTR volume */
++      { 49, 0x0010 },   /* R49    - Class D Control 1 */
+       { 51, 0x0003 },   /* R51    - Class D Control 2 */
+       { 56, 0x0506 },   /* R56    - Clocking 4 */
+@@ -794,7 +795,6 @@ static bool wm8962_volatile_register(str
+       case WM8962_ALC2:
+       case WM8962_THERMAL_SHUTDOWN_STATUS:
+       case WM8962_ADDITIONAL_CONTROL_4:
+-      case WM8962_CLASS_D_CONTROL_1:
+       case WM8962_DC_SERVO_6:
+       case WM8962_INTERRUPT_STATUS_1:
+       case WM8962_INTERRUPT_STATUS_2:
+@@ -2888,13 +2888,22 @@ static int wm8962_set_fll(struct snd_soc
+ static int wm8962_mute(struct snd_soc_dai *dai, int mute)
+ {
+       struct snd_soc_codec *codec = dai->codec;
+-      int val;
++      int val, ret;
+       if (mute)
+-              val = WM8962_DAC_MUTE;
++              val = WM8962_DAC_MUTE | WM8962_DAC_MUTE_ALT;
+       else
+               val = 0;
++      /**
++       * The DAC mute bit is mirrored in two registers, update both to keep
++       * the register cache consistent.
++       */
++      ret = snd_soc_update_bits(codec, WM8962_CLASS_D_CONTROL_1,
++                                WM8962_DAC_MUTE_ALT, val);
++      if (ret < 0)
++              return ret;
++
+       return snd_soc_update_bits(codec, WM8962_ADC_DAC_CONTROL_1,
+                                  WM8962_DAC_MUTE, val);
+ }
+--- a/sound/soc/codecs/wm8962.h
++++ b/sound/soc/codecs/wm8962.h
+@@ -1954,6 +1954,10 @@
+ #define WM8962_SPKOUTL_ENA_MASK                 0x0040  /* SPKOUTL_ENA */
+ #define WM8962_SPKOUTL_ENA_SHIFT                     6  /* SPKOUTL_ENA */
+ #define WM8962_SPKOUTL_ENA_WIDTH                     1  /* SPKOUTL_ENA */
++#define WM8962_DAC_MUTE_ALT                     0x0010  /* DAC_MUTE */
++#define WM8962_DAC_MUTE_ALT_MASK                0x0010  /* DAC_MUTE */
++#define WM8962_DAC_MUTE_ALT_SHIFT                    4  /* DAC_MUTE */
++#define WM8962_DAC_MUTE_ALT_WIDTH                    1  /* DAC_MUTE */
+ #define WM8962_SPKOUTL_PGA_MUTE                 0x0002  /* SPKOUTL_PGA_MUTE */
+ #define WM8962_SPKOUTL_PGA_MUTE_MASK            0x0002  /* SPKOUTL_PGA_MUTE */
+ #define WM8962_SPKOUTL_PGA_MUTE_SHIFT                1  /* SPKOUTL_PGA_MUTE */
index 149c07e400fe1641f790974877d0ba37aac2f871..8d8ae587c3a45c983ef14216496402f564381790 100644 (file)
@@ -66,3 +66,5 @@ nfsd-call-set_acl-with-a-null-acl-structure-if-no-entries.patch
 nfsd4-warn-on-finding-lockowner-without-stateid-s.patch
 nfsd4-remove-lockowner-when-removing-lock-stateid.patch
 percpu-make-pcpu_alloc_chunk-use-pcpu_mem_free-instead-of-kfree.patch
+asoc-wm8962-update-register-class_d_control_1-to-be-non-volatile.patch
+x86-64-modify_ldt-make-support-for-16-bit-segments-a-runtime-option.patch
diff --git a/queue-3.4/x86-64-modify_ldt-make-support-for-16-bit-segments-a-runtime-option.patch b/queue-3.4/x86-64-modify_ldt-make-support-for-16-bit-segments-a-runtime-option.patch
new file mode 100644 (file)
index 0000000..6f87aca
--- /dev/null
@@ -0,0 +1,86 @@
+From fa81511bb0bbb2b1aace3695ce869da9762624ff Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Wed, 14 May 2014 16:33:54 -0700
+Subject: x86-64, modify_ldt: Make support for 16-bit segments a runtime option
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit fa81511bb0bbb2b1aace3695ce869da9762624ff upstream.
+
+Checkin:
+
+b3b42ac2cbae x86-64, modify_ldt: Ban 16-bit segments on 64-bit kernels
+
+disabled 16-bit segments on 64-bit kernels due to an information
+leak.  However, it does seem that people are genuinely using Wine to
+run old 16-bit Windows programs on Linux.
+
+A proper fix for this ("espfix64") is coming in the upcoming merge
+window, but as a temporary fix, create a sysctl to allow the
+administrator to re-enable support for 16-bit segments.
+
+It adds a "/proc/sys/abi/ldt16" sysctl that defaults to zero (off). If
+you hit this issue and care about your old Windows program more than
+you care about a kernel stack address information leak, you can do
+
+   echo 1 > /proc/sys/abi/ldt16
+
+as root (add it to your startup scripts), and you should be ok.
+
+The sysctl table is only added if you have COMPAT support enabled on
+x86-64, but I assume anybody who runs old windows binaries very much
+does that ;)
+
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Link: http://lkml.kernel.org/r/CA%2B55aFw9BPoD10U1LfHbOMpHWZkvJTkMcfCs9s3urPr1YyWBxw@mail.gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/ldt.c        |    4 +++-
+ arch/x86/vdso/vdso32-setup.c |    8 ++++++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/ldt.c
++++ b/arch/x86/kernel/ldt.c
+@@ -20,6 +20,8 @@
+ #include <asm/mmu_context.h>
+ #include <asm/syscalls.h>
++int sysctl_ldt16 = 0;
++
+ #ifdef CONFIG_SMP
+ static void flush_ldt(void *current_mm)
+ {
+@@ -234,7 +236,7 @@ static int write_ldt(void __user *ptr, u
+        * IRET leaking the high bits of the kernel stack address.
+        */
+ #ifdef CONFIG_X86_64
+-      if (!ldt_info.seg_32bit) {
++      if (!ldt_info.seg_32bit && !sysctl_ldt16) {
+               error = -EINVAL;
+               goto out_unlock;
+       }
+--- a/arch/x86/vdso/vdso32-setup.c
++++ b/arch/x86/vdso/vdso32-setup.c
+@@ -41,6 +41,7 @@ enum {
+ #ifdef CONFIG_X86_64
+ #define vdso_enabled                  sysctl_vsyscall32
+ #define arch_setup_additional_pages   syscall32_setup_pages
++extern int sysctl_ldt16;
+ #endif
+ /*
+@@ -379,6 +380,13 @@ static ctl_table abi_table2[] = {
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec
++      },
++      {
++              .procname       = "ldt16",
++              .data           = &sysctl_ldt16,
++              .maxlen         = sizeof(int),
++              .mode           = 0644,
++              .proc_handler   = proc_dointvec
+       },
+       {}
+ };