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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 7 Jun 2023 10:47:07 +0200
  • 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=R41ycdtGBp8x31As+gryMGntCQYt9c19C8Pfcj9qd0w=; b=UArUivx5uI4GXvJ/LjtTDKGeQPefMNaq9rpTwl3unAMFnexbrEIOMtE9vuFjROsQ8Fj5WAC5Ct9pcC9n310U0o3ssmHj6Sbeba97aDfuxs+L0D+uhfegIKAstRbKYROUyqm5ruk6Z8fD87Yfn/xKbrBjsNB+BkEVlLWcdCsQ/HVmq3x5zje2utCXG0AqRctLWaY5yb7gmdYelOOSK5FwqPywEYLQR0sGf9gNpu6QymZTIWKGQzJTTP6NWM/wH3ctBA6429nlLsNRWYZM2kfaB0M0Ed7Fs/Rsb3g6yNz9i4+0Oxh3w2x/IsuavvO5jQY2KyJywvAaISPsYDhpbMNfwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c311jBEhHZr0r9rubvkk0MH3h0Zy3m7pLajhJ6u4/1jHARfEIyFPl2Y3lEnBOCyngOD2sstTXwFzN2xb3QJsgdAlZzP0zj6hsx9cE5fa6hXk/TBjKcZBYjfW8PX1jBlEN7EUCoOpy+OqBJCZNyhOkngvlAR1n2084X40bLoiyISbFfqYfmd1tpMBIoxBMqd/v51V+3HxtKCKnDhfzJboVkWXdBL5g2EP3YyhQ+U4PNKGlNGM+wKLLlBdMEQT7FpCmVhsSgG9tAJpa86YBc8YqhpwQDTd/+Ba2KhMxqHI+ApEKg6ci+m/M2ui3X0DrX6zBaeXTI6BPRE7uWa1tMyZ/Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Jun 2023 08:47:33 +0000
  • Ironport-data: A9a23:ORH4GKh30WFqFdHPOswiqBMkX1615REKZh0ujC45NGQN5FlHY01je htvDWmPbv6MZzT1KtBwO4i0/U8PsMKHn9QxSgdtrCpnRXwb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyq0N8klgZmP6sT4geBzyB94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQGdS0WbUzav9mK3eOxG8x+pvsiA+nkadZ3VnFIlVk1DN4AaLWbGeDgw4Yd2z09wMdTAfzZe swVLyJ1awjNaAFOPVFRD48imOCvhT/0dDgwRFC9/PJrpTSMilEoluS8WDbWUoXiqcF9hEGXq 3iA523kKhobKMae2XyO9XfEaurnxHqiB9xNRObnnhJsqATU+1FUBxIfb2eQuue+hVGBCvB/M mVBr0LCqoB3riRHVOLVXRe1vXqFtR40QMdLHqsx7wTl4rHP/w+TC2wATzhAQN8rrsk7QXotz FDht9H0AT1itpWFRHTb8a2bxRu4NDIJN2YEaWkBRBEc/tj4iIgpi1TESdMLOJCyitr5CDTh2 QegpSI1h6gQpcMT3qD99lfC6xqzorDZQwhz4R/YNkq14wU8aIO7aoiA7VnA8e0GPIufVkOGv nUPh46Z9u9mMH2WvCmEQeFIFrfw4f+AaGfYmQQ3Q8hn8Cmx8Xm+e4wW+Ct5OEpiLscDf3nuf VPXvgRSopRUORNGcJNKXm54MOxypYCIKDgvfqm8ggZmCnSpSDK6wQ==
  • Ironport-hdrordr: A9a23:ZLEz0Kmv42/NV+LhxzWiD+dg5yfpDfIi3DAbv31ZSRFFG/Fw9v rDoB1/73TJYVkqN03I9ervBEDjexPhHO9OgLX5VI3KNGOKhILCFvAA0WKN+UyEJwTOssJbyK d8Y+xfJbTLfDxHZB/BkWuFL+o=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jun 07, 2023 at 10:14:35AM +0200, Jan Beulich wrote:
> On 06.06.2023 19:23, Roger Pau Monne wrote:
> > --- a/xen/arch/x86/include/asm/alternative.h
> > +++ b/xen/arch/x86/include/asm/alternative.h
> > @@ -24,7 +24,9 @@ struct __packed alt_instr {
> >  
> >  extern void add_nops(void *insns, unsigned int len);
> >  /* Similar to alternative_instructions except it can be run with IRQs 
> > enabled. */
> > +#ifdef CONFIG_LIVEPATCH
> >  extern void apply_alternatives(struct alt_instr *start, struct alt_instr 
> > *end);
> > +#endif
> 
> I don't see the need for an #ifdef on the declaration. We avoid such
> in a fair number of other cases, keeping the code better readable.

Hm, yes, we will get a linker error anyway if attempted to use without
livepatch enabled.

Thanks, Roger.



 


Rackspace

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