Re: [PATCHv5 bpf-next 6/8] x86/shstk: Add return uprobe support

From
Edgecombe, Rick P <rick.p.edgecombe@intel.com>
Date
2024-05-15 01:10:06
Also in
bpf, linux-man, linux-trace-kernel, lkml
Reply to
Jiri Olsa, 2024-05-13
On Mon, 2024-05-13 at 15:23 -0600, Jiri Olsa wrote:
so at the moment the patch 6 changes shadow stack for

1) current uretprobe which are not working at the moment and we change
   the top value of shadow stack with shstk_push_frame
2) optimized uretprobe which needs to push new frame on shadow stack
   with shstk_update_last_frame

I think we should do 1) and have current uretprobe working with shadow
stack, which is broken at the moment

I'm ok with not using optimized uretprobe when shadow stack is detected
as enabled and we go with current uretprobe in that case

would this work for you?
Sorry for the delay. It seems reasonable to me due to 1 being at a fixed address
where 2 was arbitrary address. But Peterz might have felt the opposite earlier.
Not sure.

I'd also love to get some second opinions from broonie (arm shadow stack) and
Deepak (riscv shadow stack).

Deepak, even if riscv has a special instruction that pushes to the shadow stack,
will it be ok if there is a callable operation that does the same thing? Like,
aren't you relying on endbranches or the compiler or something such that
arbitrary data can't be pushed via that instruction?

BTW Jiri, thanks for considering shadow stack in your work.
Thread (32 messages) 32 messages, 7 authors, last reply 2024-05-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help