Re: [RFC PATCH] x86: Move away from /dev/cpu/*/msr

2016-06-15 Thread Len Brown
On Wed, Jun 15, 2016 at 12:56 PM, Borislav Petkov wrote: > On Wed, Jun 15, 2016 at 12:41:21PM -0400, Len Brown wrote: >> Recent hardware has an additional MSR field >> >> MSR_IA32_HWP_REQUEST.ENERGY_PERFORMANCE_PREFERENCE >> that replaces >> >> MSR_IA32_ENERGY_PERF_BIAS >> for the purpose of P-sta

Re: [RFC PATCH-tip v2 2/6] locking/rwsem: Stop active read lock ASAP

2016-06-15 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 06:48:05PM -0400, Waiman Long wrote: > Currently, when down_read() fails, the active read locking isn't undone > until the rwsem_down_read_failed() function grabs the wait_lock. If the > wait_lock is contended, it may takes a while to get the lock. During > that period, writ

Re: Playing with virtually mapped stacks (with guard pages!)

2016-06-15 Thread Andy Lutomirski
On Wed, Jun 15, 2016 at 10:05 AM, Kees Cook wrote: > On Tue, Jun 14, 2016 at 11:01 PM, Andy Lutomirski wrote: >> Hi all- >> >> If you want to play with virtually mapped stacks, I have it more or >> less working on x86 in a branch here: >> >> https://git.kernel.org/cgit/linux/kernel/git/luto/linux

Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe

2016-06-15 Thread Andy Lutomirski
On Jun 15, 2016 7:25 AM, "Borislav Petkov" wrote: > > On Wed, Jun 15, 2016 at 08:25:57PM +0800, kernel test robot wrote: > > [0.556833] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 > > bytes) > > [0.559888] [ cut here ] > > [0.559888] [

Re: [PATCH v5 2/3] drm/arm: Add support for Mali Display Processors

2016-06-15 Thread Chris Wilson
On Wed, Jun 15, 2016 at 06:21:04PM +0100, Liviu Dudau wrote: > On Wed, Jun 15, 2016 at 07:13:15PM +0200, Daniel Vetter wrote: > > On Wed, Jun 15, 2016 at 6:17 PM, Liviu Dudau wrote: > > > On Wed, Jun 15, 2016 at 05:23:10PM +0200, Daniel Vetter wrote: > > >> On Wed, Jun 15, 2016 at 03:51:34PM +0100

Re: [RFC PATCH-tip v2 3/6] locking/rwsem: Enable count-based spinning on reader

2016-06-15 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 06:48:06PM -0400, Waiman Long wrote: > static bool rwsem_optimistic_spin(struct rw_semaphore *sem) > { > - bool taken = false; > + bool taken = false, can_spin; I would place the variables without assignment first. > + int loopcnt; > > preempt_disable

Re: [RFC PATCH] x86: Move away from /dev/cpu/*/msr

2016-06-15 Thread Borislav Petkov
On Wed, Jun 15, 2016 at 01:21:01PM -0400, Len Brown wrote: > The API -- the name -- must be clear about what MSR it talks to. Didn't I say that?! "Surely we can make the new interface work too - perhaps add a new sysfs file for the new thing." > I suggest that the name exactly match the name of

Re: [PATCH perf/core v11 07/20] perf probe: Add --cache option to cache the probe definitions

2016-06-15 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 15, 2016 at 12:28:40PM +0900, Masami Hiramatsu escreveu: > From: Masami Hiramatsu > > Add --cache option to cache the probe definitions. This > just saves the result of the dwarf analysis to probe cache. So, I applied up to this patch and will test build and send to Ingo today, but f

Re: [RFC PATCH-tip v2 4/6] locking/rwsem: move down rwsem_down_read_failed function

2016-06-15 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 06:48:07PM -0400, Waiman Long wrote: > Move the rwsem_down_read_failed() function down to below the optimistic > spinning section before enabling optimistic spinning for the readers. newline > There is no change in code. Changelog fails to explain the why part.

Re: [RFC PATCH] x86: Move away from /dev/cpu/*/msr

2016-06-15 Thread Len Brown
> Well, since the utility is part of tools/, it goes with the kernel > version. Just like perf. > > Or are you dying to be able to use new tool on old kernels? Yes. Enterprise customers use old kernels. They need at least a snapshot of the utility that works w/o the API update. -- Len Brown, In

Re: perf probe issues

2016-06-15 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 15, 2016 at 11:02:01AM +0900, Masami Hiramatsu escreveu: > On Tue, 14 Jun 2016 14:05:04 -0300 > Arnaldo Carvalho de Melo wrote: > > While investigating a problem in the annotation code reported by > > Linus, with "kaslr" on the kernel command line and this in .config: > > [root@jo

Re: [RFC PATCH-tip v2 5/6] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation

2016-06-15 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 06:48:08PM -0400, Waiman Long wrote: > even the reduced maximum of about 16k (32-bit) or 1G (64-bit) should > be more than enough for the foreseeable future. So what happens if I manage to create 16k+ threads on my 32bit kernel and get them all to do mmap() or so at the sam

Re: [PATCH 15/21] time: Add time64_to_tm()

2016-06-15 Thread Deepa Dinamani
On Tue, Jun 14, 2016 at 2:18 PM, John Stultz wrote: > On Wed, Jun 8, 2016 at 10:04 PM, Deepa Dinamani > wrote: >> time_to_tm() takes time_t as an argument. >> time_t is not y2038 safe. >> Add time64_to_tm() that takes time64_t as an argument >> which is y2038 safe. >> The plan is to eventually r

Re: [RFC PATCH-tip v2 5/6] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation

2016-06-15 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 06:48:08PM -0400, Waiman Long wrote: > +++ b/arch/alpha/include/asm/rwsem.h > @@ -17,9 +17,9 @@ > #define RWSEM_UNLOCKED_VALUE 0xL > #define RWSEM_ACTIVE_BIAS0x0001L > #define RWSEM_ACTIVE_MASK0xL

Re: [PATCH v5 2/3] drm/arm: Add support for Mali Display Processors

2016-06-15 Thread Liviu Dudau
On Wed, Jun 15, 2016 at 06:35:37PM +0100, Chris Wilson wrote: > On Wed, Jun 15, 2016 at 06:21:04PM +0100, Liviu Dudau wrote: > > On Wed, Jun 15, 2016 at 07:13:15PM +0200, Daniel Vetter wrote: > > > On Wed, Jun 15, 2016 at 6:17 PM, Liviu Dudau wrote: > > > > On Wed, Jun 15, 2016 at 05:23:10PM +0200

Re: Playing with virtually mapped stacks (with guard pages!)

2016-06-15 Thread Kees Cook
On Wed, Jun 15, 2016 at 10:23 AM, Andy Lutomirski wrote: > On Wed, Jun 15, 2016 at 10:05 AM, Kees Cook wrote: >> On Tue, Jun 14, 2016 at 11:01 PM, Andy Lutomirski >> wrote: >>> Hi all- >>> >>> If you want to play with virtually mapped stacks, I have it more or >>> less working on x86 in a branc

Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe

2016-06-15 Thread Borislav Petkov
On Wed, Jun 15, 2016 at 10:23:39AM -0700, Andy Lutomirski wrote: > Did the "Call Trace" not show up? It did, but it is bollocks too: [0.020003] [ cut here ] [0.024009] WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe+0x6f/0x80 [0.0264

[tip:x86/platform] x86/platform/intel-mid: Enable GPIO expanders on Edison

2016-06-15 Thread tip-bot for Andy Shevchenko
Commit-ID: 00688272157d83e48d1369d7d11c479571324e40 Gitweb: http://git.kernel.org/tip/00688272157d83e48d1369d7d11c479571324e40 Author: Andy Shevchenko AuthorDate: Wed, 15 Jun 2016 12:48:53 +0300 Committer: Ingo Molnar CommitDate: Wed, 15 Jun 2016 12:52:54 +0200 x86/platform/intel-mid:

Re: [RFC PATCH] x86: Move away from /dev/cpu/*/msr

2016-06-15 Thread Borislav Petkov
On Wed, Jun 15, 2016 at 01:42:41PM -0400, Len Brown wrote: > Yes. Enterprise customers use old kernels. They need > at least a snapshot of the utility that works w/o the API update. Enterprise customers get the proper tool versions too. At least we - SUSE - make sure that is the case. -- Regar

Re: [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-15 Thread Luis R. Rodriguez
On Wed, Jun 15, 2016 at 05:44:01PM +0200, Julia Lawall wrote: > > > On Wed, 15 Jun 2016, Luis R. Rodriguez wrote: > > OK thanks. I remove --very-quiet now if --profile is used within SPFLAGS, > > I'll extend > > this to also avoid --very-quiet if --show-trying is used. SPFLAGS is where > > you

Re: [RFC][PATCH 3/8] sched/deadline/rtmutex: Dont miss the dl_runtime/dl_period update

2016-06-15 Thread Peter Zijlstra
On Wed, Jun 15, 2016 at 12:30:07PM -0400, Steven Rostedt wrote: > > +++ b/kernel/locking/rtmutex.c > > @@ -488,7 +488,7 @@ static int rt_mutex_adjust_prio_chain(st > > * enabled we continue, but stop the requeueing in the chain > > * walk. > > */ > > - if (waiter->prio == task->pr

Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe

2016-06-15 Thread Andy Lutomirski
On Wed, Jun 15, 2016 at 10:50 AM, Borislav Petkov wrote: > On Wed, Jun 15, 2016 at 10:23:39AM -0700, Andy Lutomirski wrote: >> Did the "Call Trace" not show up? > > It did, but it is bollocks too: > > [0.020003] [ cut here ] > [0.024009] WARNING: CPU: 0 PID: 0 at ar

Re: [PATCH resend] libata:fix kernel panic when hotplug

2016-06-15 Thread Tejun Heo
Hello, On Wed, Jun 15, 2016 at 05:15:32PM +0800, DingXiang wrote: > From: Miao Xie > > In normal condition,if we use sas protocol and hotplug a sata disk on a port, > the sas driver will send event "PORTE_BYTES_DMAED" and call function > "sas_porte_bytes_dmaed". > But if a sata disk is run io a

Re: [Cocci] [PATCH v3 3/6] scripts: add glimpse.sh for indexing the kernel

2016-06-15 Thread Luis R. Rodriguez
On Wed, Jun 15, 2016 at 12:26:19PM +0200, SF Markus Elfring wrote: > > Glimpse is a tool you can use to index the kernel. > > The tool was recently open sourced under the ISC license > > and can be obtained at: > > Do you find any official announcement for this software evolution? I had reached o

Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-15 Thread Matt Wilson
On Mon, Jun 13, 2016 at 11:46:13AM +0300, Netanel Belgazal wrote: > This is a driver for the forthcoming ENA family of networking devices. > > Signed-off-by: Netanel Belgazal [...] > + > +struct ena_napi { > + struct napi_struct napi cacheline_aligned; > + struct ena_ring *tx_ring;

Re: [PATCH v3 2/4] Add the latent_entropy gcc plugin

2016-06-15 Thread Kees Cook
On Tue, Jun 14, 2016 at 3:20 PM, Emese Revfy wrote: > This plugin mitigates the problem of the kernel having too little entropy > during > and after boot for generating crypto keys. > > It creates a local variable in every marked function. The value of this > variable is > modified by randomly c

Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe

2016-06-15 Thread Borislav Petkov
On Wed, Jun 15, 2016 at 10:55:34AM -0700, Andy Lutomirski wrote: > Isn't it this one? Yes, it is. > I'm not. If %pF points at some silly helper, we still want the frames below > it. Why silly helper? It points to the rIP where the *MSR instruction is. Can't get more precise than that. And yes

Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe

2016-06-15 Thread Andy Lutomirski
On Wed, Jun 15, 2016 at 11:07 AM, Borislav Petkov wrote: > On Wed, Jun 15, 2016 at 10:55:34AM -0700, Andy Lutomirski wrote: >> Isn't it this one? > > Yes, it is. > >> I'm not. If %pF points at some silly helper, we still want the frames below >> it. > > Why silly helper? It points to the rIP whe

[PATCH 18/19] perf probe: Introduce perf_cache interfaces

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Masami Hiramatsu Introduce perf_cache object and interfaces to create, add entries, commit, and delete the object. perf_cache represents a file for the cached "perf probe" definitions on one binary file or vmlinux which has its own build id. The probe cache file is located under the build-

[PATCH 14/19] perf stdio: Do not pass hists in hist_entry__fprintf

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa There's no need, we have the hists pointer in struct hist_entry. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1465928361-2442-8-git-send-email-jo...@kernel.org Signed-off-by: A

[PATCH] of: fix memory leak related to safe_name()

2016-06-15 Thread Frank Rowand
From: Frank Rowand Fix a memory leak resulting from memory allocation in safe_name(). This patch fixes all call sites of safe_name(). Mathieu Malaterre reported the memory leak on boot: On my PowerMac device-tree would generate a duplicate name: [0.023043] device-tree: Duplicate name in Po

[PATCH 11/19] perf stdio: Separate headers output

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Introducing hists__fprintf_headers function to separate the code that displays headers. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1465928361-2442-5-git-send-email-jo...@kern

[PATCH 19/19] perf probe: Add --cache option to cache the probe definitions

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Masami Hiramatsu Add --cache option to cache the probe definitions. This just saves the result of the dwarf analysis to probe cache. Signed-off-by: Masami Hiramatsu Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Brendan Gregg Cc: Hemant Kumar Cc: Masami Hiramatsu

[PATCH 13/19] perf stdio: Separate standard headers output

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Introducing hists__fprintf_standard_headers function to separate standard headers display code. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1465928361-2442-7-git-send-email-jo

[GIT PULL 00/19] perf/core improvements and fixes

2016-06-15 Thread Arnaldo Carvalho de Melo
/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160615 for you to fetch changes up to 2fd457a34525ea3bc609e377b46af759af8a7934: perf probe: Add --cache option to cache the probe definitions (2016-06-15 14:34:42 -0300

[PATCH 17/19] perf hists: Replace perf_evsel arg perf_hpp_fmt's width callback

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Replacing perf_evsel arg perf_hpp_fmt's width callback with hists object. This will be helpful in future for non evsel related hist browsers. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1465928361-2442-11-git-s

Re: BLKZEROOUT not zeroing md dev on VMDK

2016-06-15 Thread Arvind Kumar
It is possibly some race. We saw a WRITE SAME related issue in past for which Petr sent out a patch but looks like the patch didn't make it. :( https://groups.google.com/forum/#!topic/linux.kernel/1WGDSlyY0y0 Thanks! Arvind From: Sitsofe Wheeler Sent: Tu

[PATCH 10/19] perf tui: Separate hierarchy and standard headers output

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa It will be useful for future changes that enhance headers with multiple lines and span columns, which don't affect hierarchy headers. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org

[PATCH 03/19] perf probe: Fix to add NULL check for strndup

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Masami Hiramatsu Fix to add a NULL check for strndup when parsing probe trace command. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Brendan Gregg Cc: Hemant Kumar Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160608092920.3116.63319.stgit@

[PATCH 02/19] perf tools: Fix rm_rf() to handle non-regular files correctly

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Masami Hiramatsu Fix rm_rf() to handle non-regular files correctly. This fix includes two changes; - Fix to use lstat(3) instead of stat(3) since if the target file is a symbolic link, rm_rf() should unlink the symbolic link itself, not the file which pointed by the symlink. - Fix

[PATCH 16/19] perf hists: Replace perf_evsel arg perf_hpp_fmt's header callback

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Replacing perf_evsel arg perf_hpp_fmt's header callback with hists object. None of the actual callbacks actually use evsel object, also this will be helpful in future for non evsel related hist browsers. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijl

[PATCH 06/19] perf probe: Uncomment and export synthesize_perf_probe_point()

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Masami Hiramatsu Uncomment and export synthesize_perf_probe_point() which had once introduced but has been disabled for a long time. This renews the code and re-enable it. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Brendan Gregg Cc: Hemant Kumar Cc: Namhyung Kim

[PATCH 07/19] perf unwind: Fix compile error for static cross build

2016-06-15 Thread Arnaldo Carvalho de Melo
From: He Kuang Build failure for static cross-compiling on aarch64, with libunwind-x86 provided: $ file ./libunwind_for_x86_on_aarch64/lib/libunwind-x86.so.8.0.1 libunwind-x86.so.8.0.1: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, not stripped $ make

[PATCH 05/19] perf probe: Add perf_probe_event__copy()

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Masami Hiramatsu Add perf_probe_event__copy() to copy perf_probe_event data structure and sub data structures under given source perf_probe_event. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Brendan Gregg Cc: Hemant Kumar Cc: Namhyung Kim Cc: Peter Zijlstra Lin

[PATCH 15/19] perf stdio: Add use_callchain parameter to hists__fprintf

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa It will be convenient in following patches to display hists entries without callchains even if they are defined. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1465928361-2442-9-git-send-email-jo...@kernel.org Signe

[PATCH 08/19] perf mem: Add --ldlat option

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Adding --ldlat option to specify desired latency for loads event. Specify 50 as loads event latency: $ perf mem record -e ldlat-loads -v --ldlat 50 true calling: record -W -d -e cpu/mem-loads,ldlat=50/P true Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: P

[PATCH 01/19] perf config: Handle NULL at perf_config_set__delete()

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Taeung Song perf_config_set__delete() purge and free the config set that contains all config key-value pairs. But if the config set (i.e. 'set' variable at the function) is NULL, this is wrong so handle it. Signed-off-by: Taeung Song Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Masami Hira

[PATCH 12/19] perf stdio: Separate hierarchy headers output

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Introducing hists__fprintf_hierarchy_headers function to separate hierarchy headers display code. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1465928361-2442-6-git-send-email-

[PATCH 09/19] perf tools: Fix Data Object sort entry width index

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Putting correct HISTC_MEM_DADDR_DSO index to Data Object sort entry. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1465928361-2442-3-git-send-email-jo...@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- too

Re: stack validation warning on lttng-modules bytecode interpreter

2016-06-15 Thread Josh Poimboeuf
On Wed, Jun 15, 2016 at 04:55:16PM +, Mathieu Desnoyers wrote: > Hi Josh, > > I notice that with gcc 6.1.1, kernel 4.6, with > CONFIG_STACK_VALIDATION=y, building lttng-modules master > at commit 6c09dd94 gives this warning: > > lttng-modules/lttng-filter-interpreter.o: warning: objtool: > l

[PATCH 04/19] perf buildid: Rename and export build_id_cache__cachedir()

2016-06-15 Thread Arnaldo Carvalho de Melo
From: Masami Hiramatsu Rename and export build_id_cache__cachedir() for retrieving use of the path of cache directory for given build_id. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Brendan Gregg Cc: Hemant Kumar Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.

Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-15 Thread Matt Wilson
On Wed, Jun 15, 2016 at 11:07:17AM -0700, Matt Wilson wrote: > > You also had a few typos in the email addresses on the Cc: line that > I've corrected (d...@avemeloft.net -> da...@davemeloft.net, Argh, and of course I typo'ed the correction. -> da...@davemloft.net. --msw

initialize a mutex into locked state?

2016-06-15 Thread Oleg Drokin
Hello! To my surprise I found out that it's not possible to initialise a mutex into a locked state. I discussed it with Arjan and apparently there's no fundamental reason not to allow this. A typical use would be when you have a structure that you need to init and then add to some li

Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe

2016-06-15 Thread Borislav Petkov
On Wed, Jun 15, 2016 at 11:12:37AM -0700, Andy Lutomirski wrote: > I want to see actual_problem in the log. So the optimal thing to do for that is to return an error to the calling site which says "exception got handled" and then the *calling* site can dump_stack(). And the old code did that: st

Re: scripts: add glimpse.sh for indexing the kernel

2016-06-15 Thread SF Markus Elfring
> http://webglimpse.net/ > Its vaguely mentioned there. That's as good as it gets... How do you think about to insert the date "2014-09-26" into your commit message? >> https://github.com/gvelez17/glimpse/ > Sadly the original release didn't compile, I reported the issue in hopes it > would > b

Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier

2016-06-15 Thread Davidlohr Bueso
On Wed, 15 Jun 2016, Peter Zijlstra wrote: In any case, its fairly simple to cure, just add smp_acquire__after_ctrl_dep() at the end. If we bail because need_resched() we don't need the acquire I think. I was just considering this for your smp_cond_acquire/smp_cond_load_acquire rework, so yeah

Re: [PATCHv2] arm64: Handle el1 synchronous instruction aborts cleanly

2016-06-15 Thread Laura Abbott
On 06/15/2016 04:00 AM, Mark Rutland wrote: Hi Laura, On Tue, Jun 14, 2016 at 11:00:35AM -0700, Laura Abbott wrote: Executing from a non-executable area gives an ugly message: lkdtm: Performing direct entry EXEC_RODATA lkdtm: attempting ok execution at 084c0e08 lkdtm: attempting bad ex

[PATCH 2/3] acpi i2c: Initialize info.type from of_compatible

2016-06-15 Thread Crestez Dan Leonard
When using devicetree i2c_board_info.type is set to the compatible string with the vendor prefix removed. For I2C devices described via ACPI the i2c_board_info.type string is set to the ACPI device name. When using ACPI and DT ids this string ends up something like "PRP0001:00". If the of_compatib

[PATCH 1/3] acpi: Export acpi_of_modalias equiv of of_modalias_node

2016-06-15 Thread Crestez Dan Leonard
When using devicetree stuff like i2c_client.name or spi_device.modalias is initialized to the first DT compatible id with the vendor prefix stripped. Since some drivers rely on this try to replicate it when using ACPI with DT ids. Signed-off-by: Crestez Dan Leonard --- drivers/acpi/bus.c |

[PATCH 0/3] Init device ids from ACPI of_compatible

2016-06-15 Thread Crestez Dan Leonard
When using devicetree stuff like i2c_client.name or spi_device.modalias is initialized to the first DT compatible id with the vendor prefix stripped. Since some drivers rely on this try to replicate it when using ACPI with DT ids. Drivers rely on these ids in order to differentiate between hardwar

[PATCH 3/3] acpi spi: Initialize modalias from of_compatible

2016-06-15 Thread Crestez Dan Leonard
When using devicetree spi_device.modalias is set to the compatible string with the vendor prefix removed. For SPI devices described via ACPI the i2c_board_info.type string is initialized by acpi_device_hid. When using ACPI and DT ids this string ends up something like "PRP0001". Change acpi_regist

[PATCH v2 0/3] net: stmmac: dwmac-rk: fixes for Wake-on-Lan on RK3288

2016-06-15 Thread Vincent Palatin
In order to support Wake-On-Lan when using the RK3288 integrated MAC (with an external RGMII PHY), we need to avoid shutting down the regulator of the external PHY when the MAC is suspended as it's currently done in the MAC platform code. As a first step, create independant callbacks for suspend/re

[PATCH v2 2/3] net: stmmac: dwmac-rk: keep the PHY up for WoL

2016-06-15 Thread Vincent Palatin
When suspending the machine, do not shutdown the external PHY by cutting its regulator in the mac platform driver suspend code if Wake-on-Lan is enabled, else it cannot wake us up. In order to do this, split the suspend/resume callbacks from the init/exit callbacks, so we can condition the power-do

[PATCH v2 1/3] net: stmmac: allow to split suspend/resume from init/exit callbacks

2016-06-15 Thread Vincent Palatin
Let the stmmac platform drivers provide dedicated suspend and resume callbacks rather than always re-using the init and exits callbacks. If the driver does not provide the suspend or resume callback, we fall back to the old behavior trying to use exit or init. This allows a specific platform to pe

[PATCH v2 3/3] ARM: dts: rockchip: add interrupt for Wake-on-Lan on RK3288

2016-06-15 Thread Vincent Palatin
In order to use Wake-on-Lan on RK3288 integrated MAC, we need to wake-up the CPU on the PMT interrupt when the MAC and the PHY are in low power mode. Adding the interrupt declaration. Signed-off-by: Vincent Palatin --- arch/arm/boot/dts/rk3288.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 d

Re: [PATCH 4/5] nvmet-rdma: add a NVMe over Fabrics RDMA target driver

2016-06-15 Thread Sagi Grimberg
Looking at rdma_destroy_id(), I think it is invalid to call it from the event handler: ... So I withdraw my comment about nvmet. I think the code is fine as-is. The 2nd reject results in a no-op since the connection request was rejected by nvmet. I was just catching up on this after a s

[PATCH] selftests/exec: Makefile is a run-time dependency, add it to the install list

2016-06-15 Thread Yannick Brosseau
The execveat test try to exec the Makefile file and expect an EACCES results. When running the test in the installed destination it would fail with ENOENT since the file is not there. Add Makefile to the TEST_FILES list so it's copied at install time. Signed-off-by: Yannick Brosseau --- tools/

Re: [PATCH v2 00/13] Runtime PM for Thunderbolt on Macs

2016-06-15 Thread Lukas Wunner
[+cc Linus, Greg KH] On Tue, Jun 14, 2016 at 03:22:28PM -0500, Bjorn Helgaas wrote: > On Tue, Jun 14, 2016 at 09:14:27PM +0200, Andreas Noever wrote: > > On Tue, Jun 14, 2016 at 6:37 PM, Bjorn Helgaas wrote: > > > On Sat, May 21, 2016 at 11:48:42AM +0200, Andreas Noever wrote: > > > > On Fri, May

Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-15 Thread Matt Wilson
On Wed, Jun 15, 2016 at 09:32:35PM +0300, Netanel Belgazal wrote: > I removed HAVE_NETDEV_NAPI_LIST and fixed the ena print macro. > I'll wait a bit to see if there are additional comment before I'll send the > v2 patch. Also, please don't top post (reply inline) and send emails as plain text only

Re: [PATCH v3 2/2] media: et8ek8: Add documentation

2016-06-15 Thread Rob Herring
On Tue, Jun 14, 2016 at 11:31 PM, Sakari Ailus wrote: > Hi Rob, > > On Tue, Jun 14, 2016 at 05:05:17PM -0500, Rob Herring wrote: >> On Sat, Jun 11, 2016 at 06:39:53PM +0300, Ivaylo Dimitrov wrote: >> > Add DT bindings description >> >> Not exactly the best commit msg. >> >> > >> > Signed-off-by: I

Re: [PATCH 3.12 00/56] 3.12.61-stable review

2016-06-15 Thread Guenter Roeck
On Wed, Jun 15, 2016 at 09:30:14AM +0200, Jiri Slaby wrote: > This is the start of the stable review cycle for the 3.12.61 release. > There are 56 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. > > R

Re: scripts: add glimpse.sh for indexing the kernel

2016-06-15 Thread Luis R. Rodriguez
On Wed, Jun 15, 2016 at 08:24:03PM +0200, SF Markus Elfring wrote: > > http://webglimpse.net/ > > Its vaguely mentioned there. That's as good as it gets... > > How do you think about to insert the date "2014-09-26" into your commit > message? Sure. > >> https://github.com/gvelez17/glimpse/ > > S

Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier

2016-06-15 Thread Peter Zijlstra
On Wed, Jun 15, 2016 at 11:27:24AM -0700, Davidlohr Bueso wrote: > On Wed, 15 Jun 2016, Peter Zijlstra wrote: > > >In any case, its fairly simple to cure, just add > >smp_acquire__after_ctrl_dep() at the end. If we bail because > >need_resched() we don't need the acquire I think. > > I was just c

Re: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe

2016-06-15 Thread Andy Lutomirski
On Wed, Jun 15, 2016 at 11:23 AM, Borislav Petkov wrote: > On Wed, Jun 15, 2016 at 11:12:37AM -0700, Andy Lutomirski wrote: >> I want to see actual_problem in the log. > > So the optimal thing to do for that is to return an error to the calling > site which says "exception got handled" and then th

Re: [PATCH v5 2/2] phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy

2016-06-15 Thread Heiko Stübner
Hi Frank, Am Mittwoch, 15. Juni 2016, 18:58:43 schrieb Frank Wang: > On 2016/6/15 17:04, Heiko Stübner wrote: > > Am Mittwoch, 15. Juni 2016, 11:23:26 schrieb Frank Wang: > >> On 2016/6/14 21:27, Heiko Stübner wrote: > >>> Am Montag, 13. Juni 2016, 10:10:10 schrieb Frank Wang: > The newer SoC

Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier

2016-06-15 Thread Davidlohr Bueso
On Wed, 15 Jun 2016, Peter Zijlstra wrote: On Wed, Jun 15, 2016 at 11:27:24AM -0700, Davidlohr Bueso wrote: On Wed, 15 Jun 2016, Peter Zijlstra wrote: >In any case, its fairly simple to cure, just add >smp_acquire__after_ctrl_dep() at the end. If we bail because >need_resched() we don't need t

Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin

2016-06-15 Thread Kees Cook
On Tue, Jun 14, 2016 at 3:17 PM, Emese Revfy wrote: > I would like to introduce the latent_entropy gcc plugin. This plugin mitigates > the problem of the kernel having too little entropy during and after boot > for generating crypto keys. > > This plugin mixes random values into the latent_entropy

Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier

2016-06-15 Thread Waiman Long
On 06/15/2016 04:04 AM, Boqun Feng wrote: Hi Waiman, On Tue, Jun 14, 2016 at 06:48:04PM -0400, Waiman Long wrote: The osq_lock() and osq_unlock() function may not provide the necessary acquire and release barrier in some cases. This patch makes sure that the proper barriers are provided when os

[PATCH v10] x86/boot: Refuse to build with data relocations

2016-06-15 Thread Kees Cook
The compressed kernel is built with -fPIC/-fPIE so that it can run in any location a bootloader happens to put it. However, since ELF relocation processing is not happening (and all the relocation information has already been stripped at link time), none of the code can use data relocations (e.g. s

[PATCH v10] x86/KASLR: Clarify identity map interface

2016-06-15 Thread Kees Cook
This extracts the call to prepare_level4() into a top-level function that the user of the pagetable.c interface must call to initialize the new page tables. For clarity and to match the "finalize" function, it has been renamed to initialize_identity_maps(). This function also gains the initializati

Re: [rfc patch] sched/fair: Use instantaneous load for fork/exec balancing

2016-06-15 Thread Dietmar Eggemann
On 15/06/16 17:03, Mike Galbraith wrote: > On Wed, 2016-06-15 at 16:32 +0100, Dietmar Eggemann wrote: > >>> In general, the fuzz helps us to not be so spastic. I'm not sure that >>> we really really need to care all that much, because I strongly suspect >>> that it's only gonna make any differenc

[PATCHv2 0/3] x86/UV, x86/efi: Re-factor efi_call_virt for general use

2016-06-15 Thread Alex Thorlton
Hey guys, This patchset creates a general purpose version of the efi_call_virt macro that does not assume that the function pointer being passed in is inside of efi.systab->runtime. It also fixes up uv_bios_call to use the new functionality, and does a bit of cleanup in the efi_thunk macro. Quic

[PATCH 3/3] Update efi_thunk to use the the arch_efi_call_virt* macros

2016-06-15 Thread Alex Thorlton
Currently, the efi_thunk macro has some semi-duplicated code in it that can be replaced with the arch_efi_call_virt_setup/teardown macros. This commit simply replaces the duplicated code with those macros. Signed-off-by: Alex Thorlton Suggested-by: Matt Fleming Cc: Russ Anderson Cc: Dimitri Siv

[PATCH 1/3] Convert efi_call_virt to efi_call_virt_pointer

2016-06-15 Thread Alex Thorlton
This commit makes a few slight modifications to the efi_call_virt macro to get it to work with function pointers that are stored in locations other than efi.systab->runtime, and renames the macro to efi_call_virt_pointer. The majority of the changes here are to pull these macros up into header fil

[PATCH 2/3] Update uv_bios_call to use efi_call_virt_pointer

2016-06-15 Thread Alex Thorlton
Now that the efi_call_virt macro has been generalized to be able to use EFI system tables besides efi.systab, we are able to convert our uv_bios_call wrapper to use this standard EFI callback mechanism. This simple change is part of a much larger effort to recover from some issues with the way we

[PATCH] x86/mm: Do not reference phys addr beyond kernel

2016-06-15 Thread Kees Cook
From: Thomas Garnier The new physical address randomized KASLR implementation can cause the kernel to be aligned close to the end of physical memory. In this case, _brk_end aligned to PMD will go beyond what is expected safe and hit the assert in __phys_addr_symbol(): VIRTUAL_BUG_ON(y >=

Re: [PATCH 4/4] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci

2016-06-15 Thread Luis R. Rodriguez
On Wed, Jun 15, 2016 at 06:52:27PM +0200, Julia Lawall wrote: > > > On Wed, 15 Jun 2016, Luis R. Rodriguez wrote: > > > On Wed, Jun 15, 2016 at 06:11:57PM +0200, Julia Lawall wrote: > > > > > > > > > On Wed, 15 Jun 2016, Luis R. Rodriguez wrote: > > > > > > > On Wed, Jun 15, 2016 at 05:55:34PM +

Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier

2016-06-15 Thread Waiman Long
On 06/15/2016 01:12 PM, Peter Zijlstra wrote: On Wed, Jun 15, 2016 at 09:56:59AM -0700, Davidlohr Bueso wrote: On Tue, 14 Jun 2016, Waiman Long wrote: +++ b/kernel/locking/osq_lock.c @@ -115,7 +115,7 @@ bool osq_lock(struct optimistic_spin_queue *lock) * cmpxchg in an attempt to undo o

Re: [RFC PATCH-tip 6/6] xfs: Enable reader optimistic spinning for DAX inodes

2016-06-15 Thread Waiman Long
On 06/14/2016 07:06 PM, Dave Chinner wrote: On Tue, Jun 14, 2016 at 02:12:39PM -0400, Waiman Long wrote: This patch enables reader optimistic spinning for inodes that are under a DAX-based mount point. On a 4-socket Haswell machine running on a 4.7-rc1 tip-based kernel, the fio test with multit

Re: [PATCH 2/4] scripts: add reqs python library

2016-06-15 Thread Michal Marek
Dne 15.6.2016 v 18:02 Luis R. Rodriguez napsal(a): > On Wed, Jun 15, 2016 at 09:50:11AM +0200, Michal Marek wrote: >> On 2016-06-15 00:10, Luis R. Rodriguez wrote: >>> +weight = (int(rel_specs['VERSION'])<< 32) + \ >>> + (int(rel_specs['PATCHLEVEL']) << 16) + \ >>> +

Re: [PATCH] of: fix memory leak related to safe_name()

2016-06-15 Thread Rob Herring
On Wed, Jun 15, 2016 at 1:13 PM, Frank Rowand wrote: > From: Frank Rowand > > Fix a memory leak resulting from memory allocation in safe_name(). > This patch fixes all call sites of safe_name(). > > Mathieu Malaterre reported the memory leak on boot: > > On my PowerMac device-tree would generate

Re: stack validation warning on lttng-modules bytecode interpreter

2016-06-15 Thread Mathieu Desnoyers
- On Jun 15, 2016, at 2:18 PM, Josh Poimboeuf jpoim...@redhat.com wrote: > On Wed, Jun 15, 2016 at 04:55:16PM +, Mathieu Desnoyers wrote: >> Hi Josh, >> >> I notice that with gcc 6.1.1, kernel 4.6, with >> CONFIG_STACK_VALIDATION=y, building lttng-modules master >> at commit 6c09dd94 give

Re: [PATCHv2] kcov: reject open when kernel not instrumented

2016-06-15 Thread Dmitry Vyukov
On Wed, Jun 15, 2016 at 7:04 PM, Mark Rutland wrote: > If the toolchain does not support -fsanitize-coverage=trace-pc, we blat > this option from CFLAGS_KCOV, and build the kernel without > instrumentation, even if CONFIG_KCOV was selected. However, we still > build the rest of the kcov infrastruc

Re: [RFC PATCH-tip v2 2/6] locking/rwsem: Stop active read lock ASAP

2016-06-15 Thread Waiman Long
On 06/15/2016 01:22 PM, Peter Zijlstra wrote: On Tue, Jun 14, 2016 at 06:48:05PM -0400, Waiman Long wrote: Currently, when down_read() fails, the active read locking isn't undone until the rwsem_down_read_failed() function grabs the wait_lock. If the wait_lock is contended, it may takes a while

Re: [RFC PATCH-tip v2 4/6] locking/rwsem: move down rwsem_down_read_failed function

2016-06-15 Thread Waiman Long
On 06/15/2016 01:40 PM, Peter Zijlstra wrote: On Tue, Jun 14, 2016 at 06:48:07PM -0400, Waiman Long wrote: Move the rwsem_down_read_failed() function down to below the optimistic spinning section before enabling optimistic spinning for the readers. newline There is no change in code. Changel

Re: [PATCH v3 2/2] media: et8ek8: Add documentation

2016-06-15 Thread Ivaylo Dimitrov
On 15.06.2016 21:41, Rob Herring wrote: On Tue, Jun 14, 2016 at 11:31 PM, Sakari Ailus wrote: Hi Rob, On Tue, Jun 14, 2016 at 05:05:17PM -0500, Rob Herring wrote: On Sat, Jun 11, 2016 at 06:39:53PM +0300, Ivaylo Dimitrov wrote: Add DT bindings description Not exactly the best commit msg.

[BUG] Sleeping in atomic context, nfs_alloc_fattr, next-20160615

2016-06-15 Thread Krzysztof Kozlowski
;sig->cred_guard_mutex){..}, at: [] prepare_bprm_creds+0x28/0x74 #1: (rcu_read_lock){..}, at: [] nfs_permission+0x68/0x23c CPU: 3 PID: 232 Comm: kworker/u16:0 Not tainted 4.7.0-rc3-next-20160615 #633 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (sho

Re: [PATCH 1/2] workqueue: Move wq_update_unbound_numa() to the beginning of CPU_ONLINE

2016-06-15 Thread Gautham R Shenoy
Hello Tejun, On Wed, Jun 15, 2016 at 11:53:50AM -0400, Tejun Heo wrote: > Hello, > > On Tue, Jun 07, 2016 at 08:44:02PM +0530, Gautham R. Shenoy wrote: > > Currently in the CPU_ONLINE workqueue handler, the > > restore_unbound_workers_cpumask() will never call > > set_cpus_allowed_ptr() for a new

Re: [PATCH v5 2/3] drm/arm: Add support for Mali Display Processors

2016-06-15 Thread Daniel Vetter
On Wed, Jun 15, 2016 at 7:21 PM, Liviu Dudau wrote: > On Wed, Jun 15, 2016 at 07:13:15PM +0200, Daniel Vetter wrote: >> On Wed, Jun 15, 2016 at 6:17 PM, Liviu Dudau wrote: >> > On Wed, Jun 15, 2016 at 05:23:10PM +0200, Daniel Vetter wrote: >> >> On Wed, Jun 15, 2016 at 03:51:34PM +0100, Liviu Dud

Re: [RFC PATCH-tip v2 5/6] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation

2016-06-15 Thread Waiman Long
On 06/15/2016 01:43 PM, Peter Zijlstra wrote: On Tue, Jun 14, 2016 at 06:48:08PM -0400, Waiman Long wrote: even the reduced maximum of about 16k (32-bit) or 1G (64-bit) should be more than enough for the foreseeable future. So what happens if I manage to create 16k+ threads on my 32bit kernel a

<    2   3   4   5   6   7   8   9   10   11   >