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

Re: [PATCH v3 1/5] xen/livepatch: drop load_addr Elf section field


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 26 Sep 2024 14:35:55 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Iqt8yQpY7eJkVtkAsCyd+/WLRRQw+5JuiyQ5cX6j2F8=; b=du1NvIMZh4Jh5KBeBNQVMNXt3GqIL9rk47njpfp9j0u8WjLcZG3RNzac97TN7sOPFlh3aAekbB/q9p4Urk14r45rqMQSkXYaWwAkqGR1mFxyfxjCHfRBIWXBNiJQ48rybwMMCNhi6KkuS93hQJZTmo6wVaWRywt+r5dBqDe1RhNfLqnej+BqQ3Bbod8Xr5Btpf0A+r0UfERJHjSttNlQKTXSWY8YpcyXVZ4QBzIYqvT+6J/4C2wzfi+51frsbkdGLnHdRk4OYzJSsFWFO5xwbLMp5GEW8RML3yF+9f1W4RdeOKIpk1StEeAyMdCR4J4mgZlgRO1TiBnV/licG1+nJQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FjR+jEMaMD1b3c2GOlzI1V1cbpsE7poidy3ck7S9ZgLAnP2PpmqaEy4ZiPNKG4uBLNwoJ/lB+LBuwLFzVnTaJUL8Y2dAAemWWkVvvXybrFhRTyhF6eoKheLVweKjY4IULBrY2InGMYx5ujbFPAaH2GA4ynDYD3o9ZgMq9PD4bEBOUq+ihoXJn5fEkc2kdJK90c5C56YW3JWKrU3HbqXrvQ8AjfRyBwP85yv8nEOZwOpev/ol1wEY4DPVwYO7GW8XWD0kyeJwam0VcvtGGx7N3YahuUk/fsLWABZ+MNc3PzUgMk7lbai5aVatQZ5cSwrQY3PC7VFE8Nq2+79GiAOEDw==
  • Cc: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Thu, 26 Sep 2024 12:36:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 26/09/2024 12:14, Roger Pau Monne wrote:
> 
> 
> The Elf loading logic will initially use the `data` section field to stash a
> pointer to the temporary loaded data (from the buffer allocated in
> livepatch_upload(), which is later relocated and the new pointer stashed in
> `load_addr`.
> 
> Remove this dual field usage and use an `addr` uniformly.  Initially data will
> point to the temporary buffer, until relocation happens, at which point the
> pointer will be updated to the relocated address.
> 
> This avoids leaking a dangling pointer in the `data` field once the temporary
> buffer is freed by livepatch_upload().
> 
> Note the `addr` field cannot retain the const attribute from the previous
> `data`field, as there's logic that performs manipulations against the loaded
> sections, like applying relocations or sorting the exception table.
> 
> No functional change intended.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
For Arm part:
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal



 


Rackspace

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