From: Alexei Starovoitov <[email protected]>
To: Rick Edgecombe <[email protected]>
Cc: [email protected],
Andrew Morton <[email protected]>,
Borislav Petkov <[email protected]>, Mark Brown <[email protected]>,
Christophe Leroy <[email protected]>,
Dave Hansen <[email protected]>,
[email protected], "H. Peter Anvin" <[email protected]>,
Kees Cook <[email protected]>,
"Kirill A. Shutemov" <[email protected]>,
Andy Lutomirski <[email protected]>,
Ingo Molnar <[email protected]>,
Peter Zijlstra <[email protected]>,
Thomas Gleixner <[email protected]>, X86 ML <[email protected]>,
LKML <[email protected]>,
linux-mm <[email protected]>,
linux-s390 <[email protected]>,
[email protected], [email protected],
[email protected], [email protected],
Linux-Fsdevel <[email protected]>,
[email protected], bpf <[email protected]>
Subject: Re: [PATCH v4 02/14] mm: Switch mm->get_unmapped_area() to a flag
Date: Mon, 25 Mar 2024 20:32:40 -0700 [thread overview]
Message-ID: <CAADnVQKHtRX2WS9c2qcMUJTmNNda+attkXoiNurFyMKvHNfa=A@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
On Mon, Mar 25, 2024 at 7:17 PM Rick Edgecombe
<[email protected]> wrote:
>
>
> diff --git a/mm/util.c b/mm/util.c
> index 669397235787..8619d353a1aa 100644
> --- a/mm/util.c
> +++ b/mm/util.c
> @@ -469,17 +469,17 @@ void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack)
>
> if (mmap_is_legacy(rlim_stack)) {
> mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
> - mm->get_unmapped_area = arch_get_unmapped_area;
> + clear_bit(MMF_TOPDOWN, &mm->flags);
> } else {
> mm->mmap_base = mmap_base(random_factor, rlim_stack);
> - mm->get_unmapped_area = arch_get_unmapped_area_topdown;
> + set_bit(MMF_TOPDOWN, &mm->flags);
> }
> }
> #elif defined(CONFIG_MMU) && !defined(HAVE_ARCH_PICK_MMAP_LAYOUT)
> void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack)
> {
> mm->mmap_base = TASK_UNMAPPED_BASE;
> - mm->get_unmapped_area = arch_get_unmapped_area;
> + clear_bit(MMF_TOPDOWN, &mm->flags);
> }
> #endif
Makes sense to me.
Acked-by: Alexei Starovoitov <[email protected]>
for the idea and for bpf bits.
next prev parent reply other threads:[~2024-03-26 3:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[email protected]>
2024-03-26 2:16 ` [PATCH v4 02/14] mm: Switch mm->get_unmapped_area() to a flag Rick Edgecombe
2024-03-26 3:32 ` Alexei Starovoitov [this message]
2024-03-26 11:57 ` Jarkko Sakkinen
2024-03-27 2:42 ` Edgecombe, Rick P
2024-03-27 13:15 ` Jarkko Sakkinen
2024-03-28 3:32 ` Edgecombe, Rick P
2024-03-27 6:38 ` Dan Williams
2024-03-28 3:31 ` Edgecombe, Rick P
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='CAADnVQKHtRX2WS9c2qcMUJTmNNda+attkXoiNurFyMKvHNfa=A@mail.gmail.com' \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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