Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gotls:get ret_len by register in go >1.17 #623

Closed
wants to merge 1 commit into from

Conversation

alahaiyo
Copy link

@alahaiyo alahaiyo commented Sep 14, 2024

修复了gotls获取到的ret_len不正确问题

fix: #618

@cfc4n cfc4n added the 🐞 bug Something isn't working label Sep 15, 2024
@cfc4n
Copy link
Member

cfc4n commented Sep 15, 2024

Could you provide some information on the changes in register passing parameters for Go version 1.7?

@alahaiyo
Copy link
Author

Could you provide some information on the changes in register passing parameters for Go version 1.7?

golang/go#40724

@cfc4n
Copy link
Member

cfc4n commented Sep 19, 2024

感谢回复。

不过,我没有找到关于返回值在寄存器内的参数顺序变更的描述,能否给出相关描述?


Thank you for your response. However, I couldn't find any description regarding the change in the order of parameters within the 'return value' register. Could you provide a relevant description?

@alahaiyo
Copy link
Author

感谢回复。

不过,我没有找到关于返回值在寄存器内的参数顺序变更的描述,能否给出相关描述?

Thank you for your response. However, I couldn't find any description regarding the change in the order of parameters within the 'return value' register. Could you provide a relevant description?感谢您的回复。但是,我找不到任何关于“返回值”寄存器中参数顺序变化的描述。您能否提供相关描述?

Oh, I apologize. The specific ABI specification can be found in this document: https://go.googlesource.com/go/+/refs/heads/dev.regabi/src/cmd/compile/internal-abi.md
In our scenario, the first return value of the function is stored in the register RAX. I called your function go_get_argument_by_reg.

@cfc4n
Copy link
Member

cfc4n commented Sep 25, 2024

Sorry, I’ve been a little busy recently. I‘ll review it later.

@cfc4n
Copy link
Member

cfc4n commented Oct 1, 2024

The implementation here indeed has issues; it should utilize the encapsulated function go_get_argument instead of go_get_argument_by_stack.

I plan to release a new version soon, and I guess you should be on vacation. So I will submit a new PR, thank you for your feedback.

cfc4n added a commit that referenced this pull request Oct 2, 2024
…tion in the Golang TLS module. improve #623

Signed-off-by: CFC4N <[email protected]>
cfc4n added a commit that referenced this pull request Oct 2, 2024
…n the Golang TLS module. (#646)

* kern: fix the issue with retrieving the return value of the Read function in the Golang TLS module. improve #623

* kern: format code by new clang-format style.

* makefile: fix Recursive variable 'KERN_HEADERS' references itself (eventually).

Signed-off-by: CFC4N <[email protected]>

---------

Signed-off-by: CFC4N <[email protected]>
@cfc4n
Copy link
Member

cfc4n commented Oct 2, 2024

The new PR #646 has been merged. Thanks.

@cfc4n cfc4n closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undecrypted traffic from the gotls module
2 participants