Re: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier usages

From: Luck, Tony
Date: Fri Sep 08 2017 - 13:25:34 EST


On Fri, Sep 08, 2017 at 03:18:30PM +0900, Sergey Senozhatsky wrote:
> if the addr is not in kernel .text, then try dereferencing it and check
> if the dereferenced addr is in kernel .text.

If it really is a function pointer, then we know that it is safe
to dereference. But if it isn't, then maybe not?

If it is a function pointer then dereferening will indeed give
us a .text address. But if it isn't, it might still give us a
.text address (we could reduce the probability of a false hit
by checking that the .text address was exactly on a symbol with
no offset ... but data values that happen to be the addresses of
function entry points are possible).

-Tony