Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp686873ybl; Fri, 23 Aug 2019 07:01:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfXVGIxy8CJ0ij9sgCufs32/lF6cuzHKptKsTvAu4qJCU1lLYxG20ifQmYdOnD5plJ5efT X-Received: by 2002:a65:6102:: with SMTP id z2mr4061183pgu.391.1566568908577; Fri, 23 Aug 2019 07:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566568908; cv=none; d=google.com; s=arc-20160816; b=iBt50mrl/rFno67iltoZaLpE46Xxs9trGxyk6YlEevj1MpTiBjTV/E7ha0mZ6I6pvM 4do2rAHRUzxfzTrx4xBivKDn/a5NnDx23qN++6phJcR4w4R7abf3HigRe5Wp2t7+PHOl 5/IdRNXVJWKR/xZEUHU46Lm+v0t5FHCHT5lUwbZMSATwjc4yN6sa4Lcn7Zwc0RXWN4jS UDGOcLUGjMCKSByLfGXh27ag8ct7oKimMpyxKNVNZto8pZK5C2zBzZGTBw4gl0wGAhsl c4RO4HaytkmFSqNBui/DvjHnjJPEGjwvAMvDR8HGxgYOKwiEB3MkopI0yYFtGtpHqiwT jIVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=D50tK8KekkIQlmfWu3PgNhzvWgPE0xa3t2/U0GM4oTU=; b=DrvVs2ytM5XLRudwlKW25s6u6oISDwB6OTKaIjVOkT6BMehoW5iih+VdVznkAKwJlq mPj/A8KEEyRteXFJ1nt6E8WsVPntYJdD92UBBe6vCNiff6XDUuvB/jHMxNKSBapyNrGK T+t7jjre9imRrF5ybHNPOjXYed8S1dGaW6r3J0Zh+CMpyxrbllwuqbKYfsv/LE7mSqbZ GBpC35OpvoQx94iT/ZVTuHhHMaSclf8L6FFshj3Md6L3PnDGgKNAu3yDC0xaCevzewd8 ipZe7ftWWkk7ykvJzDQWdv3GEBxT89iqTXH/dl5syokCgR2rMxdMod4vRDYi79MaSbgJ YXww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r74si2700288pfr.79.2019.08.23.07.01.32; Fri, 23 Aug 2019 07:01:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390011AbfHVVvR (ORCPT + 99 others); Thu, 22 Aug 2019 17:51:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8418 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389740AbfHVVvR (ORCPT ); Thu, 22 Aug 2019 17:51:17 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED7033175291; Thu, 22 Aug 2019 21:51:16 +0000 (UTC) Received: from treble (ovpn-121-55.rdu2.redhat.com [10.10.121.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6269A5D713; Thu, 22 Aug 2019 21:51:15 +0000 (UTC) Date: Thu, 22 Aug 2019 16:51:12 -0500 From: Josh Poimboeuf To: Julien Cc: Raphael Gault , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, peterz@infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, raph.gault+kdev@gmail.com Subject: Re: [RFC v4 07/18] objtool: Introduce INSN_UNKNOWN type Message-ID: <20190822215112.n36slswph64nbzhb@treble> References: <20190816122403.14994-1-raphael.gault@arm.com> <20190816122403.14994-8-raphael.gault@arm.com> <20190822200406.jc3yf77pomxxwep6@treble> <3c4e3227-eeb3-371a-d015-a0e0e60e5332@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3c4e3227-eeb3-371a-d015-a0e0e60e5332@gmail.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 22 Aug 2019 21:51:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 22, 2019 at 09:45:00PM +0100, Julien wrote: > Hi Josh, > > On 22/08/19 21:04, Josh Poimboeuf wrote: > > On Fri, Aug 16, 2019 at 01:23:52PM +0100, Raphael Gault wrote: > > > On arm64 some object files contain data stored in the .text section. > > > This data is interpreted by objtool as instruction but can't be > > > identified as a valid one. In order to keep analysing those files we > > > introduce INSN_UNKNOWN type. The "unknown instruction" warning will thus > > > only be raised if such instructions are uncountered while validating an > > > execution branch. > > > > > > This change doesn't impact the x86 decoding logic since 0 is still used > > > as a way to specify an unknown type, raising the "unknown instruction" > > > warning during the decoding phase still. > > > > > > Signed-off-by: Raphael Gault > > > > Is there a reason such data can't be moved to .rodata? That would seem > > like the proper fix. > > > > Raphaƫl can confirm, if I remember correctly, that issue was encountered on > assembly files implementing crypto algorithms were some words/double-words > of data were in the middle of the .text. I think it is done this way to make > sure the data can be loaded in a single instruction. So moving it to another > section could impact the crypto performance depending on the relocations. > > That was my understanding at least. Thanks. If that's the case then that would be useful information to put in the patch description. A code excerpt of an example code site would be useful too. I'm not sure INSN_UNKNOWN is the right name though, since the decoder does actually know about it. Maybe INSN_DATA or something? -- Josh