Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735395
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference |
| Date | 2017-09-20 04:00 +0200 |
| Message-ID | <urCsV-4FV-3@gated-at.bofh.it> (permalink) |
| References | <uqcqR-4iC-1@gated-at.bofh.it> <uqcqS-4iC-7@gated-at.bofh.it> <uqhTz-886-9@gated-at.bofh.it> <urnWW-4c9-11@gated-at.bofh.it> <uro6B-4gb-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> writes:
> On (09/19/17 20:22), Michael Ellerman wrote:
>> > 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.
>
> unlike ppc_function_entry(), printk() can get called on any symbol,
> not just function pointers.
>
> for example,
>
> cat /proc/kallsyms | grep shrinker_rwsem
> ffffffff81a4b1e0 d shrinker_rwsem
Yep, good point. So your patch is probably good then. Maybe someone
other than me can find time to test it ;)
cheers
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
[PATCH 5/5] symbol lookup: use new kernel and module dereference functions Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
[PATCH 1/5] sections: split dereference_function_descriptor() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
[PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-09-16 11:50 +0200
Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 13:40 +0200
Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Michael Ellerman <mpe@ellerman.id.au> - 2017-09-19 12:30 +0200
Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-19 12:40 +0200
Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Michael Ellerman <mpe@ellerman.id.au> - 2017-09-20 04:00 +0200
Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-20 08:20 +0200
[PATCH 4/5] parisc64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
[PATCH 2/5] ia64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers "Luck, Tony" <tony.luck@intel.com> - 2017-09-18 19:50 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-18 20:40 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-19 04:10 +0200
RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers David Laight <David.Laight@ACULAB.COM> - 2017-09-19 15:40 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-19 22:10 +0200
RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers David Laight <David.Laight@ACULAB.COM> - 2017-09-20 10:50 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-20 12:30 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-20 18:40 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-19 16:10 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-19 22:10 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-20 02:50 +0200
Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-19 04:10 +0200
csiph-web