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 serie

[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 Fi

[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

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 will

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] 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: > > ERR

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: [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 no

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 index

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: >> (&vma->vm_sequence){+.+...}, at: [] >> zap_page_range_single+0xd0/0x1a0 >> >> but task is already holding lock: >> (&mapping->i_mmap_rwsem){..}, at:

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 in

[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 a

[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 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 b6

[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 sta

[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 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 --- drivers/irqchip/irq-gic-v3-its.c

[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. Since

[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 Ano

[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 | 1

[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 +++- drivers/irqchip/irq-gic-v3-its-

[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. Signed-o

[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 --- drivers/irqchip/irq-gic-v3-its-pci-msi

[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 a/d

[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 for

[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 i

[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 logical

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 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 https:/

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: [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 zero

kexec_file: use crypto_free_shash to free memory

2017-08-08 Thread Pan Bian
In function kexec_calculate_store_digests(), kfree() is used to free memory allocated by crypto_alloc_shash(). It is better to use function crypto_free_shash(), which also zeroizes the memory to be freed. Signed-off-by: Pan Bian --- kernel/kexec_file.c | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Christophe JAILLET
Le 08/08/2017 à 10:49, Zhang Rui a écrit : On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: Reorder code in the error handling path in order to match the way resources have been allocated. With this new order, we can avoid a call to 'device_unregister()' if 'thermal_zone_create_devi

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/07/2017 08:19 PM, Sergey Senozhatsky wrote: > On (08/07/17 11:52), Prarit Bhargava wrote: > [..] >> +/** >> + * enum printk_time_type - Timestamp types for printk() messages. >> + * @PRINTK_TIME_DISABLE: No time stamp. >> + * @PRINTK_TIME_LOCAL: Local hardware clock timestamp. >> + * @PRINT

Re: [PATCH v3 33/49] bcache: convert to bio_for_each_segment_all_sp()

2017-08-08 Thread Coly Li
On 2017/8/8 下午4:45, Ming Lei wrote: > Cc: linux-bca...@vger.kernel.org > Signed-off-by: Ming Lei The patch is good to me. Thanks. Acked-by: Coly Li > --- > drivers/md/bcache/btree.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/md/bcache/btree.c b/drivers

Re: [PATCH] kbuild: Update example for ccflags-y usage

2017-08-08 Thread Sedat Dilek
On Mon, Aug 7, 2017 at 10:24 PM, Jonathan Corbet wrote: > On Mon, 24 Jul 2017 17:27:05 +0200 > Sedat Dilek wrote: > >> The old example to describe ccflags-y usage is no more valid. >> >> Signed-off-by: Sedat Dilek > > I've applied this; had to clean up some whitespace weirdness on the way. > My

Re: [PATCH v3 07/49] bcache: comment on direct access to bvec table

2017-08-08 Thread Coly Li
On 2017/8/8 下午4:45, Ming Lei wrote: > Looks all are safe after multipage bvec is supported. > > Cc: linux-bca...@vger.kernel.org > Signed-off-by: Ming Lei Acked-by: Coly Li Coly Li > --- > drivers/md/bcache/btree.c | 1 + > drivers/md/bcache/super.c | 6 ++ > drivers/md/bcache/util.c |

Re: [PATCH 5/6] [media] exynos4-is: constify video_subdev structures

2017-08-08 Thread Sylwester Nawrocki
On 08/08/2017 12:58 PM, Julia Lawall wrote: The v4l2_subdev_ops structures are only passed as the second argument of v4l2_subdev_init, which is const, so the v4l2_subdev_ops structures can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Sylwester N

Re: [PATCH v3 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON

2017-08-08 Thread Zhang Rui
On Mon, 2017-07-31 at 12:26 -0700, Markus Mayer wrote: > From: Brian Norris > > Add binding for Broadcom STB thermal. > > Signed-off-by: Brian Norris > Signed-off-by: Markus Mayer $ file v3-1-4-Documentation-devicetree-add-binding-for-Broadcom-STB- AVS-TMON.patch  unified diff output, UTF-8 U

[PATCH 0/2] ARM: shmobile: document iWave's iW-RainboW-G22D-SODIMM RZ/G1E SODIMM development platform

2017-08-08 Thread Fabrizio Castro
Hello, This series aims to add the documentation for the device tree bindings of the iWave iW-RainboW-G22D-SODIMM RZ/G1E SODIMM development kit: http://www.iwavesystems.com/product/development-platform/sodimm-evaluation-boards/rz-g1e-sodimm-development-kit-28/rz-g1e-sodimm-development-kit.html wh

[PATCH 1/2] ARM: shmobile: document iW-RainboW-G22M-SM SODIMM System on Module

2017-08-08 Thread Fabrizio Castro
Document the iW-RainboW-G22M-SM SODIMM System on Module device tree bindings. It is just a placeholder for the time being, the actual implementation is not available yet. Signed-off-by: Fabrizio Castro --- Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 2/2] ARM: shmobile: document iW-RainboW-G22D SODIMM SOM Development Platform

2017-08-08 Thread Fabrizio Castro
Document the iW-RainboW-G22D device tree bindings. It is just a placeholder for the time being, the actual implementation is not available yet. Signed-off-by: Fabrizio Castro --- Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentatio

firmware: vpd: use memunmap instead of iounmap

2017-08-08 Thread Pan Bian
In functions vpd_sections_init() and vpd_section_init(), iounmap() is used to unmap memory. However, in these cases, memunmap() is better. Signed-off-by: Pan Bian --- drivers/firmware/google/vpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/google/v

Question about bh1770glc.ko

2017-08-08 Thread Anton Volkov
Hello. In drivers/misc/bh1770glc.c several functions have comments stating that they must be called under lock protection, e.g. bh1770_prox_mode_control, bh1770_lux_interrupt_control, bh1770_lux_rate, bh1770_chip_on. However there are places where they are called without lock being held, e.g.

Re: [PATCH v2 2/3] usb: chipidea: Hook into mux framework to toggle usb switch

2017-08-08 Thread Peter Rosin
On 2017-08-08 03:51, Stephen Boyd wrote: > Quoting Peter Rosin (2017-07-31 03:33:22) >> On 2017-07-14 23:40, Stephen Boyd wrote: >>> @@ -1964,16 +1965,26 @@ void ci_hdrc_gadget_destroy(struct ci_hdrc *ci) >>> >>> static int udc_id_switch_for_device(struct ci_hdrc *ci) >>> { >>> + int ret =

Re: [PATCH 6/6] [media] uvcvideo: constify video_subdev structures

2017-08-08 Thread Laurent Pinchart
Hi Julia, Thank you for the patch. On Tuesday 08 Aug 2017 12:58:32 Julia Lawall wrote: > uvc_subdev_ops is only passed as the second argument of > v4l2_subdev_init, which is const, so uvc_subdev_ops can be > const as well. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall

Re: [PATCH] thermal/drivers/hisi: Remove confusing error message

2017-08-08 Thread Zhang Rui
On Tue, 2017-08-08 at 12:15 +0200, Daniel Lezcano wrote: > On 08/08/2017 09:55, Zhang Rui wrote: > > > > On Fri, 2017-07-07 at 17:03 +0200, Daniel Lezcano wrote: > > > > > > The sensor id is unknown at init time and we use all id in the > > > authorized > > > MAX_SENSORS interval to register the

Re: [RFC]Add new mdev interface for QoS

2017-08-08 Thread Gao, Ping A
On 2017/8/8 14:42, Kirti Wankhede wrote: > > On 8/7/2017 1:11 PM, Gao, Ping A wrote: >> On 2017/8/4 5:11, Alex Williamson wrote: >>> On Thu, 3 Aug 2017 20:26:14 +0800 >>> "Gao, Ping A" wrote: >>> On 2017/8/3 0:58, Alex Williamson wrote: > On Wed, 2 Aug 2017 21:16:28 +0530 > Kirti Wan

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

2017-08-08 Thread Jan Kara
On Tue 08-08-17 14:20:23, Laurent Dufour wrote: > 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: > >> (&vma->vm_sequence){+.+...}, at: [] > >> zap_page_range_single+0xd0/0x1a0 > >> > >> but task is al

Re: [PATCH 6/6] [media] uvcvideo: constify video_subdev structures

2017-08-08 Thread Julia Lawall
On Tue, 8 Aug 2017, Laurent Pinchart wrote: > Hi Julia, > > Thank you for the patch. > > On Tuesday 08 Aug 2017 12:58:32 Julia Lawall wrote: > > uvc_subdev_ops is only passed as the second argument of > > v4l2_subdev_init, which is const, so uvc_subdev_ops can be > > const as well. > > > > Done

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Tue, Aug 08, 2017 at 03:50:20PM +0900, Minchan Kim wrote: > There is no need to use dynamic bio allocation for BDI_CAP_SYNC > devices. They can with on-stack-bio without concern about waiting > bio allocation from mempool under heavy memory pressure. This seems ... more complex than necessary?

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

2017-08-08 Thread Pasha Tatashin
Hi Will, > Damn, I actually prefer the flag :) > > But actually, if you look at our implementation of vmemmap_populate, then we > have our own version of vmemmap_populate_basepages that terminates at the > pmd level anyway if ARM64_SWAPPER_USES_SECTION_MAPS. If there's resistance > to do this

[PATCHv4 06/14] x86/boot/compressed/64: Detect and handle 5-level paging at boot-time

2017-08-08 Thread Kirill A. Shutemov
This patch prepare decompression code to boot-time switching between 4- and 5-level paging. Signed-off-by: Kirill A. Shutemov --- arch/x86/boot/compressed/head_64.S | 24 1 file changed, 24 insertions(+) diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/c

[PATCHv4 02/14] mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS

2017-08-08 Thread Kirill A. Shutemov
With boot-time switching between paging mode we will have variable MAX_PHYSMEM_BITS. Let's use the maximum varible possible for CONFIG_X86_5LEVEL=y configuration to define zsmalloc data structures. Signed-off-by: Kirill A. Shutemov Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky --- m

[PATCHv4 08/14] x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable

2017-08-08 Thread Kirill A. Shutemov
For boot-time switching between 4- and 5-level paging we need to be able to fold p4d page table level at runtime. It requires variable PGDIR_SHIFT and PTRS_PER_P4D. Signed-off-by: Kirill A. Shutemov --- arch/x86/boot/compressed/kaslr.c| 5 + arch/x86/include/asm/pgtable_32.h |

[PATCHv4 04/14] x86/xen: Provide pre-built page tables only for XEN_PV and XEN_PVH

2017-08-08 Thread Kirill A. Shutemov
Looks like we only need pre-built page tables for XEN_PV and XEN_PVH cases. Let's not provide them for other configurations. Signed-off-by: Kirill A. Shutemov Reviewed-by: Juergen Gross --- arch/x86/kernel/head_64.S | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a

[PATCHv4 03/14] x86/kasan: Use the same shadow offset for 4- and 5-level paging

2017-08-08 Thread Kirill A. Shutemov
We are going to support boot-time switching between 4- and 5-level paging. For KASAN it means we cannot have different KASAN_SHADOW_OFFSET for different paging modes: the constant is passed to gcc to generate code and cannot be changed at runtime. This patch changes KASAN code to use 0xdc0

[PATCHv4 01/14] mm/sparsemem: Allocate mem_section at runtime for SPARSEMEM_EXTREME

2017-08-08 Thread Kirill A. Shutemov
Size of mem_section array depends on size of physical address space. In preparation for boot-time switching between paging modes on x86-64 we need to make allocation of mem_section dynamic. The patch allocates the array on the first call to sparse_memory_present_with_active_regions(). Signed-off

[PATCHv4 10/14] x86/mm: Fold p4d page table layer at runtime

2017-08-08 Thread Kirill A. Shutemov
This patch changes page table helpers to fold p4d at runtime. The logic is the same as in . Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/paravirt.h | 10 ++ arch/x86/include/asm/pgalloc.h | 5 - arch/x86/include/asm/pgtable.h | 10 +- 3 files changed, 19 inse

[PATCHv4 14/14] x86/mm: Offset boot-time paging mode switching cost

2017-08-08 Thread Kirill A. Shutemov
By this point we have functioning boot-time switching between 4- and 5-level paging mode. But naive approach comes with cost. Numbers below are for kernel build, allmodconfig, 5 times. CONFIG_X86_5LEVEL=n: Performance counter stats for 'sh -c make -j100 -B -k >/dev/null' (5 runs): 17308719.

[PATCHv4 11/14] x86/mm: Replace compile-time checks for 5-level with runtime-time

2017-08-08 Thread Kirill A. Shutemov
This patch converts the of CONFIG_X86_5LEVEL check to runtime checks for p4d folding. Signed-off-by: Kirill A. Shutemov --- arch/x86/mm/fault.c| 2 +- arch/x86/mm/ident_map.c| 2 +- arch/x86/mm/init_64.c | 30 ++ arch/x86/mm/kasan_init_6

[PATCHv4 13/14] x86/xen: Allow XEN_PV and XEN_PVH to be enabled with X86_5LEVEL

2017-08-08 Thread Kirill A. Shutemov
With boot-time switching between paging modes, XEN_PV and XEN_PVH can be boot into 4-level paging mode. Signed-off-by: Kirill A. Shutemov Cc: Juergen Gross --- arch/x86/kernel/head_64.S | 12 ++-- arch/x86/xen/Kconfig | 5 - arch/x86/xen/mmu_pv.c | 21 +

[PATCHv4 07/14] x86/mm: Make virtual memory layout movable for CONFIG_X86_5LEVEL

2017-08-08 Thread Kirill A. Shutemov
We need to be able to adjust virtual memory layout at runtime to be able to switch between 4- and 5-level paging at boot-time. KASLR already has movable __VMALLOC_BASE, __VMEMMAP_BASE and __PAGE_OFFSET. Let's re-use it. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/kaslr.h

[PATCHv4 12/14] x86/mm: Allow to boot without la57 if CONFIG_X86_5LEVEL=y

2017-08-08 Thread Kirill A. Shutemov
All pieces of the puzzle are in place and we can now allow to boot with CONFIG_X86_5LEVEL=y on a machine without la57 support. Kernel will detect that la57 is missing and fold p4d at runtime. Update documentation and Kconfig option description to reflect the change. Signed-off-by: Kirill A. Shut

[PATCHv4 05/14] x86/xen: Drop 5-level paging support code from XEN_PV code

2017-08-08 Thread Kirill A. Shutemov
It was decided 5-level paging is not going to be supported in XEN_PV. Let's drop the dead code from XEN_PV code. Signed-off-by: Kirill A. Shutemov Cc: Juergen Gross --- arch/x86/xen/mmu_pv.c | 159 +++--- 1 file changed, 60 insertions(+), 99 deletion

[PATCHv4 09/14] x86/mm: Handle boot-time paging mode switching at early boot

2017-08-08 Thread Kirill A. Shutemov
This patch adds detection of 5-level paging at boot-time and adjusts virtual memory layout and folds p4d page table layer if needed. We have to make X86_5LEVEL dependant on SPARSEMEM_VMEMMAP. !SPARSEMEM_VMEMMAP configuration doesn't work well with variable MAX_PHYSMEM_BITS. Signed-off-by: Kirill

[PATCHv4 00/14] Boot-time switching between 4- and 5-level paging

2017-08-08 Thread Kirill A. Shutemov
The basic idea is to implement the same logic as pgtable-nop4d.h provides, but at runtime. Runtime folding is only implemented for CONFIG_X86_5LEVEL=y case. With the option disabled, we do compile-time folding as before.. Initially, I tried to fold pgd instread. I've got to shell, but it required

Re: [PATCH] IB/core: fix memory leak on ah on error return path

2017-08-08 Thread Johannes Thumshirn
On Tue, Aug 08, 2017 at 11:28:16AM +0100, Colin Ian King wrote: > I was using the same subject start as the patch that introduced the > memory leak and touched the same portion of code. I can resend if necessary. I think having the hns prefix makes it clearer, as the patch doesn't touch IB core co

Re: [PATCH v2 3/5] thermal: imx: Add support for reading OCOTP through nvmem

2017-08-08 Thread Zhang Rui
On Tue, 2017-08-08 at 12:44 +0100, Srinivas Kandagatla wrote: > > > > On 08/08/17 12:38, Leonard Crestez wrote: > > > > On Tue, 2017-08-08 at 12:00 +0100, Srinivas Kandagatla wrote: > > > > > > On 08/08/17 08:21, Zhang Rui wrote: > > > > > > > > On Tue, 2017-07-25 at 16:08 +0800, Shawn Guo w

Re: [PATCH] Remove explicit return type cast

2017-08-08 Thread hari prasath
On 3 August 2017 at 18:53, Dan Carpenter wrote: > On Thu, Aug 03, 2017 at 06:23:54PM +0530, hari prasath wrote: >> On 3 August 2017 at 11:52, kbuild test robot wrote: >> > Hi Hari, >> > >> > [auto build test WARNING on staging/staging-testing] >> > [also build test WARNING on next-20170802] >> >

Re: [RFC] Tagging of vmalloc pages for supporting the pmalloc allocator

2017-08-08 Thread Igor Stoppa
On 07/08/17 22:12, Jerome Glisse wrote: > On Mon, Aug 07, 2017 at 05:13:00PM +0300, Igor Stoppa wrote: [...] >> I have an updated version of the old proposal: >> >> * put a magic number in the private field, during initialization of >> pmalloc pages >> >> * during hardened usercopy verification,

input: touchscreen: mxs-lradc: use correct error check

2017-08-08 Thread Pan Bian
Function devm_ioremap() will return a NULL pointer on failure. However, in function mxs_lradc_ts_probe(), its return value is checked with IS_ERR(), which cannot detect the exceptional case. Signed-off-by: Pan Bian --- drivers/input/touchscreen/mxs-lradc-ts.c | 4 ++-- 1 file changed, 2 insertio

Re: [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-08-08 Thread Zhang Rui
On Tue, 2017-08-08 at 14:31 +0200, Christophe JAILLET wrote: > Le 08/08/2017 à 10:49, Zhang Rui a écrit : > > > > On Sun, 2017-07-16 at 08:59 +0200, Christophe JAILLET wrote: > > > > > > Reorder code in the error handling path in order to match the way > > > resources > > > have been allocated. >

Re: [PATCH] KVM: X86: expand ->arch.apic_arb_prio to u64

2017-08-08 Thread Paolo Bonzini
On 08/08/2017 13:37, Longpeng(Mike) wrote: > Currently 'apic_arb_prio' is int32_t, it's too short for long > time running. In our environment, it overflowed and then the > UBSAN was angry: > > signed integer overflow: > 2147483647 + 1 cannot be represented in type 'int' > CPU: 22 PID: 31237 Comm:

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

2017-08-08 Thread Laurent Dufour
On 08/08/2017 14:49, Jan Kara wrote: > On Tue 08-08-17 14:20:23, Laurent Dufour wrote: >> 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: (&vma->vm_sequence){+.+...}, at: [] zap_page_range_si

Re: scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-08 Thread Jinpu Wang
On Tue, Aug 8, 2017 at 1:40 PM, Pan Bian wrote: > In function pm8001_pci_probe(), on errors that the control flow jumps to > label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), > scsi_host_put() is called to release shost, which keeps the return value > of scsi_host_alloc().

Re: [PATCH 1/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-08-08 Thread Colin Walters
On Tue, Aug 8, 2017, at 12:26 AM, Ian Kent wrote: > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -3022,8 +3022,7 @@ static inline int vfs_lstat(const char __user *name, > struct kstat *stat) > static inline int vfs_fstatat(int dfd, const char __user *filename, >

Re: [PATCH v2 0/2] mm,fork,security: introduce MADV_WIPEONFORK

2017-08-08 Thread Rik van Riel
On Tue, 2017-08-08 at 11:58 +0200, Florian Weimer wrote: > On 08/07/2017 08:23 PM, Mike Kravetz wrote: > > If my thoughts above are correct, what about returning EINVAL if > > one > > attempts to set MADV_DONTFORK on mappings set up for sharing? > > That's my preference as well.  If there is a use

[PATCH] fixdep: trivial: typo fix and correction

2017-08-08 Thread Cao jin
Signed-off-by: Cao jin --- scripts/basic/fixdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index fff818b..bbf62cb 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -25,7 +25,7 @@ * * So we play

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

2017-08-08 Thread Peter Zijlstra
On Tue, Aug 08, 2017 at 02:20:23PM +0200, Laurent Dufour wrote: > This is an option, but the previous one was signed by Peter, and I'd prefer > to keep his unchanged and add this new one to fix that. > Again this is to ease the review. You can always add something like: [ldufour: fixed lockdep co

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

2017-08-08 Thread David Laight
From: Pasha Tatashin > Sent: 08 August 2017 12:49 > 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 zero memory in place when > need

Re: INITRAMFS_SOURCE broken by 6e19eded3684dc184181093af3bff2ff440f5b53?

2017-08-08 Thread Thomas Meyer
On Tue, Aug 08, 2017 at 02:04:42PM +0200, Willy Tarreau wrote: > Hi Thomas, > > On Tue, Aug 08, 2017 at 01:46:25PM +0200, Thomas Meyer wrote: > > Hi, > > > > did the commit 6e19eded3684dc184181093af3bff2ff440f5b53 break a linux kernel > > build with an included ramdisk? > > > > As fas as I under

Re: [PATCH] arm64: correct modules range of kernel virtual memory layout

2017-08-08 Thread Will Deacon
On Tue, Aug 08, 2017 at 01:27:25PM +0800, Miles Chen wrote: > On Tue, 2017-08-08 at 12:44 +0800, Miles Chen wrote: > > On Mon, 2017-08-07 at 15:01 +0100, Will Deacon wrote: > > > On Mon, Aug 07, 2017 at 02:18:00PM +0100, Ard Biesheuvel wrote: > > > > On 7 August 2017 at 14:16, Will Deacon wrote: >

Re: [PATCH net] rds: Reintroduce statistics counting

2017-08-08 Thread Shamir Rabinovitch
On Tue, Aug 08, 2017 at 11:13:32AM +0200, Håkon Bugge wrote: > In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection > while senders are present"), refilling the receive queue was removed > from rds_ib_recv(), along with the increment of > s_ib_rx_refill_from_thread. > > Commit 73ce431

Re: [Linux-ima-devel] [RFC PATCH 1/5] ima: extend clone() with IMA

2017-08-08 Thread
Stefan, Still on the vTPM requirements, could you help answering the following questions? 1. Where will the boot measurements be stored? What is the integrity measurement domain for this vTPM? The current proposal is that the vTPM would be used for the container (or namespace) files/inodes. Wha

xen/9pfs: check return value of xenbus_read correctly

2017-08-08 Thread Pan Bian
In function xen_9pfs_front_probe(), variable len is checked against 0 to to check the case that xenbus_read() fails. However, xenbus_read() may return an ERR_PTR pointer even aften assigning a non-zero value to len. As a result, the check of len cannot prevent from accessing bad memory. Signed-off

Re: [PATCH v8 1/3] perf: cavium: Support memory controller PMU counters

2017-08-08 Thread Will Deacon
On Fri, Jul 28, 2017 at 04:12:33PM -0700, Greg KH wrote: > On Thu, Jul 27, 2017 at 03:15:15PM +0200, Borislav Petkov wrote: > > On Thu, Jul 27, 2017 at 11:08:56AM +0200, Jan Glauber wrote: > > > OK. As fixing the firmware will take quite some time I'll go for the > > > memory > > > controller driv

Re: [PATCH v2 0/4] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-08 Thread Corey Minyard
On 08/07/2017 08:25 PM, Brendan Higgins wrote: On Sat, Aug 5, 2017 at 3:23 PM, Corey Minyard wrote: On 08/04/2017 08:18 PM, Brendan Higgins wrote: This patchset introduces IPMI Block Transfer over I2C (BT-I2C), which has the same semantics as IPMI Block Transfer except it done over I2C. For t

[PATCH] Add /proc/pid/smaps_rollup

2017-08-08 Thread Daniel Colascione
/proc/pid/smaps_rollup is a new proc file that improves the performance of user programs that determine aggregate memory statistics (e.g., total PSS) of a process. Anroid regularly "samples" the memory usage of various processes in order to blance its memory pool sizes. This sampling process invol

Re: [PATCH v1 2/2] [media] ov9655: fix missing mutex_destroy()

2017-08-08 Thread Sakari Ailus
On Fri, Jul 21, 2017 at 05:49:41PM +0200, Hugues Fruchet wrote: > Fix missing mutex_destroy() when probe fails and > when driver is removed. > > Signed-off-by: Hugues Fruchet Thanks, applied both, with the subject changed to reflect the driver file name (ov9550.c). -- Sakari Ailus e-mail: saka

Re: [PATCH v1 2/6] fs: use on-stack-bio if backing device has BDI_CAP_SYNC capability

2017-08-08 Thread Matthew Wilcox
On Tue, Aug 08, 2017 at 05:49:59AM -0700, Matthew Wilcox wrote: > + struct bio sbio; > + struct bio_vec sbvec; ... this needs to be sbvec[nr_pages], of course. > - bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), > + if (bdi_cap_synchronous_io(inode_to_bdi(inode

Re: [PATCH v6 2/2] thermal: uniphier: add UniPhier thermal driver

2017-08-08 Thread Zhang Rui
On Tue, 2017-08-01 at 17:04 +0900, Kunihiko Hayashi wrote: > Add a thermal driver for on-chip PVT (Process, Voltage and > Temperature) > monitoring unit implemented on UniPhier SoCs. This driver supports > temperature monitoring and alert function. > > Signed-off-by: Kunihiko Hayashi > --- >  dri

Re: [PATCH] thermal/drivers/hisi: Remove confusing error message

2017-08-08 Thread Leo Yan
On Tue, Aug 08, 2017 at 08:48:51PM +0800, Zhang Rui wrote: [...] > > > > @@ -352,10 +353,9 @@ static int hisi_thermal_probe(struct > > > > platform_device *pdev) > > > >   ret = hisi_thermal_register_sensor(pdev, data, > > > >      &data

[PATCH v4 21/21] doc: media/v4l-drivers: Qualcomm Camera Subsystem - Media graph

2017-08-08 Thread Todor Tomov
Update the Qualcomm Camera Subsystem driver document with a media controller pipeline graph diagram. Signed-off-by: Todor Tomov --- Documentation/media/v4l-drivers/qcom_camss.rst | 27 ++ .../media/v4l-drivers/qcom_camss_graph.dot | 41 ++ 2 files chan

[PATCH v4 20/21] camss: Use optimal clock frequency rates

2017-08-08 Thread Todor Tomov
Use standard V4L2 control to get pixel clock rate from a sensor linked in the media controller pipeline. Then calculate clock rates on CSIPHY, CSID and VFE to use the lowest possible. If the currnet pixel clock rate of the sensor cannot be read then use the highest possible. This case covers also

[PATCH v4 02/21] dt-bindings: media: Binding document for Qualcomm Camera subsystem driver

2017-08-08 Thread Todor Tomov
Add DT binding document for Qualcomm Camera subsystem driver. CC: Rob Herring CC: devicet...@vger.kernel.org Signed-off-by: Todor Tomov Acked-by: Rob Herring --- .../devicetree/bindings/media/qcom,camss.txt | 197 + 1 file changed, 197 insertions(+) create mode 10064

[PATCH v4 18/21] camss: vfe: Configure crop module in VFE

2017-08-08 Thread Todor Tomov
Add crop module configuration support to be able to apply cropping. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 41 +- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss-8x16/camss-vfe.c b/d

[PATCH v4 19/21] doc: media/v4l-drivers: Qualcomm Camera Subsystem - Scale and crop

2017-08-08 Thread Todor Tomov
Update the Qualcomm Camera Subsystem driver document for VFE scale and crop modules support. Signed-off-by: Todor Tomov --- Documentation/media/v4l-drivers/qcom_camss.rst | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/media/v4l-drivers/qcom_camss

[PATCH v4 16/21] camss: vfe: Configure scaler module in VFE

2017-08-08 Thread Todor Tomov
Add scaler module configuration support to be able to apply scaling. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 59 +- 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/drivers/media/platform/qcom/camss-8x16/camss-vfe.c

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