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

add tls cleanup toprotect udp #13050

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wangchen61698
Copy link
Contributor

Summary

Due to abnormal application exit,so add tls cleanup to protect udp process

Impact

udp

Testing

Manual verification

net/udp/udp.h Outdated Show resolved Hide resolved
@anchao
Copy link
Contributor

anchao commented Aug 21, 2024

@xiaoxiang781216
The life cycle of the socket should be managed with file descriptor. If an abnormal exit causes an exception, then the VFS needs to be further enhanced. If all subsystems depends on TLS when exiting, then the entire kernel will be surrounded by TLS. The implementation of the protocol stack should further learn from the Linux kernel instead of applying these ugly patches!

@anchao anchao marked this pull request as draft August 21, 2024 00:39
@anchao
Copy link
Contributor

anchao commented Aug 21, 2024

If similar changes are allowed, in the future any waiting logic in the subsystem will need to depends on tls_cleanup_push/tls_cleanup_pop, Is this what you expect?

@wengzhe
Copy link
Contributor

wengzhe commented Aug 23, 2024

@xiaoxiang781216 The life cycle of the socket should be managed with file descriptor. If an abnormal exit causes an exception, then the VFS needs to be further enhanced. If all subsystems depends on TLS when exiting, then the entire kernel will be surrounded by TLS. The implementation of the protocol stack should further learn from the Linux kernel instead of applying these ugly patches!

@anchao Agree, and maybe we'll not merge this PR into the master. BTW, is CONFIG_CANCELLATION_POINTS well tested? Socket operations are already protected by cancellation points, but we haven't enabled it on products yet.

@github-actions github-actions bot added Area: Networking Effects networking subsystem Size: S The size of the change in this PR is small labels Nov 18, 2024
@wangchen61698 wangchen61698 marked this pull request as ready for review November 19, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Networking Effects networking subsystem Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants