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: <CAH0uvojRo0YV+OGwzDHCh6+p5zaLBPKP6aQLjcexEfTmiBqKmA@mail.gmail.com>
Date: Wed, 26 Feb 2025 22:03:34 -0800
From: Howard Chu <howardchu95@...il.com>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...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>, Kan Liang <kan.liang@...ux.intel.com>, 
	Yicong Yang <yangyicong@...ilicon.com>, James Clark <james.clark@...aro.org>, 
	"Dr. David Alan Gilbert" <linux@...blig.org>, Levi Yun <yeoreum.yun@....com>, Ze Gao <zegao2021@...il.com>, 
	Weilin Wang <weilin.wang@...el.com>, Xu Yang <xu.yang_2@....com>, 
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 01/11] perf debug: Avoid stack overflow in recursive
 error message

Hello,

On Wed, Feb 26, 2025 at 9:45 PM Ian Rogers <irogers@...gle.com> wrote:
>
> On Wed, Feb 26, 2025 at 9:40 PM Howard Chu <howardchu95@...il.com> wrote:
> >
> > Hi Ian,
> >
> > On Wed, Jan 8, 2025 at 11:51 PM Ian Rogers <irogers@...gle.com> wrote:
> > >
> > > In debug_file, pr_warning_once is called on error. As that function
> > > calls debug_file the function will yield a stack overflow. Switch the
> > > location of the call so the recursion is avoided.
> >
> > May I ask how it created the recursion? Too ignorant to understand sorry...
>
> If _debug_file is NULL then debug_file calls pr_warning_once which
> calls debug_file which calls pr_warning_once again, etc ... :-)

Got it,

pr_warning()
  eprintf()
    veprintf()
      debug_file()

ack.

Thanks,
Howard
>
> Thanks,
> Ian
>
> > Thanks,
> > Howard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ