[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] create-diff-object: handle missing padding at end of special section
- To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
- Date: Tue, 18 Apr 2023 13:51:52 +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=m3r19hQM1WDXFiw+A77e9FObRqsL+dJACDbBC/vUIN8=; b=Rd93/vikXcqM5PuFDbhKDSwy77Fpdk0kswNCIiE6wFPfkzaAefMjhegvYy+BbhqGMbwOJk86wXEy0rJAo0eNjyo/EdXCxsB8N43h5CggXEqL2JEDFiovQsWh2RqkxlbQGYjeP9dQpL8me95QGA0kIuOdfo1Dz8kxrQxcVQt+6QDlBzFl1oxkOKHcaEKaZfJolRUM+LxrLhdEzNlNIkZPHVFGinut61+VwcpUNDe5GFna7RF/oWq63dup8qA5bpdN9zL9KX6cEnPwHmReNoy84bBCdkWmEw33DveSCi2x75m1nDaEm0IaUg0HC35Gkc4JhNerOfUyJl5NQi0VgEltBw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bKIls7F+d0piLKgOZVFheSOtOMWJK2GRGV85L1Rt+oPOa9DQKQxMCpASLDvgHdUDnb0PuFHQC4ed4xEII9hEuAhxt27X7HIYWUuddRa6nxeLE2CjQQ+ZV/Krz2Id1RRoOco1djjCX5EnYb2z8NJYQX+oHqPD8xDd8JkZ0jCfxRh9R5C3tYX4umx5zTKiQATk8VOm1TbT1zIPl/GXKzhq0ICfhSmV2nxt/VhsB8UgkNAA6dNADdFC2kR+l2h7UZ7tnalw4+CvwcmCAOBBmXGB78H0mMh8fj9VEn4BP2qF2HVa5z3CUZT9RbIwu1L6/pgSQbley824tZY436/86xRucg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
- Delivery-date: Tue, 18 Apr 2023 13:52:05 +0000
- Ironport-data: A9a23:KK4R0K2LYozNIOVsUvbD5eBwkn2cJEfYwER7XKvMYLTBsI5bpzcHz GdKCG/XOvjYYGb9eN0iOdi180MPvsfQyoBrTFZupC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS+XuDgNyo4GlD5gBnNagR1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfEWdT1 u4fdBk0fgm+gMPnw52LQbMvv5F2RCXrFNt3VnBI6xj8VK9jbbWdBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD5F4l+Ct7pX9W2QA9BTJ+uxqvC6Kk1IZPLvFabI5fvSQQt5O2EKRq W/c4G39BjkRNcCFyCrD+XWp7gPKtXqjBdNDSeLjqpaGhnWplmYQDT0NWGLgrNyEtlGbXdJnB Eo9r39GQa8asRbDosPGdw21pjuIswARX/JUEvYm80edx6zM+QGbC2MYCDlbZ7QOttcxRDkg0 VKhhd7lBTVz9raSTBq19bCStzq+fzcUKWwqYjUNRg8IpdLkpekOYgnnS99iFOu5i4PzEDSpm jSS9nFh2fMUkNIB0Li98RbfmTWwq5PVTwkzoALKQmai6QA/b4mgD2C11WXmAT97BN7xZjG8U LIswqByMMhm4UmxqRGw
- Ironport-hdrordr: A9a23:Mc2Td668sSJifYuRMQPXwNnXdLJyesId70hD6qkRc3Fom6mj/K qTdZsgpHzJYUkqKRMdcLy7VpVoIkmxyXcW2+ks1N6ZNWHbUQCTQ72Kg7GC/9ToIVyaytJg
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Msip_labels:
- Thread-index: AQHZbuSTaQYCrBXOqU2gniRwRe4uLa8xG8Ih
- Thread-topic: [PATCH] create-diff-object: handle missing padding at end of special section
> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> Sent: Friday, April 14, 2023 4:19 PM
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx <xen-devel@xxxxxxxxxxxxxxxxxxxx>
> Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>; Roger Pau Monne
> <roger.pau@xxxxxxxxxx>; Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>; Ross
> Lagerwall <ross.lagerwall@xxxxxxxxxx>
> Subject: [PATCH] create-diff-object: handle missing padding at end of special
> section
>
> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
>
> The paravirt_patch_site struct has 12 bytes of data and 4 bytes of
> padding, for a total of 16 bytes. However, when laying out the structs
> in the .parainstructions section, the vmlinux script only aligns before
> each struct's data, not after. So the last entry doesn't have the
> 4-byte padding, which breaks kpatch_regenerate_special_section()'s
> assumption of a 16-byte struct, resulting in a memcpy past the end of
> the section.
>
> Fixes #747.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
>
> This is commit:
>
> c2dc3836e862 create-diff-object: handle missing padding at end of special
> section
>
> In kpatch repository.
>
> I've seen the .fixup section get an alignment of 16 but a size of 81,
> which makes the error removed in this patch trigger. Overall I'm not
> sure why the original alignment check was done against the size of the
> section, the alignment applies to the address of the section, not its
> size.
>
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
|