Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp199854pxf; Thu, 11 Mar 2021 01:31:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJymjenGACci/U2r3wSrHziVaRLBA+NFa+HN4EPfoKrAYBib9AUna9HF4gd8p22pb1S1sh9D X-Received: by 2002:a05:6402:1853:: with SMTP id v19mr7541027edy.179.1615455073843; Thu, 11 Mar 2021 01:31:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615455073; cv=none; d=google.com; s=arc-20160816; b=ylTurOafPvlXT0fmr36E1RKarmNpAP1tIC0J05e1fePjbiNKG/Z38eZrE53VKWZsMX LIu4mgIBZ64He7ldFQ3TFzMEtPSSZuJpwWDYaonHPHCEEtHZGIcLGD1Uuhl088QriVIz LzDEPsiqWUyyhKW7zvtJ1ODyQLfGQjAOEhkkGG9M6MEsbTuogM0MPxlRxs/2b9Yo3UbA KEsXQo0NxWdSU2IPXCXNkTUdn9/0GOIeoFFMPH7BrsZEVq1Vc7J44iJEIotXxpAuZUSt t/vAkPeg86DkEIKDrqWuEUdiW26ZKfpn8R1Ts7GN5KWFe1MnbtT/8ODqKuHAh1A0u13+ ZACA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=ZgmbyaHDCndL5qhT9pi9j/dQV/27YdeWlCHFub/NIU8=; b=ezN38GUJ0ezOT+oILNvUx/qqbDQnX3sFqdw8U0FuNc+klhpV8JsjuMiAkZq1pSdC1I pTH7qMAEapJZNEwuSBQioXb73LTN0K3z6OJnxPg1L8e7GE2ETGBxiWWVLiaJAuvAZlqK yO7baUCEMV2J5G5lMIUADdb83VmD0BsXU8vLBXUHazyi/vGiWMXcNL3zCAFitbP8NuHt aMU1DiGLpxMo86C0pnJbdswTLN5dTuj3yD8uxuiQ8Gik4WWPCEL4neWzF++YfHMSr4OA jp7PgTbaUoG5zwf5cUcldvVuz77FXfcFRQOkGfybAify8ylm5p9u9J2g4WOdgPlu9Z8y 70hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gy3si1345804ejb.557.2021.03.11.01.30.40; Thu, 11 Mar 2021 01:31:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbhCKJ3W convert rfc822-to-8bit (ORCPT + 99 others); Thu, 11 Mar 2021 04:29:22 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.85.151]:52881 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232001AbhCKJ2u (ORCPT ); Thu, 11 Mar 2021 04:28:50 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-232-BZvBvr3pMjOf4Z7qPKK-tw-1; Thu, 11 Mar 2021 09:28:47 +0000 X-MC-Unique: BZvBvr3pMjOf4Z7qPKK-tw-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 11 Mar 2021 09:28:46 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Thu, 11 Mar 2021 09:28:46 +0000 From: David Laight To: 'Peter Zijlstra' , Alexei Starovoitov CC: bpf , Steven Rostedt , "H. Peter Anvin" , X86 ML , LKML Subject: RE: The killing of ideal_nops[] Thread-Topic: The killing of ideal_nops[] Thread-Index: AQHXFcc39lSrY3Kgm0WONtWbUmlAY6p+hE6A Date: Thu, 11 Mar 2021 09:28:46 +0000 Message-ID: <3913a992a9384fe083a5f24e4ef86fdc@AcuMS.aculab.com> References: <20210309120519.7c6bbb97@gandalf.local.home> <362BD2A4-016D-4F6B-8974-92C84DC0DDB4@zytor.com> <20210310091324.0c346d5f@oasis.local.home> 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com 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 ... > Below is the latest version which I just pushed out to my git tree so > that the robots can have a go at it. Why not delete the indirection table? So you end up with: > +#ifndef CONFIG_64BIT > + > +/* > + * Generic 32bit nops from GAS: > + * > + * 1: nop > + * 2: movl %esi,%esi > + * 3: leal 0x00(%esi),%esi > + * 4: leal 0x00(,%esi,1),%esi > + * 5: leal %ds:0x00(,%esi,1),%esi > + * 6: leal 0x00000000(%esi),%esi > + * 7: leal 0x00000000(,%esi,1),%esi > + * 8: leal %ds:0x00000000(,%esi,1),%esi > * > - * *_NOP5_ATOMIC must be a single instruction. > + * Except 5 and 8, which are DS prefixed 4 and 7 resp, where GAS would emit 2 > + * nop instructions. > */ > +#define BYTES_NOP1 0x90 > +#define BYTES_NOP2 0x89,0xf6 > +#define BYTES_NOP3 0x8d,0x76,0x00 > +#define BYTES_NOP4 0x8d,0x74,0x26,0x00 > +#define BYTES_NOP5 0x3e,BYTES_NOP4 > +#define BYTES_NOP6 0x8d,0xb6,0x00,0x00,0x00,0x00 > +#define BYTES_NOP7 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00 > +#define BYTES_NOP8 0x3e,BYTES_NOP7 const unsigned char const x86_nops[8][8] = { { BYTES_NOP1 }, { BYTES_NOP2 }, { BYTES_NOP3 }, { BYTES_NOP4 }, { BYTES_NOP5 }, { BYTES_NOP6 }, { BYTES_NOP7 }, { BYTES_NOP8 } }; The rest of the patch may not need changing. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)