Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp83670pxa; Fri, 31 Jul 2020 07:05:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynN7vE8pwHcJF+VNN0aCHmYuBV68RtUBFdhTYZk3qN1ol7fY2FkSlQNvl2M10s+sT3RkeL X-Received: by 2002:a17:906:7a16:: with SMTP id d22mr4310128ejo.478.1596204325942; Fri, 31 Jul 2020 07:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596204325; cv=none; d=google.com; s=arc-20160816; b=S+zdT4hBmeQQy799VAhqaMZkAFuY9JK9co6hym27y6r5RVusvC0fhS3IiO5qtxtpZW ZfX74l6T93xK4SyVATthwuRegHbIz7mtZA/aBEChTv+SMaU1j1QNNCp5tzvbz/7i1SO1 IkNiemH49mf/7mJ5Muk+Sm12mKZKRNqUoRizpnO8se4zLmCwFsAV77s4vjV3SLCw9JyV +Vv2qeF1Y6U2s982o8l0b0IwhX20rsu+OO+BRAZEDbGgUf0peArohi+h63g8Ixw8vpFL gLc6F67CRbBv1fzv1Hj0wz6170TDRET6eM/uNEH6x1kzBmIePewoy3XiPwJD6KYdG51H 5BRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VyIseixnXp1s5WTThyAPC9T3W3AG9+lCb/FRjaq4Th4=; b=RqjqhhSagcqJNtON0+SjAdX9i0PKagFTFOAAawzZdJbXQdQDlfx7G4aPr9jxrAfrmN feIEyqxyyEDRh9e0/PDj1OGNoymssg9FqDPpI/pSUek1DVKDWTdpQw3Fyi3O++P7k4Od ZBS5uAeFCx/RKDedi/n/MndEMAgDr+K5Y4FPHui0UevLBdHW7MSlTC2mBb5cJeRdNeir 7XaDbsaLOma/yZ4PhiO9uQ+VbLHUefwyu8hwq2tXfl7r7t9OMRVwRiC6j6EK36Iscuz0 H/PRg8ypKLJIK6ydQy21SKsLWMGSYtzF7t1qM7X7ZlIpq3lbIW8jUHivLe9wZ+dyN1ht B4HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gpRmaGsK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si5118276edq.584.2020.07.31.07.05.01; Fri, 31 Jul 2020 07:05:25 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gpRmaGsK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732351AbgGaOEv (ORCPT + 99 others); Fri, 31 Jul 2020 10:04:51 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:55866 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730170AbgGaOEv (ORCPT ); Fri, 31 Jul 2020 10:04:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596204291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VyIseixnXp1s5WTThyAPC9T3W3AG9+lCb/FRjaq4Th4=; b=gpRmaGsKoY97rPYK0Z7uhmHRmWaZVaiD/k+su+C/grb85PoTxhLmynHPJHia0plqGEJei3 yALxor/QDgUpuofR4xwfmuGYoqcxVgQJa0tO9A1NZVD2dT+R7TTgi3Zb6DeWBdqGncSaA4 s2x2y517pSTDVYSs5cH8MXNz4t9mPUM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-339-cCDTueIOP7SOBg3xRLHFxQ-1; Fri, 31 Jul 2020 10:04:47 -0400 X-MC-Unique: cCDTueIOP7SOBg3xRLHFxQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 87493800465; Fri, 31 Jul 2020 14:04:45 +0000 (UTC) Received: from treble (ovpn-119-23.rdu2.redhat.com [10.10.119.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C14E75C5B7; Fri, 31 Jul 2020 14:04:43 +0000 (UTC) Date: Fri, 31 Jul 2020 09:04:41 -0500 From: Josh Poimboeuf To: Julien Thierry Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mbenes@suse.cz, raphael.gault@arm.com, benh@kernel.crashing.org Subject: Re: [PATCH v2 9/9] objtool: Abstract unwind hint reading Message-ID: <20200731140441.cpzr4lrlkcrmoz2c@treble> References: <20200730094652.28297-1-jthierry@redhat.com> <20200730094652.28297-10-jthierry@redhat.com> <20200730150341.udqnykbw7yfsjvin@treble> <1a078563-001d-c666-d2f5-9291f0efd35a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1a078563-001d-c666-d2f5-9291f0efd35a@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 31, 2020 at 08:00:58AM +0100, Julien Thierry wrote: > > > + cfa->offset = hint->sp_offset; > > > + insn->cfi.hint_type = hint->type; > > > + insn->cfi.end = hint->end; > > > + > > > + insn->cfi.sp_only = hint->type == ORC_TYPE_REGS || hint->type == ORC_TYPE_REGS_IRET; > > > > What does "sp" mean here in sp_only? > > > > Stack pointer, like in CFI_SP. When objtool encounters one of these hints, > it starts to only track the stack frame with the stack pointer (no BP, no > drap register, no move to temporary registers). Just trying to make some > sense of this corner case. I think that's not quite right, because ORC_TYPE_CALL could also be "sp_only" in some cases, by that definition. The call to update_cfi_state_regs() is really regs-specific, not sp-specific. -- Josh