Received: by 10.213.65.68 with SMTP id h4csp335573imn; Fri, 16 Mar 2018 04:46:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELtedoeRyREkAKHg3zO3rzugoqadkeZOCAORS+URr8IVj1PvWsu2MwSWjNIvxi8U9YO1Js+a X-Received: by 2002:a17:902:6103:: with SMTP id t3-v6mr1843867plj.76.1521200798984; Fri, 16 Mar 2018 04:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521200798; cv=none; d=google.com; s=arc-20160816; b=U75PhPrmQNwyh2HyTrYdgxkeC4HOQpVC56BMtVQrvm0lgafaTMDdmkPFRbPXIl7qOn 489J2TY78U3Mwf77n0oPr1ba1nZP4Soi3zqPi0suaJJ9dvKA7iWHvGVgzGTgwSEvykQG 8VFuTSZ9teZP/sngY+OHGJxLEYUHF9A6INMbEgGMc9FpczsJ+4tFO7hPXHwHUjxuIP7z POhs5rm5m9i/awN8VGD389Ol1ktwCPxPax+89TMphpDhwymKJstBc6o0GI+pN8ebB8cv 9n5QwQ8QvUwV4AN1GdObkw23ZdoYgxvtoyK/BqK0Tz+1MGLfAPjzpNUeQqHI5iU6Eu6J 5yyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=mj16SVehscUWHOIgXnLqCeNyZD0YbJvzqVtsijwaKQ4=; b=ETk1ZvttIGgp3kxsvdKOfCZmSgAy01eNdY1RXaB3G61hEL+0t/su2fcaWbnK1VIruh IjUqAu+TNE5LOomod2EU+Mc/Es9JmLCDy2WDTbkWX86tl368o+QfzWL8yKF9W2JRhoe9 aECs3ztLtP4MgKvayJveP38srhn8j3buO8X34IntPaAxK8HRAvft1yoIWY6SnoQ4BQwu DH80cNJZ7lXxxb+T08fnST3CzKwhG+o8fRPqSbC0fdkTwTfl4Cb0svln0y7h2qg05luH g+c/2I1FsYYK2Pw4uhfviB9GtgRh01/vfTSgLjVJVYiVTLGxOOuHVfZQqAL8DA+FzHPY oskw== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r29si4759768pgn.386.2018.03.16.04.46.22; Fri, 16 Mar 2018 04:46:38 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753531AbeCPLor (ORCPT + 99 others); Fri, 16 Mar 2018 07:44:47 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59172 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752031AbeCPLop (ORCPT ); Fri, 16 Mar 2018 07:44:45 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2GBhqgx132387 for ; Fri, 16 Mar 2018 07:44:44 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gra1h7ecx-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 16 Mar 2018 07:44:44 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Mar 2018 11:44:41 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 16 Mar 2018 11:44:34 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2GBiX3V51642404; Fri, 16 Mar 2018 11:44:33 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17C99A4053; Fri, 16 Mar 2018 11:37:21 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B768A4055; Fri, 16 Mar 2018 11:37:10 +0000 (GMT) Received: from [9.79.219.128] (unknown [9.79.219.128]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 16 Mar 2018 11:37:10 +0000 (GMT) Subject: Re: [PATCH 5/8] trace_uprobe: Support SDT markers having reference count (semaphore) To: Oleg Nesterov Cc: mhiramat@kernel.org, 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, rostedt@goodmis.org, tglx@linutronix.de, tmricht@linux.vnet.ibm.com, willy@infradead.org, yao.jin@linux.intel.com, fengguang.wu@intel.com, Ravi Bangoria References: <20180313125603.19819-1-ravi.bangoria@linux.vnet.ibm.com> <20180313125603.19819-6-ravi.bangoria@linux.vnet.ibm.com> <20180315142120.GA19218@redhat.com> <20180315143044.GA19643@redhat.com> <3b303a2d-35dd-9178-fc03-de9f2d588797@linux.vnet.ibm.com> <20180316113917.GA21303@redhat.com> From: Ravi Bangoria Date: Fri, 16 Mar 2018 17:16:49 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180316113917.GA21303@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18031611-0012-0000-0000-000005BFE71C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031611-0013-0000-0000-0000193BF526 Message-Id: <663244e6-2de0-48bb-08d1-fbc66b3c736b@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-16_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803160142 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/16/2018 05:09 PM, Oleg Nesterov wrote: > On 03/16, Ravi Bangoria wrote: >> On 03/15/2018 08:00 PM, Oleg Nesterov wrote: >>> Note to mention that sdt_find_vma() can return NULL but the callers do >>> vma_offset_to_vaddr(vma) without any check. >> If the "mm" we are passing to sdt_find_vma() is returned by >> uprobe_build_map_info(ref_ctr_offset), sdt_find_vma() must >> _not_ return NULL. > Not at all. > > Once build_map_info() returns any mapping can go away. Otherwise, why do > you think the caller has to take ->mmap_sem and use find_vma()? If you > were right, build_map_info() could just return the list of vma's instead > of list of mm's. Oh.. okay.. I was under wrong impression then. Will add a check there. Thanks for the review :) Ravi