[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200711050953.GZ597537@hirez.programming.kicks-ass.net>
Date: Sat, 11 Jul 2020 07:09:53 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, mhiramat@...nel.org,
bristot@...hat.com, jbaron@...mai.com,
torvalds@...ux-foundation.org, tglx@...utronix.de,
mingo@...nel.org, namit@...are.com, hpa@...or.com, luto@...nel.org,
ard.biesheuvel@...aro.org, jpoimboe@...hat.com,
pbonzini@...hat.com, mathieu.desnoyers@...icios.com,
linux@...musvillemoes.dk
Subject: Re: [PATCH v6 13/17] static_call: Add static_call_cond()
On Fri, Jul 10, 2020 at 07:08:25PM -0400, Steven Rostedt wrote:
> On Fri, 10 Jul 2020 15:38:44 +0200
> Peter Zijlstra <peterz@...radead.org> wrote:
>
> > +static void __static_call_transform(void *insn, enum insn_type type, void *func)
> > {
> > - const void *code = text_gen_insn(opcode, insn, func);
> > + int size = CALL_INSN_SIZE;
> > + const void *code;
> >
> > - if (WARN_ONCE(*(u8 *)insn != opcode,
> > - "unexpected static call insn opcode 0x%x at %pS\n",
> > - opcode, insn))
>
> I would still feel better if we did some sort of sanity check before
> just writing to the text. Confirm this is a jmp, call, ret or nop?
I'll see if I can come up with something, but I'm not sure we keep
enough state to be able to reconstruct what should be there.
Powered by blists - more mailing lists