Re: [PATCH v3] LoongArch: Enable STRICT_MODULE_RWX for stricter modules memory permissions
From: Tiezhu Yang
Date: Thu Jun 11 2026 - 02:28:22 EST
On 2026/6/9 下午4:33, Huacai Chen wrote:
Hi, Haoran,
On Mon, Jun 8, 2026 at 2:39 PM <haoran.jiang@xxxxxxxxx> wrote:
From: Haoran Jiang <jianghaoran@xxxxxxxxxx>
Enable STRICT_MODULE_RWX to enforce strict memory permissions
on modules,making the code region non-writable, the data region
non-executable, and the read-only data region both non-writable
and non-executable.Temporarily modify code section read/write
permissions via set_memory() API.
...
In addition, it seems that text_mutex and patch_lock are for the same
purpose, so patch_lock can be removed here.
@Tiezhu, what's your opinion?
Agreed. If all callers properly switch to text_mutex, patch_lock can be
removed entirely.
Thanks,
Tiezhu