Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation

From: Linus Torvalds
Date: Wed Jul 20 2022 - 14:07:51 EST


On Wed, Jul 20, 2022 at 10:50 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> [ 2.464117] missing return thunk: lkdtm_rodata_do_nothing+0x0/0x8-lkdtm_rodata_do_nothing+0x5/0x8: e9 00 00 00 00

Well, that looks like a "jmp" instruction that has never been relocated.

The 'e9' is 'jmp', the four zeros after it are either "I'm jumping to
the next instruction" or "I haven't been filled in".

I'm assuming it's the second case.

That lkdtm_rodata_do_nothing thing is odd, and does

OBJCOPYFLAGS_rodata_objcopy.o := \
--rename-section
.noinstr.text=.rodata,alloc,readonly,load,contents

to put the code in an odd section. I'm assuming this hackery is
related to it then not getting relocated.

Linus