[tip: x86/mm] x86/mm: Increase pgt_buf size for 5-level page tables

2021-01-04 Thread tip-bot2 for Lorenzo Stoakes
The following commit has been merged into the x86/mm branch of tip: Commit-ID: 167dcfc08b0b1f964ea95d410aa496fd78adf475 Gitweb: https://git.kernel.org/tip/167dcfc08b0b1f964ea95d410aa496fd78adf475 Author:Lorenzo Stoakes AuthorDate:Tue, 15 Dec 2020 20:56:41 Committer

Re: [PATCH] x86/mm: increase pgt_buf size for 5-level page tables

2021-01-04 Thread Lorenzo Stoakes
Happy NY all, thanks for the review! I haven't contributed an x86-specific mm patch before so am not sure of the process - usually I submit patches to the mm mailing list and Andrew gathers them up into his tree, is there anything else I need to do with this? Thanks, Lorenzo

[PATCH] x86/mm: increase pgt_buf size for 5-level page tables

2020-12-15 Thread Lorenzo Stoakes
or 4 page tables respectively. This patch updates INIT_PGD_PAGE_COUNT to reflect this. Signed-off-by: Lorenzo Stoakes --- arch/x86/mm/init.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index e26f5c5c6565

Re: linux-next boot error: kernel BUG at include/linux/page-flags.h:LINE!

2020-12-03 Thread Lorenzo Stoakes
On Thu, 3 Dec 2020 at 12:24, Mike Rapoport wrote: > Yeah, the change to initialization of "unavailable" memory missed pfn 0 :( > This should fix it: Tried locally and it fixes the issue for me :)

[PATCH] mm: page_alloc: refactor setup_per_zone_lowmem_reserve()

2020-11-29 Thread Lorenzo Stoakes
h reverse the process and populates each zone's lowmem_reserve[] values in ascending order. This clarifies what is going on especially in the case of zero managed pages or ratio which is now explicitly shown to clear these values. Signed-off-by: Lorenzo Stoakes --- mm/page_all

Re: linux-next boot error: WARNING in prepare_kswapd_sleep

2020-11-25 Thread Lorenzo Stoakes
On Wed, 25 Nov 2020 at 06:25, Alex Shi wrote: > Acked. Thanks. I submitted as an actual patch, refactored it slightly to avoid duplication of page_memcg(). > and further more, could you like try another patch? I tried that patch against the syzkaller failure case and it worked fine! Cheers,

[PATCH] mm/memcg: warn on missing memcg on mem_cgroup_page_lruvec()

2020-11-25 Thread Lorenzo Stoakes
to assert that this is the case. Signed-off-by: Lorenzo Stoakes Reported-by: syzbot+ce635500093181f39...@syzkaller.appspotmail.com --- include/linux/memcontrol.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index

Re: linux-next boot error: WARNING in prepare_kswapd_sleep

2020-11-24 Thread Lorenzo Stoakes
On Tue, 24 Nov 2020 at 07:54, syzbot wrote: > syzbot found the following issue on: > > HEAD commit:d9137320 Add linux-next specific files for 20201124 This appears to be a product of 4b2904f3 ("mm/memcg: add missed warning in mem_cgroup_lruvec") adding a VM_WARN_ON_ONCE() to

Re: linux-next boot error: BUG: unable to handle kernel NULL pointer dereference in mempool_init_node

2020-11-11 Thread Lorenzo Stoakes
m/kasan/common.c @@ -387,6 +387,11 @@ void __kasan_slab_free_mempool(void *ptr, unsigned long ip) struct page *page; page = virt_to_head_page(ptr); + + if (!PageSlab(page)) { + return; + } + kasan_slab_free(page->slab_cache, ptr, ip, false); }

Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-28 Thread Lorenzo Stoakes
ast() in all such cases? These patches were simply a mechanical/cautious replacement for code that is more or less exactly equivalent but if this would make sense perhaps it'd be worth using gup_fast() where possible? -- Lorenzo Stoakes https://ljs.io

Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-28 Thread Lorenzo Stoakes
hes were simply a mechanical/cautious replacement for code that is more or less exactly equivalent but if this would make sense perhaps it'd be worth using gup_fast() where possible? -- Lorenzo Stoakes https://ljs.io

[PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-27 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- drivers/gpu/drm/via/via_dmablit.c | 10 +++--- 1 file changed, 3 insertions

[PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-27 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes --- drivers/gpu/drm/via/via_dmablit.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff

Re: [PATCH] drm/via: use get_user_pages_unlocked()

2017-02-20 Thread Lorenzo Stoakes
On 6 January 2017 at 07:09, Lorenzo Stoakes <lstoa...@gmail.com> wrote: > > Adding Andrew, as this may be another less active corner of the corner, > thanks! Hi all, Thought I'd also give this one a gentle nudge now the merge window has re-opened, Andrew - are you ok to pic

Re: [PATCH] drm/via: use get_user_pages_unlocked()

2017-02-20 Thread Lorenzo Stoakes
On 6 January 2017 at 07:09, Lorenzo Stoakes wrote: > > Adding Andrew, as this may be another less active corner of the corner, > thanks! Hi all, Thought I'd also give this one a gentle nudge now the merge window has re-opened, Andrew - are you ok to pick this up? I've checked

Re: [PATCH] drivers/virt: use get_user_pages_unlocked()

2017-02-20 Thread Lorenzo Stoakes
On 3 January 2017 at 21:36, Michal Hocko <mho...@kernel.org> wrote: > On Tue 03-01-17 21:14:20, Lorenzo Stoakes wrote: >> Just a gentle ping on this :) I think this might be a slightly >> abandoned corner of the kernel so not sure who else to ping to get >> this moving

Re: [PATCH] drivers/virt: use get_user_pages_unlocked()

2017-02-20 Thread Lorenzo Stoakes
On 3 January 2017 at 21:36, Michal Hocko wrote: > On Tue 03-01-17 21:14:20, Lorenzo Stoakes wrote: >> Just a gentle ping on this :) I think this might be a slightly >> abandoned corner of the kernel so not sure who else to ping to get >> this moving. > > Maybe An

Re: [PATCH] drm/via: use get_user_pages_unlocked()

2017-01-05 Thread Lorenzo Stoakes
On 3 January 2017 at 20:23, Lorenzo Stoakes <lstoa...@gmail.com> wrote: > Hi All, > > Just a gentle ping on this one :) > > Cheers, Lorenzo > > On 1 November 2016 at 19:43, Lorenzo Stoakes <lstoa...@gmail.com> wrote: >> Moving from get_user_pages() to get_us

Re: [PATCH] drm/via: use get_user_pages_unlocked()

2017-01-05 Thread Lorenzo Stoakes
On 3 January 2017 at 20:23, Lorenzo Stoakes wrote: > Hi All, > > Just a gentle ping on this one :) > > Cheers, Lorenzo > > On 1 November 2016 at 19:43, Lorenzo Stoakes wrote: >> Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code >> and

Re: [PATCH] drivers/virt: use get_user_pages_unlocked()

2017-01-03 Thread Lorenzo Stoakes
Just a gentle ping on this :) I think this might be a slightly abandoned corner of the kernel so not sure who else to ping to get this moving. On 1 November 2016 at 19:43, Lorenzo Stoakes <lstoa...@gmail.com> wrote: > Moving from get_user_pages() to get_user_pages_unlocked() simplifies

Re: [PATCH] drivers/virt: use get_user_pages_unlocked()

2017-01-03 Thread Lorenzo Stoakes
Just a gentle ping on this :) I think this might be a slightly abandoned corner of the kernel so not sure who else to ping to get this moving. On 1 November 2016 at 19:43, Lorenzo Stoakes wrote: > Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code > and takes adv

[PATCH RESEND] rapidio: use get_user_pages_unlocked()

2017-01-03 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- drivers/rapidio/devices/rio_mport_cdev.c | 11 +-- 1 file chan

[PATCH RESEND] rapidio: use get_user_pages_unlocked()

2017-01-03 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes --- drivers/rapidio/devices/rio_mport_cdev.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions

Re: [PATCH] drm/via: use get_user_pages_unlocked()

2017-01-03 Thread Lorenzo Stoakes
Hi All, Just a gentle ping on this one :) Cheers, Lorenzo On 1 November 2016 at 19:43, Lorenzo Stoakes <lstoa...@gmail.com> wrote: > Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code > and takes advantage of VM_FAULT_RETRY functionality when fault

Re: [PATCH] drm/via: use get_user_pages_unlocked()

2017-01-03 Thread Lorenzo Stoakes
Hi All, Just a gentle ping on this one :) Cheers, Lorenzo On 1 November 2016 at 19:43, Lorenzo Stoakes wrote: > Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code > and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. > > Signed-off

Re: [PATCH 1/2] mm: add locked parameter to get_user_pages()

2016-11-07 Thread Lorenzo Stoakes
On Mon, Nov 07, 2016 at 11:49:18AM +0100, Jesper Nilsson wrote: > For the cris-part: > Acked-by: Jesper Nilsson Thanks very much for that, however just to avoid any confusion, I realised this series was not not the right way forward after discussion with Paolo and rather

Re: [PATCH 1/2] mm: add locked parameter to get_user_pages()

2016-11-07 Thread Lorenzo Stoakes
On Mon, Nov 07, 2016 at 11:49:18AM +0100, Jesper Nilsson wrote: > For the cris-part: > Acked-by: Jesper Nilsson Thanks very much for that, however just to avoid any confusion, I realised this series was not not the right way forward after discussion with Paolo and rather it makes more sense to

[PATCH] rapidio: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- drivers/rapidio/devices/rio_mport_cdev.c | 8 +++- 1 file changed, 3 inse

[PATCH] rapidio: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes --- drivers/rapidio/devices/rio_mport_cdev.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions

[PATCH] drm/via: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- drivers/gpu/drm/via/via_dmablit.c | 10 +++--- 1 file changed, 3 insertions

[PATCH] drivers/virt: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- drivers/virt/fsl_hypervisor.c | 7 ++- 1 file changed, 2 insertions

[PATCH] platform: goldfish: pipe: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- drivers/platform/goldfish/goldfish_pipe.c | 6 ++ 1 file changed, 2 inse

[PATCH] drm/via: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes --- drivers/gpu/drm/via/via_dmablit.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff

[PATCH] drivers/virt: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes --- drivers/virt/fsl_hypervisor.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH] platform: goldfish: pipe: use get_user_pages_unlocked()

2016-11-01 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes --- drivers/platform/goldfish/goldfish_pipe.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
On Mon, Oct 31, 2016 at 06:55:33PM +0100, Paolo Bonzini wrote: > > 2. There is currently only one caller of get_user_pages_locked() in > >mm/frame_vector.c which seems to suggest this function isn't widely > >used/known. > > Or not widely necessary. :) Well, quite :) > > > 3. This change

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
On Mon, Oct 31, 2016 at 06:55:33PM +0100, Paolo Bonzini wrote: > > 2. There is currently only one caller of get_user_pages_locked() in > >mm/frame_vector.c which seems to suggest this function isn't widely > >used/known. > > Or not widely necessary. :) Well, quite :) > > > 3. This change

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
On Mon, Oct 31, 2016 at 12:45:36PM +0100, Paolo Bonzini wrote: > > > On 31/10/2016 11:02, Lorenzo Stoakes wrote: > > - * > > - * get_user_pages should be phased out in favor of > > - * get_user_pages_locked|unlocked or get_user_pages_fast. Nothing > > - *

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
On Mon, Oct 31, 2016 at 12:45:36PM +0100, Paolo Bonzini wrote: > > > On 31/10/2016 11:02, Lorenzo Stoakes wrote: > > - * > > - * get_user_pages should be phased out in favor of > > - * get_user_pages_locked|unlocked or get_user_pages_fast. Nothing > > - *

[PATCH 1/2] mm: add locked parameter to get_user_pages()

2016-10-31 Thread Lorenzo Stoakes
behaviour when faulting in pages. It should not introduce any functional changes, however it does allow for subsequent changes to get_user_pages() callers to take advantage of VM_FAULT_RETRY. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- arch/cris/arch-v32/drivers/crypt

[PATCH 1/2] mm: add locked parameter to get_user_pages()

2016-10-31 Thread Lorenzo Stoakes
behaviour when faulting in pages. It should not introduce any functional changes, however it does allow for subsequent changes to get_user_pages() callers to take advantage of VM_FAULT_RETRY. Signed-off-by: Lorenzo Stoakes --- arch/cris/arch-v32/drivers/cryptocop.c| 2

[PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
get_user_pages() now has an int *locked parameter which renders get_user_pages_locked() redundant, so remove it. This patch should not introduce any functional changes. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- include/linux/mm.h | 2 -- mm/frame_vector.c | 4 ++-- mm

[PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
get_user_pages() now has an int *locked parameter which renders get_user_pages_locked() redundant, so remove it. This patch should not introduce any functional changes. Signed-off-by: Lorenzo Stoakes --- include/linux/mm.h | 2 -- mm/frame_vector.c | 4 ++-- mm/gup.c | 56

[PATCH 0/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
. Lorenzo Stoakes (2): mm: add locked parameter to get_user_pages() mm: remove get_user_pages_locked() arch/cris/arch-v32/drivers/cryptocop.c | 2 + arch/ia64/kernel/err_inject.c | 2 +- arch/x86/mm/mpx.c | 2 +- drivers/gpu

[PATCH 0/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
. Lorenzo Stoakes (2): mm: add locked parameter to get_user_pages() mm: remove get_user_pages_locked() arch/cris/arch-v32/drivers/cryptocop.c | 2 + arch/ia64/kernel/err_inject.c | 2 +- arch/x86/mm/mpx.c | 2 +- drivers/gpu

[PATCH v2 2/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
, this flag was originally silently dropped by 1e9877902dc7e ("mm/gup: Introduce get_user_pages_remote()"), so this appears to have been unintentional and reintroducing it is therefore not an issue. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- v2: updated patch to apply

[PATCH v2 2/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
, this flag was originally silently dropped by 1e9877902dc7e ("mm/gup: Introduce get_user_pages_remote()"), so this appears to have been unintentional and reintroducing it is therefore not an issue. Signed-off-by: Lorenzo Stoakes --- v2: updated patch to apply against mainline rather t

[PATCH v2 0/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
- get_user_pages_unlocked() if the current task and memory descriptor are referenced, or get_user_pages_remote() if other task/memory descriptors are referenced (having acquiring mmap_sem.) Lorenzo Stoakes (2): mm: add locked parameter to get_user_pages_remote() mm: unexport __get_user_pages_unlocked

[PATCH v2 0/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
- get_user_pages_unlocked() if the current task and memory descriptor are referenced, or get_user_pages_remote() if other task/memory descriptors are referenced (having acquiring mmap_sem.) Lorenzo Stoakes (2): mm: add locked parameter to get_user_pages_remote() mm: unexport __get_user_pages_unlocked

[PATCH v2 1/2] mm: add locked parameter to get_user_pages_remote()

2016-10-27 Thread Lorenzo Stoakes
for VM_FAULT_RETRY behaviour when faulting in pages. It should not introduce any functional changes, however it does allow for subsequent changes to get_user_pages_remote() callers to take advantage of VM_FAULT_RETRY. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- v2: updated description d

[PATCH v2 1/2] mm: add locked parameter to get_user_pages_remote()

2016-10-27 Thread Lorenzo Stoakes
for VM_FAULT_RETRY behaviour when faulting in pages. It should not introduce any functional changes, however it does allow for subsequent changes to get_user_pages_remote() callers to take advantage of VM_FAULT_RETRY. Signed-off-by: Lorenzo Stoakes --- v2: updated description drivers/gpu/drm/etnaviv

[PATCH 2/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
, this flag was originally silently dropped by 1e9877902dc7e ("mm/gup: Introduce get_user_pages_remote()"), so this appears to have been unintentional and reintroducing it is therefore not an issue. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- include/linux/mm.h |

[PATCH 2/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
, this flag was originally silently dropped by 1e9877902dc7e ("mm/gup: Introduce get_user_pages_remote()"), so this appears to have been unintentional and reintroducing it is therefore not an issue. Signed-off-by: Lorenzo Stoakes --- include/linux/mm.h | 3 --- mm/gup.c

[PATCH 0/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
- get_user_pages_unlocked() if the current task and memory descriptor are referenced, or get_user_pages_remote() if other task/memory descriptors are referenced (having acquiring mmap_sem.) Lorenzo Stoakes (2): mm: add locked parameter to get_user_pages_remote() mm: unexport __get_user_pages_unlocked

[PATCH 0/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
- get_user_pages_unlocked() if the current task and memory descriptor are referenced, or get_user_pages_remote() if other task/memory descriptors are referenced (having acquiring mmap_sem.) Lorenzo Stoakes (2): mm: add locked parameter to get_user_pages_remote() mm: unexport __get_user_pages_unlocked

Re: [PATCH 0/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
On Thu, Oct 27, 2016 at 10:51:39AM +0100, Lorenzo Stoakes wrote: > This patch series continues the cleanup of get_user_pages*() functions taking > advantage of the fact we can now pass gup_flags as we please. Note that this patch series has an unfortunate trivial dependency on my recent '

Re: [PATCH 0/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Lorenzo Stoakes
On Thu, Oct 27, 2016 at 10:51:39AM +0100, Lorenzo Stoakes wrote: > This patch series continues the cleanup of get_user_pages*() functions taking > advantage of the fact we can now pass gup_flags as we please. Note that this patch series has an unfortunate trivial dependency on my recent '

[PATCH 1/2] mm: add locked parameter to get_user_pages_remote()

2016-10-27 Thread Lorenzo Stoakes
__get_user_pages_unlocked() need only be exported for his ability to allow VM_FAULT_RETRY behaviour, this adjustment allows us to subsequently unexport __get_user_pages_unlocked() as well as allowing for future flexibility in the use of get_user_pages_remote(). Signed-off-by: Lorenzo Stoakes <ls

[PATCH 1/2] mm: add locked parameter to get_user_pages_remote()

2016-10-27 Thread Lorenzo Stoakes
__get_user_pages_unlocked() need only be exported for his ability to allow VM_FAULT_RETRY behaviour, this adjustment allows us to subsequently unexport __get_user_pages_unlocked() as well as allowing for future flexibility in the use of get_user_pages_remote(). Signed-off-by: Lorenzo Stoakes

Re: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-27 Thread Lorenzo Stoakes
On Thu, Oct 27, 2016 at 11:27:24AM +0200, Paolo Bonzini wrote: > > > On 27/10/2016 02:12, Andrew Morton wrote: > > > > > >> Subject: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() > >> calls > > > > The patch is rather misidentified. > > > >> virt/kvm/async_pf.c | 7 --- > >>

Re: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-27 Thread Lorenzo Stoakes
On Thu, Oct 27, 2016 at 11:27:24AM +0200, Paolo Bonzini wrote: > > > On 27/10/2016 02:12, Andrew Morton wrote: > > > > > >> Subject: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() > >> calls > > > > The patch is rather misidentified. > > > >> virt/kvm/async_pf.c | 7 --- > >>

Re: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-27 Thread Lorenzo Stoakes
On Wed, Oct 26, 2016 at 05:12:07PM -0700, Andrew Morton wrote: > It's a KVM patch and should have been called "kvm: remove ...". > Possibly the KVM maintainers will miss it for this reason. > Ah, indeed, however I think given my and Michal's discussion in this thread regarding adjusting

Re: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-27 Thread Lorenzo Stoakes
On Wed, Oct 26, 2016 at 05:12:07PM -0700, Andrew Morton wrote: > It's a KVM patch and should have been called "kvm: remove ...". > Possibly the KVM maintainers will miss it for this reason. > Ah, indeed, however I think given my and Michal's discussion in this thread regarding adjusting

Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-26 Thread Lorenzo Stoakes
On Wed, Oct 26, 2016 at 11:15:43AM +0200, Michal Hocko wrote: > On Wed 26-10-16 00:46:31, Lorenzo Stoakes wrote: > > The holdout for unexporting __get_user_pages_unlocked() is its invocation in > > mm/process_vm_access.c: process_vm_rw_single_vec(), as this definitely >

Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-26 Thread Lorenzo Stoakes
On Wed, Oct 26, 2016 at 11:15:43AM +0200, Michal Hocko wrote: > On Wed 26-10-16 00:46:31, Lorenzo Stoakes wrote: > > The holdout for unexporting __get_user_pages_unlocked() is its invocation in > > mm/process_vm_access.c: process_vm_rw_single_vec(), as this definitely >

[PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-26 Thread Lorenzo Stoakes
get_user_pages_remote() reintroduces use of the FOLL_TOUCH flag. However, this flag was originally silently dropped by 1e9877902dc7e ("mm/gup: Introduce get_user_pages_remote()"), so this appears to have been unintentional and reintroducing it is therefore not an issue. Signed-off-b

[PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-26 Thread Lorenzo Stoakes
get_user_pages_remote() reintroduces use of the FOLL_TOUCH flag. However, this flag was originally silently dropped by 1e9877902dc7e ("mm/gup: Introduce get_user_pages_remote()"), so this appears to have been unintentional and reintroducing it is therefore not an issue. Signed-off-b

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-26 Thread Lorenzo Stoakes
On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote: >I am wondering whether we can go further. E.g. it is not really clear to >me whether we need an explicit FOLL_REMOTE when we can in fact check >mm != current->mm and imply that. Maybe there are some contexts which >wouldn't work, I

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-26 Thread Lorenzo Stoakes
On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote: >I am wondering whether we can go further. E.g. it is not really clear to >me whether we need an explicit FOLL_REMOTE when we can in fact check >mm != current->mm and imply that. Maybe there are some contexts which >wouldn't work, I

Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-26 Thread Lorenzo Stoakes
On Wed, Oct 26, 2016 at 12:36:09AM +0100, Lorenzo Stoakes wrote: > In hva_to_pfn_slow() we are able to replace __get_user_pages_unlocked() with > get_user_pages_unlocked() since we can now pass gup_flags. > > In async_pf_execute() we need to pass different tsk, mm

Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-26 Thread Lorenzo Stoakes
On Wed, Oct 26, 2016 at 12:36:09AM +0100, Lorenzo Stoakes wrote: > In hva_to_pfn_slow() we are able to replace __get_user_pages_unlocked() with > get_user_pages_unlocked() since we can now pass gup_flags. > > In async_pf_execute() we need to pass different tsk, mm

Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-25 Thread Lorenzo Stoakes
The holdout for unexporting __get_user_pages_unlocked() is its invocation in mm/process_vm_access.c: process_vm_rw_single_vec(), as this definitely _does_ seem to invoke VM_FAULT_RETRY behaviour which get_user_pages_remote() will not trigger if we were to replace it with the latter. I'm not sure

Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-25 Thread Lorenzo Stoakes
The holdout for unexporting __get_user_pages_unlocked() is its invocation in mm/process_vm_access.c: process_vm_rw_single_vec(), as this definitely _does_ seem to invoke VM_FAULT_RETRY behaviour which get_user_pages_remote() will not trigger if we were to replace it with the latter. I'm not sure

[PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-25 Thread Lorenzo Stoakes
-by: Lorenzo Stoakes <lstoa...@gmail.com> --- virt/kvm/async_pf.c | 7 --- virt/kvm/kvm_main.c | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 8035cc1..e8c832c 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/asyn

[PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

2016-10-25 Thread Lorenzo Stoakes
-by: Lorenzo Stoakes --- virt/kvm/async_pf.c | 7 --- virt/kvm/kvm_main.c | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 8035cc1..e8c832c 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c @@ -82,10 +82,11 @@ static

[PATCH] mm: fixup get_user_pages* comments

2016-10-25 Thread Lorenzo Stoakes
parameters which were removed in c12d2da5 ("mm/gup: Remove the macro overload API migration helpers from the get_user*() APIs"), this patch fixes this also. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- mm/gup.c | 16 ++-- 1 file changed, 6 insertions(+), 10 de

[PATCH] mm: fixup get_user_pages* comments

2016-10-25 Thread Lorenzo Stoakes
parameters which were removed in c12d2da5 ("mm/gup: Remove the macro overload API migration helpers from the get_user*() APIs"), this patch fixes this also. Signed-off-by: Lorenzo Stoakes --- mm/gup.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mm/

[PATCH] mm: unexport __get_user_pages()

2016-10-24 Thread Lorenzo Stoakes
se, flags | FOLL_TOUCH) __get_user_pages(current, current->mm, addr, 1, flags | FOLL_TOUCH, NULL, NULL, NULL) Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- include/linux/mm.h | 4 mm/gup.c| 3 +-- mm/nommu.c | 2 +- virt/k

[PATCH] mm: unexport __get_user_pages()

2016-10-24 Thread Lorenzo Stoakes
se, flags | FOLL_TOUCH) __get_user_pages(current, current->mm, addr, 1, flags | FOLL_TOUCH, NULL, NULL, NULL) Signed-off-by: Lorenzo Stoakes --- include/linux/mm.h | 4 mm/gup.c| 3 +-- mm/nommu.c | 2 +- virt/kvm/kvm_main.c | 10 -- 4 file

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-19 Thread Lorenzo Stoakes
On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote: > I am wondering whether we can go further. E.g. it is not really clear to > me whether we need an explicit FOLL_REMOTE when we can in fact check > mm != current->mm and imply that. Maybe there are some contexts which > wouldn't work, I

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-19 Thread Lorenzo Stoakes
On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote: > I am wondering whether we can go further. E.g. it is not really clear to > me whether we need an explicit FOLL_REMOTE when we can in fact check > mm != current->mm and imply that. Maybe there are some contexts which > wouldn't work, I

Re: [PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-19 Thread Lorenzo Stoakes
On Wed, Oct 19, 2016 at 10:52:05AM +0200, Michal Hocko wrote: > yes this is the desirable and expected behavior. > > > wonder if this is desirable behaviour or whether this ought to be limited to > > ptrace system calls. Regardless, by making the flag more visible it makes it > > easier to see

Re: [PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-19 Thread Lorenzo Stoakes
On Wed, Oct 19, 2016 at 10:52:05AM +0200, Michal Hocko wrote: > yes this is the desirable and expected behavior. > > > wonder if this is desirable behaviour or whether this ought to be limited to > > ptrace system calls. Regardless, by making the flag more visible it makes it > > easier to see

Re: [PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-19 Thread Lorenzo Stoakes
On Wed, Oct 19, 2016 at 10:13:52AM +0200, Michal Hocko wrote: > On Wed 19-10-16 09:59:03, Jan Kara wrote: > > On Thu 13-10-16 01:20:18, Lorenzo Stoakes wrote: > > > This patch removes the write parameter from __access_remote_vm() and > > > replaces it > > &g

Re: [PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-19 Thread Lorenzo Stoakes
On Wed, Oct 19, 2016 at 10:13:52AM +0200, Michal Hocko wrote: > On Wed 19-10-16 09:59:03, Jan Kara wrote: > > On Thu 13-10-16 01:20:18, Lorenzo Stoakes wrote: > > > This patch removes the write parameter from __access_remote_vm() and > > > replaces it > > &g

Re: [PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-18 Thread Lorenzo Stoakes
On Tue, Oct 18, 2016 at 02:54:25PM +0200, Jan Kara wrote: > > @@ -1282,7 +1282,7 @@ long get_user_pages(unsigned long start, unsigned > > long nr_pages, > > int write, int force, struct page **pages, > > struct vm_area_struct **vmas); > > long

Re: [PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-18 Thread Lorenzo Stoakes
On Tue, Oct 18, 2016 at 02:54:25PM +0200, Jan Kara wrote: > > @@ -1282,7 +1282,7 @@ long get_user_pages(unsigned long start, unsigned > > long nr_pages, > > int write, int force, struct page **pages, > > struct vm_area_struct **vmas); > > long

[PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-13 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_locked() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

[PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-13 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_locked() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

[PATCH 10/10] mm: replace access_process_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- arch/alpha/kernel/ptrace.c | 9 ++--- arch/blackfin/kernel/ptrace.c | 5 +++-- arch/cris/arch-v32/kernel/ptrace.c | 4 ++-- arch/ia64/kernel/ptrace.c

[PATCH 10/10] mm: replace access_process_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes --- arch/alpha/kernel/ptrace.c | 9 ++--- arch/blackfin/kernel/ptrace.c | 5 +++-- arch/cris/arch-v32/kernel/ptrace.c | 4 ++-- arch/ia64/kernel/ptrace.c | 14 +- arch/m32r

[PATCH 06/10] mm: replace get_user_pages() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 06/10] mm: replace get_user_pages() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 05/10] mm: replace get_vaddr_frames() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_vaddr_frames() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 05/10] mm: replace get_vaddr_frames() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_vaddr_frames() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- mm/memory.c | 23 +++ mm/nommu.c | 9 ++--- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 20a9adb..79ebed3

[PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes --- mm/memory.c | 23 +++ mm/nommu.c | 9 ++--- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 20a9adb..79ebed3 100644 --- a/mm/memory.c +++ b

[PATCH 09/10] mm: replace access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com> --- fs/proc/base.c | 19 +-- include/linux/mm.h | 2 +- mm/memory.c| 11 +++ mm/nommu.c | 7 +++ 4 files changed, 20 insertions(+), 19 del

[PATCH 09/10] mm: replace access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes --- fs/proc/base.c | 19 +-- include/linux/mm.h | 2 +- mm/memory.c| 11 +++ mm/nommu.c | 7 +++ 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/fs/proc

[PATCH 07/10] mm: replace get_user_pages_remote() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_remote() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

  1   2   3   >