Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1919018ybb; Thu, 2 Apr 2020 09:41:30 -0700 (PDT) X-Google-Smtp-Source: APiQypLhRewXhLRPrAVDrb1IbpxzTrhFmZM7iVFj89w+8ORCkWVjgzmAtDOPp8c8fKCX+MT3v2Od X-Received: by 2002:a05:6830:6:: with SMTP id c6mr3028755otp.84.1585845690321; Thu, 02 Apr 2020 09:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585845690; cv=none; d=google.com; s=arc-20160816; b=LBGJefPH5Ku7QeBY/KXG2B+wN556jSC8E+fs+OjWtCfCq3PBo84zHd/ai/0yQKZ+aI +wgTHR8qLzpPi7SLLToOev8lMc/qM9Y1RZIccvXmS+kfW67J70VRD6xpQIl0GV29dtYL qABS023z89cjb+/JfyMH0dy9hCei1yzsb3C/g6BjsgNEe5G2LyrnrLtLzA7QC2qDWJqL vEsqoq2SOwpcixIocdiHeVoX0C64u93KydRGpeXqeMhUWRAPAVEiqfcjIe26aLo1El9y P/ptMj87mQFVd+aG1tE8mKnoQc1hXk4URAHjaFWm9Yp+5Wmp6oaYllbZPgaj5aeUOf/Z uP+g== 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=SZ61JY4/qMzGRRy2q/yJ6msRavUpvnK9aapJOKTpzqU=; b=yq1IAEAtRzgpAJvkU6jhzMg3XnBBbAezRkcNtM546idN29pseJPghgfycZLw6qGddJ CuTh8JCq9kpujYqSDYgGdigVSqlNve95XGDjfPcG5qfSiZza1dvWbTW916CfRAv/EGDw 0dxTyv3QqXOB2iHioBZSVMEErDSRBiGMvRKci1hjE7xKxqIq5M3WF2oDNnjJlZbCc8TM 7ZfMklH7axPPaIMnqvaVzTUb7WMyxKUG8KTvNSbzS+TaU/MWWfOByYnytca5pzOqitfG gfP3wDJmIplHmTBazTQnXv5lU3lkiBjxtIQaIF1/Jl0kdVTkjXZItpGpGKec7uKmS+SG LQew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="paSCP1/e"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si2506846otq.184.2020.04.02.09.41.15; Thu, 02 Apr 2020 09:41:30 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="paSCP1/e"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388905AbgDBP1X (ORCPT + 99 others); Thu, 2 Apr 2020 11:27:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55286 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726927AbgDBP1X (ORCPT ); Thu, 2 Apr 2020 11:27:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SZ61JY4/qMzGRRy2q/yJ6msRavUpvnK9aapJOKTpzqU=; b=paSCP1/eVNRse/xGNQY5Ty4LAv UReZvtQdW5qGp98i+k17hrCYfWxaCpH/moDsumrF7ZLvCjkaqLAuX7+hcSzqaaBo0SbqITSWy9Ank Qk/9Gz+JRY+g39AgBXF67vm6MM0fAfziPaKX5rRTJKVJ7MkAQz6zYDqviOqdzYVwKD82feB3ndOSq IVBwOeLNokLziSvhvc1PxYRSlvHFeUrEfFd6d5/sXagT9oemcTq2OlLMA7P82JXMVMRG3Lb1z/v6s kzXEJjO9bup9HbotVSt/OO2q3PxGd9pIvkr79hfGGkvWzvFUeSHRtnUKudwy4CjVU5QHP3iUmTpr4 diPrxg4A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jK1kV-0002tW-CS; Thu, 02 Apr 2020 15:27:19 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D17ED3056DE; Thu, 2 Apr 2020 17:27:17 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B9FF52B0DE831; Thu, 2 Apr 2020 17:27:17 +0200 (CEST) Date: Thu, 2 Apr 2020 17:27:17 +0200 From: Peter Zijlstra To: Alexandre Chartre Cc: x86@kernel.org, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, jthierry@redhat.com, tglx@linutronix.de Subject: Re: [PATCH 4/7] objtool: Add support for return trampoline call Message-ID: <20200402152717.GE20730@hirez.programming.kicks-ass.net> References: <20200402082220.808-1-alexandre.chartre@oracle.com> <20200402082220.808-5-alexandre.chartre@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402082220.808-5-alexandre.chartre@oracle.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 02, 2020 at 10:22:17AM +0200, Alexandre Chartre wrote: > With retpoline, the return instruction is used to branch to an address > stored on the stack. So, unlike a regular return instruction, when a > retpoline return instruction is reached the stack has been modified > compared to what we have when the function was entered. > > Provide the mechanism to explicitly call-out such return instruction > so that objtool can correctly handle them. https://lkml.kernel.org/r/20200331222703.GH2452@worktop.programming.kicks-ass.net And also, the split out version: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=core/objtool&id=ec9d9549901dfd2ff411676dfc624e50219e4d5a