Re: [PATCH 6.4 00/28] 6.4.1-rc1 review - hppa argument list too long

From: Linus Torvalds
Date: Mon Jul 03 2023 - 00:49:52 EST


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));