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: <6b07c48d-656f-4e42-bfa7-0ecead72a7b8@csgroup.eu>
Date: Tue, 3 Sep 2024 19:18:26 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Charlie Jenkins <charlie@...osinc.com>, Arnd Bergmann <arnd@...db.de>,
 Richard Henderson <richard.henderson@...aro.org>,
 Ivan Kokshaysky <ink@...assic.park.msu.ru>, Matt Turner
 <mattst88@...il.com>, Vineet Gupta <vgupta@...nel.org>,
 Russell King <linux@...linux.org.uk>, Guo Ren <guoren@...nel.org>,
 Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>,
 Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
 Helge Deller <deller@....de>, Michael Ellerman <mpe@...erman.id.au>,
 Nicholas Piggin <npiggin@...il.com>, Naveen N Rao <naveen@...nel.org>,
 Alexander Gordeev <agordeev@...ux.ibm.com>,
 Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
 Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
 Christian Borntraeger <borntraeger@...ux.ibm.com>,
 Sven Schnelle <svens@...ux.ibm.com>,
 Yoshinori Sato <ysato@...rs.sourceforge.jp>, Rich Felker <dalias@...c.org>,
 John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
 "David S. Miller" <davem@...emloft.net>,
 Andreas Larsson <andreas@...sler.com>, Thomas Gleixner <tglx@...utronix.de>,
 Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
 Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
 "H. Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>,
 Peter Zijlstra <peterz@...radead.org>, Muchun Song <muchun.song@...ux.dev>,
 Andrew Morton <akpm@...ux-foundation.org>,
 "Liam R. Howlett" <Liam.Howlett@...cle.com>, Vlastimil Babka
 <vbabka@...e.cz>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 Shuah Khan <shuah@...nel.org>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-alpha@...r.kernel.org, linux-snps-arc@...ts.infradead.org,
 linux-arm-kernel@...ts.infradead.org, linux-csky@...r.kernel.org,
 loongarch@...ts.linux.dev, linux-mips@...r.kernel.org,
 linux-parisc@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
 linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
 sparclinux@...r.kernel.org, linux-mm@...ck.org,
 linux-kselftest@...r.kernel.org
Subject: Re: [PATCH RFC v2 2/4] mm: Add hint and mmap_flags to struct
 vm_unmapped_area_info

Hi Charlie,

Le 29/08/2024 à 09:15, Charlie Jenkins a écrit :
> The hint address and mmap_flags are necessary to determine if
> MAP_BELOW_HINT requirements are satisfied.
> 
> Signed-off-by: Charlie Jenkins <charlie@...osinc.com>
> ---
>   arch/alpha/kernel/osf_sys.c      | 2 ++
>   arch/arc/mm/mmap.c               | 3 +++
>   arch/arm/mm/mmap.c               | 7 +++++++
>   arch/csky/abiv1/mmap.c           | 3 +++
>   arch/loongarch/mm/mmap.c         | 3 +++
>   arch/mips/mm/mmap.c              | 3 +++
>   arch/parisc/kernel/sys_parisc.c  | 3 +++
>   arch/powerpc/mm/book3s64/slice.c | 7 +++++++
>   arch/s390/mm/hugetlbpage.c       | 4 ++++
>   arch/s390/mm/mmap.c              | 6 ++++++
>   arch/sh/mm/mmap.c                | 6 ++++++
>   arch/sparc/kernel/sys_sparc_32.c | 3 +++
>   arch/sparc/kernel/sys_sparc_64.c | 6 ++++++
>   arch/sparc/mm/hugetlbpage.c      | 4 ++++
>   arch/x86/kernel/sys_x86_64.c     | 6 ++++++
>   arch/x86/mm/hugetlbpage.c        | 4 ++++
>   fs/hugetlbfs/inode.c             | 4 ++++
>   include/linux/mm.h               | 2 ++
>   mm/mmap.c                        | 6 ++++++
>   19 files changed, 82 insertions(+)
> 

>   
> diff --git a/arch/powerpc/mm/book3s64/slice.c b/arch/powerpc/mm/book3s64/slice.c
> index ef3ce37f1bb3..f0e2550af6d0 100644
> --- a/arch/powerpc/mm/book3s64/slice.c
> +++ b/arch/powerpc/mm/book3s64/slice.c
> @@ -286,6 +286,10 @@ static unsigned long slice_find_area_bottomup(struct mm_struct *mm,
>   		.length = len,
>   		.align_mask = PAGE_MASK & ((1ul << pshift) - 1),
>   	};
> +
> +	info.hint = addr;
> +	info.mmap_flags = flags;
> +
>   	/*
>   	 * Check till the allow max value for this mmap request
>   	 */
> @@ -331,6 +335,9 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
>   	};
>   	unsigned long min_addr = max(PAGE_SIZE, mmap_min_addr);
>   
> +	info.hint = addr;
> +	info.mmap_flags = flags;
> +
>   	/*
>   	 * If we are trying to allocate above DEFAULT_MAP_WINDOW
>   	 * Add the different to the mmap_base.

ppc64_defconfig:

   CC      arch/powerpc/mm/book3s64/slice.o
arch/powerpc/mm/book3s64/slice.c: In function 'slice_find_area_bottomup':
arch/powerpc/mm/book3s64/slice.c:291:27: error: 'flags' undeclared 
(first use in this function)
   291 |         info.mmap_flags = flags;
       |                           ^~~~~
arch/powerpc/mm/book3s64/slice.c:291:27: note: each undeclared 
identifier is reported only once for each function it appears in
arch/powerpc/mm/book3s64/slice.c: In function 'slice_find_area_topdown':
arch/powerpc/mm/book3s64/slice.c:339:27: error: 'flags' undeclared 
(first use in this function)
   339 |         info.mmap_flags = flags;
       |                           ^~~~~
make[5]: *** [scripts/Makefile.build:244: 
arch/powerpc/mm/book3s64/slice.o] Error 1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ