Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp547099ybi; Thu, 30 May 2019 02:52:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbzUGWIu1mHJBY7kqZUAR/eu5PAcgzTIqPGxncqqzMU2GRx0k3G+oEl65rHfR/hdsWiZ2T X-Received: by 2002:a62:7689:: with SMTP id r131mr2730641pfc.181.1559209933983; Thu, 30 May 2019 02:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559209933; cv=none; d=google.com; s=arc-20160816; b=LkPG0rXRHNlY3lbWf/Fcazz0tE6rOBcIc9UCe9ZUKRS3TKrNZr7HMPe+OB5BhF4IKF aiSf2DMiIRjrdZy85XBZTLXy+Ka9nScNtJ/W8ZouLMqSGhx8S+pPbgojuptX++HG8kuX SqJXRVANbgZLVoMB3v0HDp9iOznSUxWGNtX8iTq6VyqsihRHjlki2A50IFATqqP8aIMn PVCtZ9Gar7cCQObJ08CKhvkt26+tw7ROYUDOAX0IQOVGwuk1y0YJR9Acus1QY/Jts8Ah zqaHwSdc+oz5QDaxbnXPjP1KcvZ4/hK6p5woXvntpBAkZEbfwDu6kIXSaEHpEjs2rxpt osgA== 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:dkim-signature; bh=iSdK26IrmOEc/B9VC/Q0XsQRMEkKcuvxsa2POFBAfWg=; b=QDAWtxwjigtIhsFH8Lh1FU30uM+ouUnota2DkfVnafYdJ7B27aCd5SrWwddv1ualKG 9z3fQk4SyVXRPiKFdusJy9sZEgY+9ulTvfd0BbWuGuLJxeW1wX/CH8QXT68s3trGgHqA txb27P7VGCaa3rru4BPI1bvy8OteDc9uUhVJtRfH0vshuH/jXKM9TbprJpcNH5d8VsoE pMHVvzemeCsQ32LrVrnht/30gkBZ/5yEb6NFWh8er0zWLb9D4aEwWC7DaschnKOrtwDX iTpRED/tJY2fWGyVJi0Cb5KepREXcvhoub3VX6BPW/vRGoaZGOO2MM9QqtnVNT9CW1iq BUDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LCpbGaIP; 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 m189si3226232pfm.17.2019.05.30.02.51.57; Thu, 30 May 2019 02:52:13 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LCpbGaIP; 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 S1727833AbfE3Juw (ORCPT + 99 others); Thu, 30 May 2019 05:50:52 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36712 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727671AbfE3Juw (ORCPT ); Thu, 30 May 2019 05:50:52 -0400 Received: by mail-wm1-f66.google.com with SMTP id v22so3417896wml.1 for ; Thu, 30 May 2019 02:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iSdK26IrmOEc/B9VC/Q0XsQRMEkKcuvxsa2POFBAfWg=; b=LCpbGaIPpV5r99H6iR6FLlmoZ3ctc0Wo0tAaXSBSHw6z4REiqnyT7PkFbOzd+UPe5l sK0Z4FkJ1KPKDQ/Wssfmzm5JrLnfiFJaVvCUvp7coOL1SGorMfV3kiLVeRVzWKiJzycw lGaUA5D/+pAfiiopfPIWvDalUZjZWblLTfOZg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=iSdK26IrmOEc/B9VC/Q0XsQRMEkKcuvxsa2POFBAfWg=; b=RgRX6yJIbyaBpjAw/SHfcZLdgEEJZtIlaibuM+2IL2VgVjuO9zX5zic9YrurzSrjti RlYhdQ7te0nkwT4KWcOvtGZ4nD/BNCy07XBNqW9lYbTPWJ2m8/G9st4APKBRuKQIxvpk srZMKkSY4Nk7F+yWeNsFo8rOOFqFvewquJWqg4275ocu13ZfjrWFRKDiXiAn0/KTEKau iU4T/2gt2/w1sUsdASQfH9PyrVT5Objk9houRd1urY8GfGb68DttEf5dau44SwlRBREl 3P2TQP63COpSFftueoztju+SjiR3ITdomWnDONblFp5vAVoMDfTq2KFhTOz0KszMzn4/ l5tA== X-Gm-Message-State: APjAAAVXZ5N6CPd0qGvAUB5CFMoeV16PBQY7rRu+s48bx1HvEclPDmQb ZQlAceQJHfIvc9UbSKKQUm8k+g== X-Received: by 2002:a1c:ca01:: with SMTP id a1mr1700893wmg.30.1559209849831; Thu, 30 May 2019 02:50:49 -0700 (PDT) Received: from andrea (86.100.broadband17.iol.cz. [109.80.100.86]) by smtp.gmail.com with ESMTPSA id x68sm2239214wmf.13.2019.05.30.02.50.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2019 02:50:48 -0700 (PDT) Date: Thu, 30 May 2019 11:50:39 +0200 From: Andrea Parri To: Greg KH Cc: David Howells , viro@zeniv.linux.org.uk, raven@themaw.net, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-block@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Will Deacon , "Paul E. McKenney" , Mark Rutland Subject: Re: [PATCH 1/7] General notification queue with user mmap()'able ring buffer Message-ID: <20190530095039.GA5137@andrea> References: <20190528231218.GA28384@kroah.com> <20190528162603.GA24097@kroah.com> <155905930702.7587.7100265859075976147.stgit@warthog.procyon.org.uk> <155905931502.7587.11705449537368497489.stgit@warthog.procyon.org.uk> <4031.1559064620@warthog.procyon.org.uk> <31936.1559146000@warthog.procyon.org.uk> <20190529231112.GB3164@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190529231112.GB3164@kroah.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Looking at the perf ring buffer, there appears to be a missing barrier in > > perf_aux_output_end(): > > > > rb->user_page->aux_head = rb->aux_head; > > > > should be: > > > > smp_store_release(&rb->user_page->aux_head, rb->aux_head); > > > > It should also be using smp_load_acquire(). See > > Documentation/core-api/circular-buffers.rst > > > > And a (partial) patch has been proposed: https://lkml.org/lkml/2018/5/10/249 > > So, if that's all that needs to be fixed, can you use the same > buffer/code if that patch is merged? That's about one year old...: let me add the usual suspects in Cc: ;-) since I'm not sure what the plan was (or if I'm missing something) ... Speaking of ring buffer implementations (and relatively "old" patches), here's another quite interesting: https://lkml.kernel.org/r/20181211034032.32338-1-yuleixzhang@tencent.com Thanks, Andrea