Git Product home page Git Product logo

Comments (5)

joe-lawrence avatar joe-lawrence commented on July 30, 2024

repro-1386.tar.gz

Note that cpumask_weight() moves from .text.cpumask_weight to .text.unlikely.cpumask_weight, but otherwise carries no object code differences:

$ diff -upr \
      <(objdump -Dr -j.text.cpumask_weight          proc.ORIG.o) \
      <(objdump -Dr -j.text.unlikely.cpumask_weight proc.PATCHED.o)
--- /dev/fd/63  2024-04-15 14:53:36.281721258 -0400
+++ /dev/fd/62  2024-04-15 14:53:36.282721251 -0400
@@ -1,8 +1,8 @@
 
-proc.ORIG.o:     file format elf64-x86-64
+proc.PATCHED.o:     file format elf64-x86-64
 
 
-Disassembly of section .text.cpumask_weight:
+Disassembly of section .text.unlikely.cpumask_weight:
 
 0000000000000000 <__pfx_cpumask_weight>:
    0:  90                      nop

cpumask_weight() is included because create-diff-object considers the section change as allowed and marks the symbol as CHANGED:

static void kpatch_compare_correlated_symbol(struct symbol *sym)
{

	[ ... snip ... ]

	/*
	 * If two symbols are correlated but their sections are not, then the
	 * symbol has changed sections.  This is only allowed if the symbol is
	 * moving out of an ignored section, or moving between normal/hot/unlikely
	 * subsections.
	 */
	if (sym1->sec && sym2->sec && sym1->sec->twin != sym2->sec) {
		if ((sym2->sec->twin && sym2->sec->twin->ignore) ||
		    kpatch_subsection_changed(sym1->sec, sym2->sec))
			sym->status = CHANGED;
		else
			DIFF_FATAL("symbol changed sections: %s", sym1->name);
	}

	[ ... snip ... ]

The CHANGED status means that we will be trying to kpatch the original function with the new one.

from kpatch.

github-actions avatar github-actions commented on July 30, 2024

This issue has been open for 30 days with no activity and no assignee. It will be closed in 7 days unless a comment is added.

from kpatch.

github-actions avatar github-actions commented on July 30, 2024

This issue was closed because it was inactive for 7 days after being marked stale.

from kpatch.

github-actions avatar github-actions commented on July 30, 2024

This issue has been open for 30 days with no activity and no assignee. It will be closed in 7 days unless a comment is added.

from kpatch.

github-actions avatar github-actions commented on July 30, 2024

This issue was closed because it was inactive for 7 days after being marked stale.

from kpatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.