lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7ci-qxL0r6SOh0_bktS33OBf6JoOE3LJzmcZgZV_uNzcLA@mail.gmail.com>
Date: Fri, 9 Feb 2024 20:42:09 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Nathan Chancellor <nathan@...nel.org>, 
	Nick Desaulniers <ndesaulniers@...gle.com>, Tom Rix <trix@...hat.com>, 
	Ravi Bangoria <ravi.bangoria@....com>, James Clark <james.clark@....com>, 
	Kan Liang <kan.liang@...ux.intel.com>, John Garry <john.g.garry@...cle.com>, 
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org, 
	llvm@...ts.linux.dev
Subject: Re: [PATCH v2 8/9] perf srcline: Add missed addr2line closes

On Fri, Feb 9, 2024 at 4:21 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> On Wed, Jan 31, 2024 at 4:15 PM Ian Rogers <irogers@...gle.com> wrote:
> >
> > The child_process for addr2line sets in and out to -1 so that pipes
> > get created. It is the caller's responsibility to close the pipes,
> > finish_command doesn't do it. Add the missed closes.
> >
> > Fixes: b3801e791231 ("perf srcline: Simplify addr2line subprocess")
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > ---
> >  tools/perf/util/srcline.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
> > index 034b496df297..7addc34afcf5 100644
> > --- a/tools/perf/util/srcline.c
> > +++ b/tools/perf/util/srcline.c
> > @@ -399,6 +399,8 @@ static void addr2line_subprocess_cleanup(struct child_process *a2l)
> >                 kill(a2l->pid, SIGKILL);
> >                 finish_command(a2l); /* ignore result, we don't care */
> >                 a2l->pid = -1;
> > +               close(a2l->in);
> > +               close(a2l->out);
>
> I was about to ask the stderr, but addr2line_subprocess_init()
> sets a2l->no_stderr already.
>
> I wish it could be handled in finish_command() but it seems
> the API allows setting external file descriptors (before calling
> start_command).  Hmm..
>
> Anyway it looks like an independent fix.

I'll apply this separately.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ