From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751194AbdAQEto (ORCPT ); Mon, 16 Jan 2017 23:49:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47030 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751034AbdAQEtn (ORCPT ); Mon, 16 Jan 2017 23:49:43 -0500 Date: Mon, 16 Jan 2017 23:49:21 -0500 From: Jessica Yu To: Abel Vesa Cc: linux@armlinux.org.uk, jpoimboe@redhat.com, jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com, rostedt@goodmis.org, mingo@redhat.com, gregkh@linuxfoundation.org, geert+renesas@glider.be, davem@davemloft.net, akpm@linux-foundation.org, emil.l.velikov@gmail.com, mchehab@kernel.org, linux@roeck-us.net, ard.biesheuvel@linaro.org, jens.wiklander@linaro.org, jean-philippe.brucker@arm.com, viro@zeniv.linux.org.uk, stefano.stabellini@eu.citrix.com, chris.brandt@renesas.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org Subject: Re: arm: module: Add apply_relocate_add Message-ID: <20170117044921.GI9045@packer-debian-8-amd64.digitalocean.com> References: <1481043967-15602-1-git-send-email-abelvesa@linux.com> <1481043967-15602-4-git-send-email-abelvesa@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1481043967-15602-4-git-send-email-abelvesa@linux.com> X-OS: Linux eisen.io 3.16.0-4-amd64 x86_64 User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 17 Jan 2017 04:49:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Abel Vesa [06/12/16 17:06 +0000]: >It was only added to fix compiler error. It is not implemented >yet. > >Signed-off-by: Abel Vesa >--- > arch/arm/kernel/module.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c >index 4f14b5c..bf94922 100644 >--- a/arch/arm/kernel/module.c >+++ b/arch/arm/kernel/module.c >@@ -52,6 +52,15 @@ void *module_alloc(unsigned long size) > #endif > > int >+apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, >+ unsigned int symindex, unsigned int relindex, >+ struct module *module) >+{ >+ /* Not implemented yet */ >+ return 0; >+} Are SHT_RELA relocation sections actually supported on 32-bit arm? It looks like there's only support for SHT_REL. arch/arm/Kconfig:84: select MODULES_USE_ELF_REL If we support SHT_REL sections, the correct fix is to probably have klp_write_object_relocations() check if the relocation section is SHT_REL or SHT_RELA, and call the appropriate function (apply_relocate or apply_relocate_add), similar to how the module loader does it. Jessica