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

Re: [PATCH v2] livepatch: apply_alternatives() is only used for livepatch


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 7 Jun 2023 11:10:27 +0200
  • 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=YP+IbsYJMlYC25NkZV8IWkUlH8FiUEwuE1hTTg7c8KA=; b=n6GniQL+WH5qyhzRRz414rk9zbBbfpwu1fq+0axos5WmOZJvBDkkTQYX4p8fzP+rkE4QK3TeSeZyTkmoeeKfIu2C1F54ygzFcwVFQkRzjoW1Yim5ncX/jpSaNIxXpEyQJlKlgdFyrSV+0CoZJ4Nfkprm9WkULWT96PCkPC26Rdes5qfulnYAQ/ySTZOHgm9jCFVVD+DixHB1+XvaHr2de9Cj3Slex2FZ2WFp+WLcTFJ/vdZU7vYexQZSjR7IZybgtSUL9uv8FIoen9w82wK9PKKJefXoK3/1bSUytg1D+AX1axk1+WFIzFvzl1KZgY1199+J4ds51ToCbwwxOyXlOQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RmDpn4wEaOcfKSvXzBUlkNubvFLF/gEKfNTYs2GA/fY+qS79neGs1BZj3Zelz7E3AXGT+krGmRoT6qnQ0iLDmHsBGBa/KTdZ0ATK8P54qaKq7R/veG3CrqSU42SOeo/01OyHxUbxub/zzZ7QusEactjHTJp1uKAZYUeDZJmSYevMtXL088CyH+t6q+T6RWMA0wHTtZJbnDQdSbMMHDiaQqwm0EQTA+BRA9KaQHyWHB4ZDS7HwdWfvHToyPYzuh9JhYMTzm43LT9MUc2ab8tD0269/p7Hkn1gpvsfR1Z7phnzGuLT5L+IllL+N3u4m5bNLRLx0B+z1BaoIVkdmaQyDw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Jun 2023 09:10:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.06.2023 11:01, Roger Pau Monne wrote:
> Guard it with CONFIG_LIVEPATCH.  Note alternatives are applied at boot
> using _apply_alternatives().
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
albeit the implicit ack therein is only on the assumption that (apart
from me) it is generally deemed better ...

> --- a/xen/arch/x86/alternative.c
> +++ b/xen/arch/x86/alternative.c
> @@ -358,11 +358,12 @@ static void init_or_livepatch 
> _apply_alternatives(struct alt_instr *start,
>      }
>  }
>  
> -void init_or_livepatch apply_alternatives(struct alt_instr *start,
> -                                          struct alt_instr *end)
> +#ifdef CONFIG_LIVEPATCH

... to have the #ifdef than the init_or_livepatch attribute.

Jan

> +void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
>  {
>      _apply_alternatives(start, end, true);
>  }
> +#endif
>  
>  static unsigned int __initdata alt_todo;
>  static unsigned int __initdata alt_done;




 


Rackspace

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