[PATCH v5 2/6] iommu/iova: Optimise the padding calculation

2017-09-21 Thread Robin Murphy
From: Zhen Lei The mask for calculating the padding size doesn't change, so there's no need to recalculate it every loop iteration. Furthermore, Once we've done that, it becomes clear that we don't actually need to calculate a padding size at all - by flipping the

[PATCH v5 0/6] Optimise 64-bit IOVA allocations

2017-09-21 Thread Robin Murphy
v4: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1493704.html Right, this is hopefully the last version - I've put things back in a sensible order with the new additions at the end, so if they prove contentious the first 4 previously-tested patches can still get their time in

[PATCH v5 1/6] iommu/iova: Optimise rbtree searching

2017-09-21 Thread Robin Murphy
From: Zhen Lei Checking the IOVA bounds separately before deciding which direction to continue the search (if necessary) results in redundantly comparing both pfns twice each. GCC can already determine that the final comparison op is redundant and optimise it down to 3 in total, but we can go

[PATCH v5 2/6] iommu/iova: Optimise the padding calculation

2017-09-21 Thread Robin Murphy
From: Zhen Lei The mask for calculating the padding size doesn't change, so there's no need to recalculate it every loop iteration. Furthermore, Once we've done that, it becomes clear that we don't actually need to calculate a padding size at all - by flipping the arithmetic around, we can just

[PATCH v5 6/6] iommu/iova: Simplify cached node logic

2017-09-21 Thread Robin Murphy
The logic of __get_cached_rbnode() is a little obtuse, but then __get_prev_node_of_cached_rbnode_or_last_node_and_update_limit_pfn() wouldn't exactly roll off the tongue... Now that we have the invariant that there is always a valid node to start searching downwards from, everything gets a bit

[PATCH v5 6/6] iommu/iova: Simplify cached node logic

2017-09-21 Thread Robin Murphy
The logic of __get_cached_rbnode() is a little obtuse, but then __get_prev_node_of_cached_rbnode_or_last_node_and_update_limit_pfn() wouldn't exactly roll off the tongue... Now that we have the invariant that there is always a valid node to start searching downwards from, everything gets a bit

[PATCH v2 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq

2017-09-21 Thread Chris Packham
Document the device tree bindings for the uio-prv-genirq driver. Provide some examples on how it can be used. Signed-off-by: Chris Packham --- .../bindings/uio/linux,uio-pdrv-genirq.txt | 28 ++ 1 file changed, 28 insertions(+)

[PATCH v2 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq

2017-09-21 Thread Chris Packham
Document the device tree bindings for the uio-prv-genirq driver. Provide some examples on how it can be used. Signed-off-by: Chris Packham --- .../bindings/uio/linux,uio-pdrv-genirq.txt | 28 ++ 1 file changed, 28 insertions(+) create mode 100644

[PATCH v2 0/2] using uio_pdrv_genirq without module param

2017-09-21 Thread Chris Packham
I found myself about to add a driver that was a sub-optimal clone of uio_pdrv_genirq the only difference was that I didn't want to modify the args passed to the kernel by my bootloader. If uio_pdrv_genirq had a default of_match entry I could simply use that. This series attempts to implement this.

[PATCH v2 0/2] using uio_pdrv_genirq without module param

2017-09-21 Thread Chris Packham
I found myself about to add a driver that was a sub-optimal clone of uio_pdrv_genirq the only difference was that I didn't want to modify the args passed to the kernel by my bootloader. If uio_pdrv_genirq had a default of_match entry I could simply use that. This series attempts to implement this.

[PATCH v2 2/2] uio: add default compatible string to uio_pdrv_genirq

2017-09-21 Thread Chris Packham
Add a default compatible string "linux,uio-pdrv-genirq" to uio_pdrv_genirq to make it usable without supplying a module parameter. The module parameter is still supported in addition to the default. Signed-off-by: Chris Packham ---

[PATCH v2 2/2] uio: add default compatible string to uio_pdrv_genirq

2017-09-21 Thread Chris Packham
Add a default compatible string "linux,uio-pdrv-genirq" to uio_pdrv_genirq to make it usable without supplying a module parameter. The module parameter is still supported in addition to the default. Signed-off-by: Chris Packham --- drivers/uio/uio_pdrv_genirq.c | 3 ++- 1 file changed, 2

[PATCH RT] locking/rtmutex: don't drop the wait_lock twice

2017-09-21 Thread Sebastian Andrzej Siewior
Since the futex rework, __rt_mutex_start_proxy_lock() does no longer acquire the wait_lock so it must not drop it. Otherwise the lock is not only unlocked twice but also the preemption counter is underflown. Cc: rt-sta...@vger.kernel.org Reported-by: Gusenleitner Klaus

[PATCH RT] locking/rtmutex: don't drop the wait_lock twice

2017-09-21 Thread Sebastian Andrzej Siewior
Since the futex rework, __rt_mutex_start_proxy_lock() does no longer acquire the wait_lock so it must not drop it. Otherwise the lock is not only unlocked twice but also the preemption counter is underflown. Cc: rt-sta...@vger.kernel.org Reported-by: Gusenleitner Klaus Signed-off-by: Sebastian

Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Mathieu Desnoyers
- On Sep 21, 2017, at 11:27 AM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: > On Thu, Sep 21, 2017 at 03:11:43PM +, Mathieu Desnoyers wrote: >> - On Sep 21, 2017, at 8:13 AM, Peter Zijlstra pet...@infradead.org wrote: >> >> > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu

Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Mathieu Desnoyers
- On Sep 21, 2017, at 11:27 AM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: > On Thu, Sep 21, 2017 at 03:11:43PM +, Mathieu Desnoyers wrote: >> - On Sep 21, 2017, at 8:13 AM, Peter Zijlstra pet...@infradead.org wrote: >> >> > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu

Re: Query regarding synchronize_sched_expedited and resched_cpu

2017-09-21 Thread Steven Rostedt
On Thu, 21 Sep 2017 15:55:46 +0200 Peter Zijlstra wrote: > On Mon, Sep 18, 2017 at 11:11:05AM -0400, Steven Rostedt wrote: > > On Sun, 17 Sep 2017 11:37:06 +0530 > > Neeraj Upadhyay wrote: > > > > > Hi Paul, how about replacing

Re: Query regarding synchronize_sched_expedited and resched_cpu

2017-09-21 Thread Steven Rostedt
On Thu, 21 Sep 2017 15:55:46 +0200 Peter Zijlstra wrote: > On Mon, Sep 18, 2017 at 11:11:05AM -0400, Steven Rostedt wrote: > > On Sun, 17 Sep 2017 11:37:06 +0530 > > Neeraj Upadhyay wrote: > > > > > Hi Paul, how about replacing raw_spin_trylock_irqsave with > > > raw_spin_lock_irqsave in

Re: [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq

2017-09-21 Thread Chris Packham
On 21/09/17 19:50, Andy Shevchenko wrote: > On Thu, Sep 21, 2017 at 3:53 AM, Chris Packham > wrote: > > >> -module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0); >> +module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, ); >

Re: [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq

2017-09-21 Thread Chris Packham
On 21/09/17 19:50, Andy Shevchenko wrote: > On Thu, Sep 21, 2017 at 3:53 AM, Chris Packham > wrote: > > >> -module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0); >> +module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, ); > > 0 -> looks like bogus

[GIT PULL] Kbuild fixes for v4.14-rc2

2017-09-21 Thread Masahiro Yamada
Hi Linus, Here are some early Kbuild fixes. The in-kernel firmware was removed during the previous merge window. Since then, some bug reports of broken rpm building are flying in ML. We need to fix it now. The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e: Linux

[GIT PULL] Kbuild fixes for v4.14-rc2

2017-09-21 Thread Masahiro Yamada
Hi Linus, Here are some early Kbuild fixes. The in-kernel firmware was removed during the previous merge window. Since then, some bug reports of broken rpm building are flying in ML. We need to fix it now. The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e: Linux

Re: [PATCH] net: phy: Fix truncation of large IRQ numbers in phy_attached_print()

2017-09-21 Thread Andrew Lunn
On Thu, Sep 21, 2017 at 01:27:02PM +0200, Geert Uytterhoeven wrote: > Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is > not enough to represent interrupt numbers on all architectures. Hence > PHY interrupt numbers may be truncated during printing. > > Increase the buffer

Re: [PATCH] net: phy: Fix truncation of large IRQ numbers in phy_attached_print()

2017-09-21 Thread Andrew Lunn
On Thu, Sep 21, 2017 at 01:27:02PM +0200, Geert Uytterhoeven wrote: > Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is > not enough to represent interrupt numbers on all architectures. Hence > PHY interrupt numbers may be truncated during printing. > > Increase the buffer

Re: [kernel-hardening] Re: [PATCH v3 03/31] usercopy: Mark kmalloc caches as usercopy caches

2017-09-21 Thread Kees Cook
On Thu, Sep 21, 2017 at 8:27 AM, Christopher Lameter wrote: > On Wed, 20 Sep 2017, Kees Cook wrote: > >> --- a/mm/slab.c >> +++ b/mm/slab.c >> @@ -1291,7 +1291,8 @@ void __init kmem_cache_init(void) >>*/ >> kmalloc_caches[INDEX_NODE] = create_kmalloc_cache( >>

Re: [kernel-hardening] Re: [PATCH v3 03/31] usercopy: Mark kmalloc caches as usercopy caches

2017-09-21 Thread Kees Cook
On Thu, Sep 21, 2017 at 8:27 AM, Christopher Lameter wrote: > On Wed, 20 Sep 2017, Kees Cook wrote: > >> --- a/mm/slab.c >> +++ b/mm/slab.c >> @@ -1291,7 +1291,8 @@ void __init kmem_cache_init(void) >>*/ >> kmalloc_caches[INDEX_NODE] = create_kmalloc_cache( >>

usb/net/hso: warning in hso_free_net_device

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). Looks like hso_create_net_device() can do goto exit before registering network device. hso 1-1:4.0: Can't find BULK IN endpoint [ cut here

usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 24 Comm:

usb/net/hso: warning in hso_free_net_device

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). Looks like hso_create_net_device() can do goto exit before registering network device. hso 1-1:4.0: Can't find BULK IN endpoint [ cut here

usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 24 Comm:

usb/net/hso: global-out-of-bounds in hso_probe

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). Is seems there's no check on the if_num value when it's used in ((u32 *)(id->driver_info))[if_num].

usb/net/hso: global-out-of-bounds in hso_probe

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). Is seems there's no check on the if_num value when it's used in ((u32 *)(id->driver_info))[if_num].

usb/media/smsusb: use-after-free in worker_thread

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). smsusb:smsusb_probe: board id=1, interface number 0 smsusb:siano_media_device_register: media controller created smsusb:smsusb1_detectmode: product string not

usb/media/smsusb: use-after-free in worker_thread

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). smsusb:smsusb_probe: board id=1, interface number 0 smsusb:siano_media_device_register: media controller created smsusb:smsusb1_detectmode: product string not

usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The issue occurs when we iterate over interface altsettings, but I don't see the driver doing anything wrong. I might be missing something, or this might be an

usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The issue occurs when we iterate over interface altsettings, but I don't see the driver doing anything wrong. I might be missing something, or this might be an

usb/sound/usx2y: warning in usb_stream_new/__alloc_pages_slowpath

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). [ cut here ] WARNING: CPU: 1 PID: 1846 at mm/page_alloc.c:3883 __alloc_pages_slowpath+0x1ef2/0x2d70 Modules linked in: CPU: 1 PID: 1846

usb/sound/usx2y: warning in usb_stream_new/__alloc_pages_slowpath

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). [ cut here ] WARNING: CPU: 1 PID: 1846 at mm/page_alloc.c:3883 __alloc_pages_slowpath+0x1ef2/0x2d70 Modules linked in: CPU: 1 PID: 1846

Re: [PATCH 7/7] fs-writeback: only allow one inflight and pending full flush

2017-09-21 Thread Jens Axboe
On 09/21/2017 09:05 AM, Christoph Hellwig wrote: > On Wed, Sep 20, 2017 at 09:33:02AM -0600, Jens Axboe wrote: >> When someone calls wakeup_flusher_threads() or >> wakeup_flusher_threads_bdi(), they schedule writeback of all dirty >> pages in the system (or on that bdi). If we are tight on memory,

Re: [PATCH 7/7] fs-writeback: only allow one inflight and pending full flush

2017-09-21 Thread Jens Axboe
On 09/21/2017 09:05 AM, Christoph Hellwig wrote: > On Wed, Sep 20, 2017 at 09:33:02AM -0600, Jens Axboe wrote: >> When someone calls wakeup_flusher_threads() or >> wakeup_flusher_threads_bdi(), they schedule writeback of all dirty >> pages in the system (or on that bdi). If we are tight on memory,

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

2017-09-21 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Wed, Sep 20, 2017 at 10:32:43AM -0700, H. Peter Anvin wrote: > > On 09/19/17 11:45, Josh Poimboeuf wrote: > > > For inline asm statements which have a CALL instruction, we list the > > > stack pointer as a constraint to convince GCC to ensure

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

2017-09-21 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Wed, Sep 20, 2017 at 10:32:43AM -0700, H. Peter Anvin wrote: > > On 09/19/17 11:45, Josh Poimboeuf wrote: > > > For inline asm statements which have a CALL instruction, we list the > > > stack pointer as a constraint to convince GCC to ensure the frame > > > pointer

Re: Query regarding synchronize_sched_expedited and resched_cpu

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 03:57:49PM +0200, Peter Zijlstra wrote: > On Mon, Sep 18, 2017 at 09:55:27AM -0700, Paul E. McKenney wrote: > > On Mon, Sep 18, 2017 at 12:29:31PM -0400, Steven Rostedt wrote: > > > On Mon, 18 Sep 2017 09:24:12 -0700 > > > "Paul E. McKenney"

Re: Query regarding synchronize_sched_expedited and resched_cpu

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 03:57:49PM +0200, Peter Zijlstra wrote: > On Mon, Sep 18, 2017 at 09:55:27AM -0700, Paul E. McKenney wrote: > > On Mon, Sep 18, 2017 at 12:29:31PM -0400, Steven Rostedt wrote: > > > On Mon, 18 Sep 2017 09:24:12 -0700 > > > "Paul E. McKenney" wrote: > > > > > > > > > > As

[PATCH v5 1/4] dt-bindings: Document the STM32 DMAMUX bindings

2017-09-21 Thread Pierre-Yves MORDRET
This patch adds the documentation of device tree bindings for the STM32 DMAMUX. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET --- Version history: v5: v4: * Add multi-master ability for STM32

[PATCH v5 1/4] dt-bindings: Document the STM32 DMAMUX bindings

2017-09-21 Thread Pierre-Yves MORDRET
This patch adds the documentation of device tree bindings for the STM32 DMAMUX. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET --- Version history: v5: v4: * Add multi-master ability for STM32 DMAMUX * Get rid of st,dmamux properties v3:

Re: Query regarding synchronize_sched_expedited and resched_cpu

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 03:55:46PM +0200, Peter Zijlstra wrote: > On Mon, Sep 18, 2017 at 11:11:05AM -0400, Steven Rostedt wrote: > > On Sun, 17 Sep 2017 11:37:06 +0530 > > Neeraj Upadhyay wrote: > > > > > Hi Paul, how about replacing raw_spin_trylock_irqsave with > > >

Re: Query regarding synchronize_sched_expedited and resched_cpu

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 03:55:46PM +0200, Peter Zijlstra wrote: > On Mon, Sep 18, 2017 at 11:11:05AM -0400, Steven Rostedt wrote: > > On Sun, 17 Sep 2017 11:37:06 +0530 > > Neeraj Upadhyay wrote: > > > > > Hi Paul, how about replacing raw_spin_trylock_irqsave with > > > raw_spin_lock_irqsave in

[PATCH v5 3/4] dt-bindings: stm32-dma: add a property to handle STM32 DMAMUX

2017-09-21 Thread Pierre-Yves MORDRET
STM32 DMA controller has to exposed its number of request line to be addressed via STM32 DMAMUX. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET --- Version history: v5: v4: * get rid of st,dmamux

[PATCH v5 3/4] dt-bindings: stm32-dma: add a property to handle STM32 DMAMUX

2017-09-21 Thread Pierre-Yves MORDRET
STM32 DMA controller has to exposed its number of request line to be addressed via STM32 DMAMUX. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET --- Version history: v5: v4: * get rid of st,dmamux property * number of DMA requests is exposed

[PATCH v5 2/4] dmaengine: Add STM32 DMAMUX driver

2017-09-21 Thread Pierre-Yves MORDRET
This patch implements the STM32 DMAMUX driver. The DMAMUX request multiplexer allows routing a DMA request line between the peripherals and the DMA controllers of the product. The routing function is ensured by a programmable multi-channel DMA request line multiplexer. Each channel selects a

[PATCH v5 2/4] dmaengine: Add STM32 DMAMUX driver

2017-09-21 Thread Pierre-Yves MORDRET
This patch implements the STM32 DMAMUX driver. The DMAMUX request multiplexer allows routing a DMA request line between the peripherals and the DMA controllers of the product. The routing function is ensured by a programmable multi-channel DMA request line multiplexer. Each channel selects a

[PATCH v5 0/4] Add STM32 DMAMUX support

2017-09-21 Thread Pierre-Yves MORDRET
This patchset adds support for the STM32 DMA multiplexer. It allows to map any peripheral DMA request to any channel of the product DMAs. This IP has been introduced with STM32H7 SoC. --- Version history: v5: * Set selected channel ID within a lock to avoid race condition.

[PATCH v5 4/4] ARM: configs: stm32: Add DMAMUX support in STM32 defconfig

2017-09-21 Thread Pierre-Yves MORDRET
This patch adds DMAMUX support in STM32 defconfig file Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET --- Version history: v5: v4: v3: v2: * None --- --- arch/arm/configs/stm32_defconfig

[PATCH v5 0/4] Add STM32 DMAMUX support

2017-09-21 Thread Pierre-Yves MORDRET
This patchset adds support for the STM32 DMA multiplexer. It allows to map any peripheral DMA request to any channel of the product DMAs. This IP has been introduced with STM32H7 SoC. --- Version history: v5: * Set selected channel ID within a lock to avoid race condition.

[PATCH v5 4/4] ARM: configs: stm32: Add DMAMUX support in STM32 defconfig

2017-09-21 Thread Pierre-Yves MORDRET
This patch adds DMAMUX support in STM32 defconfig file Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET --- Version history: v5: v4: v3: v2: * None --- --- arch/arm/configs/stm32_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git

Re: Memory-ordering recipes

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 02:45:31PM +0200, Peter Zijlstra wrote: > On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > > > So what litmus tests are needed? Here is my initial set: > > > > 1. Release-acquire chains, AKA ISA2, Z6.2, LB, and 3.LB I grouped the expansions of all of

Re: Memory-ordering recipes

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 02:45:31PM +0200, Peter Zijlstra wrote: > On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > > > So what litmus tests are needed? Here is my initial set: > > > > 1. Release-acquire chains, AKA ISA2, Z6.2, LB, and 3.LB I grouped the expansions of all of

Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 03:11:43PM +, Mathieu Desnoyers wrote: > - On Sep 21, 2017, at 8:13 AM, Peter Zijlstra pet...@infradead.org wrote: > > > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu Desnoyers wrote: > >> @@ -3373,6 +3362,7 @@ static void __sched notrace __schedule(bool

Re: [PATCH v3 03/31] usercopy: Mark kmalloc caches as usercopy caches

2017-09-21 Thread Christopher Lameter
On Wed, 20 Sep 2017, Kees Cook wrote: > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -1291,7 +1291,8 @@ void __init kmem_cache_init(void) >*/ > kmalloc_caches[INDEX_NODE] = create_kmalloc_cache( > kmalloc_info[INDEX_NODE].name, > -

Re: [PATCH v3 03/31] usercopy: Mark kmalloc caches as usercopy caches

2017-09-21 Thread Christopher Lameter
On Wed, 20 Sep 2017, Kees Cook wrote: > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -1291,7 +1291,8 @@ void __init kmem_cache_init(void) >*/ > kmalloc_caches[INDEX_NODE] = create_kmalloc_cache( > kmalloc_info[INDEX_NODE].name, > -

Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 03:11:43PM +, Mathieu Desnoyers wrote: > - On Sep 21, 2017, at 8:13 AM, Peter Zijlstra pet...@infradead.org wrote: > > > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu Desnoyers wrote: > >> @@ -3373,6 +3362,7 @@ static void __sched notrace __schedule(bool

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-09-21 Thread Tyler Baicar
On 9/13/2017 8:40 AM, Baicar, Tyler wrote: On 8/29/2017 2:16 AM, Borislav Petkov wrote: On Mon, Aug 28, 2017 at 10:53:41AM -0600, Tyler Baicar wrote: Currently we acknowledge errors before clearing the error status. This could cause a new error to be populated by firmware in-between the error

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-09-21 Thread Tyler Baicar
On 9/13/2017 8:40 AM, Baicar, Tyler wrote: On 8/29/2017 2:16 AM, Borislav Petkov wrote: On Mon, Aug 28, 2017 at 10:53:41AM -0600, Tyler Baicar wrote: Currently we acknowledge errors before clearing the error status. This could cause a new error to be populated by firmware in-between the error

Re: [PATCH v3 02/31] usercopy: Enforce slab cache usercopy region boundaries

2017-09-21 Thread Christopher Lameter
On Wed, 20 Sep 2017, Kees Cook wrote: > diff --git a/mm/slab.c b/mm/slab.c > index 87b6e5e0cdaf..df268999cf02 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -4408,7 +4408,9 @@ module_init(slab_proc_init); > > #ifdef CONFIG_HARDENED_USERCOPY > /* > - * Rejects objects that are incorrectly

Re: [PATCH v3 02/31] usercopy: Enforce slab cache usercopy region boundaries

2017-09-21 Thread Christopher Lameter
On Wed, 20 Sep 2017, Kees Cook wrote: > diff --git a/mm/slab.c b/mm/slab.c > index 87b6e5e0cdaf..df268999cf02 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -4408,7 +4408,9 @@ module_init(slab_proc_init); > > #ifdef CONFIG_HARDENED_USERCOPY > /* > - * Rejects objects that are incorrectly

Re: [PATCH v3 01/31] usercopy: Prepare for usercopy whitelisting

2017-09-21 Thread Christopher Lameter
On Wed, 20 Sep 2017, Kees Cook wrote: > diff --git a/include/linux/stddef.h b/include/linux/stddef.h > index 9c61c7cda936..f00355086fb2 100644 > --- a/include/linux/stddef.h > +++ b/include/linux/stddef.h > @@ -18,6 +18,8 @@ enum { > #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE

Re: [PATCH v3 01/31] usercopy: Prepare for usercopy whitelisting

2017-09-21 Thread Christopher Lameter
On Wed, 20 Sep 2017, Kees Cook wrote: > diff --git a/include/linux/stddef.h b/include/linux/stddef.h > index 9c61c7cda936..f00355086fb2 100644 > --- a/include/linux/stddef.h > +++ b/include/linux/stddef.h > @@ -18,6 +18,8 @@ enum { > #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE

[PATCH v2] iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq

2017-09-21 Thread Sebastian Andrzej Siewior
get_cpu_ptr() disabled preemption and returns the ->fq object of the current CPU. raw_cpu_ptr() does the same except that it not disable preemption which means the scheduler can move it to another CPU after it obtained the per-CPU object. In this case this is not bad because the data structure

[PATCH v2] iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq

2017-09-21 Thread Sebastian Andrzej Siewior
get_cpu_ptr() disabled preemption and returns the ->fq object of the current CPU. raw_cpu_ptr() does the same except that it not disable preemption which means the scheduler can move it to another CPU after it obtained the per-CPU object. In this case this is not bad because the data structure

Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header

2017-09-21 Thread Jiri Olsa
On Thu, Sep 21, 2017 at 05:18:42PM +0200, Jiri Olsa wrote: > On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote: > > SNIP > > > @@ -2647,11 +2681,22 @@ int perf_file_header__read(struct perf_file_header > > *header, > > > > if (header->size != sizeof(*header)) { > > /*

Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header

2017-09-21 Thread Jiri Olsa
On Thu, Sep 21, 2017 at 05:18:42PM +0200, Jiri Olsa wrote: > On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote: > > SNIP > > > @@ -2647,11 +2681,22 @@ int perf_file_header__read(struct perf_file_header > > *header, > > > > if (header->size != sizeof(*header)) { > > /*

Re: [RFC PATCH 0/7] AXP803 AC/Battery support

2017-09-21 Thread Icenowy Zheng
于 2017年9月21日 GMT+08:00 下午10:46:21, Jonathan Cameron 写到: >On Wed, 20 Sep 2017 23:18:07 +0800 >Icenowy Zheng wrote: > >> The AXP803 PMIC, used by most Allwinner A64 boards, features 3 power >inputs: >> AC, USB and Battery. >> >> This patchset adds

Re: [RFC PATCH 0/7] AXP803 AC/Battery support

2017-09-21 Thread Icenowy Zheng
于 2017年9月21日 GMT+08:00 下午10:46:21, Jonathan Cameron 写到: >On Wed, 20 Sep 2017 23:18:07 +0800 >Icenowy Zheng wrote: > >> The AXP803 PMIC, used by most Allwinner A64 boards, features 3 power >inputs: >> AC, USB and Battery. >> >> This patchset adds support for the AC and Battery supplies, which

Re: [PATCH 2/2] mfd: intel-lpss: switch to suspend_late()/resume_early()

2017-09-21 Thread Rafael J. Wysocki
On Thu, Sep 21, 2017 at 5:17 PM, Lee Jones wrote: > On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: > >> On Thursday, September 21, 2017 10:41:33 AM CEST Lee Jones wrote: >> > On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: >> > >> > > On Thu, Sep 21, 2017 at 12:31 AM, Rajat

Re: [PATCH v2 2/3] ASoC: fsl-asoc-card: Handle return value of devm_kasprintf

2017-09-21 Thread Mark Brown
On Thu, Sep 21, 2017 at 10:50:03AM +0530, Arvind Yadav wrote: > devm_kasprintf() can fail here and we must check its return value. This is patch 2/3 but you've only sent me this one patch. This is missing the point of numbering a series, the only reason for the numbering is to provide ordering

Re: [PATCH 2/2] mfd: intel-lpss: switch to suspend_late()/resume_early()

2017-09-21 Thread Rafael J. Wysocki
On Thu, Sep 21, 2017 at 5:17 PM, Lee Jones wrote: > On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: > >> On Thursday, September 21, 2017 10:41:33 AM CEST Lee Jones wrote: >> > On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: >> > >> > > On Thu, Sep 21, 2017 at 12:31 AM, Rajat Jain wrote: >> > > >

Re: [PATCH v2 2/3] ASoC: fsl-asoc-card: Handle return value of devm_kasprintf

2017-09-21 Thread Mark Brown
On Thu, Sep 21, 2017 at 10:50:03AM +0530, Arvind Yadav wrote: > devm_kasprintf() can fail here and we must check its return value. This is patch 2/3 but you've only sent me this one patch. This is missing the point of numbering a series, the only reason for the numbering is to provide ordering

Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header

2017-09-21 Thread Jiri Olsa
On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote: SNIP > @@ -2647,11 +2681,22 @@ int perf_file_header__read(struct perf_file_header > *header, > > if (header->size != sizeof(*header)) { > /* Support the previous format */ > - if (header->size ==

Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header

2017-09-21 Thread Jiri Olsa
On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote: SNIP > @@ -2647,11 +2681,22 @@ int perf_file_header__read(struct perf_file_header > *header, > > if (header->size != sizeof(*header)) { > /* Support the previous format */ > - if (header->size ==

Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header

2017-09-21 Thread Jiri Olsa
On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote: SNIP > @@ -2686,6 +2731,11 @@ int perf_file_header__read(struct perf_file_header > *header, > } > } > > + if (ph->needs_swap && format_time) { > + header->first_sample_time =

Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header

2017-09-21 Thread Jiri Olsa
On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote: SNIP > @@ -2686,6 +2731,11 @@ int perf_file_header__read(struct perf_file_header > *header, > } > } > > + if (ph->needs_swap && format_time) { > + header->first_sample_time =

Re: [PATCH 2/2] mfd: intel-lpss: switch to suspend_late()/resume_early()

2017-09-21 Thread Lee Jones
On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: > On Thursday, September 21, 2017 10:41:33 AM CEST Lee Jones wrote: > > On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: > > > > > On Thu, Sep 21, 2017 at 12:31 AM, Rajat Jain wrote: > > > > Ref: https://lkml.org/lkml/2017/9/19/649

Re: [PATCH 2/2] mfd: intel-lpss: switch to suspend_late()/resume_early()

2017-09-21 Thread Lee Jones
On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: > On Thursday, September 21, 2017 10:41:33 AM CEST Lee Jones wrote: > > On Thu, 21 Sep 2017, Rafael J. Wysocki wrote: > > > > > On Thu, Sep 21, 2017 at 12:31 AM, Rajat Jain wrote: > > > > Ref: https://lkml.org/lkml/2017/9/19/649 > > > > > > > > The

Re: [PATCH v3 0/5] Call GetEventLog before ExitBootServices

2017-09-21 Thread Jarkko Sakkinen
On Wed, Sep 20, 2017 at 10:13:35AM +0200, Thiebaud Weksteen wrote: > With TPM 1.2, the ACPI table ("TCPA") has two fields to recover the Event > Log Area (LAML and LASA). These logs are useful to understand and rebuild > the final values of PCRs. > > With TPM 2.0, the ACPI table ("TPM2") does not

Re: [PATCH v3 0/5] Call GetEventLog before ExitBootServices

2017-09-21 Thread Jarkko Sakkinen
On Wed, Sep 20, 2017 at 10:13:35AM +0200, Thiebaud Weksteen wrote: > With TPM 1.2, the ACPI table ("TCPA") has two fields to recover the Event > Log Area (LAML and LASA). These logs are useful to understand and rebuild > the final values of PCRs. > > With TPM 2.0, the ACPI table ("TPM2") does not

Re: [PATCH] ARM: davinci_all_defconfig: enable CMA options

2017-09-21 Thread Suman Anna
On 09/21/2017 09:43 AM, Sekhar Nori wrote: > On Wednesday 20 September 2017 11:31 PM, Suman Anna wrote: >> Enable the CMA and DMA_CMA Kconfig options by default for >> Davinci platforms. Davinci remoteproc driver is one of the >> modules that depends on these options, and this allows the >> driver

Re: [PATCH] ARM: davinci_all_defconfig: enable CMA options

2017-09-21 Thread Suman Anna
On 09/21/2017 09:43 AM, Sekhar Nori wrote: > On Wednesday 20 September 2017 11:31 PM, Suman Anna wrote: >> Enable the CMA and DMA_CMA Kconfig options by default for >> Davinci platforms. Davinci remoteproc driver is one of the >> modules that depends on these options, and this allows the >> driver

Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Mathieu Desnoyers
- On Sep 21, 2017, at 8:13 AM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu Desnoyers wrote: >> @@ -3373,6 +3362,7 @@ static void __sched notrace __schedule(bool preempt) >> >> /* Also unlocks the rq: */ >> rq =

Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Mathieu Desnoyers
- On Sep 21, 2017, at 8:13 AM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu Desnoyers wrote: >> @@ -3373,6 +3362,7 @@ static void __sched notrace __schedule(bool preempt) >> >> /* Also unlocks the rq: */ >> rq =

[PATCH 4/4] [media] usbvision-core: Replace four printk() calls by dev_err()

2017-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 21 Sep 2017 16:47:28 +0200 * Replace the local variable "proc" by the identifier "__func__". * Use the interface "dev_err" instead of "printk" in these functions. Signed-off-by: Markus Elfring ---

Re: [PATCH] iommu/amd: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->flush_queue

2017-09-21 Thread Sebastian Andrzej Siewior
On 2017-09-11 22:22:11 [-0400], Vinod Adhikary wrote: > Dear all, Hi, > Thank you for the great community support and support from Sebastian to > provide me this patch. I wanted to send this email to inform you and > perhaps get some information on how I could keep myself updated on updates > in

[PATCH 4/4] [media] usbvision-core: Replace four printk() calls by dev_err()

2017-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 21 Sep 2017 16:47:28 +0200 * Replace the local variable "proc" by the identifier "__func__". * Use the interface "dev_err" instead of "printk" in these functions. Signed-off-by: Markus Elfring --- drivers/media/usb/usbvision/usbvision-core.c | 18

Re: [PATCH] iommu/amd: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->flush_queue

2017-09-21 Thread Sebastian Andrzej Siewior
On 2017-09-11 22:22:11 [-0400], Vinod Adhikary wrote: > Dear all, Hi, > Thank you for the great community support and support from Sebastian to > provide me this patch. I wanted to send this email to inform you and > perhaps get some information on how I could keep myself updated on updates > in

[PATCH 3/4] [media] usbvision-core: Delete unnecessary braces in 11 functions

2017-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 21 Sep 2017 16:24:20 +0200 Do not use curly brackets at some source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring ---

[PATCH 3/4] [media] usbvision-core: Delete unnecessary braces in 11 functions

2017-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 21 Sep 2017 16:24:20 +0200 Do not use curly brackets at some source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring --- drivers/media/usb/usbvision/usbvision-core.c | 71 1 file changed, 31

[PATCH 2/4] [media] usbvision-core: Use common error handling code in usbvision_set_compress_params()

2017-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 21 Sep 2017 12:45:49 +0200 * Add a jump target so that a bit of exception handling can be better reused at the end of this function. * Replace the local variable "proc" by the identifier "__func__". * Use the interface "dev_err"

[PATCH 2/4] [media] usbvision-core: Use common error handling code in usbvision_set_compress_params()

2017-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 21 Sep 2017 12:45:49 +0200 * Add a jump target so that a bit of exception handling can be better reused at the end of this function. * Replace the local variable "proc" by the identifier "__func__". * Use the interface "dev_err" instead of "printk".

Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface

2017-09-21 Thread Greg KH
On Thu, Sep 21, 2017 at 05:51:29PM +0300, Serge Semin wrote: > On Thu, Sep 21, 2017 at 10:23:38AM +0200, Greg KH > wrote: > > On Sat, Sep 16, 2017 at 01:42:20PM +0300, Serge Semin wrote: > > > diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c > >

Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface

2017-09-21 Thread Greg KH
On Thu, Sep 21, 2017 at 05:51:29PM +0300, Serge Semin wrote: > On Thu, Sep 21, 2017 at 10:23:38AM +0200, Greg KH > wrote: > > On Sat, Sep 16, 2017 at 01:42:20PM +0300, Serge Semin wrote: > > > diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c > > > index 71994b883..c2dd9742f

<    4   5   6   7   8   9   10   11   12   13   >