Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756643AbdIHRZb (ORCPT ); Fri, 8 Sep 2017 13:25:31 -0400 Received: from mga02.intel.com ([134.134.136.20]:59458 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752132AbdIHRZa (ORCPT ); Fri, 8 Sep 2017 13:25:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,362,1500966000"; d="scan'208";a="1170414543" Date: Fri, 8 Sep 2017 10:25:29 -0700 From: "Luck, Tony" To: Sergey Senozhatsky Cc: Helge Deller , "linux-kernel@vger.kernel.org" , Sergey Senozhatsky , Petr Mladek , Andrew Morton , "Yu, Fenghua" , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Subject: Re: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier usages Message-ID: <20170908172528.qc2vdtxzqh777k6o@intel.com> References: <20170907004522.GA3885@jagdpanzerIV.localdomain> <8b93f9ca-95f6-4e40-1cc8-d1a65833abff@gmx.de> <20170907075653.GA533@jagdpanzerIV.localdomain> <20170907083207.GC533@jagdpanzerIV.localdomain> <667b8849-fb60-a312-2483-505252ff737e@gmx.de> <20170907093631.GD533@jagdpanzerIV.localdomain> <20170907095119.GE533@jagdpanzerIV.localdomain> <0604f27e-24ab-625b-9013-c6c0f4f6acc1@gmx.de> <3908561D78D1C84285E8C5FCA982C28F6136C2ED@ORSMSX114.amr.corp.intel.com> <20170908061830.GA496@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170908061830.GA496@jagdpanzerIV.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 665 Lines: 15 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