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

Re: [PATCH 1/2] livepatch: do not ignore sections with 0 size


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Date: Thu, 7 Apr 2022 16:16:12 +0000
  • Accept-language: 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=p+bKdzziTzyhaZjlUs5f17T9HEOXH44BuH4BfxkL9Fg=; b=ZVdcZ0dNSx8bo1I+czyqV3Sa0H/5VmzCFvAM6r5lMknVf0v9nKrcTQtbeIU9ATx4HNlbl/rDMDkvkOZ+2VzaZxOYJsLAbNJQ18ThU0gmbndY/ieHEouyc3k/9boRdr/d7rmjXYHTSW86Boiy1GVmkDBKff9JD9062xNp5pJrfvzSZaaMiuVWc+92nfj/53bLVVWZLab035M6S+yoOwVLRIYkHmV5iKfBQAfQhE1SXLf7bLQQELgEST87WIzo83ZKx/7uLyA/QQI8wVxZYDsLIpspBCoO+s2hZNqJd9ZaQGkGFi1msdbwMMf1AGjf+iY4q50MYeUvprcpU0I4NSfXng==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XeQHF6umAfQDb/xvZsI1v6v4F6z7WwBquc4DDg7tSr3DwrwLcWEdPdKLlDkO3DSbZ7L0Uw6986ZXV4g1XgQL803wLnKW60AVQJ5dUwYPdVEgVB0Gqfcile+oiOdNj4pRCRrTMKmzQH3GQNjqIn2g7o5qS5fud/94RajbDPvfXfwNhy5hHRIeWPfkw/YQwukUld8HoJmjGu+Po0xVp6/zwHL1ApM40OizmoO1UcudA1a1tvvZ7944E6zxvJHDgsaU3sZO4s6AnBkDziHNX2k1qQzdtrvNDUjoJhe+SXervmnjCmqbCM35T373xeXLYTcTGYXnP9872dS7DyUhJl/UkQ==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
  • Delivery-date: Thu, 07 Apr 2022 16:16:31 +0000
  • Ironport-data: A9a23:/XfhV6mhei5SNjvIsQoZUsro5gyLJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJMCG7UOP+OZ2WnKohyaYXjpEgH7J+Gz4MxHFFk+y88FSMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EoLd9IR2NYy24DlW1zV4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYCigvD6+TnfghQhgCOCZEIoZUoKOALi3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3oHZ71nfdBPkrW4/KR6Hi7t5ExjYgwMtJGJ4yY uJHOWQ+NEmdPHWjPH9ILqJhsrmTt0PkUCRe8F6kqIFw2Gr6mVkZPL/Fb4OOJ43iqd9utkWfo HjP8yLmAxUZHNuFwDGB/zSngeqntTP2XsceGaO18tZugUaP3SoDBRsOT1y5rPKlzEmkVLpix 1c8o3R06/JorQryE4e7D0bQTGO4UgA0GPVWIu9l7R2x26uOyAGjGUMWFiIGZ4lz3CMpfgAC2 liMltLvIDVgtryJVH6QnoupQSOO1Ts9djFbO3JdJecRy5y6+dxo0EqTJjp2OPTt5uAZDw0c1 NxjQMIWo7wIxfAG2Kyglbwsq2L9/8OZJuLZC+i+Y45E0u+bTNP9D2BLwQKChRqlEGp/ZgPc1 JTjs5LDhN3i9bnXyESwrBwlRdlFHcqtPjzGmkJIFJI87Tmr8HPLVdkOvGAkdBo0YplbIGaBj KrvVeV5vsI70JyCN/EfXm5MI55ykfiI+SrNCJg4keaikrAuLVTarUmClGab3nz3kVhErE3ME czzTCpYNl5DUf4P5GPvH481iOZ3rghjlTK7bc2qlHyPjOvBDEN5vJ9YaTNimMhit/jayOgUm v4CX/a3J+J3DLWlMnaKq9ZKRb3IRFBiba3LRwVsXrfrCiJtGX07Cu+XxrUkeod/mL9SmPuO9 Xa4MnK0AnKm7ZEbAW1mskxeVY4=
  • Ironport-hdrordr: A9a23:/4eOVqE84VJfBbO3pLqEi8eALOsnbusQ8zAXPiFKKSC9F/byqy nAppkmPHPP4gr5O0tApTn/Asa9qBrnnPZICOIqUYtKMjOJhFeV
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels:
  • Thread-index: AQHYOe9tRJv1F56fOUuExIhUnmsVN6zkwUJS
  • Thread-topic: [PATCH 1/2] livepatch: do not ignore sections with 0 size

> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> Sent: Thursday, March 17, 2022 11:08 AM
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx <xen-devel@xxxxxxxxxxxxxxxxxxxx>
> Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>; Konrad Rzeszutek Wilk 
> <konrad.wilk@xxxxxxxxxx>; Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> Subject: [PATCH 1/2] livepatch: do not ignore sections with 0 size 
>  
> A side effect of ignoring such sections is that symbols belonging to
> them won't be resolved, and that could make relocations belonging to
> other sections that reference those symbols fail.
> 
> For example it's likely to have an empty .altinstr_replacement with
> symbols pointing to it, and marking the section as ignored will
> prevent the symbols from being resolved, which in turn will cause any
> relocations against them to fail.
> 
> In order to solve this do not ignore sections with 0 size, only ignore
> sections that don't have the SHF_ALLOC flag set.
> 
> Special case such empty sections in move_payload so they are not taken
> into account in order to decide whether a livepatch can be safely
> re-applied after a revert.
> 
> Fixes: 98b728a7b2 ('livepatch: Disallow applying after an revert')
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>


 


Rackspace

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