Re: [PATCH 10/39] x86/entry/32: Handle Entry from Kernel-Mode on Entry-Stack

2018-10-12 Thread Jan Kiszka
On 18.07.18 11:40, Joerg Roedel wrote: From: Joerg Roedel It can happen that we enter the kernel from kernel-mode and on the entry-stack. The most common way this happens is when we get an exception while loading the user-space segment registers on the kernel-to-userspace exit path. The

Re: [PATCH 10/39] x86/entry/32: Handle Entry from Kernel-Mode on Entry-Stack

2018-10-12 Thread Jan Kiszka
On 18.07.18 11:40, Joerg Roedel wrote: From: Joerg Roedel It can happen that we enter the kernel from kernel-mode and on the entry-stack. The most common way this happens is when we get an exception while loading the user-space segment registers on the kernel-to-userspace exit path. The

Re: [PATCH 00/16] clk: at91: Rework DT bindings

2018-10-12 Thread Stephen Boyd
Quoting Stephen Boyd (2018-08-31 10:45:30) > Quoting Alexandre Belloni (2018-08-16 04:47:55) > > On 27/07/2018 10:03:22-0700, Stephen Boyd wrote: > > > Quoting Alexandre Belloni (2018-07-17 15:27:41) > > > > This is the promised rework of the at91 PMC clocks driver. It is mainly > > > > necessary

Re: [PATCH 00/16] clk: at91: Rework DT bindings

2018-10-12 Thread Stephen Boyd
Quoting Stephen Boyd (2018-08-31 10:45:30) > Quoting Alexandre Belloni (2018-08-16 04:47:55) > > On 27/07/2018 10:03:22-0700, Stephen Boyd wrote: > > > Quoting Alexandre Belloni (2018-07-17 15:27:41) > > > > This is the promised rework of the at91 PMC clocks driver. It is mainly > > > > necessary

Re: [PATCH v2 1/7] modules: Create rlimit for module space

2018-10-12 Thread Jann Horn
On Fri, Oct 12, 2018 at 2:35 AM Jann Horn wrote: > On Fri, Oct 12, 2018 at 1:40 AM Rick Edgecombe > wrote: > > This introduces a new rlimit, RLIMIT_MODSPACE, which limits the amount of > > module space a user can use. The intention is to be able to limit module > > space > > allocations that

Re: [PATCH v2 1/7] modules: Create rlimit for module space

2018-10-12 Thread Jann Horn
On Fri, Oct 12, 2018 at 2:35 AM Jann Horn wrote: > On Fri, Oct 12, 2018 at 1:40 AM Rick Edgecombe > wrote: > > This introduces a new rlimit, RLIMIT_MODSPACE, which limits the amount of > > module space a user can use. The intention is to be able to limit module > > space > > allocations that

Re: [RFC][PATCH] x86: ptrace: Add function argument access API

2018-10-12 Thread Steven Rostedt
On Fri, 12 Oct 2018 11:21:28 -0700 Andy Lutomirski wrote: > On Fri, Oct 12, 2018 at 9:26 AM Steven Rostedt wrote: > > > > > > Anyone have any issues with this patch? > > > > I'm conceptually okay with it. That being said, > regs_within_kernel_stack(), which you're indirectly using, is >

Re: [RFC][PATCH] x86: ptrace: Add function argument access API

2018-10-12 Thread Steven Rostedt
On Fri, 12 Oct 2018 11:21:28 -0700 Andy Lutomirski wrote: > On Fri, Oct 12, 2018 at 9:26 AM Steven Rostedt wrote: > > > > > > Anyone have any issues with this patch? > > > > I'm conceptually okay with it. That being said, > regs_within_kernel_stack(), which you're indirectly using, is >

Re: Avoid VLA in pgd_alloc kills boot on 32-bit machines was Re: -next20181010,1011 regression: thinkpad x60 (32 bit) dies during boot.

2018-10-12 Thread Pavel Machek
On Fri 2018-10-12 20:10:11, Pavel Machek wrote: > Hi! > > > > > So what came in between -next20181005 and the first bad one? > > > > kernel/sched/* > > > > being the first place to look at. > > > > > > kernel/sched does not seem to contain anything too scary. > > > > > > I know that

Re: Avoid VLA in pgd_alloc kills boot on 32-bit machines was Re: -next20181010,1011 regression: thinkpad x60 (32 bit) dies during boot.

2018-10-12 Thread Pavel Machek
On Fri 2018-10-12 20:10:11, Pavel Machek wrote: > Hi! > > > > > So what came in between -next20181005 and the first bad one? > > > > kernel/sched/* > > > > being the first place to look at. > > > > > > kernel/sched does not seem to contain anything too scary. > > > > > > I know that

Re: [RFC][PATCH] x86: ptrace: Add function argument access API

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 9:26 AM Steven Rostedt wrote: > > > Anyone have any issues with this patch? > I'm conceptually okay with it. That being said, regs_within_kernel_stack(), which you're indirectly using, is off-by-a-few. And updating it to use probe_kernel_read() might be nice for

Re: [RFC][PATCH] x86: ptrace: Add function argument access API

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 9:26 AM Steven Rostedt wrote: > > > Anyone have any issues with this patch? > I'm conceptually okay with it. That being said, regs_within_kernel_stack(), which you're indirectly using, is off-by-a-few. And updating it to use probe_kernel_read() might be nice for

Re: [PATCH 08/11] x86/fpu: Always store the registers in copy_fpstate_to_sigframe()

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > From: Rik van Riel > > copy_fpstate_to_sigframe() has two callers and both invoke the function only > if > fpu->initialized is set. So the check in the function for ->initialized makes > no sense. It might be a relict from the lazy-FPU

Re: [PATCH 0/7] HMM updates, improvements and fixes

2018-10-12 Thread Jerome Glisse
On Fri, Aug 24, 2018 at 03:25:42PM -0400, jgli...@redhat.com wrote: > From: Jérôme Glisse > > Few fixes that only affect HMM users. Improve the synchronization call > back so that we match was other mmu_notifier listener do and add proper > support to the new blockable flags in the process. > >

Re: [PATCH 08/11] x86/fpu: Always store the registers in copy_fpstate_to_sigframe()

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > From: Rik van Riel > > copy_fpstate_to_sigframe() has two callers and both invoke the function only > if > fpu->initialized is set. So the check in the function for ->initialized makes > no sense. It might be a relict from the lazy-FPU

Re: [PATCH 0/7] HMM updates, improvements and fixes

2018-10-12 Thread Jerome Glisse
On Fri, Aug 24, 2018 at 03:25:42PM -0400, jgli...@redhat.com wrote: > From: Jérôme Glisse > > Few fixes that only affect HMM users. Improve the synchronization call > back so that we match was other mmu_notifier listener do and add proper > support to the new blockable flags in the process. > >

Re: [PATCH v7 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-10-12 Thread Jerome Glisse
On Fri, Oct 12, 2018 at 10:49:31AM -0700, Dan Williams wrote: > [ apologies for the resend, script error ] > > Changes since v6 [1]: > * Rebase on next-20181008 and fixup conflicts with the xarray conversion > and hotplug optimizations > * It has soaked on a 0day visible branch for a few days

Re: [PATCH v7 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-10-12 Thread Jerome Glisse
On Fri, Oct 12, 2018 at 10:49:31AM -0700, Dan Williams wrote: > [ apologies for the resend, script error ] > > Changes since v6 [1]: > * Rebase on next-20181008 and fixup conflicts with the xarray conversion > and hotplug optimizations > * It has soaked on a 0day visible branch for a few days

Re: Avoid VLA in pgd_alloc kills boot on 32-bit machines was Re: -next20181010,1011 regression: thinkpad x60 (32 bit) dies during boot.

2018-10-12 Thread Borislav Petkov
On Fri, Oct 12, 2018 at 08:10:11PM +0200, Pavel Machek wrote: > And the winner is... > > [1be3f247c2882a82279cbcf43717581ea943b692] x86/mm: Avoid VLA in > pgd_alloc() That should be fixed now: https://git.kernel.org/tip/184d47f0fd365108bd06ab26cdb3450b716269fd -- Regards/Gruss, Boris.

Re: Avoid VLA in pgd_alloc kills boot on 32-bit machines was Re: -next20181010,1011 regression: thinkpad x60 (32 bit) dies during boot.

2018-10-12 Thread Borislav Petkov
On Fri, Oct 12, 2018 at 08:10:11PM +0200, Pavel Machek wrote: > And the winner is... > > [1be3f247c2882a82279cbcf43717581ea943b692] x86/mm: Avoid VLA in > pgd_alloc() That should be fixed now: https://git.kernel.org/tip/184d47f0fd365108bd06ab26cdb3450b716269fd -- Regards/Gruss, Boris.

Re: [GIT PULL 3/4] ARM: exynos: soc/mach for v4.20, second round

2018-10-12 Thread Olof Johansson
On Thu, Oct 11, 2018 at 7:02 AM Arnd Bergmann wrote: > > On 10/10/18, Krzysztof Kozlowski wrote: > > Hi, > > > > On top of previous pull request. > > > > > > Samsung mach/soc changes for v4.20, second round > > > > 1. Disable

Re: [GIT PULL 3/4] ARM: exynos: soc/mach for v4.20, second round

2018-10-12 Thread Olof Johansson
On Thu, Oct 11, 2018 at 7:02 AM Arnd Bergmann wrote: > > On 10/10/18, Krzysztof Kozlowski wrote: > > Hi, > > > > On top of previous pull request. > > > > > > Samsung mach/soc changes for v4.20, second round > > > > 1. Disable

[PATCH] mm/thp: fix call to mmu_notifier in set_pmd_migration_entry() v2

2018-10-12 Thread jglisse
From: Jérôme Glisse Inside set_pmd_migration_entry() we are holding page table locks and thus we can not sleep so we can not call invalidate_range_start/end() So remove call to mmu_notifier_invalidate_range_start/end() because they are call inside the function calling set_pmd_migration_entry()

Re: [PATCH security-next v5 00/30] LSM: Explict ordering

2018-10-12 Thread John Johansen
On 10/12/2018 04:31 AM, Jordan Glover wrote: > ‐‐‐ Original Message ‐‐‐ > On Friday, October 12, 2018 2:26 AM, John Johansen > wrote: > >> On 10/11/2018 04:53 PM, Jordan Glover wrote: >> >>> ‐‐‐ Original Message ‐‐‐ >>> On Friday, October 12, 2018 1:09 AM, Kees Cook

[PATCH] mm/thp: fix call to mmu_notifier in set_pmd_migration_entry() v2

2018-10-12 Thread jglisse
From: Jérôme Glisse Inside set_pmd_migration_entry() we are holding page table locks and thus we can not sleep so we can not call invalidate_range_start/end() So remove call to mmu_notifier_invalidate_range_start/end() because they are call inside the function calling set_pmd_migration_entry()

Re: [PATCH security-next v5 00/30] LSM: Explict ordering

2018-10-12 Thread John Johansen
On 10/12/2018 04:31 AM, Jordan Glover wrote: > ‐‐‐ Original Message ‐‐‐ > On Friday, October 12, 2018 2:26 AM, John Johansen > wrote: > >> On 10/11/2018 04:53 PM, Jordan Glover wrote: >> >>> ‐‐‐ Original Message ‐‐‐ >>> On Friday, October 12, 2018 1:09 AM, Kees Cook

Avoid VLA in pgd_alloc kills boot on 32-bit machines was Re: -next20181010,1011 regression: thinkpad x60 (32 bit) dies during boot.

2018-10-12 Thread Pavel Machek
Hi! > > > So what came in between -next20181005 and the first bad one? > > > kernel/sched/* > > > being the first place to look at. > > > > kernel/sched does not seem to contain anything too scary. > > > > I know that -next20181005 works ok, and I know -next20181010 is > > bad. Is there easy

Avoid VLA in pgd_alloc kills boot on 32-bit machines was Re: -next20181010,1011 regression: thinkpad x60 (32 bit) dies during boot.

2018-10-12 Thread Pavel Machek
Hi! > > > So what came in between -next20181005 and the first bad one? > > > kernel/sched/* > > > being the first place to look at. > > > > kernel/sched does not seem to contain anything too scary. > > > > I know that -next20181005 works ok, and I know -next20181010 is > > bad. Is there easy

Re: [PATCH RFC v1 7/8] drivers: qcom: cpu_pd: Handle cpu hotplug in the domain

2018-10-12 Thread Raju P L S S S N
On 10/12/2018 7:55 PM, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:54AM +0530, Raju P.L.S.S.S.N wrote: Use cpu hotplug callback mechanism to attach/dettach the cpu in the cpu power domain. During cpu hotplug callback registration, the starting callback is invoked on all online cpus. So

Re: [PATCH RFC v1 7/8] drivers: qcom: cpu_pd: Handle cpu hotplug in the domain

2018-10-12 Thread Raju P L S S S N
On 10/12/2018 7:55 PM, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:54AM +0530, Raju P.L.S.S.S.N wrote: Use cpu hotplug callback mechanism to attach/dettach the cpu in the cpu power domain. During cpu hotplug callback registration, the starting callback is invoked on all online cpus. So

Re: [PATCH 04/11] x86/fpu: eager switch PKRU state

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 10:51 AM Dave Hansen wrote: > > On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > > From: Rik van Riel > > > > While most of a task's FPU state is only needed in user space, > > the protection keys need to be in place immediately after a > > context switch. > > >

Re: [PATCH 04/11] x86/fpu: eager switch PKRU state

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 10:51 AM Dave Hansen wrote: > > On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > > From: Rik van Riel > > > > While most of a task's FPU state is only needed in user space, > > the protection keys need to be in place immediately after a > > context switch. > > >

Re: [PATCH RFC v1 5/8] dt-bindings: introduce cpu power domain bindings for Qualcomm SoCs

2018-10-12 Thread Raju P L S S S N
On 10/11/2018 4:38 PM, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:52AM +0530, Raju P.L.S.S.S.N wrote: Add device binding documentation for Qualcomm Technology Inc's cpu domain driver. The driver is used for managing system sleep activities that are required when application processor

Re: [PATCH RFC v1 5/8] dt-bindings: introduce cpu power domain bindings for Qualcomm SoCs

2018-10-12 Thread Raju P L S S S N
On 10/11/2018 4:38 PM, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:52AM +0530, Raju P.L.S.S.S.N wrote: Add device binding documentation for Qualcomm Technology Inc's cpu domain driver. The driver is used for managing system sleep activities that are required when application processor

Re: [PATCH 07/11] x86/pkeys: Drop the preempt-disable section

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 10:58 AM Dave Hansen wrote: > > On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > > The fpu->initialized flag should not be changed underneath us. This might > > be a > > fallout during the removal of the LazyFPU support. The FPU is marked > > initialized as soon

Re: [PATCH 07/11] x86/pkeys: Drop the preempt-disable section

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 10:58 AM Dave Hansen wrote: > > On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > > The fpu->initialized flag should not be changed underneath us. This might > > be a > > fallout during the removal of the LazyFPU support. The FPU is marked > > initialized as soon

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

2018-10-12 Thread Pavel Machek
Hi! > > >>> Signed-off-by: Dan Murphy > > >> > > >> NAK. > > > > > > Thanks for the NAK. > > > > > > This NAK was NAK'd by other maintainer in the V2 RFC patchset > > > > > > https://lore.kernel.org/patchwork/patch/993171/ > > > > I confirm. LM3697 is a standalone device and not a cell of

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

2018-10-12 Thread Pavel Machek
Hi! > > >>> Signed-off-by: Dan Murphy > > >> > > >> NAK. > > > > > > Thanks for the NAK. > > > > > > This NAK was NAK'd by other maintainer in the V2 RFC patchset > > > > > > https://lore.kernel.org/patchwork/patch/993171/ > > > > I confirm. LM3697 is a standalone device and not a cell of

[PATCH v7 7/7] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL

2018-10-12 Thread Dan Williams
The routines hmm_devmem_add(), and hmm_devmem_add_resource() duplicated devm_memremap_pages() and are now simple now wrappers around the core facility to inject a dev_pagemap instance into the global pgmap_radix and hook page-idle events. The devm_memremap_pages() interface is base infrastructure

Re: [PATCH RFC v1 4/8] drivers: qcom: cpu_pd: add cpu power domain support using genpd

2018-10-12 Thread Raju P L S S S N
On 10/12/2018 8:03 PM, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:51AM +0530, Raju P.L.S.S.S.N wrote: RPMH based targets require that the sleep and wake state request votes be sent during system low power mode entry. The votes help reduce the power consumption when the AP is not using

Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions

2018-10-12 Thread David Miller
From: "Kirill A. Shutemov" Date: Fri, 12 Oct 2018 14:30:56 +0300 > I looked into the code more and noticed move_pte() helper called from > move_ptes(). It changes PTE entry to suite new address. > > It is only defined in non-trivial way on Sparc. I don't know much about > Sparc and it's hard

Re: [PATCH 05/11] x86/fpu: set PKRU state for kernel threads

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 10:54 AM Dave Hansen wrote: > > On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > > The PKRU value is not set for kernel threads because they do not have > > the ->initialized value set. As a result the kernel thread has a random > > PKRU value set which it

[PATCH v7 7/7] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL

2018-10-12 Thread Dan Williams
The routines hmm_devmem_add(), and hmm_devmem_add_resource() duplicated devm_memremap_pages() and are now simple now wrappers around the core facility to inject a dev_pagemap instance into the global pgmap_radix and hook page-idle events. The devm_memremap_pages() interface is base infrastructure

Re: [PATCH RFC v1 4/8] drivers: qcom: cpu_pd: add cpu power domain support using genpd

2018-10-12 Thread Raju P L S S S N
On 10/12/2018 8:03 PM, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:51AM +0530, Raju P.L.S.S.S.N wrote: RPMH based targets require that the sleep and wake state request votes be sent during system low power mode entry. The votes help reduce the power consumption when the AP is not using

Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions

2018-10-12 Thread David Miller
From: "Kirill A. Shutemov" Date: Fri, 12 Oct 2018 14:30:56 +0300 > I looked into the code more and noticed move_pte() helper called from > move_ptes(). It changes PTE entry to suite new address. > > It is only defined in non-trivial way on Sparc. I don't know much about > Sparc and it's hard

Re: [PATCH 05/11] x86/fpu: set PKRU state for kernel threads

2018-10-12 Thread Andy Lutomirski
On Fri, Oct 12, 2018 at 10:54 AM Dave Hansen wrote: > > On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > > The PKRU value is not set for kernel threads because they do not have > > the ->initialized value set. As a result the kernel thread has a random > > PKRU value set which it

[PATCH v7 5/7] mm, hmm: Use devm semantics for hmm_devmem_{add, remove}

2018-10-12 Thread Dan Williams
devm semantics arrange for resources to be torn down when device-driver-probe fails or when device-driver-release completes. Similar to devm_memremap_pages() there is no need to support an explicit remove operation when the users properly adhere to devm semantics. Note that devm_kzalloc()

[PATCH v7 5/7] mm, hmm: Use devm semantics for hmm_devmem_{add, remove}

2018-10-12 Thread Dan Williams
devm semantics arrange for resources to be torn down when device-driver-probe fails or when device-driver-release completes. Similar to devm_memremap_pages() there is no need to support an explicit remove operation when the users properly adhere to devm semantics. Note that devm_kzalloc()

Re: Gang scheduling

2018-10-12 Thread Tim Chen
On 10/10/2018 05:09 PM, Subhra Mazumdar wrote: > Hi, > > I was following the Coscheduling patch discussion on lkml and Peter mentioned > he had a patch series. I found the following on github. > > https://github.com/pdxChen/gang/commits/sched_1.23-loadbal > > I would like to test this with

[PATCH v7 6/7] mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-10-12 Thread Dan Williams
Commit e8d513483300 "memremap: change devm_memremap_pages interface to use struct dev_pagemap" refactored devm_memremap_pages() to allow a dev_pagemap instance to be supplied. Passing in a dev_pagemap interface simplifies the design of pgmap type drivers in that they can rely on container_of() to

[PATCH v7 2/7] mm, devm_memremap_pages: Kill mapping "System RAM" support

2018-10-12 Thread Dan Williams
Given the fact that devm_memremap_pages() requires a percpu_ref that is torn down by devm_memremap_pages_release() the current support for mapping RAM is broken. Support for remapping "System RAM" has been broken since the beginning and there is no existing user of this this code path, so just

Re: Gang scheduling

2018-10-12 Thread Tim Chen
On 10/10/2018 05:09 PM, Subhra Mazumdar wrote: > Hi, > > I was following the Coscheduling patch discussion on lkml and Peter mentioned > he had a patch series. I found the following on github. > > https://github.com/pdxChen/gang/commits/sched_1.23-loadbal > > I would like to test this with

[PATCH v7 6/7] mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-10-12 Thread Dan Williams
Commit e8d513483300 "memremap: change devm_memremap_pages interface to use struct dev_pagemap" refactored devm_memremap_pages() to allow a dev_pagemap instance to be supplied. Passing in a dev_pagemap interface simplifies the design of pgmap type drivers in that they can rely on container_of() to

[PATCH v7 2/7] mm, devm_memremap_pages: Kill mapping "System RAM" support

2018-10-12 Thread Dan Williams
Given the fact that devm_memremap_pages() requires a percpu_ref that is torn down by devm_memremap_pages_release() the current support for mapping RAM is broken. Support for remapping "System RAM" has been broken since the beginning and there is no existing user of this this code path, so just

[PATCH v7 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-10-12 Thread Dan Williams
The last step before devm_memremap_pages() returns success is to allocate a release action, devm_memremap_pages_release(), to tear the entire setup down. However, the result from devm_add_action() is not checked. Checking the error from devm_add_action() is not enough. The api currently relies on

[PATCH v7 4/7] mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support

2018-10-12 Thread Dan Williams
In preparation for consolidating all ZONE_DEVICE enabling via devm_memremap_pages(), teach it how to handle the constraints of MEMORY_DEVICE_PRIVATE ranges. Reviewed-by: Jérôme Glisse [jglisse: call move_pfn_range_to_zone for MEMORY_DEVICE_PRIVATE] Acked-by: Christoph Hellwig Reported-by: Logan

[PATCH v7 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-10-12 Thread Dan Williams
The last step before devm_memremap_pages() returns success is to allocate a release action, devm_memremap_pages_release(), to tear the entire setup down. However, the result from devm_add_action() is not checked. Checking the error from devm_add_action() is not enough. The api currently relies on

[PATCH v7 4/7] mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support

2018-10-12 Thread Dan Williams
In preparation for consolidating all ZONE_DEVICE enabling via devm_memremap_pages(), teach it how to handle the constraints of MEMORY_DEVICE_PRIVATE ranges. Reviewed-by: Jérôme Glisse [jglisse: call move_pfn_range_to_zone for MEMORY_DEVICE_PRIVATE] Acked-by: Christoph Hellwig Reported-by: Logan

[PATCH v7 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-10-12 Thread Dan Williams
[ apologies for the resend, script error ] Changes since v6 [1]: * Rebase on next-20181008 and fixup conflicts with the xarray conversion and hotplug optimizations * It has soaked on a 0day visible branch for a few days without any reports. [1]: https://lkml.org/lkml/2018/9/13/104 --- Hi

[PATCH v7 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-10-12 Thread Dan Williams
devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument

[PATCH v7 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-10-12 Thread Dan Williams
devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument

[PATCH v7 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-10-12 Thread Dan Williams
[ apologies for the resend, script error ] Changes since v6 [1]: * Rebase on next-20181008 and fixup conflicts with the xarray conversion and hotplug optimizations * It has soaked on a 0day visible branch for a few days without any reports. [1]: https://lkml.org/lkml/2018/9/13/104 --- Hi

[PATCH v7 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-10-12 Thread Dan Williams
Changes since v6 [1]: * Rebase on next-20181008 and fixup conflicts with the xarray conversion and hotplug optimizations * It has soaked on a 0day visible branch for a few days without any reports. [1]: https://lkml.org/lkml/2018/9/13/104 --- Hi Andrew, Jérôme has reviewed the cleanups,

[PATCH v7 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-10-12 Thread Dan Williams
devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument

[PATCH v7 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-10-12 Thread Dan Williams
Changes since v6 [1]: * Rebase on next-20181008 and fixup conflicts with the xarray conversion and hotplug optimizations * It has soaked on a 0day visible branch for a few days without any reports. [1]: https://lkml.org/lkml/2018/9/13/104 --- Hi Andrew, Jérôme has reviewed the cleanups,

[PATCH v7 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-10-12 Thread Dan Williams
devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument

Re: [PATCH 07/11] x86/pkeys: Drop the preempt-disable section

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > The fpu->initialized flag should not be changed underneath us. This might be a > fallout during the removal of the LazyFPU support. The FPU is marked > initialized as soon as the state has been set to an initial value. It does not > signal

Re: [PATCH 07/11] x86/pkeys: Drop the preempt-disable section

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > The fpu->initialized flag should not be changed underneath us. This might be a > fallout during the removal of the LazyFPU support. The FPU is marked > initialized as soon as the state has been set to an initial value. It does not > signal

Re: [PATCH] mm/thp: fix call to mmu_notifier in set_pmd_migration_entry()

2018-10-12 Thread Andrea Arcangeli
On Fri, Oct 12, 2018 at 01:35:19PM -0400, Jerome Glisse wrote: > On Fri, Oct 12, 2018 at 01:24:22PM -0400, Andrea Arcangeli wrote: > > Hello, > > > > On Fri, Oct 12, 2018 at 12:20:54PM -0400, Zi Yan wrote: > > > On 12 Oct 2018, at 12:09, jgli...@redhat.com wrote: > > > > > > > From: Jérôme

Re: [PATCH] mm/thp: fix call to mmu_notifier in set_pmd_migration_entry()

2018-10-12 Thread Andrea Arcangeli
On Fri, Oct 12, 2018 at 01:35:19PM -0400, Jerome Glisse wrote: > On Fri, Oct 12, 2018 at 01:24:22PM -0400, Andrea Arcangeli wrote: > > Hello, > > > > On Fri, Oct 12, 2018 at 12:20:54PM -0400, Zi Yan wrote: > > > On 12 Oct 2018, at 12:09, jgli...@redhat.com wrote: > > > > > > > From: Jérôme

Re: [PATCH 06/11] x86/pkeys: make init_pkru_value static

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > The variable init_pkru_value isn't used outside of this file. > Make init_pkru_value static. > > Signed-off-by: Sebastian Andrzej Siewior Looks good. Acked-by: Dave Hansen

Re: [PATCH 06/11] x86/pkeys: make init_pkru_value static

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > The variable init_pkru_value isn't used outside of this file. > Make init_pkru_value static. > > Signed-off-by: Sebastian Andrzej Siewior Looks good. Acked-by: Dave Hansen

Re: [PATCH 05/11] x86/fpu: set PKRU state for kernel threads

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > The PKRU value is not set for kernel threads because they do not have > the ->initialized value set. As a result the kernel thread has a random > PKRU value set which it inherits from the previous task. > It has been suggested by Paolo

Re: [PATCH 05/11] x86/fpu: set PKRU state for kernel threads

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > The PKRU value is not set for kernel threads because they do not have > the ->initialized value set. As a result the kernel thread has a random > PKRU value set which it inherits from the previous task. > It has been suggested by Paolo

Re: [PATCH v1 3/3] clk: mediatek: mt2712: add pll reference support

2018-10-12 Thread Stephen Boyd
Quoting Weiyi Lu (2018-09-20 02:57:27) > For some MT2712 projects, audpll could select another reference > clock source if there exists an extra Crystal Oscillators than > the default clk26m XTAL. > Declare with the property "mediatek,refclk-aud" to switch > the audpll reference clock. > And also

Re: [PATCH RFC v1 8/8] arm64: dtsi: sdm845: Add cpu power domain support

2018-10-12 Thread Lina Iyer
On Fri, Oct 12 2018 at 11:35 -0600, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:55AM +0530, Raju P.L.S.S.S.N wrote: Add cpu power domain support Signed-off-by: Raju P.L.S.S.S.N --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git

Re: [PATCH v1 3/3] clk: mediatek: mt2712: add pll reference support

2018-10-12 Thread Stephen Boyd
Quoting Weiyi Lu (2018-09-20 02:57:27) > For some MT2712 projects, audpll could select another reference > clock source if there exists an extra Crystal Oscillators than > the default clk26m XTAL. > Declare with the property "mediatek,refclk-aud" to switch > the audpll reference clock. > And also

Re: [PATCH RFC v1 8/8] arm64: dtsi: sdm845: Add cpu power domain support

2018-10-12 Thread Lina Iyer
On Fri, Oct 12 2018 at 11:35 -0600, Sudeep Holla wrote: On Thu, Oct 11, 2018 at 02:50:55AM +0530, Raju P.L.S.S.S.N wrote: Add cpu power domain support Signed-off-by: Raju P.L.S.S.S.N --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git

Re: [PATCH 04/11] x86/fpu: eager switch PKRU state

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > From: Rik van Riel > > While most of a task's FPU state is only needed in user space, > the protection keys need to be in place immediately after a > context switch. > > The reason is that any accesses to userspace memory while running

Re: [PATCH 04/11] x86/fpu: eager switch PKRU state

2018-10-12 Thread Dave Hansen
On 10/04/2018 07:05 AM, Sebastian Andrzej Siewior wrote: > From: Rik van Riel > > While most of a task's FPU state is only needed in user space, > the protection keys need to be in place immediately after a > context switch. > > The reason is that any accesses to userspace memory while running

Re: [PATCH 4.9 00/35] 4.9.133-stable review

2018-10-12 Thread Guenter Roeck
On Thu, Oct 11, 2018 at 05:35:02PM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.9.133 release. > There are 35 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me

Re: [PATCH 4.9 00/35] 4.9.133-stable review

2018-10-12 Thread Guenter Roeck
On Thu, Oct 11, 2018 at 05:35:02PM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.9.133 release. > There are 35 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me

Re: [PATCH v2 0/4] devres: provide and use devm_kstrdup_const()

2018-10-12 Thread Stephen Boyd
Quoting Bartosz Golaszewski (2018-09-20 05:59:54) > 2018-08-28 11:33 GMT+02:00 Bartosz Golaszewski : > > This series implements devm_kstrdup_const() together with some > > prerequisite changes and uses it in pmc-atom driver. > > > > v1 -> v2: > > - fixed the changelog in the patch implementing

Re: [PATCH v2 0/4] devres: provide and use devm_kstrdup_const()

2018-10-12 Thread Stephen Boyd
Quoting Bartosz Golaszewski (2018-09-20 05:59:54) > 2018-08-28 11:33 GMT+02:00 Bartosz Golaszewski : > > This series implements devm_kstrdup_const() together with some > > prerequisite changes and uses it in pmc-atom driver. > > > > v1 -> v2: > > - fixed the changelog in the patch implementing

RE: issues with suspend on Dell XPS 13 2-in-1

2018-10-12 Thread Mario.Limonciello
> -Original Message- > From: Dennis Gilmore > Sent: Friday, October 12, 2018 8:39 AM > To: Pandruvada, Srinivas > Cc: linux-kernel@vger.kernel.org; linux-a...@vger.kernel.org; Limonciello, > Mario > Subject: Re: issues with suspend on Dell XPS 13 2-in-1 > It appears I'm being added to

RE: issues with suspend on Dell XPS 13 2-in-1

2018-10-12 Thread Mario.Limonciello
> -Original Message- > From: Dennis Gilmore > Sent: Friday, October 12, 2018 8:39 AM > To: Pandruvada, Srinivas > Cc: linux-kernel@vger.kernel.org; linux-a...@vger.kernel.org; Limonciello, > Mario > Subject: Re: issues with suspend on Dell XPS 13 2-in-1 > It appears I'm being added to

Re: [PATCH 6/6] arm64: dts: marvell: Add cpu clock node on Armada 7K/8K

2018-10-12 Thread Stephen Boyd
+Rob Quoting Gregory CLEMENT (2018-09-22 11:17:09) > diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi > b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi > index 4a65e4e830aa..27c840e91abe 100644 > --- a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi > +++

Re: [PATCH 6/6] arm64: dts: marvell: Add cpu clock node on Armada 7K/8K

2018-10-12 Thread Stephen Boyd
+Rob Quoting Gregory CLEMENT (2018-09-22 11:17:09) > diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi > b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi > index 4a65e4e830aa..27c840e91abe 100644 > --- a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi > +++

Re: [PATCH v6] clk: qcom: Add lpass clock controller driver for SDM845

2018-10-12 Thread Stephen Boyd
Quoting Taniya Das (2018-10-09 23:12:27) > > > On 10/10/2018 2:22 AM, Stephen Boyd wrote: > > Quoting Taniya Das (2018-10-09 10:26:38) > >> Hello Stephen, > >> > >> On 10/8/2018 8:14 AM, Stephen Boyd wrote: > >>> Quoting Taniya Das (2018-10-04 05:02:26) > Add support for the lpass clock

Re: [PATCH v6] clk: qcom: Add lpass clock controller driver for SDM845

2018-10-12 Thread Stephen Boyd
Quoting Taniya Das (2018-10-09 23:12:27) > > > On 10/10/2018 2:22 AM, Stephen Boyd wrote: > > Quoting Taniya Das (2018-10-09 10:26:38) > >> Hello Stephen, > >> > >> On 10/8/2018 8:14 AM, Stephen Boyd wrote: > >>> Quoting Taniya Das (2018-10-04 05:02:26) > Add support for the lpass clock

Re: [PATCH] mm/thp: fix call to mmu_notifier in set_pmd_migration_entry()

2018-10-12 Thread Jerome Glisse
On Fri, Oct 12, 2018 at 01:24:22PM -0400, Andrea Arcangeli wrote: > Hello, > > On Fri, Oct 12, 2018 at 12:20:54PM -0400, Zi Yan wrote: > > On 12 Oct 2018, at 12:09, jgli...@redhat.com wrote: > > > > > From: Jérôme Glisse > > > > > > Inside set_pmd_migration_entry() we are holding page table

Re: [PATCH] mm/thp: fix call to mmu_notifier in set_pmd_migration_entry()

2018-10-12 Thread Jerome Glisse
On Fri, Oct 12, 2018 at 01:24:22PM -0400, Andrea Arcangeli wrote: > Hello, > > On Fri, Oct 12, 2018 at 12:20:54PM -0400, Zi Yan wrote: > > On 12 Oct 2018, at 12:09, jgli...@redhat.com wrote: > > > > > From: Jérôme Glisse > > > > > > Inside set_pmd_migration_entry() we are holding page table

Re: [PATCH RFC v1 8/8] arm64: dtsi: sdm845: Add cpu power domain support

2018-10-12 Thread Sudeep Holla
On Thu, Oct 11, 2018 at 02:50:55AM +0530, Raju P.L.S.S.S.N wrote: > Add cpu power domain support > > Signed-off-by: Raju P.L.S.S.S.N > --- > arch/arm64/boot/dts/qcom/sdm845.dtsi | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi >

Re: [PATCH RFC v1 8/8] arm64: dtsi: sdm845: Add cpu power domain support

2018-10-12 Thread Sudeep Holla
On Thu, Oct 11, 2018 at 02:50:55AM +0530, Raju P.L.S.S.S.N wrote: > Add cpu power domain support > > Signed-off-by: Raju P.L.S.S.S.N > --- > arch/arm64/boot/dts/qcom/sdm845.dtsi | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi >

[PATCHv3] mm/gup: Cache dev_pagemap while pinning pages

2018-10-12 Thread Keith Busch
Getting pages from ZONE_DEVICE memory needs to check the backing device's live-ness, which is tracked in the device's dev_pagemap metadata. This metadata is stored in a radix tree and looking it up adds measurable software overhead. This patch avoids repeating this relatively costly operation

[PATCHv3] mm/gup: Cache dev_pagemap while pinning pages

2018-10-12 Thread Keith Busch
Getting pages from ZONE_DEVICE memory needs to check the backing device's live-ness, which is tracked in the device's dev_pagemap metadata. This metadata is stored in a radix tree and looking it up adds measurable software overhead. This patch avoids repeating this relatively costly operation

Re: [PATCH v1] KVM/x86/vPMU: Guest PMI Optimization

2018-10-12 Thread Alexey Budankov
Hi, On 12.10.2018 19:30, Andi Kleen wrote: >> 4. Results >> - Without this optimization, the guest pmi handling time is >> ~450 ns, and the max sampling rate is reduced to 250. >> - With this optimization, the guest pmi handling time is ~9000 ns >> (i.e. 1 / 500 of the

Re: [PATCH v1] KVM/x86/vPMU: Guest PMI Optimization

2018-10-12 Thread Alexey Budankov
Hi, On 12.10.2018 19:30, Andi Kleen wrote: >> 4. Results >> - Without this optimization, the guest pmi handling time is >> ~450 ns, and the max sampling rate is reduced to 250. >> - With this optimization, the guest pmi handling time is ~9000 ns >> (i.e. 1 / 500 of the

Re: [PATCH] KEYS: trusted: fix -Wvarags warning

2018-10-12 Thread Denis Kenzior
Hi Nick, So maybe I'm misunderstanding something, but the issue seems to be that unsigned char is promoted to 'unsigned char *' by Clang and probably unsigned int or int by gcc. No. This is extremely well defined behavior in C. In C, integral types are NEVER promoted to pointer to integer

Re: [PATCH] KEYS: trusted: fix -Wvarags warning

2018-10-12 Thread Denis Kenzior
Hi Nick, So maybe I'm misunderstanding something, but the issue seems to be that unsigned char is promoted to 'unsigned char *' by Clang and probably unsigned int or int by gcc. No. This is extremely well defined behavior in C. In C, integral types are NEVER promoted to pointer to integer

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