* [PATCH] mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines
@ 2024-07-12 15:58 Yang Shi
2024-07-13 1:20 ` David Hildenbrand
2024-07-19 9:19 ` Yves-Alexis Perez
0 siblings, 2 replies; 4+ messages in thread
From: Yang Shi @ 2024-07-12 15:58 UTC (permalink / raw)
To: corsac, willy, jirislaby, surenb, riel, cl, carnil, ben, akpm
Cc: yang, linux-mm, linux-kernel, stable
Yves-Alexis Perez reported commit 4ef9ad19e176 ("mm: huge_memory: don't
force huge page alignment on 32 bit") didn't work for x86_32 [1]. It is
because x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT.
!CONFIG_64BIT should cover all 32 bit machines.
[1] https://lore.kernel.org/linux-mm/CAHbLzkr1LwH3pcTgM+aGQ31ip2bKqiqEQ8=FQB+t2c3dhNKNHA@mail.gmail.com/
Fixes: 4ef9ad19e176 ("mm: huge_memory: don't force huge page alignment on 32 bit")
Reported-by: Yves-Alexis Perez <corsac@debian.org>
Tested-By: Yves-Alexis Perez <corsac@debian.org>
Cc: <stable@vger.kernel.org> [6.8+]
Signed-off-by: Yang Shi <yang@os.amperecomputing.com>
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 2120f7478e55..64f00aedf9af 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -857,7 +857,7 @@ static unsigned long __thp_get_unmapped_area(struct file *filp,
loff_t off_align = round_up(off, size);
unsigned long len_pad, ret, off_sub;
- if (IS_ENABLED(CONFIG_32BIT) || in_compat_syscall())
+ if (!IS_ENABLED(CONFIG_64BIT) || in_compat_syscall())
return 0;
if (off_end <= off_align || (off_end - off_align) < size)
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines
2024-07-12 15:58 [PATCH] mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines Yang Shi
@ 2024-07-13 1:20 ` David Hildenbrand
2024-07-19 9:19 ` Yves-Alexis Perez
1 sibling, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2024-07-13 1:20 UTC (permalink / raw)
To: Yang Shi, corsac, willy, jirislaby, surenb, riel, cl, carnil, ben,
akpm
Cc: linux-mm, linux-kernel, stable
On 12.07.24 17:58, Yang Shi wrote:
> Yves-Alexis Perez reported commit 4ef9ad19e176 ("mm: huge_memory: don't
> force huge page alignment on 32 bit") didn't work for x86_32 [1]. It is
> because x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT.
>
> !CONFIG_64BIT should cover all 32 bit machines.
>
> [1] https://lore.kernel.org/linux-mm/CAHbLzkr1LwH3pcTgM+aGQ31ip2bKqiqEQ8=FQB+t2c3dhNKNHA@mail.gmail.com/
>
> Fixes: 4ef9ad19e176 ("mm: huge_memory: don't force huge page alignment on 32 bit")
> Reported-by: Yves-Alexis Perez <corsac@debian.org>
> Tested-By: Yves-Alexis Perez <corsac@debian.org>
> Cc: <stable@vger.kernel.org> [6.8+]
> Signed-off-by: Yang Shi <yang@os.amperecomputing.com>
> ---
> mm/huge_memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 2120f7478e55..64f00aedf9af 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -857,7 +857,7 @@ static unsigned long __thp_get_unmapped_area(struct file *filp,
> loff_t off_align = round_up(off, size);
> unsigned long len_pad, ret, off_sub;
>
> - if (IS_ENABLED(CONFIG_32BIT) || in_compat_syscall())
> + if (!IS_ENABLED(CONFIG_64BIT) || in_compat_syscall())
> return 0;
>
> if (off_end <= off_align || (off_end - off_align) < size)
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines
2024-07-12 15:58 [PATCH] mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines Yang Shi
2024-07-13 1:20 ` David Hildenbrand
@ 2024-07-19 9:19 ` Yves-Alexis Perez
2024-07-19 20:46 ` Andrew Morton
1 sibling, 1 reply; 4+ messages in thread
From: Yves-Alexis Perez @ 2024-07-19 9:19 UTC (permalink / raw)
To: Yang Shi, willy, jirislaby, surenb, riel, cl, carnil, ben, akpm
Cc: linux-mm, linux-kernel, stable
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Fri, 2024-07-12 at 08:58 -0700, Yang Shi wrote:
> Yves-Alexis Perez reported commit 4ef9ad19e176 ("mm: huge_memory: don't
> force huge page alignment on 32 bit") didn't work for x86_32 [1]. It is
> because x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT.
>
> !CONFIG_64BIT should cover all 32 bit machines.
Hi,
I've noticed that the patch was integrated into the -mm tree and next/master.
It's not yet in the first half of the merge window for 6.11 but do you know if
it's scheduled for rc1?
Regards,
- --
Yves-Alexis
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAmaaL5wACgkQ3rYcyPpX
RFtzIQf8Dn0wqm4ZDeAvoxX+xPTn5Qhu5T1tDZfnryL584DRroe5PyYr5uI+BL7W
oMfPc+cNYUmGRPc8qmbAhg5K18xlfmPfUDq4idWzLMjpUnmEZflWgrGFvRgJmTo5
Kq2MRxpLi38M9GTeqG3MKtWxouKilch9n1ukmQhV9H0DUtiiS3EhITt9X7PbJ7Zc
yvPtdRcdHXRXSl0x/0hztQy4xuKSJxGQULGoSL0HyS8R9OCj+0hDFgEz98YkSbYW
6pZ8+iZLc+OXEkjKfC3uwI/q0Dw3eZW1zIyPn7ahYteisBr+HfKwoGz7UNzw3aB4
/BB3VA+A7/ikJ9NIwjgSlGTmZso73A==
=1puG
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines
2024-07-19 9:19 ` Yves-Alexis Perez
@ 2024-07-19 20:46 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2024-07-19 20:46 UTC (permalink / raw)
To: Yves-Alexis Perez
Cc: Yang Shi, willy, jirislaby, surenb, riel, cl, carnil, ben,
linux-mm, linux-kernel, stable
On Fri, 19 Jul 2024 11:19:24 +0200 Yves-Alexis Perez <corsac@debian.org> wrote:
> On Fri, 2024-07-12 at 08:58 -0700, Yang Shi wrote:
> > Yves-Alexis Perez reported commit 4ef9ad19e176 ("mm: huge_memory: don't
> > force huge page alignment on 32 bit") didn't work for x86_32 [1]. It is
> > because x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT.
> >
> > !CONFIG_64BIT should cover all 32 bit machines.
>
> Hi,
>
> I've noticed that the patch was integrated into the -mm tree and next/master.
> It's not yet in the first half of the merge window for 6.11 but do you know if
> it's scheduled for rc1?
I put it in the mm-hotfixes branch since it's cc:stable. I expect to
send the hotfixes to Linus next week.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-19 20:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 15:58 [PATCH] mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines Yang Shi
2024-07-13 1:20 ` David Hildenbrand
2024-07-19 9:19 ` Yves-Alexis Perez
2024-07-19 20:46 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).