Re: [syzbot] [mm?] possible deadlock in upgrade_mmap_lock_carefully
From: Shu Han
Date: Wed Oct 02 2024 - 08:15:04 EST
It seems to be the same as [1].
New LSM hook position for remap_file_pages + IMA = deadlock.
The new LSM hook position is added for a bypass caused by
no check in remap_file_pages + READ_IMPLIES_EXEC in do_mmap.
I suggest fix it by removing the check and moving READ_IMPLIES_EXEC
out of do_mmap[2].
Link: https://lore.kernel.org/lkml/20240928065620.7abadb2d8552f03d785c77c9@xxxxxxxxxxxxxxxxxxxx/
[1]
Link: https://lore.kernel.org/all/20240928180044.50-1-ebpqwerty472123@xxxxxxxxx/
[2]