Skip to content

Use typed user pointers for msg_control and HOMAIOCINFO - #124

Open
randomizedcoder wants to merge 1 commit into
PlatformLab:mainfrom
randomizedcoder:fix/plumbing-user-pointers
Open

randomizedcoder wants to merge 1 commit into
PlatformLab:mainfrom
randomizedcoder:fix/plumbing-user-pointers

Conversation

@randomizedcoder

Copy link
Copy Markdown
Contributor
  • homa_sendmsg/homa_recvmsg: use msg->msg_control_user instead of casting msg->msg_control (sendmsg already checks msg_control_is_user); drops one __force.
  • homa_ioc_info: char __user *dst = u64_to_user_ptr(hinfo.rpc_info) instead of a plain char * cast back for copy_to_user.

Found with sparse -Wsparse-all (4× "cast adds address space '__user'"); all four are gone.

No test: no functional change. Unit tests: 862/862 pass.

🤖 Generated with Claude Code

* homa_sendmsg and homa_recvmsg cast msg->msg_control to
  void __user *; use msg->msg_control_user instead (homa_sendmsg
  already checks msg_control_is_user). This also drops a __force.
* homa_ioc_info stored hinfo.rpc_info in a plain char * and cast it
  back for copy_to_user; make dst a char __user * set with
  u64_to_user_ptr.
* No functional change. Found with sparse (-Wsparse-all: "cast adds
  address space '__user'").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant