[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 Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 7 Jun 2023 12:19:06 +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=wzAetTIwQXdC7Zhwn9GtVFyz+TsaxBc7lbOayXvekiI=; b=bEhdDMvAv+67PYttWXUeBGRUEzwwzkWyaZnYw0P5Sa6rfLSohk485hiwOXdqrS7F1yEpsNNU64p7I3EwZD65oxYsEGAnfzf0Pt6hMYfsZbGfHridPiRQDMz8A2txfd7g2snnSiIKKwPmDL0xgGaMOG2WdKLrfPRoCengU2dliwZ6oe5YTRUpR0QbGtTFIC8d5y+Uikg4tVqxig75+GJ2egYTqTZ2IYVBn1h0MaoH81ZFp2n+oL+H3pMoKJFxTDb95GR0d7gx+ECw7cR16yErtInDq1U8woPevhPwyR5G/jdJVVjzIgpOjrKF4/nTNs8BRtxzpymGggzmIkU9IOSLCw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RX5xisyb7K4RUWfBTnrO2bNd5t+Bhkvn4k7H6NnUNSjLzIoy+juCnwlZBPhOHRbnQaoP8T+ACxB4CnxNL/CialWsDGvy4ua2YGAOhDfLTxK3OjbbgRDEh+6lznHntVmYiNVHabzATlopzQpyHfpWrLgZl+m9gfGL7Mj25T/+4rLfTgy8t4f/5O7qBsz2ThN4B7i3tEScSTqcNSy9J/M7y6GHeIROGDY01+8mvT4qS5qx7KEmw+OD6uJ0CMlzGoL7dZD+ITonESYNqciT1sVBVUDlK60mx7tqeJj895Mx52LA5irRLNi5LNT4681V+HJC2HYKIZFcQfeFNh6sPZn+jw==
- 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 10:19:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 07.06.2023 11:17, Roger Pau Monné wrote:
> On Wed, Jun 07, 2023 at 11:10:27AM +0200, Jan Beulich wrote:
>> 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.
>
> But the init_or_livepatch attribute doesn't remove the function when
> !CONFIG_LIVEPATCH,
Yes up to here.
> so it's not a replacement for the ifdef.
That depends how you look at it. We don't meaningfully care about a
few extra bytes in .init.text, I think. So it really is the Misra
requirement of not having unreferenced symbols which makes the
difference here.
Jan
|