From: Paul Moore <paul@paul-moore.com>
To: Marc Reisner <reisner.marc@gmail.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
akpm@linux-foundation.org, david@redhat.com, linux-mm@kvack.org,
omosnace@redhat.com, peterz@infradead.org,
selinux@vger.kernel.org, Vlastimil Babka <vbabka@suse.cz>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Subject: Re: [PATCH v3 3/4] selinux: use vma_is_initial_stack() and vma_is_initial_heap()
Date: Thu, 8 Aug 2024 16:40:55 -0400 [thread overview]
Message-ID: <CAHC9VhS2T+Ld0hpP9aioJKEMkjUH-iQbHbiRkAPHgCWJgDBaQw@mail.gmail.com> (raw)
In-Reply-To: <ZrUd-ZUe12FahKIc@marcreisner.com>
On Thu, Aug 8, 2024 at 3:35 PM Marc Reisner <reisner.marc@gmail.com> wrote:
> On Thu, Aug 08, 2024 at 02:00:09PM -0400, Liam R. Howlett wrote:
> > Have a look at the mmapstress 3 test in ltp [1]. The tests pokes holes
> > and mmaps into those holes throughout the brk range.
> >
> > [1]. https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/mem/mmapstress/mmapstress03.c
>
> In investigating this further, with additional reproducers, I believe
> that the whole bug is in vma_is_initial_heap().
That's my feeling at this point too. Unfortunately, there are a few
callers other than SELinux so I don't want to change the helper
function without an explicit ACK from the mm folks and I think now
that we understand the problem we want to get this fixed ASAP in
Linus' tree (and get it marked for -stable).
I just posted a patch that reverts just our use of
vma_is_initial_heap() in favor of our old logic and adds a few lines
of comments about the problem with vma_is_initial_heap(). I'm okay
with moving back to vma_is_initial_heap() when it's fixed, but I'd
prefer it to be fixed for a while before we transition back to it.
We've gotten burned twice now with vma_is_initial_heap() so I'm going
to be a little extra cautious here.
https://lore.kernel.org/selinux/20240808203353.202352-2-paul@paul-moore.com
> What do you all think about this patch? If it doesn't have any obvious
> flaws I can submit it (along with a revert for the revert).
I'll leave the mm folks to weigh in on the fix to
vma_is_initial_heap(), but as I said above, please don't submit a
patch to SELinux right now, I want the fixed version of
vma_is_initial_heap() to "soak" for a bit before we go back to it.
--
paul-moore.com
next prev parent reply other threads:[~2024-08-08 20:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 5:00 [PATCH v3 0/4] mm: convert to vma_is_initial_heap/stack() Kefeng Wang
2023-07-28 5:00 ` [PATCH v3 1/4] mm: factor out VMA stack and heap checks Kefeng Wang
2023-07-28 5:00 ` [PATCH v3 2/4] drm/amdkfd: use vma_is_initial_stack() and vma_is_initial_heap() Kefeng Wang
2023-07-28 5:00 ` [PATCH v3 3/4] selinux: " Kefeng Wang
[not found] ` <CAEjxPJ5ZuBGVDah0f3g0-7t2v1uSXTmp_cTT3g_MSP3J9QtoeA@mail.gmail.com>
[not found] ` <CAHC9VhR_Tzbs=fE+D6VrP1boe7O_uHPu9yd7kfVppnB2vtPLOA@mail.gmail.com>
[not found] ` <CAEjxPJ6iFRZUetSvMgZvq_327U_JZ_w9s=gFccKgJhfCt8bqNg@mail.gmail.com>
[not found] ` <CAHC9VhRB1uVVWFUgnMZ1iwCD_A0mEX2Xhn79qTxuNKTzisWULg@mail.gmail.com>
2023-12-06 14:22 ` Ondrej Mosnacek
2023-12-06 20:47 ` Paul Moore
2023-12-07 4:50 ` Kefeng Wang
2023-12-07 8:37 ` Ondrej Mosnacek
2023-12-07 9:23 ` Kefeng Wang
[not found] ` <ZrPmoLKJEf1wiFmM@marcreisner.com>
[not found] ` <CAHC9VhSWVdiuK+VtbjV6yJiCp=2+6Bji_86mSkj1eeRL4g_Jfg@mail.gmail.com>
[not found] ` <7fb19e0a-118d-46a1-8d1b-ab71c545d7ed@huawei.com>
[not found] ` <0806d149-905c-49b2-930f-5d6d0f8890c9@huawei.com>
[not found] ` <CAEjxPJ5S9sz4PaRMVLyP6PWdLCG_bBxj7nw53EhU5+L1TM7kFg@mail.gmail.com>
[not found] ` <4d2e1d4f-659a-428f-a167-faaaa4eca18a@huawei.com>
[not found] ` <ZrTeT8_pzD8fH-_P@marcreisner.com>
2024-08-08 18:00 ` Liam R. Howlett
2024-08-08 19:35 ` Marc Reisner
2024-08-08 20:40 ` Paul Moore [this message]
2023-07-28 5:00 ` [PATCH v3 4/4] perf/core: " Kefeng Wang
2023-07-31 13:47 ` [PATCH v3 0/4] mm: convert to vma_is_initial_heap/stack() Peter Zijlstra
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=CAHC9VhS2T+Ld0hpP9aioJKEMkjUH-iQbHbiRkAPHgCWJgDBaQw@mail.gmail.com \
--to=paul@paul-moore.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=omosnace@redhat.com \
--cc=peterz@infradead.org \
--cc=reisner.marc@gmail.com \
--cc=selinux@vger.kernel.org \
--cc=vbabka@suse.cz \
--cc=wangkefeng.wang@huawei.com \
/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