[PATCH 08/14] lib/kasprintf.c: add sanity check to kvasprintf

2015-11-23 Thread Rasmus Villemoes
kasprintf relies on being able to replay the formatting and getting the same result (in particular, the same length). This will almost always work, but it is possible that the object pointed to by a %s or %p argument changed under us (so we might get truncated output). Add a somewhat paranoid sanit

[PATCH 10/14] lib/test_printf.c: check for out-of-bound writes

2015-11-23 Thread Rasmus Villemoes
Add a few padding bytes on either side of the test buffer, and check that these (and the part of the buffer not used) are untouched by vsnprintf. Acked-by: Kees Cook Signed-off-by: Rasmus Villemoes --- lib/test_printf.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletion

[PATCH 13/14] lib/test_printf.c: add test for large bitmaps

2015-11-23 Thread Rasmus Villemoes
Following "lib/vsprintf.c: expand field_width to 24 bits", let's add a test to see that we now actually support bitmaps with 65536 bits. Cc: Maurizio Lombardi Cc: Tejun Heo Acked-by: Kees Cook Signed-off-by: Rasmus Villemoes --- lib/test_printf.c | 17 + 1 file changed, 17 ins

[PATCH 14/14] lib/test_printf.c: test dentry printing

2015-11-23 Thread Rasmus Villemoes
Cc: Al Viro Signed-off-by: Rasmus Villemoes --- lib/test_printf.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/lib/test_printf.c b/lib/test_printf.c index 705907aec901..6b7c4a1ec141 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -13,6 +13,7 @@ #inc

[PATCH 09/14] lib/test_printf.c: don't BUG

2015-11-23 Thread Rasmus Villemoes
BUG is a completely unnecessarily big hammer, and we're more likely to get the internal bug reported if we just pr_err() and ensure the test suite fails. Acked-by: Kees Cook Signed-off-by: Rasmus Villemoes --- lib/test_printf.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -

Re: [RFC/PATCH 0/3] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions

2015-11-23 Thread Stephen Boyd
On 11/23, Arnd Bergmann wrote: > On Monday 23 November 2015 12:38:47 Stephen Boyd wrote: > > On 11/23, Arnd Bergmann wrote: > > > On Monday 23 November 2015 09:14:39 Christopher Covington wrote: > > > > On 11/23/2015 03:15 AM, Arnd Bergmann wrote: > > > > LPAE is only supported in the Krait 450. >

[PATCH 11/14] lib/test_printf.c: test precision quirks

2015-11-23 Thread Rasmus Villemoes
The kernel's printf doesn't follow the standards in a few corner cases (which are probably mostly irrelevant). Add tests that document the current behaviour. Cc: Kees Cook Signed-off-by: Rasmus Villemoes --- lib/test_printf.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deleti

[PATCH 12/14] lib/test_printf.c: account for kvasprintf tests

2015-11-23 Thread Rasmus Villemoes
These should also count as performed tests. Acked-by: Kees Cook Signed-off-by: Rasmus Villemoes --- lib/test_printf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/test_printf.c b/lib/test_printf.c index 5f742b99cfdc..fc9169d360ba 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c

Re: [RFC] asm-generic: default BUG_ON(x) to "if(x) BUG()"

2015-11-23 Thread Arnd Bergmann
On Monday 23 November 2015 13:17:48 Josh Triplett wrote: > > not sure where I can find tinyconfig, > > "make tinyconfig" in the standard kernel tree. It turns on a few > options that make the kernel even smaller. I should learn how that works. We have way too many configuration files on ARM and

Re: [PATCH v8 00/61] PCI: Resource allocation cleanup for v4.4

2015-11-23 Thread Khalid Aziz
On Fri, 2015-10-30 at 18:53 -0700, Yinghai Lu wrote: > On Fri, Oct 30, 2015 at 2:47 PM, Khalid Aziz wrote: > > > > I applied patches 1-8 and 11-16 to 4.3.0-rc7 to test on sparc platforms. I > > am seeing a "can't claim BAR" message on a T4: > > > > pci :04:00.0: can't claim BAR 6 [mem 0x84

[PATCH 05/14] lib/vsprintf.c: help gcc make number() smaller

2015-11-23 Thread Rasmus Villemoes
One consequence of the reorganization of struct printf_spec to make field_width 24 bits was that number() gained about 180 bytes. Since spec is never passed to other functions, we can help gcc make number() lose most of that extra weight by using local variables for the field width and precision.

[PATCH 07/14] lib/vsprintf.c: slightly refactor vscnprintf()

2015-11-23 Thread Rasmus Villemoes
If we're given a size of 0, the vsnprintf() won't have any side effects, and neither "i < size" or "size != 0" will trigger. So we might as well return 0 immediately. Signed-off-by: Rasmus Villemoes --- lib/vsprintf.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib

Re: [RFC/PATCH 2/3] recordmcount: Record locations of __aeabi_{u}idiv() calls on ARM

2015-11-23 Thread Russell King - ARM Linux
On Mon, Nov 23, 2015 at 01:16:01PM -0800, Stephen Boyd wrote: > Thanks. I don't see the prints on my system even with this config > on top of allyesconfig. Odd. Hmm. It could be because I use ccache in hardlink mode to avoid the disk overhead of having two copies and having to duplicate the file

[PATCH 06/14] lib/vsprintf.c: warn about too large precisions and field widths

2015-11-23 Thread Rasmus Villemoes
The field width is overloaded to pass some extra information for some %p extensions (e.g. #bits for %pb). But we might silently truncate the passed value when we stash it in struct printf_spec (see e.g. "lib/vsprintf.c: expand field_width to 24 bits"). Hopefully 23 value bits should now be enough

[PATCH 03/14] lib/vsprintf.c: eliminate potential race in string()

2015-11-23 Thread Rasmus Villemoes
If the string corresponding to a %s specifier can change under us, we might end up copying a \0 byte to the output buffer. There might be callers who expect the output buffer to contain a genuine C string whose length is exactly the snprintf return value (assuming truncation hasn't happened or has

Re: [PATCH v12 01/30] tracing: Update cond flag when enabling or disabling a trigger

2015-11-23 Thread Steven Rostedt
On Mon, 23 Nov 2015 13:51:16 -0600 Tom Zanussi wrote: > When a trigger is enabled, the cond flag should be set beforehand, > otherwise a trigger that's expecting to process a trace record > (e.g. one with post_trigger set) could be invoked without one. > > Likewise a trigger's cond flag should b

[PATCH 02/14] lib/vsprintf.c: move string() below widen_string()

2015-11-23 Thread Rasmus Villemoes
This is pure code movement, making sure the widen_string() helper is defined before the string() function. Cc: Ingo Molnar Signed-off-by: Rasmus Villemoes --- lib/vsprintf.c | 62 +- 1 file changed, 31 insertions(+), 31 deletions(-) diff

[PATCH 00/14] printf stuff for 4.5

2015-11-23 Thread Rasmus Villemoes
I was too late for 4.4, so here's hoping to get this into 4.5. 1-3 fix a theoretical race in printing strings via %s - since we're reusing existing code from the dentry printer, we actually also win on code size. Ingo, can I perhaps get you to turn your "looks good to" into an ack? 4 fixes a prob

Re: [PATCH v2 2/5] clk: sunxi: Add driver for the H3 THS clock

2015-11-23 Thread Rob Herring
On Mon, Nov 23, 2015 at 09:02:49AM +0100, Josef Gajdusek wrote: > This patch adds a driver for the THS clock which is present on the > Allwinner H3. > > Signed-off-by: Josef Gajdusek Acked-by: Rob Herring > --- > Documentation/devicetree/bindings/clock/sunxi.txt | 1 + > drivers/clk/sunxi/Ma

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue

2015-11-23 Thread Rainer Weikusat
David Miller writes: > From: Rainer Weikusat >> Rainer Weikusat writes: >> An AF_UNIX datagram socket being the client in an n:1 association [...] > Applied and queued up for -stable, I'm sorry for this 13th hour request/ suggestion but while thinking about a reply to Dmitry, it occurred to m

Re: [RFC/PATCH] perf tools: Introduce perf_thread for backtrace

2015-11-23 Thread Arnaldo Carvalho de Melo
Em Fri, Nov 20, 2015 at 03:03:03PM +0900, Namhyung Kim escreveu: > Backtrace is a crucial info for debugging. And upcoming refcnt > tracking facility also wants to use it. > > So instead of relying on glibc's backtrace_symbols[_fd] which misses > some (static) functions , use our own symbol searc

Re: [PATCH RESEND] pwm: ftm: fix clock enable/disable when using PM

2015-11-23 Thread Stefan Agner
Thanks Thierry for looking into that! Added Li as recipient to start discussion. Some comments below: On 2015-11-23 01:45, Thierry Reding wrote: > On Wed, Nov 18, 2015 at 06:04:12PM -0800, Stefan Agner wrote: >> Thierry, >> >> I realized that this patch did not make it into 4.4-rc1, while others

[PATCH] staging: lustre: ptlrpc: constify ptlrpc_sec_cops structs

2015-11-23 Thread Aya Mahfouz
Constifies ptlrpc_sec_cops structures in the lustre driver since they are not modified after their initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall Signed-off-by: Aya Mahfouz --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 +- drivers/staging/lustre/lust

Re: [RFC PATCH 2/2] Crypto kernel tls socket

2015-11-23 Thread Dave Watson
On 11/23/15 02:27 PM, Sowmini Varadhan wrote: > On (11/23/15 09:43), Dave Watson wrote: > > Currently gcm(aes) represents ~80% of our SSL connections. > > > > Userspace interface: > > > > 1) A transform and op socket are created using the userspace crypto > > interface > > 2) Setsockopt ALG_SET_AU

Re: [PATCH] fs/file.c: __const_max is actually __const_min :-)

2015-11-23 Thread Rasmus Villemoes
On Thu, Oct 29 2015, Albino B Neto wrote: > 2015-10-29 9:01 GMT-02:00 Rasmus Villemoes : >> 7f4b36f9bb930 "get rid of files_defer_init()" inexplicably changed a >> min() to a __const_max() - but the __const_max macro actually gives >> the minimum... So no functional change, just less confusing na

Re: [PATCH 2/3] ftrace: add ftrace-buffer option

2015-11-23 Thread Steven Rostedt
On Mon, 2 Nov 2015 17:42:43 -0500 Mathieu Desnoyers wrote: > In order to use ftrace tracers to generate tracepoints without doing > tracing to its own hardcoded ring buffers, add a ftrace-buffer option > (default: 1). When set to 0, it disables tracing into the ftrace > hardcoded buffers. > Th

Re: [RFC PATCH] xfs: support for non-mmu architectures

2015-11-23 Thread Dave Chinner
On Mon, Nov 23, 2015 at 03:41:49AM +0200, Octavian Purdila wrote: > On Mon, Nov 23, 2015 at 12:44 AM, Dave Chinner wrote: > > On Sat, Nov 21, 2015 at 12:26:47AM +0200, Octavian Purdila wrote: > >> On Fri, Nov 20, 2015 at 11:08 PM, Dave Chinner wrote: > >> > On Fri, Nov 20, 2015 at 03:43:20PM +020

Re: [PATCH RESEND] pwm: ftm: fix clock enable/disable when using PM

2015-11-23 Thread Stefan Agner
On 2015-11-23 13:40, Stefan Agner wrote: > Thanks Thierry for looking into that! > > Added Li as recipient to start discussion. Yeah, kind of remember now, Li is not with Freescale anymore, at least his address bounces: The original message was received at Mon, 23 Nov 2015 14:50:20 -0700 from az

Re: [PATCH v5 2/8] watchdog: Introduce WDOG_RUNNING flag

2015-11-23 Thread Guenter Roeck
On Mon, Nov 23, 2015 at 08:26:06PM +0100, Uwe Kleine-König wrote: > Hello Guenter, > > On Sun, Nov 22, 2015 at 07:20:59PM -0800, Guenter Roeck wrote: > > diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h > > index b535b02b1d7f..f0292d56caf0 100644 > > --- a/include/linux/watchdog.h

Re: [PATCH v2 1/1] stop_machine: Remove stop_cpus_lock and lg_double_lock/unlock()

2015-11-23 Thread Tejun Heo
Hello, Oleg. On Sat, Nov 21, 2015 at 07:11:48PM +0100, Oleg Nesterov wrote: > stop_two_cpus() and stop_cpus() use stop_cpus_lock to avoid the deadlock, > we need to ensure that the stopper functions can't be queued "backwards" > from one another. This doesn't look nice; if we use lglock then we do

Re: [PATCH 2/9] IB: add a proper completion queue abstraction

2015-11-23 Thread Bart Van Assche
On 11/23/2015 01:28 PM, Jason Gunthorpe wrote: On Mon, Nov 23, 2015 at 01:04:25PM -0800, Bart Van Assche wrote: Considerable time ago the send queue in the SRP initiator driver was modified from signaled to non-signaled to reduce the number of interrupts triggered by the SRP initiator driver. T

Re: [PATCH v5 1/8] watchdog: Introduce hardware maximum timeout in watchdog core

2015-11-23 Thread Guenter Roeck
Hi Uwe, On Mon, Nov 23, 2015 at 07:26:08PM +0100, Uwe Kleine-König wrote: > Hello Guenter, > > On Mon, Nov 23, 2015 at 08:14:56AM -0800, Guenter Roeck wrote: > > On 11/22/2015 11:53 PM, Uwe Kleine-König wrote: > > >On Sun, Nov 22, 2015 at 07:20:58PM -0800, Guenter Roeck wrote: > > >>@@ -160,7 +17

[PATCH 3/7] perf test: Add callchain order setup for DWARF unwinder test

2015-11-23 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Adding callchain order setup for DWARF unwinder test. The test now runs unwinder for both callee and caller orders. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1447772739-18471-4-

[PATCH net-next 00/10] hv_netvsc: Eliminate the additional head room

2015-11-23 Thread K. Y. Srinivasan
In an attempt to avoid having to allocate memory on the send path, the netvsc driver was requesting additional head room so that both rndis header and the netvsc packet (the state that had to persist) could be placed in the skb. Since the amount of head room requested was exceeding the default head

[PATCH 1/7] perf callchain: Move initial entry call into get_entries function

2015-11-23 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Moving initial entry call into get_entries function so all entries processing is on one place. It will be useful for next change that adds ordering logic. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http:

[PATCH 7/7] perf callchain: Add missing parent_val initialization

2015-11-23 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Adding missing parent_val callchain_node initialization. It's causing segfault in perf top: $ sudo perf top -g perf: Segmentation fault backtrace free_callchain_node(+0x29) in perf [0x4a4b3e] free_callchain(+0x29) in perf [0x4a5a83] hist_entry__delet

[PATCH net-next 10/10] hv_netvsc: remove locking in netvsc_send()

2015-11-23 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov Packet scheduler guarantees there won't be multiple senders for the same queue and as we use q_idx for multi_send_data the spinlock is redundant. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/hyperv_net.h |1 - drivers/net/hy

[PATCH net-next 05/10] hv_netvsc: Eliminatte the data field from struct hv_netvsc_packet

2015-11-23 Thread K. Y. Srinivasan
Eliminatte the data field from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h |5 ++--- drivers/net/hyperv/netvsc.c |5 +++-- drivers/net/hyperv/netvsc_drv.c |3 ++- drivers/net/hyperv/rndis_filter.c

Re: [RFC/PATCH 0/3] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions

2015-11-23 Thread Arnd Bergmann
On Monday 23 November 2015 13:32:06 Stephen Boyd wrote: > On 11/23, Arnd Bergmann wrote: > > On Monday 23 November 2015 12:38:47 Stephen Boyd wrote: > > > On 11/23, Arnd Bergmann wrote: > > > > On Monday 23 November 2015 09:14:39 Christopher Covington wrote: > > > > > On 11/23/2015 03:15 AM, Arnd B

[PATCH net-next 09/10] hv_netvsc: move subchannel existence check to netvsc_select_queue()

2015-11-23 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/hyperv_net.h | 15 --- drivers/net/hyperv/netvsc.c |5 ++--- drivers/net/hyperv/netvsc_drv.c |3 +++ 3 files changed, 5 insertions(+), 18 deletions(-) diff -

[PATCH net-next 02/10] hv_netvsc: Rearrange the hv_negtvsc_packet to be space efficient

2015-11-23 Thread K. Y. Srinivasan
Rearrange the elements of struct hv_negtvsc_packet for optimal layout - eliminate unnecessary padding. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/driver

[PATCH net-next 01/10] hv_netvsc: Resize some of the variables in hv_netvsc_packet

2015-11-23 Thread K. Y. Srinivasan
As part of reducing the size of the hv_netvsc_packet, resize some of the variables based on their usage. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/n

[PATCH net-next 07/10] hv_netvsc: Eliminate send_completion_ctx from struct hv_netvsc_packet

2015-11-23 Thread K. Y. Srinivasan
Eliminate send_completion_ctx from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h |1 - drivers/net/hyperv/netvsc.c |3 +-- drivers/net/hyperv/netvsc_drv.c |1 - 3 files changed, 1 insertions(+), 4 deletion

Re: [RFC PATCH 2/2] Crypto kernel tls socket

2015-11-23 Thread Sowmini Varadhan
On (11/23/15 13:43), Dave Watson wrote: > > For kcm, opfd is the fd you would pass along in kcm_attach. > For rds, it looks like you'd want to use opfd as the sock instead of > the new one created by sock_create_kern in rds_tcp_conn_connect. I see. It's something to consider, and it would certai

[PATCH net-next 06/10] hv_netvsc: Eliminate send_completion from struct hv_netvsc_packet

2015-11-23 Thread K. Y. Srinivasan
Eliminate send_completion from struct hv_netvsc_packet. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h |3 +-- drivers/net/hyperv/netvsc.c |6 +++--- drivers/net/hyperv/netvsc_drv.c |2 +- drivers/net/hyperv/rndis_filter.c |

[PATCH net-next 03/10] hv_netvsc: Eliminate the channel field in hv_netvsc_packet structure

2015-11-23 Thread K. Y. Srinivasan
Eliminate the channel field in hv_netvsc_packet structure. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h | 22 ++ drivers/net/hyperv/netvsc.c | 19 --- drivers/net/hyperv/netvsc_drv.c |5 +++--

[PATCH net-next 08/10] hv_netvsc: Don't ask for additional head room in the skb

2015-11-23 Thread K. Y. Srinivasan
The rndis header is 116 bytes big and can be placed in the default head room that will be available in the skb. Since the netvsc packet is less than 48 bytes, we can use the skb control buffer for the netvsc packet. With these changes we don't need to ask for additional head room. Signed-off-by: K

[PATCH net-next 04/10] hv_netvsc: Eliminate rndis_msg pointer from hv_netvsc_packet structure

2015-11-23 Thread K. Y. Srinivasan
Eliminate rndis_msg pointer from hv_netvsc_packet structure. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h |8 +++- drivers/net/hyperv/netvsc.c | 10 ++ drivers/net/hyperv/netvsc_drv.c |7 +++ drivers/net/hyper

[GIT PULL 0/7] perf/core improvements and fixes

2015-11-23 Thread Arnaldo Carvalho de Melo
Hi Ingo, Please consider pulling, - Arnaldo The following changes since commit b7883a1c4f75edb62fc49da6000c59fb881e3c7b: perf/x86: Handle multiple umask bits for BDW CYCLE_ACTIVITY.* (2015-11-23 09:58:27 +0100) are available in the git repository at: git://git.kernel.org/pub/scm

[PATCH 5/7] perf tools: Add 'perf config' command

2015-11-23 Thread Arnaldo Carvalho de Melo
From: Taeung Song The perf configuration file contains many variables to change various aspects of each of its tools, including output, disk usage, etc. But looking at the state of configuration is difficult and there's no documentation about config variables except for the variables in perfconf

[PATCH 6/7] perf config: Add initial man page

2015-11-23 Thread Arnaldo Carvalho de Melo
From: Taeung Song Add perf-config document to describe the perf configuration and a 'list’ subcommand. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/63ad9b57-7b8c-46f8-8f18-0ffeb9a6a...@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/pe

[PATCH 4/7] perf callchain: Add order support for libdw DWARF unwinder

2015-11-23 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa As reported by Milian, currently for DWARF unwind (both libdw and libunwind) we display callchain in callee order only. Adding the support to follow callchain order setup to libdw DWARF unwinder, so we could get following output for report: $ perf record --call-graph dwarf ls

[PATCH 2/7] perf callchain: Add order support for libunwind DWARF unwinder

2015-11-23 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa As reported by Milian, currently for DWARF unwind (both libdw and libunwind) we display callchain in callee order only. Adding the support to follow callchain order setup to libunwind DWARF unwinder, so we could get following output for report: $ perf record --call-graph dwarf

Re: [PATCH v2] fpga: zynq-fpga: Enable pm_runtime (suspend, resume)

2015-11-23 Thread Moritz Fischer
Hi Mike, thanks for your feedback. I put what I think you suggested inline below. On Thu, Nov 19, 2015 at 11:25 PM, Mike Looijmans wrote: > On 19-11-15 23:07, Moritz Fischer wrote: >> @@ -457,19 +457,26 @@ static int zynq_fpga_probe(struct platform_device >> *pdev) >> return err

Re: [PATCH v3 0/5] Make cpuid <-> nodeid mapping persistent.

2015-11-23 Thread Tejun Heo
Hello, On Thu, Nov 19, 2015 at 12:22:10PM +0800, Tang Chen wrote: > [Solution] > > There are four mappings in the kernel: > 1. nodeid (logical node id) <-> pxm > 2. apicid (physical cpu id) <-> nodeid > 3. cpuid (logical cpu id) <-> apicid > 4. cpuid (logical cpu id) <-> nodei

[PATCH] Documentation/memory-barriers.txt: fix ACCESS_ONCE thinko

2015-11-23 Thread Chris Metcalf
In commit 2ecf810121c7 ("Documentation/memory-barriers.txt: Add needed ACCESS_ONCE() calls to memory-barriers.txt") the statement "Q = P" was converted to "ACCESS_ONCE(Q) = P". This should have been "Q = ACCESS_ONCE(P)". It later became "WRITE_ONCE(Q, P)". This doesn't match the following text, w

Re: [PATCH] staging: lustre: ptlrpc: constify ptlrpc_sec_cops structs

2015-11-23 Thread kbuild test robot
Hi Aya, [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.4-rc2 next-20151123] url: https://github.com/0day-ci/linux/commits/Aya-Mahfouz/staging-lustre-ptlrpc-constify-ptlrpc_sec_cops-structs/20151124-054437 config: tile-allyesconfig (attached as .config

Re: [PATCH] mtd: cfi: enforce valid geometry configuration

2015-11-23 Thread Arnd Bergmann
On Monday 23 November 2015 14:39:33 Arnd Bergmann wrote: > MTD allows compile-time configuration of the possible CFI geometry > settings that are allowed by the kernel, but that includes a couple of > invalid configurations, where no bank width or no interleave setting > is allowed. These are then

Re: [PATCH v3] mm/mmap.c: remove incorrect MAP_FIXED flag comparison from mmap_region

2015-11-23 Thread Andrew Morton
On Mon, 23 Nov 2015 18:36:42 +0100 Piotr Kwapulinski wrote: > The following flag comparison in mmap_region makes no sense: > > if (!(vm_flags & MAP_FIXED)) > return -ENOMEM; > > The condition is always false and thus the above "return -ENOMEM" is never > executed. The vm_flags must not be

Re: [PATCH V2] cpufreq: Always remove sysfs cpuX/cpufreq link on ->remove_dev()

2015-11-23 Thread Rafael J. Wysocki
On Saturday, November 21, 2015 06:42:09 AM Srinivas Pandruvada wrote: > On Sat, 2015-11-21 at 09:06 +0530, Viresh Kumar wrote: > > Subsys interface's ->remove_dev() is called when the cpufreq driver > > is > > unregistering or the CPU is getting physically removed. We keep > > removing > > the cpuX

Re: [PATCH v2] tools lib traceevents: Fix output of %llu for 64 bit values read on 32 bit machines

2015-11-23 Thread Arnaldo Carvalho de Melo
Em Mon, Nov 16, 2015 at 05:25:16PM -0500, Steven Rostedt escreveu: > > When a long value is read on 32 bit machines for 64 bit output, the parsing > needs to change "%lu" into "%llu", as the value is read natively. > > Unfortunately, if "%llu" is already there, the code will add another "l" to >

Re: [PATCH 2/9] IB: add a proper completion queue abstraction

2015-11-23 Thread Jason Gunthorpe
On Mon, Nov 23, 2015 at 01:54:05PM -0800, Bart Van Assche wrote: > Not really ... Please have a look at the SRP initiator source code. What the > SRP initiator does is to poll the send queue before sending a new > SCSI I see that. What I don't see is how SRP handles things when the sendq fills up

Re: [PATCH 05/14] lib/vsprintf.c: help gcc make number() smaller

2015-11-23 Thread Andy Shevchenko
On Mon, Nov 23, 2015 at 11:29 PM, Rasmus Villemoes wrote: > One consequence of the reorganization of struct printf_spec to make > field_width 24 bits was that number() gained about 180 bytes. Since > spec is never passed to other functions, we can help gcc make number() > lose most of that extra w

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-11-23 Thread Toshi Kani
On Mon, 2015-11-23 at 12:53 -0800, Dan Williams wrote: > On Mon, Nov 23, 2015 at 12:04 PM, Toshi Kani wrote: > > The following oops was observed when mmap() with MAP_POPULATE > > pre-faulted pmd mappings of a DAX file. follow_trans_huge_pmd() > > expects that a target address has a struct page. >

Re: WARNING: CPU: 0 PID: 913 at fs/inode.c:275 drop_nlink+0x4b/0x50()

2015-11-23 Thread Richard Weinberger
Am 23.11.2015 um 08:55 schrieb Vegard Nossum: > Hi, > > With the attached vfat disk image (fuzzed), I get the following WARNING: > > WARNING: CPU: 0 PID: 913 at fs/inode.c:275 drop_nlink+0x4b/0x50() > CPU: 0 PID: 913 Comm: a.out Not tainted 4.2.5+ #39 > Stack: > e0931b50 60075412 e13981e8

Re: [PATCH cgroup/for-4.4-fixes] cgroup: make css_set pin its css's to avoid use-afer-free

2015-11-23 Thread Dave Jones
On Mon, Nov 23, 2015 at 02:55:41PM -0500, Tejun Heo wrote: > A css_set represents the relationship between a set of tasks and > css's. css_set never pinned the associated css's. This was okay > because tasks used to always disassociate immediately (in RCU sense) - > either a task is moved to

Boot stops with ehci-pci, kernel 4.3.0

2015-11-23 Thread KARBOWSKI Piotr
Hello, I am facing an strange issue. I am unable to boot a Dell PowerEdge R210 if ehci-pci module is built into the kernel. The _ marker just blinks, after few minutes nothing has changed. The last messages it does display that I can get thru iDRAC is: ehci_hcd: USB 2.0 'Enhanced' Host C

Re: [PATCH v3 07/22] kthread: Detect when a kthread work is used by more workers

2015-11-23 Thread Tejun Heo
Hello, On Wed, Nov 18, 2015 at 02:25:12PM +0100, Petr Mladek wrote: > @@ -610,6 +625,12 @@ repeat: > if (work) { > __set_current_state(TASK_RUNNING); > work->func(work); > + > + spin_lock_irq(&worker->lock); > + /* Allow to queue the work i

Re: [PATCH 2/9] IB: add a proper completion queue abstraction

2015-11-23 Thread Bart Van Assche
On 11/23/2015 02:18 PM, Jason Gunthorpe wrote: On Mon, Nov 23, 2015 at 01:54:05PM -0800, Bart Van Assche wrote: What I don't see is how SRP handles things when the sendq fills up, ie the case where __srp_get_tx_iu() == NULL. It looks like the driver starts to panic and generates printks. I can't

Re: [PATCH 06/14] lib/vsprintf.c: warn about too large precisions and field widths

2015-11-23 Thread Andy Shevchenko
On Mon, Nov 23, 2015 at 11:29 PM, Rasmus Villemoes wrote: > The field width is overloaded to pass some extra information for > some %p extensions (e.g. #bits for %pb). But we might silently > truncate the passed value when we stash it in struct printf_spec (see > e.g. "lib/vsprintf.c: expand field

Re: [PATCH V3 5/5] ARM: dts: exynos4412: Rename OPP nodes as opp@

2015-11-23 Thread Rafael J. Wysocki
On Wednesday, November 11, 2015 08:10:58 AM Viresh Kumar wrote: > OPP bindings got updated to name OPP nodes this way, make changes > according to that. > > Reviewed-by: Krzysztof Kozlowski > Signed-off-by: Viresh Kumar > --- > arch/arm/boot/dts/exynos4412.dtsi | 28 ++--

Re: [PATCH 07/14] lib/vsprintf.c: slightly refactor vscnprintf()

2015-11-23 Thread Andy Shevchenko
On Mon, Nov 23, 2015 at 11:29 PM, Rasmus Villemoes wrote: > If we're given a size of 0, the vsnprintf() won't have any side > effects, and neither "i < size" or "size != 0" will trigger. So we > might as well return 0 immediately. > > Signed-off-by: Rasmus Villemoes > --- > lib/vsprintf.c | 7 ++

Re: [PATCH V3 5/5] ARM: dts: exynos4412: Rename OPP nodes as opp@

2015-11-23 Thread Rafael J. Wysocki
On Tuesday, November 24, 2015 12:04:00 AM Rafael J. Wysocki wrote: > On Wednesday, November 11, 2015 08:10:58 AM Viresh Kumar wrote: > > OPP bindings got updated to name OPP nodes this way, make changes > > according to that. > > > > Reviewed-by: Krzysztof Kozlowski > > Signed-off-by: Viresh Kuma

[PATCH v2] pwm: ftm: fix clock enable/disable when using PM

2015-11-23 Thread Stefan Agner
A FTM PWM instance enables/disables three clocks: The bus clock, the counter clock and the PWM clock. The bus clock gets enabled on pwm_request, whereas the counter and PWM clocks will be enabled upon pwm_enable. The driver has three closesly related issues when enabling/disabling clocks during su

Re: [PATCH V2 1/3] PM / OPP: Add missing doc comments

2015-11-23 Thread Rafael J. Wysocki
On Thursday, November 19, 2015 09:13:56 AM Viresh Kumar wrote: > Few doc-style comments were missing, add them. Rearrange another one to > match the sequence within the structure. > > Signed-off-by: Viresh Kumar > Acked-by: Pavel Machek > Reviewed-by: Stephen Boyd > --- > drivers/base/power/op

Re: [PATCH 03/14] lib/vsprintf.c: eliminate potential race in string()

2015-11-23 Thread Andy Shevchenko
On Mon, Nov 23, 2015 at 11:29 PM, Rasmus Villemoes wrote: > If the string corresponding to a %s specifier can change under us, we > might end up copying a \0 byte to the output buffer. There might be > callers who expect the output buffer to contain a genuine C string > whose length is exactly the

Re: [PATCH v3] zram: try vmalloc() after kmalloc()

2015-11-23 Thread Andrew Morton
On Mon, 23 Nov 2015 15:21:15 +0900 Kyeongdon Kim wrote: > When we're using LZ4 multi compression streams for zram swap, > we found out page allocation failure message in system running test. > That was not only once, but a few(2 - 5 times per test). > Also, some failure cases were continually occ

Re: [PATCH 01/14] lib/vsprintf.c: pull out padding code from dentry_name()

2015-11-23 Thread Andy Shevchenko
On Mon, Nov 23, 2015 at 11:29 PM, Rasmus Villemoes wrote: > Pull out the logic in dentry_name() which handles field width space > padding, in preparation for reusing it from string(). Rename the > widen() helper to move_right(), since it is used for handling the > !(flags & LEFT) case. > > Cc: Al

Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers

2015-11-23 Thread Ondrej Zary
On Sunday 22 November 2015 00:32:31 Finn Thain wrote: > > On Sat, 21 Nov 2015, Ondrej Zary wrote: > > > On Saturday 21 November 2015 02:58:57 Finn Thain wrote: > > > > > > > > I gather that your setup here is a QUANTUM LP240S target with Domex > > > 3181 (DTC-436) card and g_NCR5380 module. I'

Re: [PATCH v3 09/22] kthread: Allow to cancel kthread work

2015-11-23 Thread Tejun Heo
Hello, On Wed, Nov 18, 2015 at 02:25:14PM +0100, Petr Mladek wrote: > +static int > +try_to_cancel_kthread_work(struct kthread_work *work, > +spinlock_t *lock, > +unsigned long *flags) > +{ > + int ret = 0; > + > + if (work->t

Re: Hibernate resume bug around 3,18-rc2 - Full PAT support

2015-11-23 Thread Vassilis Virvilis
On 11/23/2015 08:56 PM, Luis R. Rodriguez wrote: Its not clear from the log who called this MTRR call for WC that failed, I hope we didn't attempt a WC wright on a WB region. Who owns e000-efff ? How can I answer that? Is there any utility to run? peek inside /proc? Her

Re: [PATCH] dax: Split pmd map when fallback on COW

2015-11-23 Thread Toshi Kani
On Mon, 2015-11-23 at 13:05 -0700, Toshi Kani wrote: > An infinite loop of PMD faults was observed when attempted to > mlock() a private read-only PMD mmap'd range of a DAX file. Typo: the above description should be (remove "read-only"): An infinite loop of PMD faults was observed when attempte

Re: [PATCH 04/14] lib/vsprintf.c: expand field_width to 24 bits

2015-11-23 Thread Andy Shevchenko
On Mon, Nov 23, 2015 at 11:29 PM, Rasmus Villemoes wrote: > Maurizio Lombardi reported a problem [1] with the %pb extension: It > doesn't work for sufficiently large bitmaps, since the size is stashed > in the field_width field of the struct printf_spec, which is currently > an s16. Concretely, th

Re: [PATCH 1/2] ptrace: make wait_on_bit(JOBCTL_TRAPPING_BIT) in ptrace_attach() killable

2015-11-23 Thread Tejun Heo
On Thu, Nov 19, 2015 at 07:47:32PM +0100, Oleg Nesterov wrote: > ptrace_attach() can hang waiting for STOPPED -> TRACED transition if the > tracee gets frozen in between, change wait_on_bit() to use TASK_KILLABLE. > > This doesn't really solve the problem(s) and we probably need to fix the > freez

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue

2015-11-23 Thread Rainer Weikusat
Rainer Weikusat writes: > David Miller writes: [...] > I'm sorry for this 13th hour request/ suggestion but while thinking > about a reply to Dmitry, it occurred to me that the restart_locked/ > sk_locked logic could be avoided by moving the test for this condition > in front of all the others

Re: [PATCH] Documentation/memory-barriers.txt: fix ACCESS_ONCE thinko

2015-11-23 Thread Paul E. McKenney
On Mon, Nov 23, 2015 at 05:04:17PM -0500, Chris Metcalf wrote: > In commit 2ecf810121c7 ("Documentation/memory-barriers.txt: Add > needed ACCESS_ONCE() calls to memory-barriers.txt") the statement > "Q = P" was converted to "ACCESS_ONCE(Q) = P". This should have > been "Q = ACCESS_ONCE(P)". It la

Re: [PATCH 2/9] IB: add a proper completion queue abstraction

2015-11-23 Thread Jason Gunthorpe
On Mon, Nov 23, 2015 at 02:33:05PM -0800, Bart Van Assche wrote: > On 11/23/2015 02:18 PM, Jason Gunthorpe wrote: > >On Mon, Nov 23, 2015 at 01:54:05PM -0800, Bart Van Assche wrote: > >What I don't see is how SRP handles things when the > >sendq fills up, ie the case where __srp_get_tx_iu() == NULL

Re: [PATCH 08/14] lib/kasprintf.c: add sanity check to kvasprintf

2015-11-23 Thread Andy Shevchenko
On Mon, Nov 23, 2015 at 11:29 PM, Rasmus Villemoes wrote: > kasprintf relies on being able to replay the formatting and getting > the same result (in particular, the same length). This will almost > always work, but it is possible that the object pointed to by a %s or > %p argument changed under u

Re: [RFC/PATCH 0/3] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions

2015-11-23 Thread Stephen Boyd
On 11/23, Arnd Bergmann wrote: > On Monday 23 November 2015 13:32:06 Stephen Boyd wrote: > > On 11/23, Arnd Bergmann wrote: > > > On Monday 23 November 2015 12:38:47 Stephen Boyd wrote: > > > > It would be nice to drop the ARCH_MSM* configs entirely. If we > > could select the right timers from kc

Re: [PATCH 2/2] ptrace: task_stopped_code(ptrace => true) can't see TASK_STOPPED task

2015-11-23 Thread Tejun Heo
On Thu, Nov 19, 2015 at 07:47:52PM +0100, Oleg Nesterov wrote: > task_stopped_code()->task_is_stopped_or_traced() doesn't look right, > the traced task must never be TASK_STOPPED. > > We can not add WARN_ON(task_is_stopped(p)), but this is only because > do_wait() can race with PTRACE_ATTACH from

Re: [PATCH v3 3/6] DT: PCI: qcom: Document PCIe devicetree bindings

2015-11-23 Thread Rob Herring
On Mon, Nov 23, 2015 at 11:29:00AM +0200, Stanimir Varbanov wrote: > From: Stanimir Varbanov > > Document Qualcomm PCIe driver devicetree bindings. > > Signed-off-by: Stanimir Varbanov > Signed-off-by: Stanimir Varbanov > --- > .../devicetree/bindings/pci/qcom,pcie.txt | 231 >

Re: [PATCH] clk: tegra: Fix bypassing of PLLs

2015-11-23 Thread Tyler Baker
Hi Jon, On 20 November 2015 at 07:11, Jon Hunter wrote: > The _clk_disable_pll() function will attempt to place a PLL into bypass > if the TEGRA_PLL_BYPASS is specified for the PLL and then disable the PLL > by clearing the enable bit. To place the PLL into bypass, the bypass bit > needs to be se

Re: [PATCH] zram/zcomp: use GFP_NOIO to allocate streams

2015-11-23 Thread Andrew Morton
On Mon, 23 Nov 2015 22:27:59 +0900 Sergey Senozhatsky wrote: > We can end up allocating a new compression stream with GFP_KERNEL > from within the IO path, which may result is nested (recursive) IO > operations. That can introduce problems if the IO path in question > is a reclaimer, holding som

Re: [PATCH 04/14] lib/vsprintf.c: expand field_width to 24 bits

2015-11-23 Thread Tejun Heo
On Mon, Nov 23, 2015 at 10:29:21PM +0100, Rasmus Villemoes wrote: > Maurizio Lombardi reported a problem [1] with the %pb extension: It > doesn't work for sufficiently large bitmaps, since the size is stashed > in the field_width field of the struct printf_spec, which is currently > an s16. Concret

Re: [PATCH v2 0/2] Improve drm_of_component_probe() and move rockchip to use it

2015-11-23 Thread Heiko Stübner
Am Freitag, 20. November 2015, 14:22:03 schrieb Liviu Dudau: > Hello, > > This is v2 of the patchset trying to make drm_of_component_probe() cope with > finding both local crtc ports and remote encoder ones. Heiko Stübner was > nice enough to test an earlier version that was patched following Russ

Re: [PATCH] zram/zcomp: use GFP_NOIO to allocate streams

2015-11-23 Thread Minchan Kim
Hello Sergey, On Mon, Nov 23, 2015 at 10:27:59PM +0900, Sergey Senozhatsky wrote: > We can end up allocating a new compression stream with GFP_KERNEL > from within the IO path, which may result is nested (recursive) IO > operations. That can introduce problems if the IO path in question > is a rec

Re: [PATCH 2/2] fs/overlay: use same inodes for hardlinks

2015-11-23 Thread Alexander Morozov
ping it's still fixes issue for me and still can be applied to master of main linux tree -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read th

Re: [PATCH v4 2/4] clk: rockchip: set an ID for crypto clk

2015-11-23 Thread Heiko Stübner
Hi Zain, Am Dienstag, 17. November 2015, 12:00:45 schrieb Zain Wang: > Set an ID for crypto clk, so that it can be called in other part. > > Signed-off-by: Zain Wang > Acked-by: Michael Turquette > Tested-by: Heiko Stuebner I've split this into the header and clk-rk3288.c changes and applied

Re: [PATCH] thermal: ti-soc-thermal: fix error check

2015-11-23 Thread Eduardo Valentin
On Mon, Nov 23, 2015 at 06:24:41PM +0530, Sudip Mukherjee wrote: > We were only checking if data is not NULL but > ti_bandgap_get_sensor_data() can return NULL or ERR_PTR. Do you have a fail case? Can you please send the logs too? > > Signed-off-by: Sudip Mukherjee > --- > drivers/thermal/ti-s

Re: [PATCH v3] zram: try vmalloc() after kmalloc()

2015-11-23 Thread Minchan Kim
Hello Andrew, On Mon, Nov 23, 2015 at 02:52:26PM -0800, Andrew Morton wrote: > On Mon, 23 Nov 2015 15:21:15 +0900 Kyeongdon Kim > wrote: > > > When we're using LZ4 multi compression streams for zram swap, > > we found out page allocation failure message in system running test. > > That was not

<    4   5   6   7   8   9   10   11   >