, Jarkko Sakkinen <[email protected]>, Sami Tolvanen <[email protected]>, "Naveen N. Rao" <[email protected]>, Marco Elver <[email protected]>, Kees Cook <[email protected]>, Steven Rostedt <[email protected]>, Nathan Chancellor <[email protected]>, Mark Brown <[email protected]>, Borislav Petkov <[email protected]>, Alexander Egorenkov <[email protected]>, Thomas Bogendoerfer <[email protected]>, [email protected], Nathaniel McCallum <[email protected]>, Dmitry Torokhov <[email protected]>, "David S. Miller" <[email protected]>, "Kirill A. Shutemov" <[email protected]>, Tobias Huschle <[email protected]>, "Peter Zijlstra \(Intel\)" <[email protected]>, "H. Peter Anvin" <[email protected]>, [email protected], Tiezhu Yang <[email protected]>, Miroslav Benes <[email protected]>, Chen Zhongjin <[email protected]>, Ard Biesheuvel <[email protected]>, [email protected], [email protected], Ing o Molnar <[email protected]>, Aaron Tomlin <[email protected]>, Albert Ou <[email protected]>, Heiko Carstens <[email protected]>, Liao Chang <[email protected]>, Paul Walmsley <[email protected]>, Josh Poimboeuf <[email protected]>, Thomas Richter <[email protected]>, [email protected], Changbin Du <[email protected]>, Palmer Dabbelt <[email protected]>, [email protected], [email protected] Errors-To: [email protected] Sender: "Linuxppc-dev" <[email protected]>
On Thu, Jun 09, 2022 at 08:47:38AM +0100, Russell King (Oracle) wrote: > On Wed, Jun 08, 2022 at 02:59:27AM +0300, Jarkko Sakkinen wrote: > > diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile > > index 553866751e1a..d2bb954cd54f 100644 > > --- a/arch/arm/kernel/Makefile > > +++ b/arch/arm/kernel/Makefile > > @@ -44,6 +44,11 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o > > obj-$(CONFIG_ISA_DMA_API) += dma.o > > obj-$(CONFIG_FIQ) += fiq.o fiqasm.o > > obj-$(CONFIG_MODULES) += armksyms.o module.o > > +ifeq ($(CONFIG_MODULES),y) > > +obj-y += module_alloc.o > > +else > > +obj-$(CONFIG_KPROBES) += module_alloc.o > > +endif > > Doesn't: > > obj-$(CONFIG_MODULES) += module_alloc.o > obj-$(CONFIG_KPROBES) += module_alloc.o That just begs for a new kconfig symbol for the object, and for the object then to be built with it. The archs which override the default can use ARCH_HAS_VM_ALLOC_EXEC. Please note that the respective free is important as well and its not clear if we need an another define for the free. Someone has to do that work. We want to ensure to noexec the code on free and this can vary on each arch. > work just as well? The kbuild modules.rst documentation says: > > The order of files in $(obj-y) is significant. Duplicates in > the lists are allowed: the first instance will be linked into > built-in.a and succeeding instances will be ignored. > > so you should be fine... or the documentation is wrong! Agreed, but this is just sloppy, better to use a new kconfig symbol to represent what is actually being required. Luis
