From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 663BAC54EE9 for ; Wed, 7 Sep 2022 09:06:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbiIGJGV convert rfc822-to-8bit (ORCPT ); Wed, 7 Sep 2022 05:06:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbiIGJGR (ORCPT ); Wed, 7 Sep 2022 05:06:17 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A357479EC5 for ; Wed, 7 Sep 2022 02:06:16 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-403-ZIK-BrzPN2uPckKgxyhbbA-1; Wed, 07 Sep 2022 10:06:14 +0100 X-MC-Unique: ZIK-BrzPN2uPckKgxyhbbA-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Wed, 7 Sep 2022 10:06:12 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.040; Wed, 7 Sep 2022 10:06:12 +0100 From: David Laight To: 'Peter Zijlstra' , "Masami Hiramatsu (Google)" CC: Steven Rostedt , Ingo Molnar , Suleiman Souhlal , bpf , "linux-kernel@vger.kernel.org" , "Borislav Petkov" , Josh Poimboeuf , "x86@kernel.org" Subject: RE: [PATCH] objtool,x86: Teach decode about LOOP* instructions Thread-Topic: [PATCH] objtool,x86: Teach decode about LOOP* instructions Thread-Index: AQHYwphvHqpJ+XEnbkqFHiF9z5Fi7a3Tq+bA Date: Wed, 7 Sep 2022 09:06:12 +0000 Message-ID: <7ef4b0d724894ff394f9d8921f8c4332@AcuMS.aculab.com> References: <166251211081.632004.1842371136165709807.stgit@devnote2> <166251212072.632004.16078953024905883328.stgit@devnote2> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra > Sent: 07 September 2022 10:01 > > On Wed, Sep 07, 2022 at 09:06:45AM +0200, Peter Zijlstra wrote: > > On Wed, Sep 07, 2022 at 09:55:21AM +0900, Masami Hiramatsu (Google) wrote: > > > > > +/* Return the jump target address or 0 */ > > > +static inline unsigned long insn_get_branch_addr(struct insn *insn) > > > +{ > > > + switch (insn->opcode.bytes[0]) { > > > + case 0xe0: /* loopne */ > > > + case 0xe1: /* loope */ > > > + case 0xe2: /* loop */ > > > > Oh cute, objtool doesn't know about those, let me go add them. Do they ever appear in the kernel? They are so slow on Intel cpu that finding one ought to deemed a bug! Have you got jcxz (0xe3) in there? They are fast on both Intel and AMD cpus - so are usable. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)