From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
Thomas Richter <tmricht@linux.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@kernel.org>,
James Clark <james.clark@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 0/3] perf: Fix kwork memory sanitization and libunwind test builds
Date: Fri, 22 May 2026 20:52:41 -0300 [thread overview]
Message-ID: <ahDsSXAYd3eHwp8_@x1> (raw)
In-Reply-To: <CAP-5=fV+H3fNnOSYzPoJkdC79DpVOzk2RzLcctYOLjcz81EdBA@mail.gmail.com>
On Fri, May 22, 2026 at 02:33:05PM -0700, Ian Rogers wrote:
> On Thu, May 21, 2026 at 12:24 AM Ian Rogers <irogers@google.com> wrote:
> >
> > The combination of the libunwind refactoring and build system changes
> > exposed a build-test regression for the libunwind build using a cached
> > feature dump. Re-send kwork fixes [1] moving a definition to kwork.h
> > to avoid breaking no libbpf builds.
> >
> > 1. Build Fix for libunwind:
> > "make feature-dump" runs without LIBUNWIND=1, skipping the setup of
> > libunwind LDFLAGS. When Makefile.feature is included to generate the
> > cached FEATURE-DUMP, the local test-libunwind.bin compiles without
> > arch-specific link flags (-lunwind-x86_64) and fails, caching a false
> > negative ("feature-libunwind=0"). Later builds (such as make_libunwind_O
> > reusing the dump) compile the unwinder based on CONFIG_LIBUNWIND (remote)
> > but disable HAVE_LIBUNWIND_SUPPORT (local), breaking compilation due to
> > missing maps__e_machine declarations in maps.h. Fixed by unconditionally
> > setting up libunwind feature build flags in Makefile.config.
> >
> > 2. kwork ASAN Double-Free & Leaks:
> > - Solves double-free in the record command argument array due to
> > parse_options mutation, by preserving original pointers in a calloc'ed
> > to_free buffer.
> > - Ensures kwork_usage string is freed on all exit paths.
> >
> > 3. kwork Unified Memory Lifecycle:
> > - Establishes a unified memory ownership model for kwork_work by
> > ensuring work names are dynamically duplicated via strdup() and
> > consistently freed using work_exit() and a central perf_kwork__exit()
> > teardown path.
>
> It would be nice to land these fixes. Thomas reported the kwork crashes in:
> https://lore.kernel.org/linux-perf-users/314df838-4c38-4f03-9515-ae1dabd09a54@linux.ibm.com/
Thanks, applied to perf-tools-next, for v7.2.
- Arnaldo
prev parent reply other threads:[~2026-05-22 23:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 7:24 [PATCH v1 0/3] perf: Fix kwork memory sanitization and libunwind test builds Ian Rogers
2026-05-21 7:24 ` [PATCH v1 1/3] perf build: Unconditionally set up libunwind feature build flags Ian Rogers
2026-05-21 7:24 ` [PATCH v1 2/3] perf kwork: Fix address sanitizer issues Ian Rogers
2026-05-21 7:24 ` [PATCH v1 3/3] perf kwork: Fix memory management of kwork_work Ian Rogers
2026-05-21 9:34 ` sashiko-bot
2026-05-22 21:33 ` [PATCH v1 0/3] perf: Fix kwork memory sanitization and libunwind test builds Ian Rogers
2026-05-22 23:52 ` Arnaldo Carvalho de Melo [this message]
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=ahDsSXAYd3eHwp8_@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@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=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tmricht@linux.ibm.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