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

Re: [Xen-devel] [PATCH v1 6/9] livepatch: Initial ARM64 support.



>> The only reason apply_alternatives() is named thusly is to match Linux. 
>> I am not fussed if it changes.
> Would this be OK with folks?
>
> There is a bit of disreprancy - ARM has 'const struct alt_instr *'
> where the 'const' gets dropped later on. That can't be done x86
> as 'apply_alternatives' at the gecko modifies the structure.

Where? I can't see anything which actually modifies the alt table, and

diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c
index be40b13..3dd5de8 100644
--- a/xen/arch/x86/alternative.c
+++ b/xen/arch/x86/alternative.c
@@ -146,7 +146,7 @@ static void *init_or_livepatch text_poke(void *addr,
const void *opcode, size_t
  */
 void init_or_livepatch apply_alternatives_nocheck(struct alt_instr
*start, struct alt_instr *end)
 {
-    struct alt_instr *a;
+    const struct alt_instr *a;
     u8 *instr, *replacement;
     u8 insnbuf[MAX_PATCH_LEN];
 

compiles just fine.

>
> Thoughts? Make it the same on ARM and x86?
>
> From 2c26d4d214926cd23b73f98c1fdaecd98b010da6 Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Date: Tue, 16 Aug 2016 22:20:54 -0400
> Subject: [PATCH] alternatives: x86 rename and change parameters on ARM
>
> On x86 we rename 'apply_alternatives' -> 'apply_alternatives_boot'
> and 'apply_alternatives_nocheck' to 'apply_alternatives'.

Looking at it, the current x86 apply_alternatives() can be folded into
its sole caller alternative_instructions(), removing the need for the
new apply_alternatives_boot().

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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