Re: [PATCH 3/4] media: i2c: Add TDA1997x HDMI receiver driver

2017-09-23 Thread Hans Verkuil
Hi Tim, On 23/09/17 00:24, Tim Harvey wrote: > Add support for the TDA1997x HDMI receivers. I did a very quick high-level scan and found a few blockers: 1) You *must* implement the get/set_edid ops. I won't accept the driver without that. You can use v4l2-ctl to set/get the EDID (see v4l2-

Re: [PATCH 0/8] [media] v4l2-core: Fine-tuning for some function implementations

2017-09-23 Thread Hans Verkuil
On 22/09/17 22:08, SF Markus Elfring wrote: >> Sorry Markus, just stay away from the videobuf-* sources. > > Will the software evolution be continued for related source files? > Are there any update candidates left over in the directory “v4l2-core”? Sorry, I don't understand the question. We don'

[PATCH v3] staging: greybus: light: Release memory obtained by kasprintf

2017-09-23 Thread Arvind Yadav
Free memory region, if gb_lights_channel_config is not successful. Signed-off-by: Arvind Yadav --- changes in v2: - Subject line changed. - add kfree in __gb_lights_led_unregister(). - No need to check return value of gb_lights_channel_flash_config(). changes

[PATCH] staging: greybus: light: remove unnecessary error check

2017-09-23 Thread Arvind Yadav
It is not necessary to check return value of gb_lights_channel_flash_config. gb_lights_channel_config returns both successful and error value. Signed-off-by: Arvind Yadav --- drivers/staging/greybus/light.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/

Re: [v8 0/4] cgroup-aware OOM killer

2017-09-23 Thread David Rientjes
On Fri, 22 Sep 2017, Tejun Heo wrote: > > If you have this low priority maintenance job charging memory to the high > > priority hierarchy, you're already misconfigured unless you adjust > > /proc/pid/oom_score_adj because it will oom kill any larger process than > > itself in today's kernels a

[GIT PULL] parisc architecture fixes for v4.14-rc2

2017-09-23 Thread Helge Deller
Hi Linus, please pull fixes for the parisc architecture for kernel 4.14-rc2 from: git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-4.14-2 Changelog: - Unbreak parisc bootloader by avoiding a gcc-7 optimization to convert multiple byte-accesses into one word-acce

Re: [PATCH] perf report: Fix debug messages with --call-graph option

2017-09-23 Thread zhangmengting
Hi Jiri, Thanks for the review. Agreed, the patch seems confused. I'll add more details in the next version patch and resend it later. Thanks, Mengting Zhang On 2017/9/22 17:18, Jiri Olsa wrote: On Fri, Sep 22, 2017 at 10:06:53AM +0800, zhangmengting wrote: With --call-graph option, perf r

[PATCH v2] perf report: Fix debug messages with --call-graph option

2017-09-23 Thread Mengting Zhang
With --call-graph option, perf report can display call chains using type, min percent threshold, optional print limit and order. And the default call-graph parameter is 'graph,0.5,caller,function,percent'. Before this patch, 'perf report --call-graph' shows incorrect debug messages as below: [root

[PATCH] Revert "f2fs: node segment is prior to data segment selected victim"

2017-09-23 Thread Yunlong Song
This reverts commit b9cd20619e359d199b755543474c3d853c8e3415. That patch causes much fewer node segments (which can be used for SSR) than before, and in the corner case (e.g. create and delete *.txt files in one same directory, there will be very few node segments but many data segments), if the r

[Question] null pointer risk of kernel workqueue

2017-09-23 Thread tanxiaofei
Hi Tejun & Jiangshan, I find an null pointer risk in the code of workqueue. Here is description: If draining, __queue_work() will call the function is_chained_work() to do some checks. In is_chained_work(), worker->current_pwq is used directly. It should be not safe. http://elixir.free-electron

Re: [PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state

2017-09-23 Thread Ingo Molnar
* Eric Biggers wrote: > From: Eric Biggers > > This series fixes the bug found by syzkaller where the ptrace syscall > can be used to set invalid bits in a task's FPU state. I also found > that an equivalent bug was reachable using the sigreturn syscall, so the > first patch fixes the bug in

[PATCH] drm/tinydrm: Replace dev_error with DRM_DEV_ERROR

2017-09-23 Thread Harsha Sharma
Convert instances of dev_error to DRM_DEV_ERROR as we have DRM_DEV_ERROR variants of drm print macros. Signed-off-by: Harsha Sharma --- drivers/gpu/drm/tinydrm/mi0283qt.c | 8 drivers/gpu/drm/tinydrm/repaper.c | 26 +- drivers/gpu/drm/tinydrm/st7586.c | 6 ++

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-23 Thread Egil Hjelmeland
Den 22. sep. 2017 22:08, skrev Andrew Lunn: I'm wondering how this is supposed to work. Please add a good comment here, since the hardware is forcing you to do something odd. Maybe it would be a good idea to save the STP state in chip. And then when chip->is_bridged is set true, change the stat

[PATCH] kfifo: Fix some typo

2017-09-23 Thread Christophe JAILLET
Fix some typo. Signed-off-by: Christophe JAILLET --- include/linux/kfifo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 41eb6fdf87a8..7b45959ebd92 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -3

[PATCH] x86/fpu: Simplify fpu__activate_fpstate_read()

2017-09-23 Thread Ingo Molnar
* Eric Biggers wrote: > On Fri, Sep 22, 2017 at 07:33:14AM +0200, Ingo Molnar wrote: > > > > * Eric Biggers wrote: > > > > > From: Eric Biggers > > > > > > This series fixes the bug found by syzkaller where the ptrace syscall > > > can be used to set invalid bits in a task's FPU state. I a

[PATCH] wireless: iwlwifi: fix minor code style issues

2017-09-23 Thread Christoph Böhmwalder
Fixes three trivial issues as reported by checkpatch.pl, namely two switch/case indentation issues and one alignment issue in a multiline comment. Signed-off-by: Christoph Böhmwalder --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) di

Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized

2017-09-23 Thread Ingo Molnar
* Jean Delvare wrote: > I don't think it makes sense to check for a possible bad > initialization order at run time on every system when it is all > decided at build time. > > A more efficient way to make sure developers do not introduce new > calls to dmi_check_system() too early in the initia

Re: [PATCH v2 0/2] x86: Fix inline asm call constraints for clang

2017-09-23 Thread Ingo Molnar
* Josh Poimboeuf wrote: > Patch 1 is a bug fix for an objtool issue which was uncovered by patch 2. > > Patch 2 is the last fix needed for clang to be able to compile and boot > the kernel. > > Josh Poimboeuf (2): > objtool: Handle another GCC stack pointer adjustment bug > x86/asm: Fix in

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-23 Thread Paolo Bonzini
On 22/09/2017 14:55, Peter Zijlstra wrote: > You just explained it yourself. If the thread that needs to complete > what you're waiting on has lower priority, it will _never_ get to run if > you're busy waiting on it. > > This is _trivial_. > > And even for !RT it can be quite costly, because you

Re: [PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-09-23 Thread Stefan Wahren
Hi Greg, > Phil Elwell hat am 11. August 2017 um 12:20 > geschrieben: > > > The previous commit (0adbfd46) fixed a memory leak but also freed a > block in the success case, causing a stale pointer to be used with > potentially fatal results. Only free the vchi_instance block in the > case that

Re: [PATCH] auxdisplay: change PANEL to menuconfig

2017-09-23 Thread Geert Uytterhoeven
On Fri, Sep 22, 2017 at 10:20 PM, Randy Dunlap wrote: > From: Randy Dunlap > > This change makes xconfig present the PANEL drivers immediately > following the AUXDISPLAY drivers instead of under the major menu > item "Device Drivers". It also unclutters the Device Drivers menu in > nconfig and me

Re: [PATCH 4/4] tracing: Remove RCU work arounds from stack tracer

2017-09-23 Thread Steven Rostedt
On Fri, 22 Sep 2017 23:07:37 -0700 "Paul E. McKenney" wrote: > OK, how about the following? > > It turns out that functions called from rcu_irq_enter() can > be subject to various kinds of tracing, which can result in > rcu_irq_enter() being invoked recursively. This recursion

Re: [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read()

2017-09-23 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Eric Biggers wrote: > > > On Fri, Sep 22, 2017 at 07:33:14AM +0200, Ingo Molnar wrote: > > > > > > * Eric Biggers wrote: > > > > > > > From: Eric Biggers > > > > > > > > This series fixes the bug found by syzkaller where the ptrace syscall > > > > can be used t

Re: [PATCH v2 0/2] x86: Fix inline asm call constraints for clang

2017-09-23 Thread Josh Poimboeuf
On Sat, Sep 23, 2017 at 12:53:18PM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > Patch 1 is a bug fix for an objtool issue which was uncovered by patch 2. > > > > Patch 2 is the last fix needed for clang to be able to compile and boot > > the kernel. > > > > Josh Poimboeuf (2): >

Re: [PATCH 1/2] i2c: designware: switch to suspend_late/resume_early

2017-09-23 Thread Rafael J. Wysocki
On Thu, Sep 21, 2017 at 4:11 PM, Rafael J. Wysocki wrote: > On Thursday, September 21, 2017 3:13:56 AM CEST Rajat Jain wrote: >> On Wed, Sep 20, 2017 at 5:24 PM, Rafael J. Wysocki wrote: >> > On Thu, Sep 21, 2017 at 12:31 AM, Rajat Jain wrote: >> >> Ref: https://lkml.org/lkml/2017/9/19/649 >> >>

[PATCH 00/33] x86 FPU fixes and cleanups for v4.14

2017-09-23 Thread Ingo Molnar
So I'd like to push these changes to Linus tomorrow-ish as an RFC pull request in 1-2 days, because there's now 4 fixes depending on these changes, and because the result will be more maintainable for the LTS v4.14 kernel. The biggest changes from the earlier iterations is the fixes from Eric Bigg

[PATCH 01/33] x86/fpu: Rename copyin_to_xsaves()/copyout_from_xsaves() to copy_user_to_xstate()/copy_xstate_to_user()

2017-09-23 Thread Ingo Molnar
The 'copyin/copyout' nomenclature needlessly departs from what the modern FPU code uses, which is: copy_fpregs_to_fpstate() copy_fpstate_to_sigframe() copy_fregs_to_user() copy_fxregs_to_kernel() copy_fxregs_to_user() copy_kernel_to_fpregs() copy_kernel_to_fregs() copy_kernel_to_fxregs()

[PATCH 04/33] x86/fpu: Remove 'kbuf' parameter from the copy_xstate_to_user() APIs

2017-09-23 Thread Ingo Molnar
The 'kbuf' parameter is unused in the _user() side of the API, remove it. This simplifies the code and makes it easier to think about. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik

[PATCH 27/33] x86/fpu: Simplify fpu__activate_fpstate_read()

2017-09-23 Thread Ingo Molnar
fpu__activate_fpstate_read() can only ever be called for a non-current, non-executing (stopped) task - so make sure this is checked via a warning and remove the current-task logic. This also fixes an incorrect (but harmless) warning introduced by one of the earlier patches. Cc: Andy Lutomirski C

[PATCH 32/33] x86/fpu: Rename fpu__activate_curr() to fpu__initialize()

2017-09-23 Thread Ingo Molnar
Rename this function to better express that it's all about initializing the FPU state of a task which goes hand in hand with the fpu::initialized field. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Eric Biggers Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter

[PATCH 23/33] x86/fpu: Turn WARN_ON() in context switch into WARN_ON_FPU()

2017-09-23 Thread Ingo Molnar
From: Andi Kleen copy_xregs_to_kernel checks if the alternatives have been already patched. This WARN_ON() is always executed in every context switch. All the other checks in fpu internal.h are WARN_ON_FPU(), but this one is plain WARN_ON(). I assume it was forgotten to switch it. So switch it

[PATCH 33/33] x86/fpu: Rename fpu__activate_fpstate_read/write() to fpu__read/write()

2017-09-23 Thread Ingo Molnar
As per the new nomenclature we don't 'activate' the FPU state anymore, we initialize it. So drop the _activate_fpstate name from these functions, which were a bit of a mouthful anyway. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Eric Biggers Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvald

[PATCH 31/33] x86/fpu: Simplify and speed up fpu__copy()

2017-09-23 Thread Ingo Molnar
fpu__copy() has a preempt_disable()/enable() pair, which it had to do to be able to atomically unlazy the current task when doing an FNSAVE. But we don't unlazy tasks anymore, we always do direct saves/restores of FPU context. So remove both the unnecessary critical section, and update the commen

[PATCH 26/33] x86/fpu: Reinitialize FPU registers if restoring FPU state fails

2017-09-23 Thread Ingo Molnar
From: Eric Biggers Userspace can change the FPU state of a task using the ptrace() or rt_sigreturn() system calls. Because reserved bits in the FPU state can cause the XRSTOR instruction to fail, the kernel has to carefully validate that no reserved bits or other invalid values are being set. U

[PATCH 30/33] x86/fpu: Fix stale comments about lazy FPU logic

2017-09-23 Thread Ingo Molnar
We don't do any lazy restore anymore, what we have are two pieces of optimization: - no-FPU tasks that don't save/restore the FPU context (kernel threads are such) - cached FPU registers maintained via the fpu->last_cpu field. This means that if an FPU task context switches to a non-FPU ta

[PATCH 29/33] x86/fpu: Rename fpu::fpstate_active to fpu::initialized

2017-09-23 Thread Ingo Molnar
The x86 FPU code used to have a complex state machine where both the FPU registers and the FPU state context could be 'active' (or inactive) independently of each other - which enabled features like lazy FPU restore. Much of this complexity is gone in the current code: now we basically can have FP

[PATCH 28/33] x86/fpu: Remove fpu__current_fpstate_write_begin/end()

2017-09-23 Thread Ingo Molnar
These functions are not used anymore, so remove them. Cc: Andy Lutomirski Cc: Bobby Powers Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar ---

[PATCH 25/33] x86/fpu: Tighten validation of user-supplied xstate_header

2017-09-23 Thread Ingo Molnar
From: Eric Biggers Move validation of user-supplied xstate_headers into a helper function and call it from both the ptrace and sigreturn syscall paths. The new function also considers it to be an error if *any* reserved bits are set, whereas before we were just clearing most of them. This shoul

Re: [PATCH 00/33] x86 FPU fixes and cleanups for v4.14

2017-09-23 Thread Ingo Molnar
* Ingo Molnar wrote: > So I'd like to push these changes to Linus tomorrow-ish as an RFC pull > request in 1-2 days, because there's now 4 fixes depending on these > changes, and because the result will be more maintainable for the > LTS v4.14 kernel. > > The biggest changes from the earlier it

[PATCH 20/33] x86/fpu: Remove struct fpu::fpregs_active

2017-09-23 Thread Ingo Molnar
The previous changes paved the way for the removal of the fpu::fpregs_active state flag - we now only have the fpu::fpstate_active and fpu::last_cpu fields left. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc

[PATCH 24/33] x86/fpu: Don't let userspace set bogus xcomp_bv

2017-09-23 Thread Ingo Molnar
From: Eric Biggers On x86, userspace can use the ptrace() or rt_sigreturn() system calls to set a task's extended state (xstate) or "FPU" registers. ptrace() can set them for another task using the PTRACE_SETREGSET request with NT_X86_XSTATE, while rt_sigreturn() can set them for the current tas

[PATCH 22/33] x86/fpu: Fix boolreturn.cocci warnings

2017-09-23 Thread Ingo Molnar
From: kbuild test robot arch/x86/kernel/fpu/xstate.c:931:9-10: WARNING: return of 0/1 in function 'xfeatures_mxcsr_quirk' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Signed-o

[PATCH 15/33] x86/fpu: Simplify fpu->fpregs_active use

2017-09-23 Thread Ingo Molnar
The fpregs_active() inline function is pretty pointless - in almost all the callsites it can be replaced with a direct fpu->fpregs_active access. Do so and eliminate the extra layer of obfuscation. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc:

[PATCH 09/33] x86/fpu: Change 'size_total' parameter to unsigned and standardize the size checks in copy_xstate_to_*()

2017-09-23 Thread Ingo Molnar
'size_total' is derived from an unsigned input parameter - and then converted to 'int' and checked for negative ranges: if (size_total < 0 || offset < size_total) { This conversion and the checks are unnecessary obfuscation, reject overly large requested copy sizes outright and simplify t

[PATCH 14/33] x86/fpu: Flip the parameter order in copy_*_to_xstate()

2017-09-23 Thread Ingo Molnar
Make it more consistent with regular memcpy() semantics, where the destination argument comes first. No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Ri

[PATCH 12/33] x86/fpu: Remove 'ubuf' parameter from the copy_kernel_to_xstate() API

2017-09-23 Thread Ingo Molnar
No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Signed-off-by: Ingo Molnar --- arch/x86/include/asm/fpu/xs

[PATCH 16/33] x86/fpu: Make the fpu state change in fpu__clear() scheduler-atomic

2017-09-23 Thread Ingo Molnar
Do this temporarily only, to make it easier to change the FPU state machine, in particular this change couples the fpu->fpregs_active and fpu->fpstate_active states: they are only set/cleared together (as far as the scheduler sees them). This will be removed by later patches. Cc: Andy Lutomirski

[PATCH 10/33] x86/fpu: Simplify __copy_xstate_to_kernel() return values

2017-09-23 Thread Ingo Molnar
__copy_xstate_to_kernel() can only return 0 (because kernel copies cannot fail), simplify the code throughout. No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc:

Re: [PATCH v2 0/2] x86: Fix inline asm call constraints for clang

2017-09-23 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Sat, Sep 23, 2017 at 12:53:18PM +0200, Ingo Molnar wrote: > > > > * Josh Poimboeuf wrote: > > > > > Patch 1 is a bug fix for an objtool issue which was uncovered by patch 2. > > > > > > Patch 2 is the last fix needed for clang to be able to compile and boot > > >

[PATCH 11/33] x86/fpu: Split copy_user_to_xstate() into copy_kernel_to_xstate() & copy_user_to_xstate()

2017-09-23 Thread Ingo Molnar
Similar to: x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user() No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik v

[PATCH 19/33] x86/fpu: Decouple fpregs_activate()/fpregs_deactivate() from fpu->fpregs_active

2017-09-23 Thread Ingo Molnar
The fpregs_activate()/fpregs_deactivate() are currently called in such a pattern: if (!fpu->fpregs_active) fpregs_activate(fpu); ... if (fpu->fpregs_active) fpregs_deactivate(fpu); But note that it's actually safe to call them without che

[PATCH 13/33] x86/fpu: Remove 'kbuf' parameter from the copy_user_to_xstate() API

2017-09-23 Thread Ingo Molnar
No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Signed-off-by: Ingo Molnar --- arch/x86/include/asm/fpu/xs

[PATCH 17/33] x86/fpu: Split the state handling in fpu__drop()

2017-09-23 Thread Ingo Molnar
Prepare fpu__drop() to use fpu->fpregs_active. There are two distinct usecases for fpu__drop() in this context: exit_thread() when called for 'current' in exit(), and when called for another task in fork(). This patch does not change behavior, it only adds a couple of debug checks and structures

[PATCH 18/33] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active

2017-09-23 Thread Ingo Molnar
We want to simplify the FPU state machine by eliminating fpu->fpregs_active, and we can do that because the two state flags (::fpregs_active and ::fpstate_active) are set essentially together. The old lazy FPU switching code used to make a distinction - but there's no lazy switching code anymore,

[PATCH 08/33] x86/fpu: Clarify parameter names in the copy_xstate_to_*() methods

2017-09-23 Thread Ingo Molnar
Right now there's a confusing mixture of 'offset' and 'size' parameters: - __copy_xstate_to_*() input parameter 'end_pos' not not really an offset, but the full size of the copy to be performed. - input parameter 'count' to copy_xstate_to_*() shadows that of __copy_xstate_to_*()'s 'count'

[PATCH 07/33] x86/fpu: Remove the 'start_pos' parameter from the __copy_xstate_to_*() functions

2017-09-23 Thread Ingo Molnar
'start_pos' is always 0, so remove it and remove the pointless check of 'pos < 0' which can not ever be true as 'pos' is unsigned ... No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov

[PATCH 05/33] x86/fpu: Clean up parameter order in the copy_xstate_to_*() APIs

2017-09-23 Thread Ingo Molnar
Parameter ordering is weird: int copy_xstate_to_kernel(unsigned int pos, unsigned int count, void *kbuf, struct xregs_state *xsave); int copy_xstate_to_user(unsigned int pos, unsigned int count, void __user *ubuf, struct xregs_state *xsave); 'pos' and 'count', which are attributes of the de

[PATCH 06/33] x86/fpu: Clean up the parameter definitions of copy_xstate_to_*()

2017-09-23 Thread Ingo Molnar
Remove pointless 'const' of non-pointer input parameter. Remove unnecessary parenthesis that shows uncertainty about arithmetic operator precedence. Clarify copy_xstate_to_user() description. No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu

[PATCH 03/33] x86/fpu: Remove 'ubuf' parameter from the copy_xstate_to_kernel() APIs

2017-09-23 Thread Ingo Molnar
The 'ubuf' parameter is unused in the _kernel() side of the API, remove it. This simplifies the code and makes it easier to think about. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Ri

[PATCH 02/33] x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user()

2017-09-23 Thread Ingo Molnar
copy_xstate_to_user() is a weird API - in part due to a bad API inherited from the regset APIs. But don't propagate that bad API choice into the FPU code - so as a first step split the API into kernel and user buffer handling routines. (Also split the xstate_copyout() internal helper.) The split

[PATCH 21/33] x86/fpu: Add FPU state copying quirk to handle XRSTOR failure on Intel Skylake CPUs

2017-09-23 Thread Ingo Molnar
From: Rik van Riel On Skylake CPUs I noticed that XRSTOR is unable to deal with states created by copyout_from_xsaves() if the xstate has only SSE/YMM state, and no FP state. That is, xfeatures had XFEATURE_MASK_SSE set, but not XFEATURE_MASK_FP. The reason is that part of the SSE/YMM state live

[tip:x86/urgent] objtool: Handle another GCC stack pointer adjustment bug

2017-09-23 Thread tip-bot for Josh Poimboeuf
Commit-ID: 0d0970eef3b03ef08b19da5bc3044410731cf38f Gitweb: http://git.kernel.org/tip/0d0970eef3b03ef08b19da5bc3044410731cf38f Author: Josh Poimboeuf AuthorDate: Wed, 20 Sep 2017 16:24:32 -0500 Committer: Ingo Molnar CommitDate: Sat, 23 Sep 2017 15:06:19 +0200 objtool: Handle another G

[tip:x86/urgent] x86/asm: Fix inline asm call constraints for Clang

2017-09-23 Thread tip-bot for Josh Poimboeuf
Commit-ID: f5caf621ee357279e759c0911daf6d55c7d36f03 Gitweb: http://git.kernel.org/tip/f5caf621ee357279e759c0911daf6d55c7d36f03 Author: Josh Poimboeuf AuthorDate: Wed, 20 Sep 2017 16:24:33 -0500 Committer: Ingo Molnar CommitDate: Sat, 23 Sep 2017 15:06:20 +0200 x86/asm: Fix inline asm c

Re: [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting

2017-09-23 Thread Peter Zijlstra
On Fri, Sep 22, 2017 at 11:05:30AM -0700, Tejun Heo wrote: > Peter, ping? Humm,. So I think I was good, but I was under the impression you'd send a new version better explaining the need/design of that iteration stuff. Could be I lost the plot somehow.

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-23 Thread Peter Zijlstra
On Sat, Sep 23, 2017 at 12:56:12PM +0200, Paolo Bonzini wrote: > On 22/09/2017 14:55, Peter Zijlstra wrote: > > You just explained it yourself. If the thread that needs to complete > > what you're waiting on has lower priority, it will _never_ get to run if > > you're busy waiting on it. > > > > T

Re: [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting

2017-09-23 Thread Tejun Heo
Hello, Peter. On Sat, Sep 23, 2017 at 03:37:31PM +0200, Peter Zijlstra wrote: > On Fri, Sep 22, 2017 at 11:05:30AM -0700, Tejun Heo wrote: > > Peter, ping? > > Humm,. So I think I was good, but I was under the impression you'd send > a new version better explaining the need/design of that iterati

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-23 Thread Andrew Lunn
> The point is: Once both external ports are in "forwarding", I see no way > to prevent traffic flowing directly between the external ports. Generally, there are port vectors. Port X can send frames only to Port Y. If you don't have that, there are possibilities with VLANs. Each port is given a u

Re: [PATCH 00/33] x86 FPU fixes and cleanups for v4.14

2017-09-23 Thread Juergen Gross
On 23/09/17 15:02, Ingo Molnar wrote: > > * Ingo Molnar wrote: > >> So I'd like to push these changes to Linus tomorrow-ish as an RFC pull >> request in 1-2 days, because there's now 4 fixes depending on these >> changes, and because the result will be more maintainable for the >> LTS v4.14 kern

Re: [media] v4l2-core: Fine-tuning for some function implementations

2017-09-23 Thread SF Markus Elfring
>> Will the software evolution be continued for related source files? >> Are there any update candidates left over in the directory “v4l2-core”? > > Sorry, I don't understand the question. I try to explain my view again. > We don't want to touch the videobuf-* files unless there is a very good

Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized

2017-09-23 Thread Jean Delvare
Hi Ingo, On Sat, 23 Sep 2017 12:50:31 +0200, Ingo Molnar wrote: > * Jean Delvare wrote: > > > I don't think it makes sense to check for a possible bad > > initialization order at run time on every system when it is all > > decided at build time. > > > > A more efficient way to make sure develop

Re: [PATCH 1/2] i2c: designware: switch to suspend_late/resume_early

2017-09-23 Thread Rajat Jain
On Sat, Sep 23, 2017 at 5:55 AM, Rafael J. Wysocki wrote: > On Thu, Sep 21, 2017 at 4:11 PM, Rafael J. Wysocki wrote: >> On Thursday, September 21, 2017 3:13:56 AM CEST Rajat Jain wrote: >>> On Wed, Sep 20, 2017 at 5:24 PM, Rafael J. Wysocki >>> wrote: >>> > On Thu, Sep 21, 2017 at 12:31 AM, Ra

Re: [PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-09-23 Thread Greg Kroah-Hartman
On Sat, Sep 23, 2017 at 12:57:33PM +0200, Stefan Wahren wrote: > Hi Greg, > > > Phil Elwell hat am 11. August 2017 um 12:20 > > geschrieben: > > > > > > The previous commit (0adbfd46) fixed a memory leak but also freed a > > block in the success case, causing a stale pointer to be used with >

Re: [PATCH 1/2] i2c: designware: switch to suspend_late/resume_early

2017-09-23 Thread Rajat Jain
On Sat, Sep 23, 2017 at 8:49 AM, Rajat Jain wrote: > On Sat, Sep 23, 2017 at 5:55 AM, Rafael J. Wysocki wrote: >> On Thu, Sep 21, 2017 at 4:11 PM, Rafael J. Wysocki >> wrote: >>> On Thursday, September 21, 2017 3:13:56 AM CEST Rajat Jain wrote: On Wed, Sep 20, 2017 at 5:24 PM, Rafael J. Wy

[PATCH v2] Asus WMI : Add lightbar led support

2017-09-23 Thread Maxime Bellengé
Some asus laptops (ROG series for example) are provided with a lightbar behind the monitor. This patch make possible to switch it on and off. This lightbar works exactly as any other led. V2 : fix whitespaces and typo Signed-off-by: Maxime Bellengé --- drivers/platform/x86/asus-wmi.c | 63 +

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-23 Thread Al Viro
On Fri, Sep 22, 2017 at 01:18:39AM -0400, Vitaly Mayatskikh wrote: > bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if > IO vector has small consecutive buffers belonging to the same page. > bio_add_pc_page merges them into one, but the page reference is never > dropped. > > S

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-23 Thread Al Viro
On Sat, Sep 23, 2017 at 05:39:28PM +0100, Al Viro wrote: > On Fri, Sep 22, 2017 at 01:18:39AM -0400, Vitaly Mayatskikh wrote: > > bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if > > IO vector has small consecutive buffers belonging to the same page. > > bio_add_pc_page merges

Re: [PATCH] coccicheck: improve pattern for getting relative path

2017-09-23 Thread Nicolas Palix (LIG)
Le 10/08/17 à 19:40, Cihangir Akturk a écrit : When invoked with V=1, coccicheck script prints the information about which semantic patch (*.cocci file) used for this operation. Actually, it prints out the relative path of the related semantic patch. The script uses sed to remove the source tree

[PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Colin King
From: Colin Ian King Currently p->phy is being null checked in several places to avoid null pointer dereferences on p->phy, however, the final call to phy_attached_info on p->phy when p->phy will perform a null pointer dereference. Fix this by simply moving the call into the previous code block t

Re: [PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Joe Perches
On Sat, 2017-09-23 at 17:57 +0100, Colin King wrote: > From: Colin Ian King > > Currently p->phy is being null checked in several places to avoid > null pointer dereferences on p->phy, however, the final call > to phy_attached_info on p->phy when p->phy will perform a null > pointer dereference.

Re: [PATCH 4/4] tracing: Remove RCU work arounds from stack tracer

2017-09-23 Thread Paul E. McKenney
On Sat, Sep 23, 2017 at 07:22:04AM -0400, Steven Rostedt wrote: > On Fri, 22 Sep 2017 23:07:37 -0700 > "Paul E. McKenney" wrote: > > > OK, how about the following? > > > > It turns out that functions called from rcu_irq_enter() can > > be subject to various kinds of tracing, which can re

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-23 Thread Al Viro
On Sat, Sep 23, 2017 at 05:55:37PM +0100, Al Viro wrote: > IOW, the loop on failure exit should go through the bio, like > __bio_unmap_user() > does. We *also* need to put everything left unused in pages[], but only from > the > last iteration through iov_for_each(). > > Frankly, I would prefe

Re: [PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Florian Fainelli
On 09/23/2017 09:57 AM, Colin King wrote: > From: Colin Ian King > > Currently p->phy is being null checked in several places to avoid > null pointer dereferences on p->phy, however, the final call > to phy_attached_info on p->phy when p->phy will perform a null > pointer dereference. Fix this

[PATCH] Documentation: DT bindings: Add chip compatible string for audio codec.

2017-09-23 Thread Shreeya Patel
This patch adds chip compatible string to remove the warnings generated by checkpatch that -DT compatible string "toshiba,apb-dummy-codec" appears un-documented. Signed-off-by: Shreeya Patel --- Documentation/devicetree/bindings/sound/sirf-audio-codec.txt | 3 ++- 1 file changed, 2 insertions(+)

Re: [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read()

2017-09-23 Thread Eric Biggers
On Sat, Sep 23, 2017 at 01:29:32PM +0200, Ingo Molnar wrote: > > > > > > > > Ok - could you please rebase these to to tip:master that is at: > > > > > > > > git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git > > > > master > > > > > > > > In particular this has a WIP.x86/fpu

[PATCH] irqchip/gic-v3-its: Fix the incorrect BUG_ON in its_init_vpe_domain()

2017-09-23 Thread Shanker Donthineni
The driver probe path hits 'BUG_ON(entries != vpe_proxy.dev->nr_ites)' on systems where it has VLPI capability, doesn't support direct LPI feature and boot with a single CPU. Relax the BUG_ON() condition to fix the issue. Signed-off-by: Shanker Donthineni --- drivers/irqchip/irq-gic-v3-its.c |

drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c: broken emergency poweroff handling

2017-09-23 Thread Pavel Machek
Hi! Not only it is unneccessarily complex, it is also broken; GFP_ATOMIC allocation can fail.. and then you fail to shut down the machine. Someone please fix this. Thanks, Pavel --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.

[PATCH] omap_ssi_core: fix kilo to be "k" not "K"

2017-09-23 Thread Pavel Machek
Kilo should be "k" not "K", fix it it comments and messages. Signed-off-by: Pavel Machek index 88e48b3..41a09f5 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -334,7 +334,7 @@ static int ssi_clk_event(struct notifier_block *nb, unsigned lo

drivers/platform/mips/cpu_hwmon.c: orderly_poweroff() is silent

2017-09-23 Thread Pavel Machek
Orderly poweroff is silent, so it would be nice to pr_alert("something") at the place of FIXME. Thanks, Pavel diff --git a/drivers/platform/mips/cpu_hwmon.c b/drivers/platform/mips/cpu_hwmon.c index 322de58..df24292 100644 --- a/drivers/platform/mi

[RESEND] Re: usb/net/p54: trying to register non-static key in p54_unregister_leds

2017-09-23 Thread Christian Lamparter
This got rejected by gmail once. Let's see if it works now. On Thursday, September 21, 2017 8:22:45 PM CEST Andrey Konovalov wrote: > On Wed, Sep 20, 2017 at 9:55 PM, Johannes Berg > wrote: > > On Wed, 2017-09-20 at 21:27 +0200, Christian Lamparter wrote: > > > >> It seems this is caused as a res

[PATCH 0/3] [media] camss-csid: Fine-tuning for three function implementations

2017-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 23 Sep 2017 21:24:56 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use common error handling code in csid_set_power() Reduce the scope for a variable in csid_set_power() Adjust a null pointer che

[PATCH 1/3] [media] camss-csid: Use common error handling code in csid_set_power()

2017-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 23 Sep 2017 20:48:33 +0200 Add jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/platform/qcom/camss-8x16/

[PATCH 2/3] [media] camss-csid: Reduce the scope for a variable in csid_set_power()

2017-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 23 Sep 2017 21:00:30 +0200 Move the definition for the local variable "dev" into an if branch so that the corresponding setting will only be performed if it was selected by the parameter "on" of this function. Signed-off-by: Markus Elfring --- drivers/media/plat

[PATCH 3/3] [media] camss-csid: Adjust a null pointer check in two functions

2017-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 23 Sep 2017 21:10:02 +0200 The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written "!format" Thus fix the affected source code places. Signed-off-by: Markus Elfring --- drivers/media/platform/qcom/camss-8x16/c

[PATCH] Fix C++ kernel in include/linux/mtd/mtd.h

2017-09-23 Thread Pavel Machek
C++ comments look wrong in kernel tree. Fix one. Signed-off-by: Pavel Machek diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 6cd0f6b..849543f1 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -267,7 +267,7 @@ struct mtd_info { */ unsigne

[PATCH] au1k_ir.c fix warning: Prefer [subsystem eg: netdev]_info([subsystem]dev, ...

2017-09-23 Thread Yurii Pavlenko
This patch fixes the following checkpatch.pl warning: fix Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Yurii Pavlenko --- drivers/staging/irda/drivers/au1k_ir.c | 40 +++--- 1 fi

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-23 Thread Al Viro
On Sat, Sep 23, 2017 at 06:19:26PM +0100, Al Viro wrote: > On Sat, Sep 23, 2017 at 05:55:37PM +0100, Al Viro wrote: > > > IOW, the loop on failure exit should go through the bio, like > > __bio_unmap_user() > > does. We *also* need to put everything left unused in pages[], but only > > from the

Re: [PATCH v2 01/31] coccinelle: Improve setup_timer.cocci matching

2017-09-23 Thread Julia Lawall
On Wed, 20 Sep 2017, Kees Cook wrote: > This improves the patch mode of setup_timer.cocci. Several patterns > were missing: > - assignments-before-init_timer() cases > - limit the .data case removal to the specific struct timer_list instance > - handling calls by dereference (timer->field vs

[PATCH 2/2] iio: accel: mma8452: Fix code style warning for unsigned int declarations

2017-09-23 Thread Harinath Nampally
Replace 'unsigned' with 'unsigned int' to improve code readability. Issue found by checkpatch. Signed-off-by: Harinath Nampally --- drivers/iio/accel/mma8452.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index

[PATCH 1/2] iio: accel: mma8452: Fix code style warning

2017-09-23 Thread Harinath Nampally
Replace symbolic permissions with octal permissions to improve code readability. Issue found by checkpatch. Signed-off-by: Harinath Nampally --- drivers/iio/accel/mma8452.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/

[PATCH 0/2] This patchset is for fixes reported by checkpatch.pl

2017-09-23 Thread Harinath Nampally
Please find the following patches: iio: accel: mma8452: Fix code style warning for symbolic permissions iio: accel: mma8452: Fix code style warning for unsigned int declarations drivers/iio/accel/mma8452.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.7.4

  1   2   >