fsi: master-ast-cf: fix relative address arithmetic#3
fsi: master-ast-cf: fix relative address arithmetic#3staticpayload wants to merge 2 commits intomasterfrom
Conversation
cfam_{read,write} split requests into up to 4-byte aligned chunks.
The per-iteration length is computed from the full count and the
current alignment. Once total_len advances, this can exceed the
remaining bytes, leading to copy_{to,from}_user() touching bytes past
the user buffer and advancing the file offset too far.
Clamp each chunk to the minimum of the alignment-based length and the
remaining bytes so each iteration handles only the bytes left.
Fixes: d1dcd67 ("fsi: Add cfam char devices")
Signed-off-by: Chaitanya Mishra <chaitanyamishra.ai@gmail.com>
📝 WalkthroughWalkthroughTwo FSI driver files received bug fix updates: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Testing
Log: /Users/staticpayload/kernel-upstream/agent_notes/aws-build-fsi-ast-cf.json
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.