On Thu, Nov 09, 2023 at 06:26:58PM +0800, WoZ1zh1 wrote: > In mem_lseek, file->f_pos may overflow. And it's not a problem that > mem_open set file mode with FMODE_UNSIGNED_OFFSET(memory_lseek). However, > another file use mem_lseek do lseek can have not FMODE_UNSIGNED_OFFSET > (kpageflags_proc_ops/proc_pagemap_operations...), so in order to prevent > file->f_pos updated to an abnormal number, fix it by checking overflow and > FMODE_UNSIGNED_OFFSET. Umm... Is there any reasons why all of those shouldn't get FMODE_UNSIGNED_OFFSET as well?