Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-24 Thread Wanpeng Li
2018-01-24 23:12 GMT+08:00 Vitaly Kuznetsov : > I was investigating an issue with seabios >= 1.10 which stopped working > for nested KVM on Hyper-V. The problem appears to be in > handle_ept_violation() function: when we do fast mmio we need to skip > the instruction so we do kvm_skip_emulated_inst

Re: tip/master falls off NOP cliff with KPTI under KVM

2018-01-24 Thread David Woodhouse
On Wed, 2018-01-24 at 16:53 -0800, Dexuan-Linux Cui wrote: > On Wed, Jan 10, 2018 at 2:53 PM, Woodhouse, David wrote: > > > > On Thu, 2018-01-11 at 01:34 +0300, Alexey Dobriyan wrote: > > > > > > > > > Bisection points to > > > > > > f3433c1010c6af61c9897f0f0447f81b991feac1 is the firs

Re: [PATCH 5/6] Documentation for Pmalloc

2018-01-24 Thread Igor Stoppa
On 24/01/18 21:14, Ralph Campbell wrote: > 2 Minor typos inline below: thanks for proof-reading, will fix accordingly. -- igor

Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc

2018-01-24 Thread Jia-Ju Bai
On 2018/1/25 12:16, Al Viro wrote: On Thu, Jan 25, 2018 at 11:13:56AM +0800, Jia-Ju Bai wrote: I have checked the given call chain, and find that nvme_dev_disable in nvme_timeout calls mutex_lock that can sleep. Thus, I suppose this call chain is not in atomic context. ... or it is broken.

Re: [PATCH v2] fs: fsnotify: account fsnotify metadata to kmemcg

2018-01-24 Thread Amir Goldstein
On Thu, Jan 25, 2018 at 3:08 AM, Shakeel Butt wrote: > On Wed, Jan 24, 2018 at 3:12 AM, Amir Goldstein wrote: >> On Wed, Jan 24, 2018 at 12:34 PM, Jan Kara wrote: >>> On Mon 22-01-18 22:31:20, Amir Goldstein wrote: On Fri, Jan 19, 2018 at 5:02 PM, Shakeel Butt wrote: > On Wed, Nov 15,

Re: [REGRESSION] (>= v4.12) IO w/dmcrypt causing audio underruns

2018-01-24 Thread vcaputo
On Fri, Jan 19, 2018 at 11:57:32AM +0100, Enric Balletbo Serra wrote: > Hi Vito, > > 2018-01-17 23:48 GMT+01:00 : > > On Mon, Dec 18, 2017 at 10:25:33AM +0100, Enric Balletbo Serra wrote: > >> Hi Vito, > >> > >> 2017-12-01 22:33 GMT+01:00 : > >> > On Wed, Nov 29, 2017 at 10:39:19AM -0800, vcap..

Re: [PATCH] ARM: dts: use a correct at24 fallback for at91-nattis-2-natte-2

2018-01-24 Thread Bartosz Golaszewski
2018-01-24 23:12 GMT+01:00 Peter Rosin : > Hi Bartosz, > > On 2018-01-24 22:34, Bartosz Golaszewski wrote: >> We now require all at24 users to use the "atmel," fallback in >> device tree for different manufacturers. > > I think my patch [3/4] from about a week ago was just a tiny bit > better. > ht

Re: [PATCH v2 4/4] RISC-V: Move to the new generic IRQ handler

2018-01-24 Thread Christoph Hellwig
On Wed, Jan 24, 2018 at 07:07:56PM -0800, Palmer Dabbelt wrote: > The old mechanism for handling IRQs on RISC-V was pretty ugly: the arch > code looked at the Kconfig entry for our first-level irqchip driver and > called into it directly. > > This patch uses the new 0generic IRQ handling infastruc

Re: [PATCH v2 1/4] arm: Make set_handle_irq and handle_arch_irq generic

2018-01-24 Thread Christoph Hellwig
On Wed, Jan 24, 2018 at 07:07:53PM -0800, Palmer Dabbelt wrote: > It looks like this same irqchip registration mechanism has been copied > into a handful of ports, including aarch64 and openrisc. I want to use > this in the RISC-V port, so I thought it would be good to make this > generic instead.

Re: [PATCH v2 3/4] openrisc: Use the new MULTI_IRQ_HANDLER

2018-01-24 Thread Christoph Hellwig
On Wed, Jan 24, 2018 at 07:07:55PM -0800, Palmer Dabbelt wrote: > It appears that openrisc copied arm64's MULTI_IRQ_HANDLER code (which > came from arm). I wanted to make this generic so I could use it in the > RISC-V port. This patch converts the openrisc code to use the generic > version. Note

Re: [PATCH v2 2/4] arm64: Use the new MULTI_IRQ_HANDLER

2018-01-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

[PATCH] media: leds: as3645a: Add CONFIG_OF support

2018-01-24 Thread Akash Gajjar
From: Akash Gajjar Witth this changes, the driver builds with CONFIG_OF support Signed-off-by: Akash Gajjar --- drivers/media/i2c/as3645a.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c index af5db71..24233fa 100644 --- a

[PATCH net-next] ptr_ring: fix integer overflow

2018-01-24 Thread Jason Wang
We try to allocate one more entry for lockless peeking. The adding operation may overflow which causes zero to be passed to kmalloc(). In this case, it returns ZERO_SIZE_PTR without any notice by ptr ring. Try to do producing or consuming on such ring will lead NULL dereference. Fix this detect and

Re: [PATCH RFC 01/16] prcu: Add PRCU implementation

2018-01-24 Thread Boqun Feng
On Wed, Jan 24, 2018 at 10:16:18PM -0800, Paul E. McKenney wrote: > On Tue, Jan 23, 2018 at 03:59:26PM +0800, liangli...@huawei.com wrote: > > From: Heng Zhang > > > > This RCU implementation (PRCU) is based on a fast consensus protocol > > published in the following paper: > > > > Fast Consensu

[PATCH v2 2/2] free_pcppages_bulk: prefetch buddy while not holding lock

2018-01-24 Thread Aaron Lu
When a page is freed back to the global pool, its buddy will be checked to see if it's possible to do a merge. This requires accessing buddy's page structure and that access could take a long time if it's cache cold. This patch adds a prefetch to the to-be-freed page's buddy outside of zone->lock

linux-next: build failure after merge of the rdma tree

2018-01-24 Thread Stephen Rothwell
Hi all, After merging the rdma tree, today's linux-next build (x86_64 allmodconfig) failed like this: ERROR: "init_rcu_head" [drivers/infiniband/ulp/srpt/ib_srpt.ko] undefined! Caused by commit a11253142e6d ("IB/srpt: Rework multi-channel support") I have used the rdma tree from next-2018011

[PATCH v2 1/2] free_pcppages_bulk: do not hold lock when picking pages to free

2018-01-24 Thread Aaron Lu
When freeing a batch of pages from Per-CPU-Pages(PCP) back to buddy, the zone->lock is held and then pages are chosen from PCP's migratetype list. While there is actually no need to do this 'choose part' under lock since it's PCP pages, the only CPU that can touch them is us and irq is also disable

Re: [PATCH v4 02/10] asm/nospec, array_ptr: sanitize speculative array de-references

2018-01-24 Thread Cyril Novikov
On 1/18/2018 4:01 PM, Dan Williams wrote: 'array_ptr' is proposed as a generic mechanism to mitigate against Spectre-variant-1 attacks, i.e. an attack that bypasses boundary checks via speculative execution). The 'array_ptr' implementation is expected to be safe for current generation cpus across

Re: [RFC PATCH v2 1/1] of: introduce event tracepoints for dynamic device_node lifecyle

2018-01-24 Thread Frank Rowand
On 01/24/18 22:48, Frank Rowand wrote: > On 01/21/18 06:31, Wolfram Sang wrote: >> From: Tyrel Datwyler >> >> This patch introduces event tracepoints for tracking a device_nodes >> reference cycle as well as reconfig notifications generated in response >> to node/property manipulations. >> >> With

[RFC PATCH V4 4/5] workqueue: convert ->nice to ->sched_attr

2018-01-24 Thread Wen Yang
The new /sys interface like this: #cat /sys/devices/virtual/workqueue/writeback/sched_attr policy=0 prio=0 nice=0 # echo "policy=0 prio=0 nice=-1" > /sys/devices/virtual/workqueue/writeback/sched_attr # cat /sys/devices/virtual/workqueue/writeback/sched_attr

[RFC PATCH V4 5/5] workqueue: introduce a way to set workqueue's scheduler

2018-01-24 Thread Wen Yang
When pinning RT threads to specific cores using CPU affinity, the kworkers on the same CPU would starve, which may lead to some kind of priority inversion. In that case, the RT threads would also suffer high performance impact. The priority inversion looks like, CPU 0: libvirtd acquired cgroup_mu

[RFC PATCH V4 3/5] workqueue: rename unbound_attrs to attrs

2018-01-24 Thread Wen Yang
Replace workqueue's unbound_attrs by attrs, so that both unbound or bound wq can use it. Signed-off-by: Wen Yang Signed-off-by: Jiang Biao Signed-off-by: Tan Hu Suggested-by: Tejun Heo Cc: Tejun Heo Cc: Lai Jiangshan Cc: kernel test robot Cc: linux-kernel@vger.kernel.org --- kernel/workque

[RFC PATCH V4 1/5] workqueue: rename system workqueues

2018-01-24 Thread Wen Yang
Rename system_wq's wq->name from "events" to "system_percpu", and similarly for the similarly named workqueues. Signed-off-by: Wen Yang Signed-off-by: Jiang Biao Signed-off-by: Tan Hu Suggested-by: Tejun Heo Cc: Tejun Heo Cc: Lai Jiangshan Cc: linux-kernel@vger.kernel.org --- kernel/workque

[RFC PATCH V4 2/5] workqueue: expose attrs for system workqueues

2018-01-24 Thread Wen Yang
Expose sched_attr for system workqueues, such as: # cat /sys/devices/virtual/workqueue/system_percpu/sched_attr policy=0 prio=0 nice=0 cat /sys/devices/virtual/workqueue/system_percpu_highpri/sched_attr policy=0 prio=0 nice=-20 Signed-off-by: Wen Yang Signed-of

[PATCH v3] f2fs: support inode creation time

2018-01-24 Thread Chao Yu
This patch adds creation time field in inode layout to support showing kstat.btime in ->statx. Signed-off-by: Chao Yu --- v3: - fix address alignment isue. fs/f2fs/f2fs.h | 7 +++ fs/f2fs/file.c | 9 + fs/f2fs/inode.c | 16 fs/f2fs/namei.c

Re: [RFC PATCH v2 0/1] of: easier debugging for node life cycle issues

2018-01-24 Thread Frank Rowand
Hi Steve, On 01/21/18 06:31, Wolfram Sang wrote: > I got a bug report for a DT node refcounting problem in the I2C subsystem. > This > patch was a huge help in validating the bug report and the proposed solution. > So, I thought I bring it to attention again. Thanks Tyrel, for the initial > work!

Re: [PATCH v2] f2fs: support inode creation time

2018-01-24 Thread Chao Yu
On 2018/1/24 22:59, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/1/24 13:38, Jaegeuk Kim wrote: >> On 01/22, Chao Yu wrote: >>> From: Chao Yu >>> >>> This patch adds creation time field in inode layout to support showing >>> kstat.btime in ->statx. >> >> Hi Chao, >> >> Could you please check this pat

Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

2018-01-24 Thread gre...@linuxfoundation.org
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Thu, Jan 25, 2018 at 02:2

Re: [RFC PATCH v2 1/1] of: introduce event tracepoints for dynamic device_node lifecyle

2018-01-24 Thread Frank Rowand
On 01/21/18 06:31, Wolfram Sang wrote: > From: Tyrel Datwyler > > This patch introduces event tracepoints for tracking a device_nodes > reference cycle as well as reconfig notifications generated in response > to node/property manipulations. > > With the recent upstreaming of the refcount API se

Re: [RFC PATCH v2 0/1] of: easier debugging for node life cycle issues

2018-01-24 Thread Frank Rowand
On 01/21/18 06:31, Wolfram Sang wrote: > I got a bug report for a DT node refcounting problem in the I2C subsystem. > This > patch was a huge help in validating the bug report and the proposed solution. > So, I thought I bring it to attention again. Thanks Tyrel, for the initial > work! > > Note

Re: [RFC PATCH v2 0/1] of: easier debugging for node life cycle issues

2018-01-24 Thread Frank Rowand
On 01/22/18 03:49, Wolfram Sang wrote: > Hi Frank, > >> Please go back and read the thread for version 1. Simply resubmitting a >> forward port is ignoring that whole conversation. >> >> There is a lot of good info in that thread. I certainly learned stuff in it. > > Yes, I did that and learned

Re: [REGRESSION] (>= v4.12) IO w/dmcrypt causing audio underruns

2018-01-24 Thread vcaputo
On Fri, Jan 19, 2018 at 11:57:32AM +0100, Enric Balletbo Serra wrote: > Hi Vito, > > 2018-01-17 23:48 GMT+01:00 : > > On Mon, Dec 18, 2017 at 10:25:33AM +0100, Enric Balletbo Serra wrote: > >> Hi Vito, > >> > >> 2017-12-01 22:33 GMT+01:00 : > >> > On Wed, Nov 29, 2017 at 10:39:19AM -0800, vcap..

linux-next: manual merge of the net-next tree with the vfs tree

2018-01-24 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/tipc/socket.c between commit: ade994f4f6c8 ("net: annotate ->poll() instances") from the vfs tree and commit: 60c253069632 ("tipc: fix race between poll() and setsockopt()") from the net-next tree. I fixed it

Re: [PATCH RFC 09/16] prcu: Implement prcu_barrier() API

2018-01-24 Thread Paul E. McKenney
On Tue, Jan 23, 2018 at 03:59:34PM +0800, liangli...@huawei.com wrote: > From: Lihao Liang > > This is PRCU's counterpart of RCU's rcu_barrier() API. > > Reviewed-by: Heng Zhang > Signed-off-by: Lihao Liang > --- > include/linux/prcu.h | 7 ++ > kernel/rcu/prcu.c| 63 > +

Re: [PATCH RFC 07/16] prcu: Implement call_prcu() API

2018-01-24 Thread Paul E. McKenney
On Tue, Jan 23, 2018 at 03:59:32PM +0800, liangli...@huawei.com wrote: > From: Lihao Liang > > This is PRCU's counterpart of RCU's call_rcu() API. > > Reviewed-by: Heng Zhang > Signed-off-by: Lihao Liang > --- > include/linux/prcu.h | 25 > init/main.c | 2 ++ >

Re: [PATCH RFC 06/16] rcuperf: Set gp_exp to true for tests to run

2018-01-24 Thread Paul E. McKenney
On Tue, Jan 23, 2018 at 03:59:31PM +0800, liangli...@huawei.com wrote: > From: Lihao Liang > > Signed-off-by: Lihao Liang > --- > kernel/rcu/rcuperf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c > index ea80fa3e..baccc123

Re: [PATCH RFC 15/16] rcutorture: Add scripts to run experiments

2018-01-24 Thread Paul E. McKenney
On Tue, Jan 23, 2018 at 03:59:40PM +0800, liangli...@huawei.com wrote: > From: Lihao Liang > > Signed-off-by: Lihao Liang > --- > kvm.sh | 452 > + > run-rcuperf.sh | 26 The usual approach would be to add what you need to t

Re: [PATCH RFC 00/16] A new RCU implementation based on a fast consensus protocol

2018-01-24 Thread Paul E. McKenney
On Tue, Jan 23, 2018 at 03:59:25PM +0800, liangli...@huawei.com wrote: > From: Lihao Liang > > Dear Paul, > > This patch set implements a preemptive version of RCU (PRCU) based on the > following paper: > > Fast Consensus Using Bounded Staleness for Scalable Read-mostly > Synchronization. > H

Re: [PATCH RFC 03/16] rcutorture: Add PRCU test config files

2018-01-24 Thread Paul E. McKenney
On Tue, Jan 23, 2018 at 03:59:28PM +0800, liangli...@huawei.com wrote: > From: Lihao Liang > > Use the same config files as TREE02, TREE03, TREE06, TREE07, and TREE09. > > Signed-off-by: Lihao Liang > --- > .../selftests/rcutorture/configs/rcu/CFLIST| 5 > .../selftests/rcutortur

Re: [PATCH RFC 01/16] prcu: Add PRCU implementation

2018-01-24 Thread Paul E. McKenney
On Tue, Jan 23, 2018 at 03:59:26PM +0800, liangli...@huawei.com wrote: > From: Heng Zhang > > This RCU implementation (PRCU) is based on a fast consensus protocol > published in the following paper: > > Fast Consensus Using Bounded Staleness for Scalable Read-mostly > Synchronization. > Haibo C

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-24 Thread jianchao.wang
Hi Eric Thanks for you kindly response and suggestion. That's really appreciated. Jianchao On 01/25/2018 11:55 AM, Eric Dumazet wrote: > On Thu, 2018-01-25 at 11:27 +0800, jianchao.wang wrote: >> Hi Tariq >> >> On 01/22/2018 10:12 AM, jianchao.wang wrote: > On 19/01/2018 5:49 PM, Eric Dumaze

Re: [PATCH] powerpc: pseries: use irq_of_parse_and_map helper

2018-01-24 Thread Michael Ellerman
Rob Herring writes: > On Tue, Jan 23, 2018 at 12:53 AM, Michael Ellerman > wrote: >> Rob Herring writes: >> >>> Instead of calling both of_irq_parse_one and irq_create_of_mapping, call >>> of_irq_parse_and_map instead which does the same thing. This gets us closer >>> to making the former 2 fu

linux-next: build failure after merge of the pci tree

2018-01-24 Thread Stephen Rothwell
Hi Bjorn, After merging the pci tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: arch/powerpc/kernel/pci-common.c: In function 'pcibios_setup _device': arch/powerpc/kernel/pci-common.c:406:15: error: 'virq' may be used uninitialized in this function [-Werror=maybe-unini

[PATCH 8/8] kprobes/s390: Fix %p uses in error messages

2018-01-24 Thread Masami Hiramatsu
Remove %p because the kprobe will be dumped in dump_kprobe(). Signed-off-by: Masami Hiramatsu --- arch/s390/kernel/kprobes.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index af3722c28fd9..df30e5b9a572 100644 ---

[PATCH 6/8] kprobes/arm64: Fix %p uses in error messages

2018-01-24 Thread Masami Hiramatsu
Fix %p uses in error messages by removing it because those are redundant or meaningless. Signed-off-by: Masami Hiramatsu --- arch/arm64/kernel/probes/kprobes.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probe

[PATCH 7/8] kprobes/MN10300: Fix %p uses in error messages

2018-01-24 Thread Masami Hiramatsu
Replace %p with %px because it is right before BUG(). Signed-off-by: Masami Hiramatsu --- arch/mn10300/kernel/kprobes.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mn10300/kernel/kprobes.c b/arch/mn10300/kernel/kprobes.c index 0311a7fcea16..e539fac00321 1006

Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc

2018-01-24 Thread Ming Lei
On Wed, Jan 24, 2018 at 08:34:14PM -0700, Jens Axboe wrote: > On 1/24/18 7:46 PM, Jia-Ju Bai wrote: > > The function ioc_create_icq here is not called in atomic context. > > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. > > > > This is found by a static analysis tool na

[PATCH 5/8] kprobes/arm: Fix %p uses in error messages

2018-01-24 Thread Masami Hiramatsu
Fix %p uses in error messages by removing it and using general dumper. Signed-off-by: Masami Hiramatsu --- arch/arm/probes/kprobes/core.c | 10 +- arch/arm/probes/kprobes/test-core.c |1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/probes/kprobes/c

[PATCH 4/8] kprobes/x86: Fix %p uses in error messages

2018-01-24 Thread Masami Hiramatsu
Fix %p uses in error messages in kprobes/x86. - Some %p uses are not needed. Just remove it (or remove message). - One %p use is right before the BUG() so replaced with %px. Signed-off-by: Masami Hiramatsu --- arch/x86/kernel/kprobes/core.c | 12 1 file changed, 4 insertions(+), 8

Hello Linux

2018-01-24 Thread norsk5
good morning Linux https://goo.gl/2YZCS5

[PATCH 3/8] kprobes: Replace %p with other pointer types

2018-01-24 Thread Masami Hiramatsu
Replace %p with appropriate pointer types (or just remove it) - Use %pS if possible - Use %px only for the function right before BUG(). - Remove unneeded error message. Signed-off-by: Masami Hiramatsu --- kernel/kprobes.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-

[PATCH 2/8] kprobes: Show address of kprobes if kallsyms does

2018-01-24 Thread Masami Hiramatsu
Show probed address in debugfs kprobe list file as same as kallsyms does. This information is used for checking kprobes are placed in the expected address. So it should be able to compared with address in kallsyms. Signed-off-by: Masami Hiramatsu --- kernel/kprobes.c | 14 +- 1 fil

[PATCH 0/8] kprobes: Fix %p in kprobes

2018-01-24 Thread Masami Hiramatsu
Hi, This series fixes %p uses in kprobes. Some by replacing with %pS, some by replacing with %px but masking with kallsyms_show_value(). I've read the thread about %pK and if I understand correctly we shouldn't print kernel addresses. However, kprobes debugfs interface can not stop to show the ac

[PATCH 1/8] kprobes: Show blacklist addresses as same as kallsyms does

2018-01-24 Thread Masami Hiramatsu
Show kprobes blacklist addresses under same condition of showing kallsyms addresses. Since there are several name conflict for local symbols, kprobe blacklist needs to show each addresses so that user can identify where is on blacklist by comparing with kallsyms. Signed-off-by: Masami Hiramatsu

Re: [PATCH] bpf/stackmap: Implement bpf_get_next_key

2018-01-24 Thread Joel Fernandes
On Wed, Jan 24, 2018 at 8:42 PM, Alexei Starovoitov wrote: > On Wed, Jan 24, 2018 at 08:37:52PM -0800, Joel Fernandes wrote: >> Currently stackmaps can't be iterated over. The keys are obtained >> through other maps and look ups have to be performed. In new usecases, >> its useful to be able to it

linux-next: manual merge of the iversion tree with the nfsd tree

2018-01-24 Thread Stephen Rothwell
Hi Jeff, Today's linux-next merge of the iversion tree got a conflict in: fs/nfsd/nfsfh.h between commit: 3ac71a649c3d ("nfsd: store stat times in fill_pre_wcc() instead of inode times") from the nfsd tree and commit: 8ace40dfbdf4 ("nfsd: convert to new i_version API") from the iversi

Re: [PATCH] bpf/stackmap: Implement bpf_get_next_key

2018-01-24 Thread Alexei Starovoitov
On Wed, Jan 24, 2018 at 08:37:52PM -0800, Joel Fernandes wrote: > Currently stackmaps can't be iterated over. The keys are obtained > through other maps and look ups have to be performed. In new usecases, > its useful to be able to iterate over the stackmap independently. > Implement bpf_get_next_k

[PATCH] bpf/stackmap: Implement bpf_get_next_key

2018-01-24 Thread Joel Fernandes
Currently stackmaps can't be iterated over. The keys are obtained through other maps and look ups have to be performed. In new usecases, its useful to be able to iterate over the stackmap independently. Implement bpf_get_next_key to make this possible. More details of use case: Currently iterating

Re: ANNOUNCE: bpfd - a remote proxy daemon for executing bpf code (with corres. bcc changes)

2018-01-24 Thread Joel Fernandes
Sigh, Correcting Brenden's email address. Apologies. On Wed, Jan 24, 2018 at 8:29 PM, Joel Fernandes wrote: > Hi Guys, > > Just providing an update: I made lots of progress last few weeks and > all the issues mentioned below (in the last post) are resolved. > I published an LWN article explaining

Re: ANNOUNCE: bpfd - a remote proxy daemon for executing bpf code (with corres. bcc changes)

2018-01-24 Thread Joel Fernandes
Hi Guys, Just providing an update: I made lots of progress last few weeks and all the issues mentioned below (in the last post) are resolved. I published an LWN article explaining the design of BPFd and BCC-side changes: https://lwn.net/SubscriberLink/744522/ba023b555957408e/ There are still a fe

Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-24 Thread Wei Wang
On 01/25/2018 01:15 AM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:42PM +0800, Wei Wang wrote: + +static void report_free_page_func(struct work_struct *work) +{ + struct virtio_balloon *vb; + unsigned long flags; + + vb = container_of(work, struct virtio_balloon, re

Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc

2018-01-24 Thread Al Viro
On Thu, Jan 25, 2018 at 11:13:56AM +0800, Jia-Ju Bai wrote: > I have checked the given call chain, and find that nvme_dev_disable in > nvme_timeout calls mutex_lock that can sleep. > Thus, I suppose this call chain is not in atomic context. ... or it is broken. > Besides, how do you find that "f

[PATCH 1/2] block: blk-tag: Replace GFP_ATOMIC with GFP_KERNEL in __blk_queue_init_tags

2018-01-24 Thread Jia-Ju Bai
After checking all possible call chains to kmalloc here, my tool finds that kmalloc is never called in atomic context. Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai --- bl

Re: [PATCH v2] NTB: ntb_perf: fix cast to restricted __le32

2018-01-24 Thread Jon Mason
On Wed, Jan 24, 2018 at 09:07:26AM +0100, Arnd Bergmann wrote: > On Wed, Jan 24, 2018 at 8:48 AM, Serge Semin wrote: > > Sparse is whining about the u32 and __le32 mixed usage in the driver > > > > drivers/ntb/test/ntb_perf.c:288:21: warning: cast to restricted __le32 > > drivers/ntb/test/ntb_perf

Re: [PATCH 10/10] kill kernel_sock_ioctl()

2018-01-24 Thread David Miller
From: Al Viro Date: Thu, 25 Jan 2018 00:01:25 + > On Wed, Jan 24, 2018 at 03:52:44PM -0500, David Miller wrote: >> >> Al this series looks fine to me, want me to toss it into net-next? > > Do you want them reposted (with updated commit messages), or would > you prefer a pull request (with o

[PATCH v2 13/15] gen_initramfs_list.sh: add -x option to enable newcx format

2018-01-24 Thread Taras Kondratiuk
From: Mimi Zohar -x option populates extended attributes in cpio_list file passed to get_init_cpio and selects newcx CPIO format. Signed-off-by: Mimi Zohar Signed-off-by: Taras Kondratiuk --- scripts/gen_initramfs_list.sh | 13 - usr/Kconfig | 11 +++ usr

[PATCH v2 09/15] initramfs: set extended attributes

2018-01-24 Thread Taras Kondratiuk
From: Mimi Zohar This patch writes out the extended attributes included in the cpio file. As the "security.ima" xattr needs to be written after the file data. this patch separates extracting and setting the xattrs by defining new do_setxattrs state. [kamensky: fixed restoring of xattrs for symbo

[PATCH v2 07/15] initramfs: split header layout information from parsing function

2018-01-24 Thread Taras Kondratiuk
Header parsing has hardcoded assumption about header field size and layout. It is hard to modify the function to parse a new format. Move information about size and layout into a data structure to make parsing code more generic and simplify adding a new format. This also removes some magic numbers

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-24 Thread Eric Dumazet
On Thu, 2018-01-25 at 11:27 +0800, jianchao.wang wrote: > Hi Tariq > > On 01/22/2018 10:12 AM, jianchao.wang wrote: > > > > On 19/01/2018 5:49 PM, Eric Dumazet wrote: > > > > > On Fri, 2018-01-19 at 23:16 +0800, jianchao.wang wrote: > > > > > > Hi Tariq > > > > > > > > > > > > Very sad that the c

[PATCH v2 05/15] initramfs: move files creation into separate state

2018-01-24 Thread Taras Kondratiuk
Move most of the file creation logic into a separate state. This splits collection of data stage from data processing and makes it easier to add additional states for a new archive format. Signed-off-by: Taras Kondratiuk --- init/initramfs.c | 52 ++---

[PATCH v2 01/15] Documentation: add newcx initramfs format description

2018-01-24 Thread Taras Kondratiuk
Many of the Linux security/integrity features are dependent on file metadata, stored as extended attributes (xattrs), for making decisions. These features need to be initialized during initcall and enabled as early as possible for complete security coverage. Initramfs (tmpfs) supports xattrs, but

[PATCH v2 10/15] gen_init_cpio: move header formatting into function

2018-01-24 Thread Taras Kondratiuk
CPIO header is generated in multiple places with the same sprintf() format string. Move formatting into a single function in preparation to adding a new cpio format. Signed-off-by: Taras Kondratiuk --- usr/gen_init_cpio.c | 186 ++-- 1 file changed

Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc

2018-01-24 Thread Jia-Ju Bai
On 2018/1/25 11:34, Jens Axboe wrote: On 1/24/18 7:46 PM, Jia-Ju Bai wrote: The function ioc_create_icq here is not called in atomic context. Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. But it

[PATCH v2 12/15] gen_init_cpio: set extended attributes for newcx format

2018-01-24 Thread Taras Kondratiuk
gen_init_cpio creates CPIO archive according to cpio_list manifest file that contains list of archive entries (one per line). To be able to store extended attributes in newcx CPIO format we need to pass them via cpio_list file. One way of doing it would be to append xattrs to each entry line, but

Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc

2018-01-24 Thread Jens Axboe
On 1/24/18 7:46 PM, Jia-Ju Bai wrote: > The function ioc_create_icq here is not called in atomic context. > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. > > This is found by a static analysis tool named DCNS written by myself. But it's running off the IO submission pa

Re: linux-next: manual merge of the vfs tree with the overlayfs tree

2018-01-24 Thread Stephen Rothwell
Hi all, On Thu, 25 Jan 2018 14:31:55 +1100 Stephen Rothwell wrote: > > + if (!disconnected) { > -hlist_bl_lock(&tmp->d_sb->s_roots); > -hlist_bl_add_head(&tmp->d_hash, &tmp->d_sb->s_roots); > -hlist_bl_unlock(&tmp->d_sb->s_roots); > ++hlist_

Re: [PATCH v1 0/2] Remove duplicate driver for MyGica T230C

2018-01-24 Thread Stefan Brüns
On Wednesday, 10 January 2018 00:33:37 CET Stefan Brüns wrote: > In 2017-02, two drivers for the T230C where submitted, but until now > only the one based on the older dvb-usb/cxusb.c driver has been part > of the mainline kernel. As a dvb-usb-v2 driver is preferable, remove > the other driver. >

[PATCH v2 11/15] gen_init_cpio: add newcx format

2018-01-24 Thread Taras Kondratiuk
Add "newcx" format that supports extended attributes and has increased size of c_mtime and c_filesize fields. Added -x option to select "newcx" format. Default is "newc". Refer to Documentation/early-userspace/buffer-format.txt for detailed format description. Signed-off-by: Taras Kondratiuk --

[PATCH 2/2] block: blk-tag: Replace GFP_ATOMIC with GFP_KERNEL in init_tag_map

2018-01-24 Thread Jia-Ju Bai
After checking all possible call chains to init_tag_map here, my tool finds that init_tag_map is never called in atomic context. Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Ba

[PATCH v2 14/15] selinux: allow setxattr on rootfs so initramfs code can set them

2018-01-24 Thread Taras Kondratiuk
From: Victor Kamensky initramfs code supporting extended cpio format have ability to fill extended attributes from cpio archive, but if SELinux enabled and security server is not initialized yet, selinux callback would refuse setxattr made by initramfs code. Solution enable SBLABEL_MNT on rootfs

[PATCH v2 04/15] initramfs: remove unnecessary symlinks processing shortcut

2018-01-24 Thread Taras Kondratiuk
Special handling of symlinks in do_header() assumes that name and body entries are sequential and reads them together. This shortcut has no real performance benefits, but it complicates changes to the state machine. Make handling of symlinks more similar to a regular files. Store name in name_buf

[PATCH v2 08/15] initramfs: add newcx format

2018-01-24 Thread Taras Kondratiuk
Add 'newcx' format that adds extended attributes and increased size of c_mtime and c_filesize fields. Refer to Documentation/early-userspace/buffer-format.txt for detailed format description. Signed-off-by: Taras Kondratiuk --- init/initramfs.c | 95 +

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-24 Thread Greentime Hu
Hi, Arnd: 2018-01-24 19:36 GMT+08:00 Arnd Bergmann : > On Tue, Jan 23, 2018 at 12:52 PM, Greentime Hu wrote: >> Hi, Arnd: >> >> 2018-01-23 16:23 GMT+08:00 Greentime Hu : >>> Hi, Arnd: >>> >>> 2018-01-18 18:26 GMT+08:00 Arnd Bergmann : On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >>>

[PATCH v2 00/15] extend initramfs archive format to support xattrs

2018-01-24 Thread Taras Kondratiuk
Many of the Linux security/integrity features are dependent on file metadata, stored as extended attributes (xattrs), for making decisions. These features need to be initialized during initcall and enabled as early as possible for complete security coverage. Initramfs (tmpfs) supports xattrs, but

[PATCH v2 03/15] initramfs: store file name in name_buf

2018-01-24 Thread Taras Kondratiuk
There is already name_buf buffer pre-allocated for a file name. No need to allocate vcollected for every file. More over a name can be already stored in name_buf by read_info() function. Add memcpy_optional() function to handle such case. Signed-off-by: Taras Kondratiuk --- init/initramfs.c | 1

Re: [PATCH 1/2] block: blk-tag: Replace GFP_ATOMIC with GFP_KERNEL in __blk_queue_init_tags

2018-01-24 Thread Jens Axboe
On 1/24/18 8:38 PM, Jia-Ju Bai wrote: > After checking all possible call chains to kmalloc here, > my tool finds that kmalloc is never called in atomic context. > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. > > This is found by a static analysis tool named DCNS writte

[PATCH v2 06/15] initramfs: separate reading cpio method from header

2018-01-24 Thread Taras Kondratiuk
From: Mimi Zohar In preparation for adding xattr support, read the CPIO method separately from the rest of the header. Signed-off-by: Mimi Zohar Signed-off-by: Taras Kondratiuk --- init/initramfs.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/init/initr

[PATCH v2 02/15] initramfs: replace states with function pointers

2018-01-24 Thread Taras Kondratiuk
Currently the FSM states are mapped directly to function pointers. Extra level of intirection is not needed and makes navigation over the code harder. One can't jump between states directly when browsing code (e.g. with cscope). Need to go through actions[] array each time. Replace states with the

[PATCH v2 15/15] selinux: delay sid population for rootfs till init is complete

2018-01-24 Thread Taras Kondratiuk
From: Victor Kamensky With initramfs cpio format that supports extended attributes we need to skip sid population on sys_lsetxattr call from initramfs for rootfs if security server is not initialized yet. Otherwise callback in selinux_inode_post_setxattr will try to translate give security.selin

linux-next: manual merge of the vfs tree with the overlayfs tree

2018-01-24 Thread Stephen Rothwell
Hi Al, Today's linux-next merge of the vfs tree got a conflict in: fs/dcache.c between commit: f9c34674bc60 ("vfs: factor out helpers d_instantiate_anon() and d_alloc_anon()") from the overlayfs tree and commit: f1ee616214cb ("VFS: don't keep disconnected dentries on d_anon") from the

Re: [PATCH AUTOSEL for 4.14 001/100] drm/vc4: Account for interrupts in flight

2018-01-24 Thread Eric Anholt
Sasha Levin writes: > From: Stefan Schake > > [ Upstream commit 253696ccd613fbdaa5aba1de44c461a058e0a114 ] > > Synchronously disable the IRQ to make the following cancel_work_sync > invocation effective. > > An interrupt in flight could enqueue further overflow mem work. As we > free the binner

Re: "irq/matrix: Spread interrupts on allocation" breaks nouveau in mainline kernel

2018-01-24 Thread Mike Galbraith
On Wed, 2018-01-24 at 15:02 -0500, Lyude Paul wrote: > Almost forgot to mention: I came across this patch because reverting it > locally on the mainline kernel makes request_irq() behave normally (it doesn't > attempt to allocate the same vector twice anymore) and nouveau starts doing > suspend/res

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-24 Thread jianchao.wang
Hi Tariq On 01/22/2018 10:12 AM, jianchao.wang wrote: >>> On 19/01/2018 5:49 PM, Eric Dumazet wrote: On Fri, 2018-01-19 at 23:16 +0800, jianchao.wang wrote: > Hi Tariq > > Very sad that the crash was reproduced again after applied the patch. >> Memory barriers vary for different A

Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc

2018-01-24 Thread Jia-Ju Bai
On 2018/1/25 10:58, Al Viro wrote: On Thu, Jan 25, 2018 at 10:46:26AM +0800, Jia-Ju Bai wrote: The function ioc_create_icq here is not called in atomic context. Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written

[PATCH v2 2/4] arm64: Use the new MULTI_IRQ_HANDLER

2018-01-24 Thread Palmer Dabbelt
It appears arm64 copied arm's MULTI_IRQ_HANDLER code, but made it unconditional. I wanted to make this generic so it could be used by the RISC-V port. This patch converts the arm64 code to use the new generic code, which simply consists of deleting the arm64 code and setting MULTI_IRQ_HANDLER ins

[PATCH v2 4/4] RISC-V: Move to the new generic IRQ handler

2018-01-24 Thread Palmer Dabbelt
The old mechanism for handling IRQs on RISC-V was pretty ugly: the arch code looked at the Kconfig entry for our first-level irqchip driver and called into it directly. This patch uses the new 0generic IRQ handling infastructure, which essentially just deletes a bunch of code. This does add an ad

Re: [patches] Re: [PATCH 1/2] asm-generic: Add a generic set_handle_irq

2018-01-24 Thread Palmer Dabbelt
On Thu, 18 Jan 2018 07:45:13 PST (-0800), Christoph Hellwig wrote: I think this should not be asm-generic and lib, but kernel/irq/handle.c and include/linux/irq.h, under the CONFIG_MULTI_IRQ_HANDLER symbol already used by arm. Also for completeness of the series please convert arm, arm64 and ope

Make set_handle_irq and handle_arch_irq generic

2018-01-24 Thread Palmer Dabbelt
This is the second version of a patch set titled "Use arm64's scheme for registering first-level IRQ handlers on RISC-V". That patch set's cover letter is still the best way to describe what's going on, so I'm just copying it here: This patch set has been sitting around for a while, but it go

[PATCH v2 3/4] openrisc: Use the new MULTI_IRQ_HANDLER

2018-01-24 Thread Palmer Dabbelt
It appears that openrisc copied arm64's MULTI_IRQ_HANDLER code (which came from arm). I wanted to make this generic so I could use it in the RISC-V port. This patch converts the openrisc code to use the generic version. Signed-off-by: Palmer Dabbelt --- arch/openrisc/Kconfig | 1 + arch/o

[PATCH v2 1/4] arm: Make set_handle_irq and handle_arch_irq generic

2018-01-24 Thread Palmer Dabbelt
It looks like this same irqchip registration mechanism has been copied into a handful of ports, including aarch64 and openrisc. I want to use this in the RISC-V port, so I thought it would be good to make this generic instead. This patch simply moves set_handle_irq and handle_arch_irq from arch/a

  1   2   3   4   5   6   7   8   9   >