Received: by 10.192.165.156 with SMTP id m28csp272115imm; Tue, 10 Apr 2018 21:32:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx48pP5KMRMUSVwevAl5DEOpKCuvDH9gFLp2fxjvaDIBlvZZ5RGv0sBY1zNelDMN8+KblmD4G X-Received: by 10.101.76.129 with SMTP id m1mr2263648pgt.90.1523421155018; Tue, 10 Apr 2018 21:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523421154; cv=none; d=google.com; s=arc-20160816; b=dx2siZF8moWKW7J35NS03O2vIUHufhn0GmliNsOjKZYqtwqqkzj3xMCoO+lnpoHRMj xCH/MVLRLMmRRa1K942bYaoS8VDLq5mPHpC0pVwZ8x+VvY9U7UHJUyS5md8hkZGAiWel 0uQDNgUl7/OkAsGePiVyEb9HTnA3EffHv4rrQr6qPk0Thk0mY1O0GOQDlAk6ggnV9CEC P+QxAkNkDbJysUBCiR0XYQR2eTKwbAClA2g9vkc9owUNoLxLQEotY/SN1D+KEiVBBmi9 4bKtrRCYXL3muK3sMCN0x7RWGspcw95dmSZzfdJJmPMtawvbQ80eRJlyFTQW29OfgQux zf6Q== 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=2O1IL3SFEq36yh0qoLrDz62IQ26vKQyD3JO0lpj8beI=; b=TM1+lPyLy0t8Sww7ofdi333o/ZxtfnhmB7jRLSeSTy6snNqJyvr+V7m1Fl7U9oZuOQ jIr8m7HcDZTGGosEFDblVwejcStan3kDH3mOZRhy27hhRYb7+VM2qSFEF2gqHoD6RPsf MpgXKz6pTu5Ne2ht+KtEjGv98PJebb1lQACHjRVIYUSAg1KMBTM7Cbl/lB8f0zKMfym3 RWfqXno23WBwfh6g5PiNY0qzcYetySp6A9WwzJKcNJy1Eu0QcKBnJbIDmnAzzDq6IBXc jXpO4+iqqOFQ7IQoWh6h+8FNI7yY8O/2l5h818W7iKutuAgLkz9pkO3FFpg5bAZG6LeO jBWA== 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 v27si202985pgc.417.2018.04.10.21.31.47; Tue, 10 Apr 2018 21:32:34 -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 S1751409AbeDKE2b (ORCPT + 99 others); Wed, 11 Apr 2018 00:28:31 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56394 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750723AbeDKE23 (ORCPT ); Wed, 11 Apr 2018 00:28:29 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3B4QEtG013652 for ; Wed, 11 Apr 2018 00:28:29 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2h96ws928c-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 11 Apr 2018 00:28:28 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Apr 2018 05:28:26 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 11 Apr 2018 05:28:19 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3B4SJIO50725016; Wed, 11 Apr 2018 04:28:19 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F4745204B; Wed, 11 Apr 2018 04:19:17 +0100 (BST) Received: from [9.124.31.216] (unknown [9.124.31.216]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9C41652045; Wed, 11 Apr 2018 04:19:12 +0100 (BST) Subject: Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter To: Oleg Nesterov Cc: mhiramat@kernel.org, peterz@infradead.org, srikar@linux.vnet.ibm.com, rostedt@goodmis.org, 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, jolsa@redhat.com, kan.liang@intel.com, kjlx@templeofstupid.com, kstewart@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, milian.wolff@kdab.com, mingo@redhat.com, namhyung@kernel.org, naveen.n.rao@linux.vnet.ibm.com, pc@us.ibm.com, tglx@linutronix.de, yao.jin@linux.intel.com, fengguang.wu@intel.com, jglisse@redhat.com, Ravi Bangoria References: <20180404083110.18647-1-ravi.bangoria@linux.vnet.ibm.com> <20180404083110.18647-8-ravi.bangoria@linux.vnet.ibm.com> <20180409132928.GA25722@redhat.com> <84c1e60f-8aad-a0ce-59af-4fcb3f77df94@linux.vnet.ibm.com> <20180410110633.GA29063@redhat.com> From: Ravi Bangoria Date: Wed, 11 Apr 2018 09:58:13 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180410110633.GA29063@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18041104-0020-0000-0000-000004107121 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041104-0021-0000-0000-000042A4986A Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-11_01:,, 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-1804110041 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oleg, On 04/10/2018 04:36 PM, Oleg Nesterov wrote: > Hi Ravi, > > On 04/10, Ravi Bangoria wrote: >>> and what if __mmu_notifier_register() fails simply because signal_pending() == T? >>> see mm_take_all_locks(). >>> >>> at first glance this all look suspicious and sub-optimal, >> Yes. I should have added checks for failure cases. >> Will fix them in v3. > And what can you do if it fails? Nothing except report the problem. But > signal_pending() is not the unlikely or error condition, it should not > cause the tracing errors. ... > Plus mm_take_all_locks() is very heavy... BTW, uprobe_mmap_callback() is > called unconditionally. Whatever it does, can we at least move it after > the no_uprobe_events() check? Can't we also check MMF_HAS_UPROBES? Sure, I'll move it after these conditions. > Either way, I do not feel that mmu_notifier is the right tool... Did you > consider the uprobe_clear_state() hook we already have? Ah! This is really a good idea. We don't need mmu_notifier then. Thanks for suggestion, Ravi