Re: [PATCH v5 06/13] module: Move strict rwx support to a separate file
From: Aaron Tomlin <hidden>
Date: 2022-02-11 11:09:38
Also in:
live-patching, lkml
From: Aaron Tomlin <hidden>
Date: 2022-02-11 11:09:38
Also in:
live-patching, lkml
On Thu 2022-02-10 12:21 +0000, Christophe Leroy wrote:
This file generates many checkpatch WARNINGs and CHECKs. Don't worry too much about the ones telling you to use WARN_ON() instead of BUG_ON() for the time being, but others should be handled.
Yes, with ./scripts/checkpatch.pl --strict'. Please note: I have used '--ignore=ASSIGN_IN_IF,AVOID_BUG' previously on that file. Albeit, I will resolve the check violations e.g. "Alignment should match open parenthesis" etc.
quoted
+# define debug_align(X) ALIGN(X, PAGE_SIZE)You can use PAGE_ALIGN() instead.
Agreed: PAGE_ALIGN(X) does expand to ALIGN(X, PAGE_SIZE)
quoted
+#ifdef CONFIG_ARCH_HAS_STRICT_MODULE_RWXThis #ifdef is not needed, frob_text() always exists.
I will leave this for you to remove, in your patch [1].
quoted
+ BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));Could be: BUG_ON(!PAGE_ALIGNED(layout->base)); Same for all others.
Agreed. [1]: https://lore.kernel.org/lkml/203348805c9ac9851d8939d15cb9802ef047b5e2.1643919758.git.christophe.leroy@csgroup.eu/ (local) Kind regards, -- Aaron Tomlin