Re: [v6 11/15] arm64/kasan: explicitly zero kasan shadow memory

2017-08-08 Thread Will Deacon
On Tue, Aug 08, 2017 at 07:49:22AM -0400, Pasha Tatashin wrote: > Hi Will, > > Thank you for looking at this change. What you described was in my previous > iterations of this project. > > See for example here: https://lkml.org/lkml/2017/5/5/369 > > I was asked to remove that flag, and only

Re: [v6 11/15] arm64/kasan: explicitly zero kasan shadow memory

2017-08-08 Thread Will Deacon
On Tue, Aug 08, 2017 at 07:49:22AM -0400, Pasha Tatashin wrote: > Hi Will, > > Thank you for looking at this change. What you described was in my previous > iterations of this project. > > See for example here: https://lkml.org/lkml/2017/5/5/369 > > I was asked to remove that flag, and only

Re: [PATCH] drm/omap: dma-buf: Constify dma_buf_ops structures.

2017-08-08 Thread Tomi Valkeinen
On 02/07/17 09:19, Arvind Yadav wrote: > dma_buf_ops are not supposed to change at runtime. All functions > working with dma_buf_ops provided by work with > const dma_buf_ops. So mark the non-const structs as const. > > File size before: >text data bss dec hex filename >

Re: [PATCH] drm/omap: dma-buf: Constify dma_buf_ops structures.

2017-08-08 Thread Tomi Valkeinen
On 02/07/17 09:19, Arvind Yadav wrote: > dma_buf_ops are not supposed to change at runtime. All functions > working with dma_buf_ops provided by work with > const dma_buf_ops. So mark the non-const structs as const. > > File size before: >text data bss dec hex filename >

Re: [PATCH v3 0/4] thermal: add brcmstb AVS TMON driver

2017-08-08 Thread Zhang Rui
On Mon, 2017-08-07 at 10:52 -0700, Florian Fainelli wrote: > On 07/31/2017 12:26 PM, Markus Mayer wrote: > > > > From: Markus Mayer > > > > This series adds the brcmstb AVS TMON driver. > > > > The driver was originally written by Brian Norris. > > > > v1 of this series

Re: [PATCH v3 0/4] thermal: add brcmstb AVS TMON driver

2017-08-08 Thread Zhang Rui
On Mon, 2017-08-07 at 10:52 -0700, Florian Fainelli wrote: > On 07/31/2017 12:26 PM, Markus Mayer wrote: > > > > From: Markus Mayer > > > > This series adds the brcmstb AVS TMON driver. > > > > The driver was originally written by Brian Norris. > > > > v1 of this series can be found at

Re: [PATCH] staging: media: atomisp: use kvmalloc/kvzalloc

2017-08-08 Thread Alan Cox
On Mon, 2017-08-07 at 21:44 +0800, Geliang Tang wrote: > Use kvmalloc()/kvzalloc() instead of atomisp_kernel_malloc() > /atomisp_kernel_zalloc(). > > Signed-off-by: Geliang Tang Definitely better now we have kvmalloc/kvzalloc. Thanks Alan

Re: [PATCH] staging: media: atomisp: use kvmalloc/kvzalloc

2017-08-08 Thread Alan Cox
On Mon, 2017-08-07 at 21:44 +0800, Geliang Tang wrote: > Use kvmalloc()/kvzalloc() instead of atomisp_kernel_malloc() > /atomisp_kernel_zalloc(). > > Signed-off-by: Geliang Tang Definitely better now we have kvmalloc/kvzalloc. Thanks Alan

[PATCH v3 2/6] MIPS: microMIPS: Fix detection of addiusp instruction

2017-08-08 Thread Matt Redfearn
The addiusp instruction uses the pool16d opcode, with bit 0 of the immediate set. The test for the addiusp opcode erroneously did a logical and of the immediate with mm_addiusp_func, which has value 1, so this test always passes when the immediate is non-zero. Fix the test by replacing the

[PATCH v3 2/6] MIPS: microMIPS: Fix detection of addiusp instruction

2017-08-08 Thread Matt Redfearn
The addiusp instruction uses the pool16d opcode, with bit 0 of the immediate set. The test for the addiusp opcode erroneously did a logical and of the immediate with mm_addiusp_func, which has value 1, so this test always passes when the immediate is non-zero. Fix the test by replacing the

[PATCH v3 3/6] MIPS: microMIPS: Fix decoding of addiusp instruction

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added handling of microMIPS instructions to manipulate the stack pointer. Unfortunately the decoding of the addiusp instruction was incorrect, and performed a left shift by 2 bits to the raw immediate, rather than decoding the

[PATCH v3 3/6] MIPS: microMIPS: Fix decoding of addiusp instruction

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added handling of microMIPS instructions to manipulate the stack pointer. Unfortunately the decoding of the addiusp instruction was incorrect, and performed a left shift by 2 bits to the raw immediate, rather than decoding the

[PATCH v3 5/6] MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems

2017-08-08 Thread Matt Redfearn
The stack unwinding code uses the mips_instuction union to decode the instructions it finds. That union uses the __BITFIELD_FIELD macro to reorder depending on endianness. The stack unwinding code always places 16bit instructions in halfword 1 of the union. This makes the union accesses correct

[PATCH v3 5/6] MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems

2017-08-08 Thread Matt Redfearn
The stack unwinding code uses the mips_instuction union to decode the instructions it finds. That union uses the __BITFIELD_FIELD macro to reorder depending on endianness. The stack unwinding code always places 16bit instructions in halfword 1 of the union. This makes the union accesses correct

[PATCH v3 1/8] irqchip/gic-v3-its: Initialize its nodes in probe order

2017-08-08 Thread Robert Richter
ATM the last discovered node is initialized first. Though this order should work too, change the initialization of nodes to probe order as one would expect it. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 1/8] irqchip/gic-v3-its: Initialize its nodes in probe order

2017-08-08 Thread Robert Richter
ATM the last discovered node is initialized first. Though this order should work too, change the initialization of nodes to probe order as one would expect it. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 2/8] irqchip/gic-v3-its: Initialize MSIs with subsys_initcalls

2017-08-08 Thread Robert Richter
This allows us to use kernel core functionality (e.g. cma) for ITS initialization. MSIs must be up before the device_initcalls (pci and platform device probe) and after arch_initcalls (dma init), so subsys_initcall is fine. Signed-off-by: Robert Richter ---

[PATCH v3 2/8] irqchip/gic-v3-its: Initialize MSIs with subsys_initcalls

2017-08-08 Thread Robert Richter
This allows us to use kernel core functionality (e.g. cma) for ITS initialization. MSIs must be up before the device_initcalls (pci and platform device probe) and after arch_initcalls (dma init), so subsys_initcall is fine. Signed-off-by: Robert Richter ---

[PATCH v3 6/8] irqchip/gic-v3-its: Initialize its nodes later

2017-08-08 Thread Robert Richter
Use an initcall to initialize its. This allows us to use the device framework during initialization that is up at this point. We use subsys_initcall() here since we need the arch to be initialized first. It is before pci and platform device probe where devices are bound to msi interrupts.

[PATCH v3 6/8] irqchip/gic-v3-its: Initialize its nodes later

2017-08-08 Thread Robert Richter
Use an initcall to initialize its. This allows us to use the device framework during initialization that is up at this point. We use subsys_initcall() here since we need the arch to be initialized first. It is before pci and platform device probe where devices are bound to msi interrupts.

[PATCH v3 5/8] irqchip/gic-v3-its: Prevent its init ordering dependencies

2017-08-08 Thread Robert Richter
Right now its_init() must be called before pci and platform init. Remove ordering dependencies to allow all initialization functions being called with the same initcall type. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 4 +++-

[PATCH v3 5/8] irqchip/gic-v3-its: Prevent its init ordering dependencies

2017-08-08 Thread Robert Richter
Right now its_init() must be called before pci and platform init. Remove ordering dependencies to allow all initialization functions being called with the same initcall type. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 4 +++-

[PATCH v3 7/8] irqchip/gic-v3-its: Handle its nodes as kernel devices

2017-08-08 Thread Robert Richter
Manage its nodes as kernel devices. We can then use the kernel's device resource management for memory allocation. Freeing memory becomes much easier now. This also allows us to use CMA for the allocation of large its tables. Signed-off-by: Robert Richter ---

[PATCH v3 7/8] irqchip/gic-v3-its: Handle its nodes as kernel devices

2017-08-08 Thread Robert Richter
Manage its nodes as kernel devices. We can then use the kernel's device resource management for memory allocation. Freeing memory becomes much easier now. This also allows us to use CMA for the allocation of large its tables. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its.c |

[PATCH v3 0/8] irqchip/gic-v3-its: Implement ITS nodes as kernel devices and use CMA

2017-08-08 Thread Robert Richter
This patch series implements ITS nodes as kernel devices. The advantage of that is that CMA can be used to allocate large ITS tables, where standard memory and page allocation fails (above MAX_ORDER - 1). This approach was suggested first here: https://marc.info/?i=56D44812.6000309%40arm.com

[PATCH v3 0/8] irqchip/gic-v3-its: Implement ITS nodes as kernel devices and use CMA

2017-08-08 Thread Robert Richter
This patch series implements ITS nodes as kernel devices. The advantage of that is that CMA can be used to allocate large ITS tables, where standard memory and page allocation fails (above MAX_ORDER - 1). This approach was suggested first here: https://marc.info/?i=56D44812.6000309%40arm.com

[PATCH v3 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of large device tables

2017-08-08 Thread Robert Richter
The gicv3-its device table may have a size of up to 16MB. With 4k pagesize the maximum size of memory allocation is 4MB. Use CMA for allocation of large tables. We use the device managed version of dma_alloc_coherent(). Thus, we don't need to release it manually on device removal. Signed-off-by:

[PATCH] MIPS: usercopy: Implement stack frame object validation

2017-08-08 Thread Matt Redfearn
This implements arch_within_stack_frames() for MIPS that validates if an object is wholly contained by a kernel stack frame. With CONFIG_HARDENED_USERCOPY enabled, MIPS now passes the LKDTM tests USERCOPY_STACK_FRAME_TO, USERCOPY_STACK_FRAME_FROM and USERCOPY_STACK_BEYOND on a Creator Ci40.

[PATCH v3 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of large device tables

2017-08-08 Thread Robert Richter
The gicv3-its device table may have a size of up to 16MB. With 4k pagesize the maximum size of memory allocation is 4MB. Use CMA for allocation of large tables. We use the device managed version of dma_alloc_coherent(). Thus, we don't need to release it manually on device removal. Signed-off-by:

[PATCH] MIPS: usercopy: Implement stack frame object validation

2017-08-08 Thread Matt Redfearn
This implements arch_within_stack_frames() for MIPS that validates if an object is wholly contained by a kernel stack frame. With CONFIG_HARDENED_USERCOPY enabled, MIPS now passes the LKDTM tests USERCOPY_STACK_FRAME_TO, USERCOPY_STACK_FRAME_FROM and USERCOPY_STACK_BEYOND on a Creator Ci40.

[PATCH v3 3/8] irqchip/gic-v3-its: Split probing from its node initialization

2017-08-08 Thread Robert Richter
To initialize the its nodes at a later point during boot, we need to split probing from initialization. Collect all information required for initialization in struct its_node. We can then use the its node list for initialization. Signed-off-by: Robert Richter ---

[PATCH v3 3/8] irqchip/gic-v3-its: Split probing from its node initialization

2017-08-08 Thread Robert Richter
To initialize the its nodes at a later point during boot, we need to split probing from initialization. Collect all information required for initialization in struct its_node. We can then use the its node list for initialization. Signed-off-by: Robert Richter ---

[PATCH v3 4/8] irqchip/gic-v3-its: Decouple its initialization from gic

2017-08-08 Thread Robert Richter
This patch separates its initialization from the gic. Probing and initialization of its nodes is separate now. There is an own cpu notifier for its now. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its.c | 61 +++---

[PATCH v3 4/8] irqchip/gic-v3-its: Decouple its initialization from gic

2017-08-08 Thread Robert Richter
This patch separates its initialization from the gic. Probing and initialization of its nodes is separate now. There is an own cpu notifier for its now. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its.c | 61 +++--- drivers/irqchip/irq-gic-v3.c

[PATCH v3 6/6] MIPS: Refactor handling of stack pointer in get_frame_info

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added handling of microMIPS instructions to manipulate the stack pointer. The code that was added violates code style rules with long lines caused by lots of nested conditionals. The added code interprets (inline) any known

[PATCH v3 6/6] MIPS: Refactor handling of stack pointer in get_frame_info

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added handling of microMIPS instructions to manipulate the stack pointer. The code that was added violates code style rules with long lines caused by lots of nested conditionals. The added code interprets (inline) any known

[PATCH v3 1/6] MIPS: Handle non word sized instructions when examining frame

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6b ("MIPS: microMIPS: Add unaligned access support.") added fairly broken support for handling 16bit microMIPS instructions in get_frame_info(). It adjusts the instruction pointer by 16bits in the case of a 16bit sp move instruction, but not any other 16bit instruction. Commit

[PATCH v3 1/6] MIPS: Handle non word sized instructions when examining frame

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6b ("MIPS: microMIPS: Add unaligned access support.") added fairly broken support for handling 16bit microMIPS instructions in get_frame_info(). It adjusts the instruction pointer by 16bits in the case of a 16bit sp move instruction, but not any other 16bit instruction. Commit

[PATCH v3 4/6] MIPS: microMIPS: Fix decoding of swsp16 instruction

2017-08-08 Thread Matt Redfearn
When the immediate encoded in the instruction is accessed, it is sign extended due to being a signed value being assigned to a signed integer. The ISA specifies that this operation is an unsigned operation. The sign extension leads us to incorrectly decode: 801e9c8e: cbf1sw

[PATCH v3 4/6] MIPS: microMIPS: Fix decoding of swsp16 instruction

2017-08-08 Thread Matt Redfearn
When the immediate encoded in the instruction is accessed, it is sign extended due to being a signed value being assigned to a signed integer. The ISA specifies that this operation is an unsigned operation. The sign extension leads us to incorrectly decode: 801e9c8e: cbf1sw

[PATCH v3 0/6] MIPS: Further microMIPS stack unwinding fixes

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added support for unwinding the stack on microMIPS, which has a mix of 16 and 32bit sized instructions. Unfortunately a lot of the code introduced had bugs which prevented it working correctly in all cases. This series aims to

[PATCH v3 0/6] MIPS: Further microMIPS stack unwinding fixes

2017-08-08 Thread Matt Redfearn
Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added support for unwinding the stack on microMIPS, which has a mix of 16 and 32bit sized instructions. Unfortunately a lot of the code introduced had bugs which prevented it working correctly in all cases. This series aims to

Re: [PATCH] audit: update the function comments

2017-08-08 Thread Paul Moore
On Mon, Aug 7, 2017 at 7:25 PM, Paul Moore wrote: > On Mon, Aug 7, 2017 at 9:44 AM, Geliang Tang wrote: >> Update the function comments to match the code. >> >> Signed-off-by: Geliang Tang >> --- >> kernel/audit.c | 2 +- >>

Re: [PATCH] audit: update the function comments

2017-08-08 Thread Paul Moore
On Mon, Aug 7, 2017 at 7:25 PM, Paul Moore wrote: > On Mon, Aug 7, 2017 at 9:44 AM, Geliang Tang wrote: >> Update the function comments to match the code. >> >> Signed-off-by: Geliang Tang >> --- >> kernel/audit.c | 2 +- >> kernel/auditsc.c | 18 +- >> 2 files changed, 10

Re: [RFC v5 05/11] mm: fix lock dependency against mapping->i_mmap_rwsem

2017-08-08 Thread Laurent Dufour
On 08/08/2017 13:17, Anshuman Khandual wrote: > On 06/16/2017 11:22 PM, Laurent Dufour wrote: >> kworker/32:1/819 is trying to acquire lock: >> (>vm_sequence){+.+...}, at: [] >> zap_page_range_single+0xd0/0x1a0 >> >> but task is already holding lock: >> (>i_mmap_rwsem){..}, at: [] >>

Re: [RFC v5 05/11] mm: fix lock dependency against mapping->i_mmap_rwsem

2017-08-08 Thread Laurent Dufour
On 08/08/2017 13:17, Anshuman Khandual wrote: > On 06/16/2017 11:22 PM, Laurent Dufour wrote: >> kworker/32:1/819 is trying to acquire lock: >> (>vm_sequence){+.+...}, at: [] >> zap_page_range_single+0xd0/0x1a0 >> >> but task is already holding lock: >> (>i_mmap_rwsem){..}, at: [] >>

xfs: use kmem_free to free return value of kmem_zalloc

2017-08-08 Thread Pan Bian
In function xfs_test_remount_options(), kfree() is used to free memory allocated by kmem_zalloc(). But it is better to use kmem_free(). Signed-off-by: Pan Bian --- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_super.c

xfs: use kmem_free to free return value of kmem_zalloc

2017-08-08 Thread Pan Bian
In function xfs_test_remount_options(), kfree() is used to free memory allocated by kmem_zalloc(). But it is better to use kmem_free(). Signed-off-by: Pan Bian --- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c

Re: [RFC v5 03/11] mm: Introduce pte_spinlock for FAULT_FLAG_SPECULATIVE

2017-08-08 Thread Laurent Dufour
On 08/08/2017 12:35, Anshuman Khandual wrote: > On 06/16/2017 11:22 PM, Laurent Dufour wrote: >> When handling page fault without holding the mmap_sem the fetch of the >> pte lock pointer and the locking will have to be done while ensuring >> that the VMA is not touched in our back. > > It does

Re: [RFC v5 03/11] mm: Introduce pte_spinlock for FAULT_FLAG_SPECULATIVE

2017-08-08 Thread Laurent Dufour
On 08/08/2017 12:35, Anshuman Khandual wrote: > On 06/16/2017 11:22 PM, Laurent Dufour wrote: >> When handling page fault without holding the mmap_sem the fetch of the >> pte lock pointer and the locking will have to be done while ensuring >> that the VMA is not touched in our back. > > It does

Re: [PATCH 4/4] dt-bindings: phy-mt65xx-usb: supports PCIe, SATA and rename file

2017-08-08 Thread Kishon Vijay Abraham I
Chunfeng On Thursday 03 August 2017 03:50 PM, Chunfeng Yun wrote: > hi, > > I made a mistake, please ignore the patches with Change-Id, very sorry No problem. However can you resend the series after fixing all checkpatch warnings? Thanks Kishon

Re: [PATCH 4/4] dt-bindings: phy-mt65xx-usb: supports PCIe, SATA and rename file

2017-08-08 Thread Kishon Vijay Abraham I
Chunfeng On Thursday 03 August 2017 03:50 PM, Chunfeng Yun wrote: > hi, > > I made a mistake, please ignore the patches with Change-Id, very sorry No problem. However can you resend the series after fixing all checkpatch warnings? Thanks Kishon

Re: [PATCH] staging: pi433: style fix - space after asterisk

2017-08-08 Thread Marcus Wolf
Reviewed-by: Marcus Wolf Thank you Marcin! > Marcin Ciupak hat am 8. August 2017 um 15:54 > geschrieben: > > > This patch is intended to fix coding style issues in order to comply > with kernel coding style guide as requested by TODO

Re: [PATCH] staging: pi433: style fix - space after asterisk

2017-08-08 Thread Marcus Wolf
Reviewed-by: Marcus Wolf Thank you Marcin! > Marcin Ciupak hat am 8. August 2017 um 15:54 > geschrieben: > > > This patch is intended to fix coding style issues in order to comply > with kernel coding style guide as requested by TODO file. > > It fixes the following checkpatch.pl error: > >

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-08 Thread Matthew Wilcox
On Mon, Aug 07, 2017 at 03:21:31PM +0800, Huang, Ying wrote: > @@ -2509,7 +2509,8 @@ enum mf_action_page_type { > #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) > extern void clear_huge_page(struct page *page, > unsigned long addr, > -

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-08 Thread Matthew Wilcox
On Mon, Aug 07, 2017 at 03:21:31PM +0800, Huang, Ying wrote: > @@ -2509,7 +2509,8 @@ enum mf_action_page_type { > #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) > extern void clear_huge_page(struct page *page, > unsigned long addr, > -

Re: [RFC v5 01/11] mm: Dont assume page-table invariance during faults

2017-08-08 Thread Laurent Dufour
On 08/08/2017 11:45, Anshuman Khandual wrote: > On 06/16/2017 11:22 PM, Laurent Dufour wrote: >> From: Peter Zijlstra >> >> One of the side effects of speculating on faults (without holding >> mmap_sem) is that we can race with free_pgtables() and therefore we >> cannot

Re: [RFC v5 01/11] mm: Dont assume page-table invariance during faults

2017-08-08 Thread Laurent Dufour
On 08/08/2017 11:45, Anshuman Khandual wrote: > On 06/16/2017 11:22 PM, Laurent Dufour wrote: >> From: Peter Zijlstra >> >> One of the side effects of speculating on faults (without holding >> mmap_sem) is that we can race with free_pgtables() and therefore we >> cannot assume the page-tables

[PATCH v4 03/19] crypto: remove redundant backlog checks on EBUSY

2017-08-08 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef --- crypto/ahash.c| 12 +++- crypto/cts.c | 6

[PATCH v4 03/19] crypto: remove redundant backlog checks on EBUSY

2017-08-08 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef --- crypto/ahash.c| 12 +++- crypto/cts.c | 6 ++ crypto/lrw.c

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

2017-08-08 Thread Phil Elwell
I'm all for fixing memory leaks, but freeing a block while it is still being used is a recipe for hard-to-debug kernel exceptions. 1) There is already a vchi method for freeing the instance, so use it. 2) Only call it on error, and then only before initted is false. Signed-off-by: Phil Elwell

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

2017-08-08 Thread Phil Elwell
I'm all for fixing memory leaks, but freeing a block while it is still being used is a recipe for hard-to-debug kernel exceptions. 1) There is already a vchi method for freeing the instance, so use it. 2) Only call it on error, and then only before initted is false. Signed-off-by: Phil Elwell

Re: [PATCH 0/5] qcom-ufs: phy/hcd: Refactor phy initialization code

2017-08-08 Thread Kishon Vijay Abraham I
Hi, On Friday 04 August 2017 12:18 PM, Vivek Gautam wrote: > Refactoring the qcom-ufs phy and host controller code to move > further towards the generic phy usage. Right now the qcom-ufs exports > a bunch of APIs that are used by the host controller to initialize > the phy. > With this patch

Re: [PATCH 0/5] qcom-ufs: phy/hcd: Refactor phy initialization code

2017-08-08 Thread Kishon Vijay Abraham I
Hi, On Friday 04 August 2017 12:18 PM, Vivek Gautam wrote: > Refactoring the qcom-ufs phy and host controller code to move > further towards the generic phy usage. Right now the qcom-ufs exports > a bunch of APIs that are used by the host controller to initialize > the phy. > With this patch

Possible null pointer dereference in rcar-dmac.ko

2017-08-08 Thread Anton Volkov
Hello. While searching for races in the Linux kernel I've come across "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came up with while analyzing results. Lines are given using the info from Linux v4.12. Consider the following case: Thread 1:

Possible null pointer dereference in rcar-dmac.ko

2017-08-08 Thread Anton Volkov
Hello. While searching for races in the Linux kernel I've come across "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came up with while analyzing results. Lines are given using the info from Linux v4.12. Consider the following case: Thread 1:

[PATCH v4 18/19] crypto: mediatek: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26

[PATCH v4 19/19] crypto: adapt api sample to use async. op wait

2017-08-08 Thread Gilad Ben-Yossef
The code sample is waiting for an async. crypto op completion. Adapt sample to use the new generic infrastructure to do the same. This also fixes a possible data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait

[PATCH v4 18/19] crypto: mediatek: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26 deletions(-) diff

[PATCH v4 19/19] crypto: adapt api sample to use async. op wait

2017-08-08 Thread Gilad Ben-Yossef
The code sample is waiting for an async. crypto op completion. Adapt sample to use the new generic infrastructure to do the same. This also fixes a possible data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait

[PATCH v4 17/19] crypto: qce: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
The qce driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-)

[PATCH v4 17/19] crypto: qce: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
The qce driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git

[PATCH v4 16/19] crypto: talitos: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(+), 33

[PATCH v4 16/19] crypto: talitos: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(+), 33 deletions(-) diff

[PATCH v4 15/19] crypto: tcrypt: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(+), 59

[PATCH v4 15/19] crypto: tcrypt: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(+), 59 deletions(-) diff --git

[PATCH v4 14/19] ima: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
ima starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Mimi Zohar --- security/integrity/ima/ima_crypto.c | 56

[PATCH v4 14/19] ima: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
ima starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Mimi Zohar --- security/integrity/ima/ima_crypto.c | 56 +++-- 1 file changed, 17 insertions(+), 39

[PATCH v4 13/19] cifs: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Pavel Shilovsky --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4

[PATCH v4 13/19] cifs: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Pavel Shilovsky --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git

[PATCH v4 12/19] dm: move dm-verity to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
dm-verity is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also fixes a possible data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait prior to the

[PATCH v4 12/19] dm: move dm-verity to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
dm-verity is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also fixes a possible data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait prior to the

[PATCH v4 11/19] fscrypt: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- fs/crypto/crypto.c | 28 fs/crypto/fname.c | 36

[PATCH v4 10/19] crypto: move testmgr to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef --- crypto/testmgr.c | 204

[PATCH v4 11/19] fscrypt: move to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- fs/crypto/crypto.c | 28 fs/crypto/fname.c | 36 ++--

[PATCH v4 10/19] crypto: move testmgr to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef --- crypto/testmgr.c | 204

Re: [PATCH v2] phy: ti-pipe3: Use TRM recommended settings for SATA DPLL

2017-08-08 Thread Kishon Vijay Abraham I
On Monday 07 August 2017 02:41 PM, Roger Quadros wrote: > The AM572x Technical Reference Manual, SPRUHZ6H, > Revised November 2016 [1], shows recommended settings for the > SATA DPLL in Table 26-8. DPLL CLKDCOLDO Recommended Settings. > > Use those settings in the driver. The TRM does not show

Re: [PATCH v2] phy: ti-pipe3: Use TRM recommended settings for SATA DPLL

2017-08-08 Thread Kishon Vijay Abraham I
On Monday 07 August 2017 02:41 PM, Roger Quadros wrote: > The AM572x Technical Reference Manual, SPRUHZ6H, > Revised November 2016 [1], shows recommended settings for the > SATA DPLL in Table 26-8. DPLL CLKDCOLDO Recommended Settings. > > Use those settings in the driver. The TRM does not show

[PATCH v4 09/19] crypto: move gcm to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto/gcm.c

[PATCH v4 09/19] crypto: move gcm to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index

[PATCH v4 08/19] crypto: move drbg to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
DRBG is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. The code now also passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating crypto request memory allocation may use GFP_KERNEL which should be perfectly fine as the code is obviously sleeping for

[PATCH v4 08/19] crypto: move drbg to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
DRBG is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. The code now also passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating crypto request memory allocation may use GFP_KERNEL which should be perfectly fine as the code is obviously sleeping for

[PATCH v4 07/19] crypto: move pub key to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
public_key_verify_signature() is starting an async crypto op and waiting for it to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4

[PATCH v4 07/19] crypto: move pub key to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
public_key_verify_signature() is starting an async crypto op and waiting for it to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 insertions(+), 24 deletions(-)

[PATCH v4 05/19] crypto: introduce crypto wait for async op

2017-08-08 Thread Gilad Ben-Yossef
Invoking a possibly async. crypto op and waiting for completion while correctly handling backlog processing is a common task in the crypto API implementation and outside users of it. This patch adds a generic implementation for doing so in preparation for using it across the board instead of hand

[PATCH v4 05/19] crypto: introduce crypto wait for async op

2017-08-08 Thread Gilad Ben-Yossef
Invoking a possibly async. crypto op and waiting for completion while correctly handling backlog processing is a common task in the crypto API implementation and outside users of it. This patch adds a generic implementation for doing so in preparation for using it across the board instead of hand

[PATCH v4 06/19] crypto: move algif to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_hash.c

[PATCH v4 06/19] crypto: move algif to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_hash.c | 30

[PATCH v4 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-08-08 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell/cesa.h

[PATCH v4 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-08-08 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell/cesa.h | 2 +- 2 files

<    8   9   10   11   12   13   14   15   16   17   >