From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44820 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbdIVWkQ (ORCPT ); Fri, 22 Sep 2017 18:40:16 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8MMd3d2039151 for ; Fri, 22 Sep 2017 18:40:16 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2d54ma23as-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 22 Sep 2017 18:40:15 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Sep 2017 18:40:14 -0400 Date: Fri, 22 Sep 2017 15:40:14 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, ngo Molnar , Andrew Morton , stable@vger.kernel.org Subject: Re: [PATCH 2/4] extable: Consolidate *kernel_text_address() functions Reply-To: paulmck@linux.vnet.ibm.com References: <20170922221543.900812109@goodmis.org> <20170922221837.600560197@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170922221837.600560197@goodmis.org> Message-Id: <20170922224014.GY3521@linux.vnet.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: On Fri, Sep 22, 2017 at 06:15:45PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > The functionality between kernel_text_address() and _kernel_text_address() > is the same except that _kernel_text_address() does a little more (that > function needs a rename, but that can be done another time). Instead of > having duplicate code in both, simply have _kernel_text_address() calls > kernel_text_address() instead. > > This is marked for stable because there's an RCU bug that can happen if > one of these functions gets called while RCU is not watching. That fix > depends on this fix to keep from having to write the fix twice. > > Cc: Paul E. McKenney > Cc: stable@vger.kernel.org > Fixes: 0be964be0 ("module: Sanitize RCU usage and locking") > Signed-off-by: Steven Rostedt (VMware) Not my area, but straightforward transformation and nice reduction in code size. Acked-by: Paul E. McKenney > --- > kernel/extable.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/kernel/extable.c b/kernel/extable.c > index 38c2412401a1..a7024a494faf 100644 > --- a/kernel/extable.c > +++ b/kernel/extable.c > @@ -102,15 +102,7 @@ int core_kernel_data(unsigned long addr) > > int __kernel_text_address(unsigned long addr) > { > - if (core_kernel_text(addr)) > - return 1; > - if (is_module_text_address(addr)) > - return 1; > - if (is_ftrace_trampoline(addr)) > - return 1; > - if (is_kprobe_optinsn_slot(addr) || is_kprobe_insn_slot(addr)) > - return 1; > - if (is_bpf_text_address(addr)) > + if (kernel_text_address(addr)) > return 1; > /* > * There might be init symbols in saved stacktraces. > -- > 2.13.2 > >