From: Ravi Bangoria <ravi.bangoria@amd.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ondrej Mosnacek <omosnace@redhat.com>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
<linux-perf-users@vger.kernel.org>, <selinux@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Ravi Bangoria <ravi.bangoria@amd.com>
Subject: Re: [PATCH v2] perf test amd ibs: avoid using executable heap
Date: Thu, 2 Jul 2026 16:41:25 +0530 [thread overview]
Message-ID: <8bac16f7-4296-42cf-9a1f-db0e4f9ee534@amd.com> (raw)
In-Reply-To: <20260702101704.GG751831@noisy.programming.kicks-ass.net>
>>>> 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.
>>>
>>> I would argue that having RWX is a problem, you really want RW->RO->RX
>>> transitions, so even with mmap() you want to combine with mprotect().
>>
>> My original intent for using RWX was to generate sufficient Icache miss
>> samples for the IBS Fetch unit by overwriting the code prior to execution.
>> I am wondering whether it would be possible to achieve the same result
>> by using CLFLUSH with RX permissions. Something like below (build tested
>> only).
>
> So for a test it is fine to have RWX
Sure, makes sense.
Thanks,
Ravi
next prev parent reply other threads:[~2026-07-02 11:11 UTC|newest]
Thread overview: 8+ 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
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 [this message]
2026-07-02 11:12 ` Ravi Bangoria
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=8bac16f7-4296-42cf-9a1f-db0e4f9ee534@amd.com \
--to=ravi.bangoria@amd.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=omosnace@redhat.com \
--cc=peterz@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox