Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp132562pxb; Fri, 8 Jan 2021 00:19:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJDGB+8QE/fRuL2lTcMrKpnzVzirS8id8hIPQFDSQqNtxnBfazr5wTYNRHO3tjd7YfIEBI X-Received: by 2002:a05:6402:37b:: with SMTP id s27mr4374564edw.266.1610093947416; Fri, 08 Jan 2021 00:19:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610093947; cv=none; d=google.com; s=arc-20160816; b=lyrurrnMX/H2IGFs8tdhfMXEr/deWpVBLUdh+G7OYyBVulL0r8T7UPZzATmP9Sapfp YBUxG64r458phVIUF+l1N70A+iuOlNRO4G33QuISu+yc+GEhYPux4pQh+Y2A3VyOzPg6 M0BdehJnAzwtsj4ICW630PtTW9L3hzHCJOxGoeNwhCaJI7NPL4clpS7E1SlU3jiOFNCV PUQW2iMhRdaeNyCD9bdS2Qe+YcoWhucVO6zEtjkpKqfDLzAoSLJnldFF1CbRs6oHNtWP 1BzMNy9btCqHTeTtwBBwk4+/VVyq3ePHt2pkKM6hn++D9BGmc3w6pKh8VucARJXQl47j hVKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=Zs1HKL5kLNHG+dw6KaKcNkrSFAO7RuNe+0xEp4ZUsw0=; b=g7kPPleKwZb4JVEfJk5jYUpyupXeOjLY/U4KQjZ+redii0LYD5Ej6/Ygok1YvLDJNP WKgSlZ/1g3RJvQOXwbI+8IEdhRFWTxqm4VsKev3XkJWuiFPsUwbpUAghZIUeJqKxshke PoonuABxY00ckJnztP1FghATG9BmfRFYe0hqcDe7YJ1hVds3Y/Ky73RnzRWL9Juft8Rn ijM+TqtAcx2yXxcI4FboBlgLaO+q21BdVxnaDQfzl97gQN5KKveMBTUorKs8VMRkUByY PnQD5VOcci+y2IM4R8YKBdNPgX5AtAbJoBoPd1t4LcOVUn/PEKyh5zID7fSm3/uq5aat AiCw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o26si3420238edw.74.2021.01.08.00.18.44; Fri, 08 Jan 2021 00:19:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727660AbhAHIQZ (ORCPT + 99 others); Fri, 8 Jan 2021 03:16:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:37456 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbhAHIQZ (ORCPT ); Fri, 8 Jan 2021 03:16:25 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0343EACAF; Fri, 8 Jan 2021 08:15:44 +0000 (UTC) Date: Fri, 8 Jan 2021 09:15:43 +0100 (CET) From: Miroslav Benes To: Josh Poimboeuf cc: Juergen Gross , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Shinichiro Kawasaki Subject: Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives In-Reply-To: <20210107181835.rc7lutdqujf4mead@treble> Message-ID: References: <9f78604e49b400eb3b2ca613591f8c357474ed4e.1608700338.git.jpoimboe@redhat.com> <20210107181835.rc7lutdqujf4mead@treble> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > That comment is indeed now obsolete. I can squash something like so: > > diff --git a/tools/objtool/check.c b/tools/objtool/check.c > index 81d56fdef1c3..ce67437aaf3f 100644 > --- a/tools/objtool/check.c > +++ b/tools/objtool/check.c > @@ -958,21 +958,8 @@ static int add_call_destinations(struct objtool_file *file) > } > > /* > - * The .alternatives section requires some extra special care, over and above > - * what other special sections require: > - * > - * 1. Because alternatives are patched in-place, we need to insert a fake jump > - * instruction at the end so that validate_branch() skips all the original > - * replaced instructions when validating the new instruction path. > - * > - * 2. An added wrinkle is that the new instruction length might be zero. In > - * that case the old instructions are replaced with noops. We simulate that > - * by creating a fake jump as the only new instruction. > - * > - * 3. In some cases, the alternative section includes an instruction which > - * conditionally jumps to the _end_ of the entry. We have to modify these > - * jumps' destinations to point back to .text rather than the end of the > - * entry in .altinstr_replacement. > + * The .alternatives section requires some extra special care over and above > + * other special sections because alternatives are patched in place. > */ > static int handle_group_alt(struct objtool_file *file, > struct special_alt *special_alt, Looks good to me. Miroslav