mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Chen Pei <cp0613@linux.alibaba.com>,
	peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, adrian.hunter@intel.com,
	james.clark@linaro.org, pjw@kernel.org, palmer@dabbelt.com,
	aou@eecs.berkeley.edu, alex@ghiti.fr, guoren@kernel.org,
	linux-perf-users@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf riscv: Add perf_regs_load and enable the dwarf unwind test
Date: Tue, 22 Sep 2026 14:40:48 +0200	[thread overview]
Message-ID: <arJ3UM-td4trU4z5@x2> (raw)
In-Reply-To: <CAP-5=fWE7gjkpZdnHh_QAiVBKTF=1tsUE+ezDxW8SaCsaS-s5w@mail.gmail.com>

On Tue, Sep 15, 2026 at 12:09:13PM -0700, Ian Rogers wrote:
> On Mon, Sep 14, 2026 at 6:54 PM Chen Pei <cp0613@linux.alibaba.com> wrote:
> >
> > Both items checked. Neither needs a v2 of this patch.
> >
> > > Does this file need to explicitly include <stdlib.h>? Since musl libc
> > > enforces strict POSIX header inclusions, missing the declaration for
> > > malloc could lead to a build failure regression on musl libc systems.
> >
> > It is not missing. "perf_regs.h" three lines above resolves to
> > arch/riscv/include/perf_regs.h, which has #include <stdlib.h> and is
> > also where PERF_REGS_MAX comes from, so this file cannot be built
> > without it. arm64 relies on the same transitive include. Checked with
> > riscv64 gcc 15.3, where an implicit declaration is a hard error:
> > including only that header is enough to call malloc() and calloc().
> 
> Hi Pei,
> 
> Thanks for the patch! Please don't rely on transitive includes as a
> change in the other header file will break code here. Since this code
> only builds for RISC-V, we're likely to miss the problem if the other
> header changes. Other than this,
> 
> Reviewed-by: Ian Rogers <irogers@google.com>

Thanks, applied to perf-tools-next, for v7.4.

- Arnaldo

      reply	other threads:[~2026-09-22 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 12:41 Chen Pei
     [not found] ` <20260914125814.C92251F000FF@smtp.kernel.org>
2026-09-15  1:54   ` Chen Pei
2026-09-15 19:09     ` Ian Rogers
2026-09-22 12:40       ` 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=arJ3UM-td4trU4z5@x2 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alex@ghiti.fr \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=cp0613@linux.alibaba.com \
    --cc=guoren@kernel.org \
    --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=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=pjw@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

all inboxes | Powered by JetHome®