v3
2026-09-01
修复gup_test批量计算溢出 · v3
修复__gup_test_ioctl()批量结束计算溢出导致越界写数组,并让gup->size按实际钉住字节数而非地址差计算。
原始补丁链接
子 Patch(2)
1/2
mm/gup_test: prevent overflow in GUP batch calculation
Hi Kiryl! On 9/1/26 4:05 PM, Kiryl Shutsemau wrote: > On Tue, Sep 01, 2026 at 02:04:51PM +0530, Sarthak Sharma wrote: » __gup_test_ioctl() calculates the end of a GUP batch using: » » next = addr
2/2
mm/gup_test: report actual pinned bytes
__gup_test_ioctl() 部分 pin 时 addr 仍按整批前进导致 gup->size 多算;改为按实际 pin 页数 * PAGE_SIZE 计算大小。