Re: [PATCH RFC v2 2/4] mm: Add hint and mmap_flags to struct vm_unmapped_area_info

Lorenzo Stoakes <[email protected]>
Newsgroups gmane.linux.ports.ppc64.devel,gmane.linux.kernel.cross-arch,gmane.linux.kernel,gmane.linux.ports.alpha,gmane.linux.kernel.arc,gmane.linux.ports.arm.kernel,gmane.linux.ports.mips,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.ports.sparc,gmane.linux.kernel.mm
Message-ID <[email protected]>
On Thu, Aug 29, 2024 at 12:15:59AM GMT, Charlie Jenkins wrote:

[snip]

> diff --git a/mm/mmap.c b/mm/mmap.c
> index d0dfc85b209b..34ba0db23678 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -1796,6 +1796,9 @@ generic_get_unmapped_area(struct file *filp, unsigned long addr,
>  	struct vm_unmapped_area_info info = {};
>  	const unsigned long mmap_end = arch_get_mmap_end(addr, len, flags);
>
> +	info.hint = addr;
> +	info.mmap_flags = flags;
> +
>  	if (len > mmap_end - mmap_min_addr)
>  		return -ENOMEM;
>
> @@ -1841,6 +1844,9 @@ generic_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
>  	struct vm_unmapped_area_info info = {};
>  	const unsigned long mmap_end = arch_get_mmap_end(addr, len, flags);
>
> +	info.hint = addr;
> +	info.mmap_flags = flags;
> +
>  	/* requested length too big for entire address space */
>  	if (len > mmap_end - mmap_min_addr)
>  		return -ENOMEM;
>

These line numbers suggest you're working against Linus's tree, mm/mmap.c
has changed a lot recently, so to avoid conflicts please base your changes
on mm-unstable in Andrew's tree (if looking to go through that) or at least
-next.

> --
> 2.45.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.