[PATCH] uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS566 with usb-id 0bc2:a013

2014-12-08 Thread Hans de Goede
Like the JMicron JMS567 enclosures with the JMS566 choke on report-opcodes, so avoid it. Tested-and-reported-by: Takeo Nakayama javh...@gmx.com Cc: stable@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/unusual_uas.h | 7 +++ 1 file changed, 7

Re: [PATCH 1/4] mm/compaction: fix wrong order check in compact_finished()

2014-12-08 Thread Vlastimil Babka
On 12/08/2014 08:16 AM, Joonsoo Kim wrote: What we want to check here is whether there is highorder freepage in buddy list of other migratetype in order to steal it without fragmentation. But, current code just checks cc-order which means allocation request order. So, this is wrong. Without

[PATCH][request for stable inclusion][3.10.x]: ARM: sched_clock: Load cycle count after epoch stabilizes

2014-12-08 Thread xiaofeng.yan
This looks applicable to stable-3.10, which load cycle count after epoch stabilizes. The function was moved from arch/arm/kernel/sched_clock.c to kernel/time/sched_clock.c because of upgrading version. I rearrange this patch for fixing bug in stable-3.10. The commit id is

[PATCH] ARM: sched_clock: Load cycle count after epoch stabilizes

2014-12-08 Thread xiaofeng.yan
There is a small race between when the cycle count is read from the hardware and when the epoch stabilizes. Consider this scenario: CPU0 CPU1 cyc = read_sched_clock() cyc_to_sched_clock()

Re: [PATCH] ARM: sched_clock: Load cycle count after epoch stabilizes

2014-12-08 Thread xiaofeng.yan
On 2014/12/6 17:57, Russell King - ARM Linux wrote: On Fri, Dec 05, 2014 at 02:17:19PM -0800, Greg KH wrote: On Fri, Nov 28, 2014 at 02:18:58AM +, xiaofeng.yan wrote: From: Stephen Boyd sb...@codeaurora.org There is a small race between when the cycle count is read from the hardware and

[PATCH 3.14] mac80211: Fix regression that triggers a kernel BUG with CCMP

2014-12-08 Thread Johannes Berg
From: Johannes Berg johannes.b...@intel.com Upstream commit 4f031fa9f188b2b0641ac20087d9e16bcfb4e49d. Commit 7ec7c4a9a686c608315739ab6a2b0527a240883c (mac80211: port CCMP to cryptoapi's CCM driver) introduced a regression when decrypting empty packets (data_len == 0). This will lead to

Re: 3.12.33 - BUG xfrm_selector_match+0x25/0x2f6

2014-12-08 Thread Smart Weblications GmbH - Florian Wiessner
Hi Julian, Am 07.12.2014 19:27, schrieb Julian Anastasov: Hello, On Fri, 5 Dec 2014, Smart Weblications GmbH - Florian Wiessner wrote: thank you for the fast responses! I would like to test any patch for 3.12. I'm attaching a patch that avoids rerouting in IPVS for LOCAL_IN.

Re: [Intel-gfx] [PATCH] drm/i915: Don't complain about stolen conflicts on gen3

2014-12-08 Thread Jani Nikula
On Fri, 05 Dec 2014, Daniel Vetter dan...@ffwll.ch wrote: On Fri, Dec 05, 2014 at 10:30:47AM -0800, Jesse Barnes wrote: On Fri, 11 Apr 2014 15:55:17 +0200 Daniel Vetter daniel.vet...@ffwll.ch wrote: Apparently stuff works that way on those machines. I agree with Chris' concern that

Re: [PATCH] USB: xhci: Reset a halted endpoint immediately when we encounter a stall.

2014-12-08 Thread Mathias Nyman
On 05.12.2014 18:34, Felipe Balbi wrote: From: Mathias Nyman mathias.ny...@linux.intel.com commit 8e71a322fdb127814bcba423a512914ca5bc6cf5 upstream. If a device is halted and reuturns a STALL, then the halted endpoint needs to be cleared both on the host and device side. The host side

Re: FAILED: patch [PATCH] drm/radeon: sync all BOs involved in a CS v2 failed to apply to 3.17-stable tree

2014-12-08 Thread Christian König
As requested a version of the patch rebased on 3.17 is attached. Regards, Christian. Am 07.12.2014 um 07:09 schrieb gre...@linuxfoundation.org: The patch below does not apply to the 3.17-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email

Re: [PATCH v2] Btrfs: fix fs corruption on transaction abort if device supports discard

2014-12-08 Thread Chris Mason
On Sun, Dec 7, 2014 at 4:31 PM, Filipe Manana fdman...@suse.com wrote: When we abort a transaction we iterate over all the ranges marked as dirty in fs_info-freed_extents[0] and fs_info-freed_extents[1], clear them from those trees, add them back (unpin) to the free space caches and, if the fs

Re: FAILED: patch [PATCH] drm/radeon: sync all BOs involved in a CS v2 failed to apply to 3.17-stable tree

2014-12-08 Thread Christian König
As requested a version of the patch rebased on 3.17 is attached. Regards, Christian. Am 07.12.2014 um 07:09 schrieb gre...@linuxfoundation.org: The patch below does not apply to the 3.17-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email

Re: [PATCH v2] Btrfs: fix fs corruption on transaction abort if device supports discard

2014-12-08 Thread Filipe David Manana
On Mon, Dec 8, 2014 at 1:53 PM, Chris Mason c...@fb.com wrote: On Sun, Dec 7, 2014 at 4:31 PM, Filipe Manana fdman...@suse.com wrote: When we abort a transaction we iterate over all the ranges marked as dirty in fs_info-freed_extents[0] and fs_info-freed_extents[1], clear them from those

Re: [PATCH] x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit

2014-12-08 Thread Konrad Rzeszutek Wilk
On Fri, Dec 05, 2014 at 07:03:28PM -0800, Andy Lutomirski wrote: paravirt_enabled has the following effects: - Disables the F00F bug workaround warning. There is no F00F bug workaround any more because Linux's standard IDT handling already works around the F00F bug, but the warning

Re: [REVIEW PATCH 1/2] img-ir/hw: Avoid clearing filter for no-op protocol change

2014-12-08 Thread James Hogan
Hi Mauro, On 04/12/14 17:38, Mauro Carvalho Chehab wrote: Em Mon, 1 Dec 2014 12:55:09 + James Hogan james.ho...@imgtec.com escreveu: When the img-ir driver is asked to change protocol, if the chosen decoder is already loaded then don't call img_ir_set_decoder(), so as not to clear the

[REVIEW PATCH v2] rc-main: Re-apply filter for no-op protocol change

2014-12-08 Thread James Hogan
Since commit da6e162d6a46 ([media] rc-core: simplify sysfs code), when the IR protocol is set using the sysfs interface to the same set of protocols that are already set, store_protocols() does not refresh the scancode filter with the new protocol, even if it has already called the

Re: [PATCH v5] clocksource: arch_timer: Fix code to use physical timers when requested

2014-12-08 Thread Catalin Marinas
On Fri, Dec 05, 2014 at 10:41:04AM +, Yingjoe Chen wrote: On Sun, 2014-11-23 at 23:02 -0800, Sonny Rao wrote: This is a bug fix for using physical arch timers when the arch_timer_use_virtual boolean is false. It restores the arch_counter_get_cntpct() function after removal in

Re: [PATCH] x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 7:45 AM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Fri, Dec 05, 2014 at 07:03:28PM -0800, Andy Lutomirski wrote: paravirt_enabled has the following effects: - Disables the F00F bug workaround warning. There is no F00F bug workaround any more because

Re: [PATCH 3.12 00/66] 3.12.35-stable review

2014-12-08 Thread Shuah Khan
On 12/06/2014 08:07 AM, Jiri Slaby wrote: This is the start of the stable review cycle for the 3.12.35 release. There are 66 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made

Re: [PATCH] ideapad_laptop: Lenovo G50-30 fix rfkill always reports wireless blocked

2014-12-08 Thread Dmitry Tunin
Is anything wrong with this patch? It was made against last mainline kernel at the moment. If a patch against linux-next needed, I can make it. Without this patch wireless is always blocked. Regards, Dmitry. 27.11.2014 19:39, Dmitry Tunin пишет: Rfkill always shows wireless blocked unless

[PATCH 2/2] x86 tlb: fix tracepoint nr_pages calculation

2014-12-08 Thread Dave Hansen
From: Dave Hansen dave.han...@linux.intel.com We calculate nr_pages with f-flush_end and f-flush_start, both of which are virtual addresses. However, we only divide f-flush_start by PAGE_SIZE, and missed f-flush_end. This patch adds some parenthesis to catch f-flush_end as well. nr_pages is

[PATCH 1/2] x86 tlb: fix overflow of flush_end in remote tlb flush

2014-12-08 Thread Dave Hansen
From: Dave Hansen dave.han...@linux.intel.com If flush_end ends up being at or above 1 page before the end of memory, the following calculation can overflow: f-flush_end = f-flush_start + PAGE_SIZE; x86_64 has a 2MB hole at the end of memory, so we don't expect this to be possible

[PATCH 1/2] x86_64, switch_to: Load TLS descriptors before switching DS and ES

2014-12-08 Thread Andy Lutomirski
Otherwise, if buggy user code points DS or ES into the TLS array, they would be corrupted after a context switch. - begin test case - /* * Copyright (c) 2014 Andy Lutomirski * GPL v2 */ static unsigned short GDT3(int idx) { return (idx 3) | 3; } static int create_tls(int

Re: 3.12.33 - BUG xfrm_selector_match+0x25/0x2f6

2014-12-08 Thread Julian Anastasov
Hello, On Mon, 8 Dec 2014, Smart Weblications GmbH - Florian Wiessner wrote: Am 07.12.2014 19:27, schrieb Julian Anastasov: I'm attaching a patch that avoids rerouting in IPVS for LOCAL_IN. Please test it in your setup. My tests were with NAT on today's net tree. I checked

[PATCH v2] x86_64, switch_to: Load TLS descriptors before switching DS and ES

2014-12-08 Thread Andy Lutomirski
Otherwise, if buggy user code points DS or ES into the TLS array, they would be corrupted after a context switch. This also significantly improves the comments and documents some gotchas in the code. Before this patch, the both tests below failed. With this patch, the es test passes, although

[CFT][PATCH 1/7] userns: Document what the invariant required for safe unprivileged mappings.

2014-12-08 Thread Eric W. Biederman
The rule is simple. Don't allow anything that wouldn't be allowed without unprivileged mappings. It was previously overlooked that establishing gid mappings would allow dropping groups and potentially gaining permission to files and directories that had lesser permissions for a specific group

[CFT][PATCH 2/7] userns: Don't allow setgroups until a gid mapping has been setablished

2014-12-08 Thread Eric W. Biederman
setgroups is unique in not needing a valid mapping before it can be called, in the case of setgroups(0, NULL) which drops all supplemental groups. The design of the user namespace assumes that CAP_SETGID can not actually be used until a gid mapping is established. Therefore add a helper

[CFT][PATCH 3/7] userns: Don't allow unprivileged creation of gid mappings

2014-12-08 Thread Eric W. Biederman
As any gid mapping will allow and must allow for backwards compatibility dropping groups don't allow any gid mappings to be established without CAP_SETGID in the parent user namespace. For a small class of applications this change breaks userspace and removes useful functionality. This small

[CFT][PATCH 4/7] userns: Check euid no fsuid when establishing an unprivileged uid mapping

2014-12-08 Thread Eric W. Biederman
setresuid allows the euid to be set to any of uid, euid, suid, and fsuid. Therefor it is safe to allow an unprivileged user to map their euid and use CAP_SETUID privileged with exactly that uid, as no new credentials can be obtained. I can not find a combination of existing system calls that

Re: [CFT][PATCH 2/7] userns: Don't allow setgroups until a gid mapping has been setablished

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:07 PM, Eric W. Biederman ebied...@xmission.com wrote: setgroups is unique in not needing a valid mapping before it can be called, in the case of setgroups(0, NULL) which drops all supplemental groups. The design of the user namespace assumes that CAP_SETGID can not

[CFT][PATCH 5/7] userns: Only allow the creator of the userns unprivileged mappings

2014-12-08 Thread Eric W. Biederman
If you did not create the user namespace and are allowed to write to uid_map or gid_map you should already have the necessary privilege in the parent user namespace to establish any mapping you want so this will not affect userspace in practice. Limiting unprivileged uid mapping establishment to

Re: [CFT][PATCH 4/7] userns: Check euid no fsuid when establishing an unprivileged uid mapping

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:08 PM, Eric W. Biederman ebied...@xmission.com wrote: setresuid allows the euid to be set to any of uid, euid, suid, and fsuid. Therefor it is safe to allow an unprivileged user to map their euid and use CAP_SETUID privileged with exactly that uid, as no new

[CFT][PATCH 6/7] userns: Add a knob to disable setgroups on a per user namespace basis

2014-12-08 Thread Eric W. Biederman
- Expose the knob to user space through a proc file /proc/pid/setgroups A value of 0 means the setgroups system call is disabled in the current processes user namespace and can not be enabled in the future in this user namespace. A value of 1 means the segtoups system call is enabled.

Re: [CFT][PATCH 5/7] userns: Only allow the creator of the userns unprivileged mappings

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:10 PM, Eric W. Biederman ebied...@xmission.com wrote: If you did not create the user namespace and are allowed to write to uid_map or gid_map you should already have the necessary privilege in the parent user namespace to establish any mapping you want so this will

[CFT][PATCH 7/7] userns: Allow setting gid_maps without privilege when setgroups is disabled

2014-12-08 Thread Eric W. Biederman
Now that setgroups can be disabled and not reenabled, setting gid_map without privielge can now be enabled when setgroups is disabled. This restores most of the functionality that was lost when unprivilege setting of gid_map was removed. Applications that use this functionality will need to

Re: [CFT][PATCH 2/7] userns: Don't allow setgroups until a gid mapping has been setablished

2014-12-08 Thread Richard Weinberger
Am 08.12.2014 um 23:07 schrieb Eric W. Biederman: setgroups is unique in not needing a valid mapping before it can be called, in the case of setgroups(0, NULL) which drops all supplemental groups. The design of the user namespace assumes that CAP_SETGID can not actually be used until a gid

Re: [CFT][PATCH 6/7] userns: Add a knob to disable setgroups on a per user namespace basis

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:11 PM, Eric W. Biederman ebied...@xmission.com wrote: - Expose the knob to user space through a proc file /proc/pid/setgroups A value of 0 means the setgroups system call is disabled in the deny current processes user namespace and can not be enabled in the

Re: [CFT][PATCH 2/7] userns: Don't allow setgroups until a gid mapping has been setablished

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:17 PM, Richard Weinberger rich...@nod.at wrote: Am 08.12.2014 um 23:07 schrieb Eric W. Biederman: setgroups is unique in not needing a valid mapping before it can be called, in the case of setgroups(0, NULL) which drops all supplemental groups. The design of the user

Re: [CFT][PATCH 7/7] userns: Allow setting gid_maps without privilege when setgroups is disabled

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:14 PM, Eric W. Biederman ebied...@xmission.com wrote: Now that setgroups can be disabled and not reenabled, setting gid_map without privielge can now be enabled when setgroups is disabled. This restores most of the functionality that was lost when unprivilege

Re: [CFT][PATCH 2/7] userns: Don't allow setgroups until a gid mapping has been setablished

2014-12-08 Thread Richard Weinberger
Am 08.12.2014 um 23:25 schrieb Andy Lutomirski: On Mon, Dec 8, 2014 at 2:17 PM, Richard Weinberger rich...@nod.at wrote: Am 08.12.2014 um 23:07 schrieb Eric W. Biederman: setgroups is unique in not needing a valid mapping before it can be called, in the case of setgroups(0, NULL) which drops

Re: [CFT][PATCH 2/7] userns: Don't allow setgroups until a gid mapping has been setablished

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:26 PM, Eric W. Biederman ebied...@xmission.com wrote: Andy Lutomirski l...@amacapital.net writes: On Mon, Dec 8, 2014 at 2:07 PM, Eric W. Biederman ebied...@xmission.com wrote: setgroups is unique in not needing a valid mapping before it can be called, in the case

Re: [CFT][PATCH 6/7] userns: Add a knob to disable setgroups on a per user namespace basis

2014-12-08 Thread Eric W. Biederman
Andy Lutomirski l...@amacapital.net writes: On Mon, Dec 8, 2014 at 2:11 PM, Eric W. Biederman ebied...@xmission.com wrote: - Expose the knob to user space through a proc file /proc/pid/setgroups A value of 0 means the setgroups system call is disabled in the deny current processes

Re: [CFT][PATCH 2/7] userns: Don't allow setgroups until a gid mapping has been setablished

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:39 PM, Eric W. Biederman ebied...@xmission.com wrote: Richard Weinberger rich...@nod.at writes: Am 08.12.2014 um 23:25 schrieb Andy Lutomirski: On Mon, Dec 8, 2014 at 2:17 PM, Richard Weinberger rich...@nod.at wrote: Am 08.12.2014 um 23:07 schrieb Eric W. Biederman:

Re: [CFT][PATCH 6/7] userns: Add a knob to disable setgroups on a per user namespace basis

2014-12-08 Thread Andy Lutomirski
On Mon, Dec 8, 2014 at 2:44 PM, Eric W. Biederman ebied...@xmission.com wrote: Andy Lutomirski l...@amacapital.net writes: On Mon, Dec 8, 2014 at 2:11 PM, Eric W. Biederman ebied...@xmission.com wrote: - Expose the knob to user space through a proc file /proc/pid/setgroups A value of 0

Re: [CFT][PATCH 6/7] userns: Add a knob to disable setgroups on a per user namespace basis

2014-12-08 Thread Eric W. Biederman
Andy Lutomirski l...@amacapital.net writes: On Mon, Dec 8, 2014 at 2:44 PM, Eric W. Biederman ebied...@xmission.com wrote: Andy Lutomirski l...@amacapital.net writes: On Mon, Dec 8, 2014 at 2:11 PM, Eric W. Biederman ebied...@xmission.com wrote: - Expose the knob to user space through a

[PATCH] xtensa: fix kmap_prot definition

2014-12-08 Thread Max Filippov
Replace PAGE_KERNEL with PAGE_KERNEL_EXEC to allow copy_to_user_page invalidate icache for pages mapped with kmap. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov jcmvb...@gmail.com --- arch/xtensa/include/asm/highmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: Patch ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC has been added to the 3.17-stable tree

2014-12-08 Thread Zheng, Lv
Hi, Greg This commit has been upstreamed since v3.17-rc3. It is proven to be a conflict with Samsung laptops. So we've reverted it since v3.18-rc3. The reversion commit ID is df9ff918. Best regards -Lv From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] Sent: Friday, December

[PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-12-08 Thread Michael Ellerman
From: Anton Blanchard an...@samba.org Backport of 152d44a853e42952f6c8a504fb1f8eefd21fd5fd. I used some 64 bit instructions when adding the 32 bit getcpu VDSO function. Fix it. Fixes: 18ad51dd342a (powerpc: Add VDSO version of getcpu) Signed-off-by: Anton Blanchard an...@samba.org

[PATCH v2] x86/tsc: Change Fast TSC calibration failed from error to warning

2014-12-08 Thread Alexandre Demers
Most users see this message when booting without knowning that it is of mostly no importance and that TSC calibration may have succeeded by another way. As explained thoroufly by Paul Bolle in 2012 (http://lkml.iu.edu//hypermail/linux/kernel/1209.3/00224.html), Fast TSC calibration failed

Re: [PATCH v5] clocksource: arch_timer: Fix code to use physical timers when requested

2014-12-08 Thread Yingjoe Chen
On Mon, 2014-12-08 at 16:21 +, Catalin Marinas wrote: On Fri, Dec 05, 2014 at 10:41:04AM +, Yingjoe Chen wrote: On Sun, 2014-11-23 at 23:02 -0800, Sonny Rao wrote: This is a bug fix for using physical arch timers when the arch_timer_use_virtual boolean is false. It restores the

[PATCH] ARM: sched_clock: Load cycle count after epoch stabilizes

2014-12-08 Thread xiaofeng.yan
There is a small race between when the cycle count is read from the hardware and when the epoch stabilizes. Consider this scenario: CPU0 CPU1 cyc = read_sched_clock() cyc_to_sched_clock()

[PATCH v2][request for stable inclusion][3.10.x]:ARM:sched_clock: Load cycle count after epoch stabilizes

2014-12-08 Thread xiaofeng.yan
commit 336ae1180df5f69b9e0fb6561bec01c5f64361cf ARM: sched_clock: Load cycle count after epoch stabilizes This looks applicable to stable-3.10, which load cycle count after epoch stabilizes, The function was moved from arch/arm/kernel/sched_clock.c to kernel/time/sched_clock.c because of

[PATCH v3][request for stable inclusion][3.10.x]:ARM:sched_clock: Load cycle count after epoch stabilizes

2014-12-08 Thread xiaofeng.yan
commit 336ae1180df5f69b9e0fb6561bec01c5f64361cf ARM: sched_clock: Load cycle count after epoch stabilizes This looks applicable to stable-3.10, which load cycle count after epoch stabilizes, The function was moved from arch/arm/kernel/sched_clock.c to kernel/time/sched_clock.c because of

[PATCH] ARM: sched_clock: Load cycle count after epoch stabilizes

2014-12-08 Thread xiaofeng.yan
From: Stephen Boyd sb...@codeaurora.org There is a small race between when the cycle count is read from the hardware and when the epoch stabilizes. Consider this scenario: CPU0 CPU1 cyc = read_sched_clock() cyc_to_sched_clock()