Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2349065imu; Fri, 23 Nov 2018 07:58:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/WEak8+q9h+L5wqHaDNz/D9U0SiLZNdTqOSpfAS7t2GzK8iYAV50c/cwsOImObzuwvBu1 X-Received: by 2002:a63:5c22:: with SMTP id q34mr14502247pgb.417.1542988736930; Fri, 23 Nov 2018 07:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542988736; cv=none; d=google.com; s=arc-20160816; b=i/cvfXNkqaI+DjBegnKQlEYhs57KAeEPBBmAJmYyU082SWK/bk3w+IUHZLsBnpFfN5 wn6WfkcJr3D+0fpLtlSG+6efDySeGzgNnHfhA2o1ijCiTBBWyog7eNZwXd76ZPRzB9+R YfceKZid9sskt1GqNoXMsZaPv/T7NeqeGHngq0HlfK0yZfyhctG9FJAS4wuVBKZJF9mk sMUdvfWTg5bM7txFgvc9vhHO6o7Z06h2NdbN4o3jViAeDlHgl4cSk2odldd8xvysMYw4 4LKRt+CosM/hHonuOpWL53jJ6XridcTuDFElSFBDqc4e9SPGeKCLGmlViFaJYij+6AZq ywQg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=CIJ4QYW5MLOeDCwG0kTEOXvzmA1Cb4ipzKKCw2S4anI=; b=Cx4aBPjvZuBgjPVOzPnPBLZZa4mHnm2rHsfyuz3F0YI1dC3xClT6aMGZHIQertOs3o kZXqn6kaY4lEGX9Fxnr1gskQNF1YkyIeOLz6rA/V2IN6KLbzp/5VvB9bpUVjFapxZDc3 5pcUUYew5emRpsZYY6TMzZ+AmtRksNi1yMlRBemTqu4Lrxb/iGnYumukd9pHUlk7DRVZ XwZYFu5Wq3w3WB0sJEuFAH4wrv3VMWInuKATdNSy7rkDVWIUySXn4QH8Jlz45qnfHmZY NKgwuyIlfw3NCjianhrovPyt40i2zKoE7kYaBbBlJ8gDeaVqPBIdfIdflGhIfXvurMgz Wi5A== 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 j10si35953253pll.179.2018.11.23.07.58.42; Fri, 23 Nov 2018 07:58:56 -0800 (PST) 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 S2395097AbeKVXQJ (ORCPT + 99 others); Thu, 22 Nov 2018 18:16:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57210 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729105AbeKVXQJ (ORCPT ); Thu, 22 Nov 2018 18:16:09 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A378558E27; Thu, 22 Nov 2018 12:36:58 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.142]) by smtp.corp.redhat.com (Postfix) with SMTP id E67666092D; Thu, 22 Nov 2018 12:36:56 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 22 Nov 2018 13:36:58 +0100 (CET) Date: Thu, 22 Nov 2018 13:36:56 +0100 From: Oleg Nesterov To: Andrea Parri Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org Subject: Re: [Question] smp_wmb() in prepare_uprobe() Message-ID: <20181122123655.GD28270@redhat.com> References: <20181121224124.GB4016@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181121224124.GB4016@andrea> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 22 Nov 2018 12:36:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 11/21, Andrea Parri wrote: > > The comment for the smp_wmb() in prepare_uprobe() says: > > "pairs with rmb() in find_active_uprobe()" it seems that this comment was wrong from the very beginning, > but I see no (smp_)rmb() in find_active_uprobe(); I see the smp_rmb() in > handle_swbp(): is this the intended pairing barrier? Yes, and the comment near this rmb() says "pairs with wmb() in install_breakpoint()", today this is not right too. > Which memory accesses do you want to "order" with this pairing? See 142b18ddc81439acda4bc4231b291e99fe67d507 ("uprobes: Fix handle_swbp() vs unregister() + register() race") and the comment above this rmb(). Oleg.