[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: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 17 Mar 2022 15:09:14 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=XC6wo68JnROZLE5tnSqHf0oA8LW1WnCccPpKJLGbbao=; b=SmNpd5jLPnI1pTcqMYw5wsMO2Wgjd3vLYcIan1MDA+10u0tUaBup32RDIsMKzoVFpnwBh+WptHsxfH4uN2+bV2b88a6rcXlM4lbdyag5otLDir6dYsaJrWXgZNU2fV5MjNyDEZGykN3kA8L75LQZtm25TErLo6q+JC1CZcA66lAO/jwBrtc4wpNU5zt8qz6KaJkzY5pQdraeR4FAvCHMYE4vJcSaTa9pRBni1K0C6rX0qaPuGrkM32bEpKzrIxhxuAheoLOL+bIU+8JIfnJpEEZ4oJLP8KTrswtZp0RpU4BfqW6nKgRPzxB9yyj4GouWw3K26WCmnYbqdh/bSiInPA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IubrONwdD95SJ6RKR3SnqHLWT+jFFi2Nwh1VzZPnqguUBUhdFFweCt6hTTNO8lYL7L88KbI0Puk883MbeR/MeQlNBVIMidi71YuAlxQp9/NWuGJ7L0AY5L8fs9zftxIcxLwfdaW8xXRUN6afOQ3ePPZzgkBz8ErwXE24+8X7dJt/ywTC7mCjktCr17fMktxiGBusJE7dpqmpd03vStFvjvHsC/6gBdfiWkl6CrivLXED6uEfUloSiTVG1617YVx7obLAVO+8J5BRvDB107jUgm+o0rIs4Sbm5k7gadeAIuDjdrtpzxA/s37xLqlnJ6ktZtccgcl5qB5gN7OF0eGCQw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 17 Mar 2022 14:09:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.03.2022 15:00, Andrew Cooper wrote:
> 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.

I think having such relocations is quite natural, but ...

> 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.

... of course it's possible to eliminate them. Whether that's worthwhile
to add logic for I'm not sure.

Jan




 


Rackspace

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