From: sashiko-bot@kernel.org
To: "Ondrej Mosnacek" <omosnace@redhat.com>
Cc: selinux@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2] perf test amd ibs: avoid using executable heap
Date: Wed, 01 Jul 2026 06:33:17 +0000 [thread overview]
Message-ID: <20260701063318.0C14D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260701062321.517351-1-omosnace@redhat.com>
> Making [parts of] the heap executable is dangerous and is blocked by
> SELinux on Fedora/RHEL even for an unconfined user. Replace the malloc()
> + mprotect() combo with just mmap(), creating a private anonymous rwx
> mapping, which only requires the more commonly allowed "execmem"
> permission under SELinux (things like JIT or regex compilation need it
> as well). mmap() with MAP_ANONYMOUS will give us a zeroed mapping that
> begins on a page boundary, so the result is equivalent to the original
> code even without a memset() or the page-alignment dance.
>
> Verified that the test still passes on a machine with an AMD CPU that
> has the "ibs" CPU flag.
>
> Fixes: 35db59fa8ea2 ("perf test amd ibs: Add sample period unit test")
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701062321.517351-1-omosnace@redhat.com?part=1
next prev parent reply other threads:[~2026-07-01 6:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 6:23 [PATCH v2] perf test amd ibs: avoid using executable heap Ondrej Mosnacek
2026-07-01 6:33 ` sashiko-bot [this message]
2026-07-01 6:43 ` Peter Zijlstra
2026-07-01 16:59 ` Ravi Bangoria
2026-07-01 18:54 ` Ian Rogers
2026-07-02 10:17 ` Peter Zijlstra
2026-07-02 11:11 ` Ravi Bangoria
2026-07-09 14:35 ` Ondrej Mosnacek
2026-07-02 11:12 ` Ravi Bangoria
2026-07-06 16:58 ` Namhyung Kim
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=20260701063318.0C14D1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=selinux@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.