Thread (14 messages) 14 messages, 4 authors, 2d ago

Re: [PATCH v2 6/9] arm64: cfi: Use CONFIG_ARM64_FUNCTION_PREFIX_NOPS for the type hash offset

From: Jose Fernandez (Anthropic) <hidden>
Date: 2026-09-27 14:06:02
Also in: bpf, linux-efi, linux-kbuild, live-patching, lkml, llvm, rust-for-linux

On Fri, Sep 25, 2026 at 12:17 PM Bill Wendling wrote:
quoted
+       return 4 + 4 * CONFIG_ARM64_FUNCTION_PREFIX_NOPS;
*drive by review* Could you explain the two fours in this equation
with a comment? (Feel free to ignore this if it's obvious to
developers.)
The first is the type hash and the second is the size of a NOP. For v3
I'll spell the second one out and add a comment for the first.

	/* The 4-byte type hash sits before the prefix NOPs. */
	return 4 + CONFIG_ARM64_FUNCTION_PREFIX_NOPS * AARCH64_INSN_SIZE;

- Jose
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help