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

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


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 18 Apr 2023 13:17:55 +0100
  • 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=EmqEYLVZS4IB3+FJFhu6PP4ws0zRPgYBkWt5s1tk+UA=; b=ECZG9nnpInqIJNMCiU1QAC8CE+EkQRENJT4TQh8t8sH49inbSNkFP/FRtfB8nxMeOa5pCLDMQjg462k/9K4B5joRPkjMkou/rLclu9UU7Q5UM2ZuVkE/9QV7bu2Brx4XabIHL3bmRyoj8M6f3NNcex/aZF+QurSWr6N7udQuSqAtDj1Ca6LwTc9CUFc4/AXAvp3KuqV+hTlCg6Fi0xeZ7vhNf9fINIH/vZ/cn/FfkThfFwxiBSGUnNWiMfSIJ/qhyEGXE8UF5jbiskr4plZZPutttKQedL/e8E8ljc0QCPOP661SEel9ovSlVX1r6q6rO7JBYysMyI2EejCY57Rwjw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GqyxmP9HeldJzpv6aoQFauD26P96/wWOOlx4KcB2rs7NbDeObaqq0rvezOjEi3+98mkhVdASVTAZNulhckJ7aiUdHRsUqpWQXfG/GO3fGxMQuCEkvAGtuXmemnzp9JFLRlWyBNZWE7TN2/hba4ZemJ1Hxry1CX4LUnjf8KJgvFTcyvNxXEJ+T300XP+skIQNgzLfuva/XfkHAmS8pPR4CV+dPkPLhA/FKWCTdwPFZU8iHM94Mn9L9LuYrtf6L/Z4SIPQctwvaChgsweqa9KzL6Z/gm8YEZV2hjKqeKeGZaZXTG8DJYNvWera/ZhXKIbPvGToethn5TChnszVfnmqgQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 18 Apr 2023 12:18:27 +0000
  • Ironport-data: A9a23:51ZmEqu3fB5WWvbfeBHUQN2UJefnVHtfMUV32f8akzHdYApBsoF/q tZmKWjVM/yPNzf8Ltwjatm2/B8AvMXRnNU2HlA5pC4yRS4W+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg3HVQ+IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4bKj6Vv0gnRkPaoQ5AOHxyFPZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwK2sjazaHuOeK/Z2iV9BM3PsIIvbzM9ZK0p1g5Wmx4fcOZ7nmGv2Pz/kHmTA6i4ZJAOrUY NcfZXx3dhPcbhZTO1ARTpUjgOOvgXq5eDpdwL6XjfNvvy6Pk0ouiP60aIO9lt+iHK25mm6xo G7c8nu/KRYdLNGFkhKO8262h/+JliT+MG4XPOTgpqU63QPMnQT/DjUHCEWnnsu4hnKFStBjK UcfwQYnq5U9oRnDot7VGkfQTGS/lg4RXZ9cHvM37CmJy7HI+ECJC24cVDlDZdc68sgsSlQC1 FWEgtfoDjxHq6CORDSW8bL8hSy2ETgYKykFfyBscOcey9zqoYV2hBSQSN9mSfaxloesQWi2x C2Wpi8jgblVldQMy6iw4VHAhXSru4TNSQk2oA7QWwpJ8z9EWWJsXKTwgXCz0BqKBN/xooWp1 JTcp/Wj0Q==
  • Ironport-hdrordr: A9a23:d/rAf61aDIwj9cd2AMs3RAqjBGIkLtp133Aq2lEZdPUzSL3/qy nOpoV96faQsl16ZJhOo7290da7MAjhHPJOjbX5RI3SPjUO4VHYSb2KjrGSpwEIeReQygcH78 ZdmsFFYbXN5DNB/L7HCWeDYq8dKfC8gcOVbJ/loUtFfEVMZ7976gtlFwqBVmFzTAlCQbo1fa D92iNPnUvbRUgq
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

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.

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.

~Andrew



 


Rackspace

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