<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/tools/objtool/tests/generic/test-cold-function.sh, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/tools/objtool/tests/generic/test-cold-function.sh?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/tools/objtool/tests/generic/test-cold-function.sh?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-09-21T09:02:54Z</updated>
<entry>
<title>objtool/klp: Add test for cold function halves</title>
<updated>2026-09-21T09:02:54Z</updated>
<author>
<name>Puranjay Mohan</name>
<email>puranjay@kernel.org</email>
</author>
<published>2026-09-16T18:43:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=76e7630d90d0d5ff402e06607662b1f9e34eff6c'/>
<id>urn:sha1:76e7630d90d0d5ff402e06607662b1f9e34eff6c</id>
<content type='text'>
The compiler splits unlikely code into a separate foo.cold symbol.  Both
halves are the same function and both belong in the livepatch: carrying
only the hot part leaves the cold path branching into unpatched code.

GCC needs -freorder-blocks-and-partition to split reliably.  The flag is
probed rather than assumed, and the test skips when the compiler declines
to split at all.

Signed-off-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;
Signed-off-by: Song Liu &lt;song@kernel.org&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Assisted-by: Claude:claude-opus-5
Link: https://patch.msgid.link/20260916184351.2720310-17-song@kernel.org
</content>
</entry>
</feed>
