Received: by 10.213.65.68 with SMTP id h4csp577595imn; Tue, 13 Mar 2018 13:42:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELsneWElzWI+QZc/g+BGbLorqUxfg/hOhqTrq15UDpoIq73XiIf4FbufVNmDR1aHcxcPrbK0 X-Received: by 10.98.57.215 with SMTP id u84mr1827393pfj.152.1520973732437; Tue, 13 Mar 2018 13:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520973732; cv=none; d=google.com; s=arc-20160816; b=tXFuyWHi12dE+R2SCNmwhlghIwOl+HlLLccDFykK5rxN0116NZy0Kom0CMVbDAv9vs 4QcxO3ZbbYc9thYxVv1mfcWlVzbNOOb/5Xq/SKiP3mPKShfZxxdzhlhgV3et3cK7B4DK FLwjhIzX1rkdzdnak4qERTxCVZUq3FdONxH7sVKpaZVONvyL6KI3UV3wOMKQmprMZjNO 5RXS2E1YywcRAo6rWX9YGL76WGGH8WsSM7h0ZLpdOBD5jvPZHdHhFRoo/6yq9ZQCb43C sUKEvQsW21E8jbAS6lEZvJHHaDlFN+4qNSQCax9AxKG9XHLitOG+tQmKDBGn14A87mjS vFHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=VRwfZojKpGUIQiHt2dY2LP6pFodr3goutHh/hV6oSQA=; b=BzJ1sbJZ6BrWqVQ1kEsrZcl/hrhOrs8bPj1EpjxD2OMp5mjNz7oVJ+8WVfWbIn0WAo CclFdRhE2bZsFQXWk9p3m0atQGnRDmoaDXle23MerBtAaf5uI5yuJqx3SaELLZp5Lv59 9eYRVRvmQxaIAYLWETNReY3yVPfKnIk7NYXEK4jlQ2Lq89dME1gU/HXjTE4hK8UDbWLm BlhwOEqmosi7bRK0Zhqc2dOBgymCPDGDp8oPndtKRtFyODZVL/LmBy1lwIMxbAq9dEVT aXeKRXDM1BBspyGSy3jtltA9khQXSocJRJcB7XjmYoAwmYLuNehrfI2vLLkRM9WaScZf o/0w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si631071pga.372.2018.03.13.13.41.57; Tue, 13 Mar 2018 13:42:12 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbeCMUke (ORCPT + 99 others); Tue, 13 Mar 2018 16:40:34 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59400 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752675AbeCMUkc (ORCPT ); Tue, 13 Mar 2018 16:40:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C7408182D16; Tue, 13 Mar 2018 20:40:31 +0000 (UTC) Received: from redhat.com (ovpn-121-215.rdu2.redhat.com [10.10.121.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B1981C725; Tue, 13 Mar 2018 20:40:26 +0000 (UTC) Date: Tue, 13 Mar 2018 16:40:25 -0400 From: Jerome Glisse 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, 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, rostedt@goodmis.org, 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: <20180313204024.GJ3828@redhat.com> References: <20180313125603.19819-1-ravi.bangoria@linux.vnet.ibm.com> <20180313125603.19819-5-ravi.bangoria@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180313125603.19819-5-ravi.bangoria@linux.vnet.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 13 Mar 2018 20:40:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 13 Mar 2018 20:40:31 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jglisse@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 13, 2018 at 06:25:59PM +0530, Ravi Bangoria wrote: > These exported data structure and functions will be used by other > files in later patches. > > No functionality changes. > > Signed-off-by: Ravi Bangoria Reviewed-by: J?r?me Glisse > --- > 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; > -- > 1.8.3.1 >