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] [day] [month] [year] [list]
Message-ID: <aLs_ZeRBzNvgfbqK@google.com>
Date: Fri, 5 Sep 2025 12:52:05 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Zecheng Li <zecheng@...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>, Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	"Liang, Kan" <kan.liang@...ux.intel.com>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Xu Liu <xliuprof@...gle.com>, linux-perf-users@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 06/10] perf annotate: Track arithmetic instructions on
 pointers

Hi Zecheng,

On Wed, Sep 03, 2025 at 04:26:50PM -0400, Zecheng Li wrote:
> > I was thinking we can use TSR_KIND_POINTER here.  Probably we need to
> > distinguish it from the existing percpu base use case. Maybe you want
> > to rename it.  Then you don't need to find a pointer type in the DWARF.
> 
> Hi Namhyung, thanks for the review.
> 
> Yes. I think that's a better way to represent a pointer to a type.
> With that tag we can also support registers representing addresses
> (is_reg_var_addr == true). And when moving an address register to a
> memory location we probably can simply add the * to denote a pointer
> without finding the exact pointer type.
> 
> >
> > > +                     tsr->offset = 0;
> >
> > I think it can refer to a member in a struct.  How about this?
> >
> >                         tsr->offset = state->offset - offset;
> 
> True, it may load an address of a struct member. Do you mean
> stack->offset - offset?

Yep.

> 
> > > @@ -388,6 +493,7 @@ static void update_insn_state_x86(struct type_state *state,
> > >               tsr->type = state->regs[src->reg1].type;
> > >               tsr->kind = state->regs[src->reg1].kind;
> > >               tsr->imm_value = state->regs[src->reg1].imm_value;
> > > +             tsr->offset = 0;
> > >               tsr->ok = true;
> 
> I also find for mov register to register this should be
> 
> tsr->offset = state->regs[src->reg1].offset;
> 
> Let me update the patch.

Great, thanks!
Namhyung


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ