Where is the return address stored in GPU program?

I’m contemplating memory safety within GPU programs. I’m particularly interested in understanding where the return address is stored when a function concludes using a RET instruction. As an example, on the Arm platform, the return address can be stored either on the stack or in the link register (lr).

Hi,

Thanks for your question.

We need to confirm with our internal team.
Will get back to you later.

1 Like

Hi,
Please share the details of the use-case. It looks like you don’t need to know this in normal use-cases. Wou like to know why you need this.

I am in the process of developing a toolchain aimed at enhancing the security of GPU kernels. Specifically, I want to prevent attacks such as buffer overflow exploitation that can hijack the GPU kernel control flow (overwriting return addresses). If the return address is stored in memory like CPU’s calling convention, I need to know its location. Then, I can enforce integrity on it, similar to the approach used with a shadow stack. Thank you for your help.

Hi,

We don’t have a public information can share about this question.
Thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.