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 >

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 >

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

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

[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

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

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

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

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

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: (>vm_sequence){+.+...}, at: []

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: (>vm_sequence){+.+...}, at: []

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

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

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

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,

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,

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

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

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

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

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

[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

[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

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

[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

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

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

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

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

[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

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

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

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

[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

[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

[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().

[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().

[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

[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

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

[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

[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

[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

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

[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

[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

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

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

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

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

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

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

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

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

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,

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

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,

[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

[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

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

[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

[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

[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

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

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

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

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

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

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

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

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

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

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. >> + *

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. >> + *

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

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

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

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

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