From: Shivam Kalra <shivamkalra98@zohomail.in>
To: Uladzislau Rezki <urezki@gmail.com>, Alice Ryhl <aliceryhl@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Danilo Krummrich <dakr@kernel.org>
Subject: Re: [PATCH v10 0/4] mm/vmalloc: free unused pages on vrealloc() shrink
Date: Fri, 17 Apr 2026 19:05:09 +0530 [thread overview]
Message-ID: <85a9f419-7f1e-41a0-9e8e-67aae7a1b0fe@zohomail.in> (raw)
In-Reply-To: <ad_cpqx38LtQPlX8@milan>
On 16/04/26 00:14, Uladzislau Rezki wrote:
> Yep, the problem reported by Sashiko regarding area->size and vread_iter()
> is correct. V10 does not address this.
>
> I am not sure that reducing vma size is a good approach here. It is
> widely used and we might end up with fixing even more corner cases.
>
> vread_iter() and vm-size calculation there should be fixed.
>
> --
> Uladzislau Rezki
Proposed Change for v11:
long vread_iter(struct iov_iter *iter, const char *addr, size_t count)
{
struct vmap_node *vn;
struct vmap_area *va;
struct vm_struct *vm;
char *vaddr;
<snip>
vaddr = (char *) va->va_start;
size = vm ? get_vm_area_size(vm) : va_size(va);
if (vm && vm->nr_pages)
size = min(size, (size_t)vm->nr_pages << PAGE_SHIFT);
<snip>
next prev parent reply other threads:[~2026-04-17 13:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-04 8:36 Shivam Kalra via B4 Relay
2026-04-04 8:36 ` [PATCH v10 1/4] mm/vmalloc: extract vm_area_free_pages() helper from vfree() Shivam Kalra via B4 Relay
2026-04-04 8:36 ` [PATCH v10 2/4] mm/vmalloc: use physical page count for vrealloc() grow-in-place check Shivam Kalra via B4 Relay
2026-04-04 8:36 ` [PATCH v10 3/4] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra via B4 Relay
2026-04-04 8:37 ` [PATCH v10 4/4] lib/test_vmalloc: add vrealloc test case Shivam Kalra via B4 Relay
2026-04-14 8:39 ` [PATCH v10 0/4] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-04-14 16:57 ` Alice Ryhl
2026-04-15 18:44 ` Uladzislau Rezki
2026-04-16 7:38 ` Shivam Kalra
2026-04-17 13:35 ` Shivam Kalra [this message]
2026-04-17 17:24 ` Uladzislau Rezki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85a9f419-7f1e-41a0-9e8e-67aae7a1b0fe@zohomail.in \
--to=shivamkalra98@zohomail.in \
--cc=akpm@linux-foundation.org \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=urezki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox