Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751328AbdINGff (ORCPT ); Thu, 14 Sep 2017 02:35:35 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36478 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbdINGfd (ORCPT ); Thu, 14 Sep 2017 02:35:33 -0400 X-Google-Smtp-Source: ADKCNb5ql6e5izYWqEy7eEDzaFsuJGK22PDKE07dxrQHDlcoESrvvu2yn2eWpWZcV9+u+fWrHZ3cig== Date: Thu, 14 Sep 2017 15:35:28 +0900 From: Sergey Senozhatsky To: "Yu, Fenghua" Cc: Sergey Senozhatsky , Helge Deller , "Luck, Tony" , "linux-kernel@vger.kernel.org" , Sergey Senozhatsky , Petr Mladek , Andrew Morton , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Subject: Re: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier usages Message-ID: <20170914063528.GB599@jagdpanzerIV.localdomain> References: <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> <3E5A0FA7E9CA944F9D5414FEC6C7122075892DD0@ORSMSX106.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E5A0FA7E9CA944F9D5414FEC6C7122075892DD0@ORSMSX106.amr.corp.intel.com> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 38 Hi, On (09/08/17 22:23), Yu, Fenghua wrote: > > From: Sergey Senozhatsky [mailto:sergey.senozhatsky.work@gmail.com] > > On (09/07/17 16:05), Luck, Tony wrote: > > +static inline bool __mod_text_address(struct module *mod, > > + unsigned long addr) { > > + /* Make sure it's within the text section. */ > > + if (!within(addr, mod->init_layout.base, mod->init_layout.text_size) > > + && !within(addr, mod->core_layout.base, mod- > > >core_layout.text_size)) > > + return false; > > + return true; > > +} > > The __mod_text_address() may be defined only on IA64, PPC64 and PARISC since it's only called in those cases. sure. well, I didn't post the exact patch. __mod_text_address() was supposed to be used from __module_text_address() /* I factored out __mod_text_address() from that function, basically */ --- @@ -4305,9 +4323,7 @@ struct module *__module_text_address(unsigned long addr) { struct module *mod = __module_address(addr); if (mod) { - /* Make sure it's within the text section. */ - if (!within(addr, mod->init_layout.base, mod->init_layout.text_size) - && !within(addr, mod->core_layout.base, mod->core_layout.text_size)) + if (!__mod_text_address(mod, addr)) mod = NULL; } return mod; --- -ss