[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YSY8TQMTo5Pord78@hirez.programming.kicks-ass.net>
Date: Wed, 25 Aug 2021 14:49:17 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org, joro@...tes.org,
boris.ostrovsky@...cle.com, jgross@...e.com, x86@...nel.org,
mbenes@...e.com, rostedt@...dmis.org, dvyukov@...gle.com,
elver@...gle.com, Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH v2 02/24] objtool: Introduce CFI hash
On Wed, Aug 25, 2021 at 12:13:43PM +0200, Peter Zijlstra wrote:
> On Fri, Aug 20, 2021 at 03:27:55PM -0700, Josh Poimboeuf wrote:
> > > +static struct cfi_state *cfi_alloc(void)
> > > +{
> > > + struct cfi_state *cfi = calloc(sizeof(struct cfi_state), 1);
> > > + if (!cfi) {
> > > + WARN("calloc failed");
> > > + exit(1);
> > > + }
> > > + nr_cfi++;
> > > + init_cfi_state(cfi);
> > > + return cfi;
> > > +}
> >
> > I'm thinking this should also add it to the hash. i.e. I don't think
> > there's a scenario where you'd alloc a cfi and not want to add it to the
> > hash. The more sharing the better.
>
> @@ -1666,9 +1666,8 @@ static int read_unwind_hints(struct objt
> continue;
> }
>
> - cfi = insn->cfip;
> - if (!cfi)
> - cfi = insn->cfip = cfi_alloc();
Urgh, the problem is that this runs before we allocate the hash-table!
Lemme try and re-order thing.
Powered by blists - more mailing lists