Skip to contentSkip to conversation

xsplice: Prevent new symbols duplicating core symbols

PATCH In review Ross Lagerwall 2 participants 2 messages May 10, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xsplice: Prevent new symbols duplicating core symbols

When loading patches, the code prevents loading a patch containing a new symbol that duplicates a symbol from another loaded patch. However, the check should also prevent loading a new symbol that duplicates a symbol from the core hypervisor.

---

Wei, can you consider this for 4.7? Thanks

 xen/common/xsplice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/xsplice.c +2 -1
index c9fc53a..21b9ec0 100644
@@ -748,7 +748,8 @@ static int build_symbol_table(struct payload *payload,
 
         if ( !found )
         {
-            if ( xsplice_symbols_lookup_by_name(symtab[i].name) )
+            if ( symbols_lookup_by_name(symtab[i].name) ||
+                 xsplice_symbols_lookup_by_name(symtab[i].name) )
             {
                 dprintk(XENLOG_ERR, XSPLICE "%s: duplicate new symbol: %s\n",
                         elf->name, symtab[i].name);
Signature · 7 lines
2.4.11


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw
Quoted 10 lines · Ross Lagerwall

When loading patches, the code prevents loading a patch containing a new symbol that duplicates a symbol from another loaded patch. However, the check should also prevent loading a new symbol that duplicates a symbol from the core hypervisor.

---

Wei, can you consider this for 4.7? Thanks

This looks like a valid and simple bug fix, I'm fine with this going into 4.7.

Wei.

Quoted 20 lines
 xen/common/xsplice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/xsplice.c +2 -1
index c9fc53a..21b9ec0 100644
@@ -748,7 +748,8 @@ static int build_symbol_table(struct payload *payload,
 
         if ( !found )
         {
-            if ( xsplice_symbols_lookup_by_name(symtab[i].name) )
+            if ( symbols_lookup_by_name(symtab[i].name) ||
+                 xsplice_symbols_lookup_by_name(symtab[i].name) )
             {
                 dprintk(XENLOG_ERR, XSPLICE "%s: duplicate new symbol: %s\n",
                         elf->name, symtab[i].name);
Signature · 1 line
2.4.11

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel