Received: by 10.213.65.68 with SMTP id h4csp62898imn; Thu, 15 Mar 2018 09:35:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELvFgCCORThvAK4vsrOZYrUKuLT2msVteOajJt1LpzdYdJGmA66G5knxmKKnkRuNWlJQcY6i X-Received: by 10.101.68.82 with SMTP id e18mr7151549pgq.329.1521131729982; Thu, 15 Mar 2018 09:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521131729; cv=none; d=google.com; s=arc-20160816; b=sAcOKXZabGjg6isyUhvXyf2JY7mOWb51SpWCOFDyS45G3tUxxm8bo/1FfiUntMvzrh HCCrTr2FzjEYCpC0t/+pFs4XCVVoQqVhSMrKOpNmcxD+h0jspF1TAyttOGPR/njbDOnH 4wJMRjH6Q9uOPwAwIFb/pN1zcBIwWFYUHDWKKTfbqAzjWglrnYaYjiaGkSZEkQA9RUKM IumGLsJw/Jd8zS7LpjQ+hQm8iyGkUdwybsfUn1G2h3xYdZpKqbR1jhBDFYGTI93o99Kh WZ07R1DwfetfFyen5juh0vAkIRwgPpxSn7+dtt1mUpHFNojCzhvNSZXk5wVLnhsPVkzJ ksZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=hVGw4AyqMQxV2Q6S23g/OTAIRXdEJV1epeYv2NjCvo8=; b=BaJ9e/8VlYdxxfcpRnYa2zIxTsKbM46CmvrCy53bef+Nsaa+2qH0CX6uvtqJCRihjH wH2NqH8mwvxghJ0eCQFadztZPJSaoWjbY36YRSKs23xs1LC8Ci9bbsEHXF6R1KYkyKUu lUWBgHdS8NekYKjb+bNVUlYD3CVhbxCaXhAQkPVqwBO4bjGXN5x9jAWFzQq9W7kwpSSy gouTpycsrqs75RWKrEqQZlyICnUY0892Dx0CQezQwY21W9twLOfcsl4+8aEpXYp0eaOT nnSSIgUGGM1kfNDyNgc4o2TdnB2VgCosxa60Kx6qWzDOiycfFw0oIP6XIFrSXKx/k5mN GX1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si4267531plu.426.2018.03.15.09.35.15; Thu, 15 Mar 2018 09:35:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbeCOQdC (ORCPT + 99 others); Thu, 15 Mar 2018 12:33:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:38854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751482AbeCOQdA (ORCPT ); Thu, 15 Mar 2018 12:33:00 -0400 Received: from vmware.local.home (ip-64-134-136-2.public.wayport.net [64.134.136.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3461E204EF; Thu, 15 Mar 2018 16:32:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3461E204EF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 15 Mar 2018 12:32:55 -0400 From: Steven Rostedt To: Ravi Bangoria Cc: mhiramat@kernel.org, oleg@redhat.com, peterz@infradead.org, srikar@linux.vnet.ibm.com, acme@kernel.org, ananth@linux.vnet.ibm.com, akpm@linux-foundation.org, alexander.shishkin@linux.intel.com, alexis.berlemont@gmail.com, corbet@lwn.net, dan.j.williams@intel.com, gregkh@linuxfoundation.org, huawei.libin@huawei.com, hughd@google.com, jack@suse.cz, jglisse@redhat.com, jolsa@redhat.com, kan.liang@intel.com, kirill.shutemov@linux.intel.com, kjlx@templeofstupid.com, kstewart@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, milian.wolff@kdab.com, mingo@redhat.com, namhyung@kernel.org, naveen.n.rao@linux.vnet.ibm.com, pc@us.ibm.com, pombredanne@nexb.com, tglx@linutronix.de, tmricht@linux.vnet.ibm.com, willy@infradead.org, yao.jin@linux.intel.com, fengguang.wu@intel.com Subject: Re: [PATCH 4/8] Uprobe: Export uprobe_map_info along with uprobe_{build/free}_map_info() Message-ID: <20180315123255.17a8d997@vmware.local.home> In-Reply-To: <20180313125603.19819-5-ravi.bangoria@linux.vnet.ibm.com> References: <20180313125603.19819-1-ravi.bangoria@linux.vnet.ibm.com> <20180313125603.19819-5-ravi.bangoria@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Mar 2018 18:25:59 +0530 Ravi Bangoria wrote: > These exported data structure and functions will be used by other > files in later patches. I'm reluctantly OK with the above. > > No functionality changes. Please remove this line. There are functionality changes. Turning a static inline into an exported function *is* a functionality change. -- Steve > > Signed-off-by: Ravi Bangoria > --- > include/linux/uprobes.h | 9 +++++++++ > kernel/events/uprobes.c | 14 +++----------- > 2 files changed, 12 insertions(+), 11 deletions(-) > > diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h > index 0a294e9..7bd2760 100644 > --- a/include/linux/uprobes.h > +++ b/include/linux/uprobes.h > @@ -109,12 +109,19 @@ enum rp_check { > RP_CHECK_RET, > }; > > +struct address_space; > struct xol_area; > > struct uprobes_state { > struct xol_area *xol_area; > }; > > +struct uprobe_map_info { > + struct uprobe_map_info *next; > + struct mm_struct *mm; > + unsigned long vaddr; > +}; > + > extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); > extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); > extern bool is_swbp_insn(uprobe_opcode_t *insn); > @@ -149,6 +156,8 @@ struct uprobes_state { > extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs); > extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, > void *src, unsigned long len); > +extern struct uprobe_map_info *uprobe_free_map_info(struct uprobe_map_info *info); > +extern struct uprobe_map_info *uprobe_build_map_info(struct address_space *mapping, loff_t offset, bool is_register); > #else /* !CONFIG_UPROBES */ > struct uprobes_state { > }; > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > index 081b88c1..e7830b8 100644 > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -695,23 +695,15 @@ static void delete_uprobe(struct uprobe *uprobe) > put_uprobe(uprobe); > } > > -struct uprobe_map_info { > - struct uprobe_map_info *next; > - struct mm_struct *mm; > - unsigned long vaddr; > -}; > - > -static inline struct uprobe_map_info * > -uprobe_free_map_info(struct uprobe_map_info *info) > +struct uprobe_map_info *uprobe_free_map_info(struct uprobe_map_info *info) > { > struct uprobe_map_info *next = info->next; > kfree(info); > return next; > } > > -static struct uprobe_map_info * > -uprobe_build_map_info(struct address_space *mapping, loff_t offset, > - bool is_register) > +struct uprobe_map_info *uprobe_build_map_info(struct address_space *mapping, > + loff_t offset, bool is_register) > { > unsigned long pgoff = offset >> PAGE_SHIFT; > struct vm_area_struct *vma;