From: Greg Kroah-Hartman Date: Mon, 10 Jun 2013 21:28:02 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.82~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41db5983d309b9e86c39c33952ab10510d4294cf;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: drm-gma500-increase-max-resolution-for-mode-setting.patch ftrace-move-ftrace_filter_lseek-out-of-config_dynamic_ftrace-section.patch tracing-fix-possible-null-pointer-dereferences.patch usb-ftdi_sio-quiet-sparse-noise-about-using-plain-integer-was-null-pointer.patch xen-pciback-rate-limit-error-messages-from-xen_pcibk_enable_msi-x.patch --- diff --git a/queue-3.4/drm-gma500-increase-max-resolution-for-mode-setting.patch b/queue-3.4/drm-gma500-increase-max-resolution-for-mode-setting.patch new file mode 100644 index 00000000000..04d03792a53 --- /dev/null +++ b/queue-3.4/drm-gma500-increase-max-resolution-for-mode-setting.patch @@ -0,0 +1,35 @@ +From cbbd379aa43890f36da934f5af619d2fb8ec3d87 Mon Sep 17 00:00:00 2001 +From: Patrik Jakobsson +Date: Thu, 25 Apr 2013 22:23:36 +0200 +Subject: drm/gma500: Increase max resolution for mode setting + +From: Patrik Jakobsson + +commit cbbd379aa43890f36da934f5af619d2fb8ec3d87 upstream. + +By having a higher max resolution we can now set up a virtual +framebuffer that spans several monitors. 4096 should be ok since we're +gen 3 or higher and should be enough for most dual head setups. + +Bugzilla: +https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-modesetting/+bug/1169147 +Signed-off-by: Patrik Jakobsson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/gma500/framebuffer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/gma500/framebuffer.c ++++ b/drivers/gpu/drm/gma500/framebuffer.c +@@ -782,8 +782,8 @@ void psb_modeset_init(struct drm_device + for (i = 0; i < dev_priv->num_pipe; i++) + psb_intel_crtc_init(dev, i, mode_dev); + +- dev->mode_config.max_width = 2048; +- dev->mode_config.max_height = 2048; ++ dev->mode_config.max_width = 4096; ++ dev->mode_config.max_height = 4096; + + psb_setup_outputs(dev); + } diff --git a/queue-3.4/ftrace-move-ftrace_filter_lseek-out-of-config_dynamic_ftrace-section.patch b/queue-3.4/ftrace-move-ftrace_filter_lseek-out-of-config_dynamic_ftrace-section.patch new file mode 100644 index 00000000000..a7bd12e2d7d --- /dev/null +++ b/queue-3.4/ftrace-move-ftrace_filter_lseek-out-of-config_dynamic_ftrace-section.patch @@ -0,0 +1,97 @@ +From lizefan@huawei.com Mon Jun 10 14:15:51 2013 +From: Li Zefan +Date: Fri, 7 Jun 2013 17:02:08 +0800 +Subject: ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section +To: Greg Kroah-Hartman +Cc: Namhyung Kim , Steven Rostedt , Frederic Weisbecker , Ingo Molnar , LKML , stable +Message-ID: <51B1A190.4060409@huawei.com> + + +From: Steven Rostedt + +commit 7f49ef69db6bbf756c0abca7e9b65b32e999eec8 upstream. + +As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to +be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the +ftrace_pid_fops is defined when DYNAMIC_FTRACE is not. + +Signed-off-by: Steven Rostedt +Cc: Namhyung Kim +[ lizf: adjust context ] +Signed-off-by: Li Zefan +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/ftrace.h | 3 ++- + kernel/trace/ftrace.c | 28 ++++++++++++++-------------- + 2 files changed, 16 insertions(+), 15 deletions(-) + +--- a/include/linux/ftrace.h ++++ b/include/linux/ftrace.h +@@ -299,7 +299,6 @@ ssize_t ftrace_filter_write(struct file + size_t cnt, loff_t *ppos); + ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, + size_t cnt, loff_t *ppos); +-loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int origin); + int ftrace_regex_release(struct inode *inode, struct file *file); + + void __init +@@ -420,6 +419,8 @@ static inline int + ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } + #endif /* CONFIG_DYNAMIC_FTRACE */ + ++loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int whence); ++ + /* totally disable ftrace - can not re-enable after this */ + void ftrace_kill(void); + +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -999,6 +999,19 @@ static __init void ftrace_profile_debugf + + static struct pid * const ftrace_swapper_pid = &init_struct_pid; + ++loff_t ++ftrace_filter_lseek(struct file *file, loff_t offset, int whence) ++{ ++ loff_t ret; ++ ++ if (file->f_mode & FMODE_READ) ++ ret = seq_lseek(file, offset, whence); ++ else ++ file->f_pos = ret = 1; ++ ++ return ret; ++} ++ + #ifdef CONFIG_DYNAMIC_FTRACE + + #ifndef CONFIG_FTRACE_MCOUNT_RECORD +@@ -2541,7 +2554,7 @@ static void ftrace_filter_reset(struct f + * routine, you can use ftrace_filter_write() for the write + * routine if @flag has FTRACE_ITER_FILTER set, or + * ftrace_notrace_write() if @flag has FTRACE_ITER_NOTRACE set. +- * ftrace_regex_lseek() should be used as the lseek routine, and ++ * ftrace_filter_lseek() should be used as the lseek routine, and + * release must call ftrace_regex_release(). + */ + int +@@ -2625,19 +2638,6 @@ ftrace_notrace_open(struct inode *inode, + inode, file); + } + +-loff_t +-ftrace_filter_lseek(struct file *file, loff_t offset, int origin) +-{ +- loff_t ret; +- +- if (file->f_mode & FMODE_READ) +- ret = seq_lseek(file, offset, origin); +- else +- file->f_pos = ret = 1; +- +- return ret; +-} +- + static int ftrace_match(char *str, char *regex, int len, int type) + { + int matched = 0; diff --git a/queue-3.4/series b/queue-3.4/series index 1f337f59040..3e64c193f56 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -25,3 +25,8 @@ hwmon-adm1021-strengthen-chip-detection-for-adm1021-lm84-and-max1617.patch drm-fix-a-use-after-free-when-gpu-acceleration-disabled.patch drm-i915-sdvo-use-intel_sdvo-ddc-instead-of-intel_sdvo-i2c-for-ddc.patch drm-i915-no-lvds-quirk-for-hp-t5740.patch +xen-pciback-rate-limit-error-messages-from-xen_pcibk_enable_msi-x.patch +usb-ftdi_sio-quiet-sparse-noise-about-using-plain-integer-was-null-pointer.patch +drm-gma500-increase-max-resolution-for-mode-setting.patch +tracing-fix-possible-null-pointer-dereferences.patch +ftrace-move-ftrace_filter_lseek-out-of-config_dynamic_ftrace-section.patch diff --git a/queue-3.4/tracing-fix-possible-null-pointer-dereferences.patch b/queue-3.4/tracing-fix-possible-null-pointer-dereferences.patch new file mode 100644 index 00000000000..ab83554f92a --- /dev/null +++ b/queue-3.4/tracing-fix-possible-null-pointer-dereferences.patch @@ -0,0 +1,113 @@ +From lizefan@huawei.com Mon Jun 10 14:15:28 2013 +From: Namhyung Kim +Date: Fri, 7 Jun 2013 17:01:16 +0800 +Subject: tracing: Fix possible NULL pointer dereferences +To: Greg Kroah-Hartman +Cc: Namhyung Kim , Steven Rostedt , Frederic Weisbecker , Ingo Molnar , LKML , stable +Message-ID: <51B1A15C.5040108@huawei.com> + + +From: Namhyung Kim + +commit 6a76f8c0ab19f215af2a3442870eeb5f0e81998d upstream. + +Currently set_ftrace_pid and set_graph_function files use seq_lseek +for their fops. However seq_open() is called only for FMODE_READ in +the fops->open() so that if an user tries to seek one of those file +when she open it for writing, it sees NULL seq_file and then panic. + +It can be easily reproduced with following command: + + $ cd /sys/kernel/debug/tracing + $ echo 1234 | sudo tee -a set_ftrace_pid + +In this example, GNU coreutils' tee opens the file with fopen(, "a") +and then the fopen() internally calls lseek(). + +Link: +http://lkml.kernel.org/r/1365663302-2170-1-git-send-email-namhyung@kernel.org + +Signed-off-by: Namhyung Kim +Cc: Frederic Weisbecker +Cc: Ingo Molnar +Cc: Namhyung Kim +Signed-off-by: Steven Rostedt +[ lizf: adjust context ] +Signed-off-by: Li Zefan +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/ftrace.h | 2 +- + kernel/trace/ftrace.c | 10 +++++----- + kernel/trace/trace_stack.c | 2 +- + 3 files changed, 7 insertions(+), 7 deletions(-) + +--- a/include/linux/ftrace.h ++++ b/include/linux/ftrace.h +@@ -299,7 +299,7 @@ ssize_t ftrace_filter_write(struct file + size_t cnt, loff_t *ppos); + ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, + size_t cnt, loff_t *ppos); +-loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int origin); ++loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int origin); + int ftrace_regex_release(struct inode *inode, struct file *file); + + void __init +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -2626,7 +2626,7 @@ ftrace_notrace_open(struct inode *inode, + } + + loff_t +-ftrace_regex_lseek(struct file *file, loff_t offset, int origin) ++ftrace_filter_lseek(struct file *file, loff_t offset, int origin) + { + loff_t ret; + +@@ -3445,7 +3445,7 @@ static const struct file_operations ftra + .open = ftrace_filter_open, + .read = seq_read, + .write = ftrace_filter_write, +- .llseek = ftrace_regex_lseek, ++ .llseek = ftrace_filter_lseek, + .release = ftrace_regex_release, + }; + +@@ -3453,7 +3453,7 @@ static const struct file_operations ftra + .open = ftrace_notrace_open, + .read = seq_read, + .write = ftrace_notrace_write, +- .llseek = ftrace_regex_lseek, ++ .llseek = ftrace_filter_lseek, + .release = ftrace_regex_release, + }; + +@@ -3659,8 +3659,8 @@ static const struct file_operations ftra + .open = ftrace_graph_open, + .read = seq_read, + .write = ftrace_graph_write, ++ .llseek = ftrace_filter_lseek, + .release = ftrace_graph_release, +- .llseek = seq_lseek, + }; + #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ + +@@ -4261,7 +4261,7 @@ static const struct file_operations ftra + .open = ftrace_pid_open, + .write = ftrace_pid_write, + .read = seq_read, +- .llseek = seq_lseek, ++ .llseek = ftrace_filter_lseek, + .release = ftrace_pid_release, + }; + +--- a/kernel/trace/trace_stack.c ++++ b/kernel/trace/trace_stack.c +@@ -384,7 +384,7 @@ static const struct file_operations stac + .open = stack_trace_filter_open, + .read = seq_read, + .write = ftrace_filter_write, +- .llseek = ftrace_regex_lseek, ++ .llseek = ftrace_filter_lseek, + .release = ftrace_regex_release, + }; + diff --git a/queue-3.4/usb-ftdi_sio-quiet-sparse-noise-about-using-plain-integer-was-null-pointer.patch b/queue-3.4/usb-ftdi_sio-quiet-sparse-noise-about-using-plain-integer-was-null-pointer.patch new file mode 100644 index 00000000000..33a499fdc3a --- /dev/null +++ b/queue-3.4/usb-ftdi_sio-quiet-sparse-noise-about-using-plain-integer-was-null-pointer.patch @@ -0,0 +1,32 @@ +From a816e3113b63753c330ca4751ea1d208e93e3015 Mon Sep 17 00:00:00 2001 +From: Ying Xue +Date: Mon, 6 Aug 2012 17:46:37 +0800 +Subject: USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointer + +From: Ying Xue + +commit a816e3113b63753c330ca4751ea1d208e93e3015 upstream. + +Pointers should not be compared to plain integers. +Quiets the sparse warning: +warning: Using plain integer as NULL pointer + +Signed-off-by: Ying Xue +Cc: Lotfi Manseur +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -2173,7 +2173,7 @@ static void ftdi_set_termios(struct tty_ + + cflag = termios->c_cflag; + +- if (old_termios == 0) ++ if (!old_termios) + goto no_skip; + + if (old_termios->c_cflag == termios->c_cflag diff --git a/queue-3.4/xen-pciback-rate-limit-error-messages-from-xen_pcibk_enable_msi-x.patch b/queue-3.4/xen-pciback-rate-limit-error-messages-from-xen_pcibk_enable_msi-x.patch new file mode 100644 index 00000000000..75af0ec957d --- /dev/null +++ b/queue-3.4/xen-pciback-rate-limit-error-messages-from-xen_pcibk_enable_msi-x.patch @@ -0,0 +1,73 @@ +From 51ac8893a7a51b196501164e645583bf78138699 Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Wed, 6 Feb 2013 10:30:38 -0500 +Subject: xen-pciback: rate limit error messages from xen_pcibk_enable_msi{,x}() + +From: Jan Beulich + +commit 51ac8893a7a51b196501164e645583bf78138699 upstream. + +... as being guest triggerable (e.g. by invoking +XEN_PCI_OP_enable_msi{,x} on a device not being MSI/MSI-X capable). + +This is CVE-2013-0231 / XSA-43. + +Also make the two messages uniform in both their wording and severity. + +Signed-off-by: Jan Beulich +Acked-by: Ian Campbell +Reviewed-by: Konrad Rzeszutek Wilk +[stable tree: Added two extra #include files] +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/xen/xen-pciback/pciback_ops.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +--- a/drivers/xen/xen-pciback/pciback_ops.c ++++ b/drivers/xen/xen-pciback/pciback_ops.c +@@ -9,6 +9,8 @@ + #include + #include + #include "pciback.h" ++#include ++#include + + int verbose_request; + module_param(verbose_request, int, 0644); +@@ -136,7 +138,6 @@ int xen_pcibk_enable_msi(struct xen_pcib + struct pci_dev *dev, struct xen_pci_op *op) + { + struct xen_pcibk_dev_data *dev_data; +- int otherend = pdev->xdev->otherend_id; + int status; + + if (unlikely(verbose_request)) +@@ -145,8 +146,9 @@ int xen_pcibk_enable_msi(struct xen_pcib + status = pci_enable_msi(dev); + + if (status) { +- printk(KERN_ERR "error enable msi for guest %x status %x\n", +- otherend, status); ++ pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err %d\n", ++ pci_name(dev), pdev->xdev->otherend_id, ++ status); + op->value = 0; + return XEN_PCI_ERR_op_failed; + } +@@ -224,10 +226,10 @@ int xen_pcibk_enable_msix(struct xen_pci + pci_name(dev), i, + op->msix_entries[i].vector); + } +- } else { +- printk(KERN_WARNING DRV_NAME ": %s: failed to enable MSI-X: err %d!\n", +- pci_name(dev), result); +- } ++ } else ++ pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI-X for guest %u: err %d!\n", ++ pci_name(dev), pdev->xdev->otherend_id, ++ result); + kfree(entries); + + op->value = result;