lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02ba63ed-ef1c-426d-b469-09878c5f03d7@vivo.com>
Date: Mon, 31 Mar 2025 10:05:53 +0800
From: Huan Yang <link@...o.com>
To: "Vishal Moola (Oracle)" <vishal.moola@...il.com>, linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
 Brendan Jackman <jackmanb@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 0/1] Introduce vmap_file()

HI Vishal,

在 2025/3/29 05:13, Vishal Moola (Oracle) 写道:
> Currently, users have to call vmap() or vmap_pfn() to map pages to
> kernel virtual space. vmap_pfn() is for special pages (i.e. pfns
> without struct page). vmap() handles normal pages.
>
> With large folios, we may want to map ranges that only span
> part of a folio (i.e. mapping half of a 2Mb folio).
> vmap_file() will allow us to do so.

You mention vmap_file can support range folio vmap, but when I look code, I can't figure out

how to use, maybe I missed something? :)

And this API still aim to file vmap, Maybe not suitable for the problem I mentioned in:

https://lore.kernel.org/lkml/20250312061513.1126496-1-link@vivo.com/

Thanks,
Huan Yang

>   
> Create a function, vmap_file(), to map a specified range of a given
> file to kernel virtual space. vmap_file() is an in-kernel equivalent
> to mmap(), and can be useful for filesystems.
>
> ---
> v2:
>    - Reword cover letter to provide a clearer overview of the current
>    vmalloc APIs, and usefulness of vmap_file()
>    - EXPORT_SYMBOL_GPL() instead of EXPORT_SYMBOL()
>    - Provide support to partially map file folios
>    - Demote this to RFC while we look for users
> --
> I don't have a user for this function right now, but it will be
> useful as users start converting to using large folios. I'm just
> putting it out here for anyone that may find a use for it.
>
> This seems like the sensible way to implement it, but I'm open
> to tweaking the functions semantics.
>
> I've Cc-ed a couple people that mentioned they might be interested
> in using it.
>
> Vishal Moola (Oracle) (1):
>    mm/vmalloc: Introduce vmap_file()
>
>   include/linux/vmalloc.h |   2 +
>   mm/vmalloc.c            | 113 ++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 115 insertions(+)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ