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

Re: [PATCH] x86/livepatch: enable livepatching assembly source files


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 18 Apr 2023 16:14:51 +0200
  • 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=iajh/4buaGwggkintFP9KUyTMsoP4KFgsTOOytx99xw=; b=VGhtUaEdwzVNbxpPKBwEMyPb9HxpnyjbmnQw9cqk1T9x1dpvrex23wc5aLYZtk6cSXusYHERu1xDjwF5NNOttzvoG484P2ZVV9MknwesPiSeyVpdfgm0Eu5477YltmRuYyOfsGyMQ4JdymYYmi81qAAM/z7OuHuQ0z/7RtbeuID+GvX7mv0yC05SSjK4wU/+Z6RfGbnxmYarZotbm5XZvRZ8ZViWxLgIjSQQrGTxDY5PoouHJxSmJB5LtUtdd0h4T40fn5tBkJidKWB/xOb4yEJIv+L3FZVFp4tYVkSB83yzVWYyMENG9EPXe4uRSsl2H91eRa9sAZiO0BVAoY/lWA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U28vIQqkB/2JUOxtlde5/DKuEjXYh0ckFK37v6OTpQpjLgyqKDqvLdTl1qRgMio0J3USR9fG7FnBdB9uyy0bbRzdzZ0trhvrARQOtid+ATr2mx1t6Zl+7Ng93HWq/jrFa5QSdvxBB54MetXZBsznYMBil5hEdUnZwC1xA+6H7/9ZU9u9/2EheySgFpzD4DidL5rxrM5oXTyZ5Q1uvQmkU0y3LgFsPyuMV//LxnMccRUbHRAq6X8g9DP2v1BnlRizZ9u5jw5BwJAZSPdCOkgRtg5RBqUwyPBA86qImyW81onJWOF1eU926+2n+zRhNovQYWEwUjQ9+SJPXDtOLm6tdA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 18 Apr 2023 14:15:14 +0000
  • Ironport-data: A9a23:UmPCc6rQXFNM0v4xzbknqfwNBFpeBmI+ZBIvgKrLsJaIsI4StFCzt garIBmPPPzbZjP0fd5xaNjl9k5QvcCBn9I1Sws4rSEzQyhA8JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WJwUmAWP6gR5weCzilNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXADoNXBSn2+2X+7GmEcdcqc0PEtPPDLpK7xmMzRmBZRonabbqZvyQoPN9gnI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jemraYWNEjCJbZw9ckKwv GXJ8n6/GhgHHNee1SCE4jSngeqncSbTAdpPRezpq6A66LGV7mgdUhwcS2Lhm9ykhm+ncd9dF GYI9wN7+MDe82TuFLERRSaQsHOC+xIRRddUO+k78x2WjLrZ5R6DAWoJRSIHb8Yp3Oc0TzE30 l6Cn/vyGCdi9raSTBq16bO8vT60fy8PIgc/iTQsSAIE55zvpd81hxeWFNJ7Svfq1pvyBC36x C2MoG4mnbIPgMUX1qK9u1fanzaroZuPRQkwjunKYl+YAspCTNbNT+SVBZLzt56s8K7xooG9g UU5
  • Ironport-hdrordr: A9a23:RLaMNKmgH2uKqmFMVP3OfDuMrZjpDfLv3DAbv31ZSRFFG/Fw9/ rCoB19726RtN9xYgBEpTnkAsO9qBznmqKdjbN+AV7AZniFhILLFuFfBOLZqlWNJ8SXzIVgPM xbAstD4bPLbGSTjazBkXSF+9RL+qj6zEiq792usEuEVWtRGsZdB58SMHfhLqVxLjM2Y6YRJd 6nyedsgSGvQngTZtTTPAh+YwCSz+e77a4PeHQ9dmYa1DU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Apr 18, 2023 at 01:17:55PM +0100, Andrew Cooper wrote:
> On 18/04/2023 10:24 am, Roger Pau Monne wrote:
> 
> > diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
> > index 7675a59ff057..c204634910c4 100644
> > --- a/xen/arch/x86/x86_64/entry.S
> > +++ b/xen/arch/x86/x86_64/entry.S
> > @@ -660,7 +660,7 @@ ENTRY(early_page_fault)
> >  
> >          ALIGN
> >  /* No special register assumptions. */
> > -restore_all_xen:
> > +START_LP(restore_all_xen)
> >          /*
> >           * Check whether we need to switch to the per-CPU page tables, in
> >           * case we return to late PV exit code (from an NMI or #MC).
> > @@ -677,6 +677,7 @@ UNLIKELY_END(exit_cr3)
> >  
> >          RESTORE_ALL adj=8
> >          iretq
> > +END_LP(restore_all_xen)
> 
> 
> While it's useful to have a concrete idea of what is necessary to fix
> all of this, I do not wish to put in markers like this.  This isn't
> about livepatching - it's about getting sane ELF metadata.

Right, Jan has expressed a similar opinion.

> This is why I had Jane work on using the Linux macros.  They account for
> *all* interesting ELF metadata, as well as taking care of things like
> the global function alignment settings, CFI patching space, etc.

I don't see much issue in using the Linux macros, if we agree we want
those.  Some of those would likely be unused, do we want to import it
wholesale, or just introduce the ones required?  Initially I might
just introduce SYM_FUNC_START{,_LOCAL}() and SYM_FUNC_END().

> Putting functions in separate sections should be hidden in the normal
> SYM_FUNC_START(), and dependent on CONFIG_SPLIT_SECTIONS behind the
> scenes seeing as we have that as a option already.

Sure.

Thanks, Roger.



 


Rackspace

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