On Sun, 2 Jul 2023 at 21:46, Guenter Roeck <linux@xxxxxxxxxxxx> wrote: > > Sorry, you lost me. Isn't that the same patch as before ? Or > is it just time for me to go to bed ? No, I think it's time for *me* to go to bed. Let's get the right diff this time. Linus
fs/exec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index 1a827d55ba94..50462ee6085c 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -212,6 +212,9 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, ret = expand_downwards(vma, pos); if (unlikely(ret < 0)) { mmap_write_unlock(mm); + pr_warn("stack expand failed: %lx-%lx (%lx)\n", + vma->vm_start, vma->vm_end, pos); + WARN_ON_ONCE(1); return NULL; } mmap_write_downgrade(mm); @@ -226,8 +229,12 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, write ? FOLL_WRITE : 0, &page, NULL); mmap_read_unlock(mm); - if (ret <= 0) + if (ret <= 0) { + pr_warn("get_user_pages_remote failed: %lx-%lx (%lx)\n", + vma->vm_start, vma->vm_end, pos); + WARN_ON_ONCE(1); return NULL; + } if (write) acct_arg_size(bprm, vma_pages(vma));