Content-Type: multipart/mixed; boundary="===============1075402226308235516==" MIME-Version: 1.0 From: Peter Zijlstra To: kbuild-all@lists.01.org Subject: Re: [trace:ftrace/text-poke 1/6] arch/x86/kernel/alternative.c:1098 text_poke_bp_batch() warn: impossible condition '(tp[i]->text[0] == 204) => ((-128)-127 == 204)' Date: Wed, 09 Oct 2019 11:35:42 +0200 Message-ID: <20191009093542.GL2328@hirez.programming.kicks-ass.net> In-Reply-To: <20191009090956.GB13286@kadam> List-Id: --===============1075402226308235516== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, Oct 09, 2019 at 12:09:56PM +0300, Dan Carpenter wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-tra= ce.git ftrace/text-poke > head: 5225ef2a7a2d3da9e00d3f3439c768ac535f7595 > commit: fedc230ef3ea89ea0b308b667e72c3ed2c02dc72 [1/6] x86/alternatives: = Teach text_poke_bp() to emulate instructions > = > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot > Reported-by: Dan Carpenter > = > smatch warnings: > arch/x86/kernel/alternative.c:1098 text_poke_bp_batch() warn: impossible = condition '(tp[i]->text[0] =3D=3D 204) =3D> ((-128)-127 =3D=3D 204)' > = > fedc230ef3ea89 Peter Zijlstra 2019-10-07 1097 for (do_sync= =3D 0, i =3D 0; i < nr_entries; i++) { > fedc230ef3ea89 Peter Zijlstra 2019-10-07 @1098 if (tp[i].t= ext[0] =3D=3D INT3_INSN_OPCODE) > = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Impossible condition. .text[] is signed char and INT3_INSN_OPCODE is > 0xCC. Blergh.. Steve, please fold into: Subject: x86/alternatives,jump_label: Provide better text_poke() batching= interface --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -941,7 +941,7 @@ struct text_poke_loc { int len; s32 rel32; u8 opcode; - const char text[POKE_MAX_OPCODE_SIZE]; + const u8 text[POKE_MAX_OPCODE_SIZE]; }; = static struct bp_patching_desc { --===============1075402226308235516==--