[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()


  • To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Andrew Cooper <amc96@xxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Tue, 19 Apr 2022 14:25:53 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E1/McT8rCeGGCPtHkVKInE6GXMkxR9fg9F7EF0SmErE=; b=OjWWKS/6mfBDVJsb3+9yQDceYBEEVqlSF6+dIZtTpE5jpAKtR634NMsJl967wr5LK9dOMOUs0AdJT4BEvy1Z66OBCZtQP0qQYb8YUoGKjV55c+qFzpgqkpuyiH436X3BIgkkHHCWQsVyinHzsWzawAZzYr7Um8Nistel6GCiID/lAbK8RqSMDrPblhb+1MTidRcqNs26gK8PE6vTYCu0R1UnsPqSoPFvgFagp16cS0pnawcqstBLorzrv7reOEq/okFq7sRrTL85PA0Mu87i4pxJSko8idgRzs/Bb5PonlthrbslAGx+UdNTnvNOE2rE8EjJfTLBicIWv7qUu7tfgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BmtZxo/EjEurIGkSSmPA4n6k1QksYHWwVBrvlR2nOqVrfNZU651ed3/jYo7VMqvQCD4CEZ7Q3V8xPp+0qFmgFapZw4quOxKvsN27bBbTvc1ZIj1IfhShkLdqsOLvLtpPnyOXvkA5xPJbJ2TgGlH0odUw1HyP1znlNcOGRwLLU8yOTNSYdq0wXBKRl/1D1P6iTvG8XR8P0bUd6sAcaYjSqBdPE9opYD2oB7DSGrDDsMnPBHn3V8ZsdR79+G/XCpEcG1rbGK83hyZAN2NAOxsfY5aGdWoosQkl28P8SJf8ad+0MCG9W2CrkQ+VwwKrqsjxcVMBXD16AjyWZgWfYA9DLw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Miroslav Benes <mbenes@xxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 19 Apr 2022 14:26:34 +0000
  • Ironport-data: A9a23:z2k1rqM1xcdf3XTvrR01lsFynXyQoLVcMsEvi/4bfWQNrUol0zwHx mVLCm6BOK6NY2qjLdB1Pty/o00C7MfRzNc3SQto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZl298w2LBVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zl dRC6LOaYDYQZIrsgNRAAiVyEQ9vBPgTkFPHCSDXXc276WTjKyep5so0SUY8MMsf5/p9BnxI+ boAMjcRYxufhuWwhrWmVu1rgcdlJ87uVG8dkig4kXeFUrB5GtaaHPyiCdxwhV/cguhnG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Q/pM0TJdJo+ zCL6RzjblLCssbd7h0CusNSda+TmbNXRXPOmSPJkmPLtBNB1vd75rspLkl7uCjf5IFiJM0hZ TaSVtd8XU/fkr/YPf+q6GjMiq9NFlVcQ6duv22vaIJy4EUbICbQhGrWRQpj9aqpekZD4nSR+ uzUagmdsPeEQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYU0SHTqWJMApeME+vJqcoJU7NiKz3HnsAgAAET4CAAAQVAIAAEEaAgAAVEAA=
  • Thread-topic: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

On 19/04/2022 14:10, Peter Zijlstra wrote:
> On Tue, Apr 19, 2022 at 01:12:14PM +0100, Andrew Cooper wrote:
>
>>> Subject: x86/xen: Add ANNOTATE_ENDBR to startup_xen()
>>> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
>>> Date: Mon, 18 Apr 2022 09:50:25 -0700
>>>
>>> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
>>>
>>> The startup_xen() kernel entry point is referenced by the ".note.Xen"
>>> section, and is the real entry point of the VM. It *will* be
>>> indirectly branched to, *however* currently Xen doesn't support PV VM
>>> with CET active.
>> Technically it's always IRET'd to, but the point is that it's never
>> "branched to" by the execution context of the VM.
>>
>> So it would be better to say that it's never indirectly branched to. 
>> That's what the IBT checks care about.
> Right, so I was thinking the IRET could set the NEED_ENDBR bit, but
> yeah, that might be stretching the definition of an indirect-branch a
> wee bit.
>
> How about so then?
>
> ---
> Subject: x86/xen: Add ANNOTATE_NOENDBR to startup_xen()
> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Date: Mon, 18 Apr 2022 09:50:25 -0700
>
> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
>
> The startup_xen() kernel entry point is referenced by the ".note.Xen"
> section, and is the real entry point of the VM. Control transfer is
> through IRET, which *could* set NEED_ENDBR, however Xen currently does
> no such thing.
>
> Add ANNOTATE_NOENDBR to silence future objtool warnings.
>
> Fixes: ed53a0d97192 ("x86/alternative: Use .ibt_endbr_seal to seal indirect 
> calls")
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Link: 
> https://lkml.kernel.org/r/a87bd48b06d11ec4b98122a429e71e489b4e48c3.1650300597.git.jpoimboe@xxxxxxxxxx

LGTM.

~Andrew

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.