public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	"James E . J . Bottomley" <jejb@parisc-linux.org>,
	Helge Deller <deller@gmx.de>, Petr Mladek <pmladek@suse.com>,
	linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, Jessica Yu <jeyu@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linuxppc-dev@lists.ozlabs.org,
	Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference
Date: Wed, 20 Sep 2017 01:51:49 +0000	[thread overview]
Message-ID: <878tha9lxm.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20170919103154.GC401@jagdpanzerIV.localdomain>

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

  reply	other threads:[~2017-09-20  1:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-16  3:53 [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Sergey Senozhatsky
2017-09-16  3:53 ` [PATCH 1/5] sections: split dereference_function_descriptor() Sergey Senozhatsky
2017-09-16  3:53 ` [PATCH 2/5] ia64: Add .opd based function descriptor dereference Sergey Senozhatsky
2017-09-16  3:53 ` [PATCH 3/5] powerpc64: " Sergey Senozhatsky
2017-09-16  9:55   ` Naveen N. Rao
2017-09-16 11:25     ` Sergey Senozhatsky
2017-09-19 10:22     ` Michael Ellerman
2017-09-19 10:31       ` Sergey Senozhatsky
2017-09-20  1:51         ` Michael Ellerman [this message]
2017-09-20  6:10           ` Sergey Senozhatsky
2017-09-16  3:53 ` [PATCH 4/5] parisc64: " Sergey Senozhatsky
2017-09-16  3:53 ` [PATCH 5/5] symbol lookup: use new kernel and module dereference functions Sergey Senozhatsky
2017-09-18 17:44 ` [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Luck, Tony
2017-09-18 18:39   ` Helge Deller
2017-09-19  2:05     ` Sergey Senozhatsky
2017-09-19 13:38       ` David Laight
2017-09-19 20:07         ` Helge Deller
2017-09-20  8:41           ` David Laight
2017-09-20 10:20             ` Helge Deller
2017-09-20 16:31               ` Sergey Senozhatsky
2017-09-19 14:07       ` Helge Deller
2017-09-19 20:03         ` Helge Deller
2017-09-20  0:47           ` Sergey Senozhatsky
2017-09-19  2:08   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tha9lxm.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=deller@gmx.de \
    --cc=fenghua.yu@intel.com \
    --cc=jejb@parisc-linux.org \
    --cc=jeyu@kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox