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

Re: [PATCH v4 2/2] livepatch: set -f{function,data}-sections compiler option


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 9 Mar 2022 13:59:31 +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=7fHboFt1H1F2EmKeBCsatrn7S9iPmBTgvX5W9kJE2WM=; b=UUg7qbR7E579TjOYx7xX5319oaF0keX7/hk03TXCvbMXQkYGfyb0kZj/s/70fS4n0N2n5W7L1Qc6c+vDAiWel9SHNE41X3cJTQdS8tuQ94cq7Ia4RvpE1SNmGUCUKjNN1o/YoyB6IxPqAK2QPT0YDSpH1lRL0xJ4b6OX08t37R9vDZ3L/FrsbDtFCMPM7nPMUDW/YilDQywyaWjtEF4+DIV8cu/jKpzj/VXriQ28JySjo5t4V/swZuqVPWc8NU3qC/j8Bb24c8E9TnJfPZRbkb/0sGdKexmowgJxzgZS6pcQG/Ttk05zCpBq7wWotebJV1aCemZ7lIoKxX/hGdnK4Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vl9/pH1U0DZv5SI9HUdaFY/QVMMba+j4V/48piyHIy8inPInhJ0gOBsoOGfUqP8TnQpdoG+lzVIHoxNKlEFuU5xWO8v01BLdXaiVwesnGIFpfKn/S8PBOzyumaDRU4kJQ9KpT7ePMP5sAe12Nwp4KDcHgAPa/TnjtCrK1Kd4Xhglk2x/jVlWIQi4Miw8oEpq0wgkxCylqVqhPlfKKkk2gYlhm+l/C1k/DNi4pQwCfE0C7LXG+djglM5mz+yGsGGDK+2NamT5UmurEanNO99l+jr3e9oZepgLmuIZHCzgAoOKzUPgaLhwn0hE+eiTWTwS8fqR75anRuil+4hy03/c/w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 09 Mar 2022 12:59:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.03.2022 13:28, Roger Pau Monne wrote:
> If livepatching support is enabled build the hypervisor with
> -f{function,data}-sections compiler options, which is required by the
> livepatching tools to detect changes and create livepatches.
> 
> This shouldn't result in any functional change on the hypervisor
> binary image, but does however require some changes in the linker
> script in order to handle that each function and data item will now be
> placed into its own section in object files. As a result add catch-all
> for .text, .data and .bss in order to merge each individual item
> section into the final image.
> 
> The main difference will be that .text.startup will end up being part
> of .text rather than .init, and thus won't be freed. .text.exit will
> also be part of .text rather than dropped. Overall this could make the
> image bigger, and package some .text code in a sub-optimal way.
> 
> On Arm the .data.read_mostly needs to be moved ahead of the .data
> section like it's already done on x86, so the .data.* catch-all
> doesn't also include .data.read_mostly. The alignment of
> .data.read_mostly also needs to be set to PAGE_SIZE so it doesn't end
> up being placed at the tail of a read-only page from the previous
> section. While there move the alignment of the .data section ahead of
> the section declaration, like it's done for other sections.
> 
> The benefit of having CONFIG_LIVEPATCH enable those compiler option
> is that the livepatch build tools no longer need to fiddle with the
> build system in order to enable them. Note the current livepatch tools
> are broken after the recent build changes due to the way they
> attempt to set  -f{function,data}-sections.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx> # xen/arm

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




 


Rackspace

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