[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r2ujp3yc.fsf@concordia.ellerman.id.au>
Date: Wed, 04 Oct 2017 22:06:35 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Tony Luck <tony.luck@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
James Bottomley <jejb@...isc-linux.org>,
Helge Deller <deller@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
Jessica Yu <jeyu@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
linux-ia64@...r.kernel.org, linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3 4/7] powerpc64: Add .opd based function descriptor dereference
Petr Mladek <pmladek@...e.com> writes:
> On Sat 2017-09-30 11:53:16, Sergey Senozhatsky wrote:
>> diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
>> index 0b0f89685b67..94caec045a90 100644
>> --- a/arch/powerpc/kernel/module_64.c
>> +++ b/arch/powerpc/kernel/module_64.c
>> @@ -712,6 +717,17 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
>> return 0;
>> }
>>
>> +#ifdef PPC64_ELF_ABI_v1
>> +unsigned long dereference_module_function_descriptor(struct module *mod,
>> + unsigned long addr)
>> +{
>> + if (addr < mod->arch.start_opd || addr >= mod->arch.end_opd)
>> + return addr;
>> +
>> + return dereference_function_descriptor(addr);
>> +}
>> +#endif /* PPC64_ELF_ABI_v1 */
>
> I would personally move this up in the source file. It is related to
> the definition of func_desc() and other functions that are
> also PPC_ELF_ABI-specific.
Yeah that would be neater. There's already a PPC64_ELF_ABI_v2 block, you
could put this in the else case of that.
But we can do that later if you're not respinning otherwise.
cheers
Powered by blists - more mailing lists