lkml.org 
[lkml]   [2017]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference
Date
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:

> On 2017/09/16 12:53PM, Sergey Senozhatsky wrote:
>> We are moving towards separate kernel and module function descriptor
>> dereference callbacks. This patch enables it for powerpc64.
>>
>> For pointers that belong to the kernel
>> - Added __start_opd and __end_opd pointers, to track the kernel
>> .opd section address range;
>>
>> - Added dereference_kernel_function_descriptor(). Now we
>> will dereference only function pointers that are within
>> [__start_opd, __end_opd];
>>
>> For pointers that belong to a module
>> - Added dereference_module_function_descriptor() to handle module
>> function descriptor dereference. Now we will dereference only
>> pointers that are within [module->opd.start, module->opd.end].
>
> Would it be simpler to just use kernel_text_address() and dereference
> everything else? See commit 83e840c770f2c5 ("powerpc64/elfv1: Only
> dereference function descriptor for non-text symbols") for a related
> patch.

Yeah that would be a lot simpler and probably work perfectly well.

cheers

\
 
 \ /
  Last update: 2017-09-19 12:23    [W:0.073 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site