From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227yOpQhzk2c716Kalfa6JBHmhghvF9NhlPp6Mr0zBjwOMHCfqvwHr2qxqZboirTjksJNcXL ARC-Seal: i=1; a=rsa-sha256; t=1516875786; cv=none; d=google.com; s=arc-20160816; b=XrWbqRs6BhjZCfCHMrcznaaCKVNOgSfE8fajVmNOwRCG0zcX/qZ0VwnnYgNnzvP2iZ 5RiWFFUhW6KVCp/0+YYGOehedv+TGnrbb2ckuTGnyBjPNB+oJF0T+4d4Oj7LDy2cqixv u+7tLZnIApK51VEbE+NdEKuZHuPSZfs1M9nSxXuxFUvzPUlbO3Cpf+ey3+Gmwu+hE7Uh ZrF0e6dP8pSXhy1dWM40NRD05EU0XaRvPcBisHw2+dw+xSp+4atlaZANthqLU+lDbqVw dQpAfbXlFqDA/dQScQrWBIQ/QSMBr8Po4oqkJwsyA8UoV41QVCdLwGqwKcYMHJaqqgdB SpAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=wlAdvIVVFRRfiqqGsJDtXFBiO2Eu54seKAm5nfdkYEA=; b=E0HXFUVwH3yEPk+9R70KH3GPTa3hjV9aQ6hco1p/6XmD1Ck0xwnMQNvytcA/7yUlqV VwP5LzBfHaSSty4bG1wlRrUK68pr8Q34kXErzjvTkQt8wDhfb39uu+T10nanNfg1kf7H iTiUOuS9bofXm1jrLaHlpzWuUc8LHJs2HH0hZookFMxlNOpDvkAFY0nFw85r8cX7z4RS QIvja/lQPbZ9/mt1E87yi/Iz617P0wujm3MU2x7NvTil7dczKJsoXQBPUYpea1MwBY1O sLmLeywZuhWzzX5G5LxwOfr7sLoyuBMYYbeXu/dayisy1fAp7AseZhzvnS9fJW61Irfv KIzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=Hss+zRCQ; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 205.233.59.134 as permitted sender) smtp.mailfrom=peterz@infradead.org Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=Hss+zRCQ; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 205.233.59.134 as permitted sender) smtp.mailfrom=peterz@infradead.org Date: Thu, 25 Jan 2018 11:22:53 +0100 From: Peter Zijlstra To: David Woodhouse Cc: Thomas Gleixner , Josh Poimboeuf , linux-kernel@vger.kernel.org, Dave Hansen , Ashok Raj , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick , Jason Baron Subject: Re: [PATCH 03/24] x86/paravirt: Annotate indirect calls Message-ID: <20180125102253.GB2228@hirez.programming.kicks-ass.net> References: <20180123152539.374360046@infradead.org> <20180123152638.162540737@infradead.org> <1516874525.30244.41.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516874525.30244.41.camel@infradead.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590397845189698377?= X-GMAIL-MSGID: =?utf-8?q?1590559544598941960?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On Thu, Jan 25, 2018 at 10:02:05AM +0000, David Woodhouse wrote: > On Tue, 2018-01-23 at 16:25 +0100, Peter Zijlstra wrote: > > Paravirt emits indirect calls which get flagged by objtool retpoline > > checks, annotate it away because all these indirect calls will be > > patched out before we start userspace. > > I've seen this asserted repeatedly but I've never truly convinced > myself of it. Is this absolutely unconditionally true in every case, > even when we're running as a guest and there are *actual* calls to be > made? We turn them into direct calls, never leave them indirect? That is my understanding; and when I worked on the paravirt spinlock code and disassembled live guest code this seemed to have happend. But let me go read the paravirt code again to make a stronger argument in favour.