[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: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Thu, 17 Mar 2022 14:00:19 +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=eGgiwjSdFnXMpx1fH9IxZVdLpg2wRThgHIiNSW6D59Y=; b=TIqO84lpLJGGI2DWHKyuXmzDUUfyO+oSrLYHgZpLsRmyjyfDsRjXSG3fvD/9yBnz4E0GKUDBIVq3aXtkBrO7KIojI4ORHoURnbv6B0vyQ74wp1X3c538oxhDhvIgNi4jBllsDFOIdsDnWH8zETKk+Oz5ME/HH/AGttdeeTr//OxqvQv3TsyAwiVEJUaqaWpsIWvHILGAHk7tT08YX/qCyARo1hsiRSmJLROchJOiUuQa9F9gqqccMnhF89f2PjqMpA5uXFTOo28rSfOI+oNwyg0NCy0A2UWzbceV6K/WllQk0PFFg27fLilmIqhRd6e7KT5qn2qz+OuOdgLeBWEfww==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O+6zHQDs/Lmy+vY4jI4QtSrdT3sP7C3S8cPADXyvNCodkBVvE7Q6a6wD+JwVM5BjUtLQzxuwQKT3mPfX7CMPU7TZpXfiBLXQYA80XOOh/exrd4xwsICRNZRITsEwhN7YVlXtyrDV+c6A97xzPa3s+LssOMSx+GnSHzaJYfJRWNalvs5ibRsPM9wqZvI18m4DMWGkwQ2kXPXkfsDO62/wgmmt24e/wR7r5ZM/mM+8Z0w6gmCg37IfSo4gx8gVDXqPm2ZvC4jxsekEnPtvRhuJAkkiMgeJG55TVsBNvQiwtEKFvNfjS5UHhvmivuuSH8VJieH5WmuafLnh1PobAzrwPQ==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
- Delivery-date: Thu, 17 Mar 2022 14:00:38 +0000
- Ironport-data: A9a23:JqYG56AvIpWNkBVW/z3jw5YqxClBgxIJ4kV8jS/XYbTApGxz0TFRz WoeCG2BPf6KYWf8e4p2boi+8xxUvpPSydBmQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Vg3dYy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPh99 +dvjL6eZzwbL/OQwv8ibBdBPiNXaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwKKsXxMZxZkXZn1TzDVt4tQIzZQrWM7thdtNs1rp4eTamHP pZIAdZpRCjOcxx2H3dUNLYVuMu3jyLnNGJ89mvA8MLb5ECMlVcsgdABKuH9eduMX8xZ2FmZo mHu+H7wCRUXcteYzFKt4n+qw+PCgy7/cIYTD6GjsO5nhkWJwW4eAwFQUkG0ycRVkWbnBYgZc RZNvHNz8+5iryRHU+URQTW0n0ymhzwydeF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NdKp4QOMMW9G+BGDBSQ/FdGiSPVPkHqcaPG+lke+83JwloOWxPJAYxpo7n5 rMFFteqG4pYkrrTdaD2ZVamyq9NllVnQ6dvf22y6IJyIEUHoCbQhFrYGpe5vednw==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYOe+gjdXCu7EMK0+5Er/7E5QfQ6zDmssA
- Thread-topic: [PATCH 1/2] livepatch: do not ignore sections with 0 size
On 17/03/2022 11:08, Roger Pau Monne wrote:
> 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.
I agree this is a bug in livepatch handling, but it's also an error in
the generated livepatch. We should not have relocations to an empty
altinstr_replacement section in the first place.
This will probably be from the lfences, where the replacement in a nop
and takes no space. I think I know how to fix this case.
~Andrew
|