Skip to content

fix ARM32 userspace pointer sign-extension when running on ARM64 kernel#345

Open
0222826398 wants to merge 1 commit into
qualcomm:developmentfrom
0222826398:fix-compatibility
Open

fix ARM32 userspace pointer sign-extension when running on ARM64 kernel#345
0222826398 wants to merge 1 commit into
qualcomm:developmentfrom
0222826398:fix-compatibility

Conversation

@0222826398

Copy link
Copy Markdown
Contributor

No description provided.

@0222826398 0222826398 requested a review from ekanshibu May 18, 2026 09:23
@0222826398

Copy link
Copy Markdown
Contributor Author
  • Issue: remote_* calls could fail (-EFAULT) when running 32-bit userspace lib on 64-bit kernel.
  • Root cause: In 32-bit userspace, some pointers were written into 64-bit fields with sign-extension (e.g. 0xffffffffxxxxxxxx). On 64-bit kernel, the value was kept as-is and treated as invalid user address in
    copy_from_user.
  • Fix: Normalize pointer packing to zero-extend via uintptr_t before casting to uint64_t in userspace argument packing path.
  • Result: Prevents invalid high-address pointer values and restores stable remote_* behavior in this mixed 32-bit userspace / 64-bit kernel setup.
  • Validation: Re-ran FastRPC smoke flow(only cpu side) on platform; failure path no longer reproduces.

@0222826398 0222826398 requested a review from quic-vkatoch June 5, 2026 03:24
@ekanshibu

Copy link
Copy Markdown
Contributor

Please add proper commit text with Signed-off-by

Signed-off-by: Eddie Lin <yutlin@qti.qualcomm.com>
@0222826398 0222826398 force-pushed the fix-compatibility branch from 38b5579 to c06a6c9 Compare June 5, 2026 07:01
@0222826398

Copy link
Copy Markdown
Contributor Author

Hi @ekanshibu,
Thanks for the heads-up, done!

@0222826398 0222826398 requested a review from Chennak-quic June 8, 2026 05:44
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.

2 participants