Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp458749ybi; Fri, 31 May 2019 04:17:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaUk5hCAW7BxbZw7VspCMpEuqK0rXgjl/MKdWBoFKRlhrkdYrVXIkm+og0ONV2vxWtfcG9 X-Received: by 2002:a17:90a:207:: with SMTP id c7mr8463557pjc.94.1559301473612; Fri, 31 May 2019 04:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559301473; cv=none; d=google.com; s=arc-20160816; b=oWxEWPDDyuhZcPEHYXhDiFtA1zpGKuCeP9sL7yhkypxSmI1lwAlQ5hwxmlFl6VIRal dDXekzfQaaKKLJ/beIwhaws1eWhL0ROPYCn4Szw6zWkrr3TSnUbCl18ZTZidIl/jSeok 3J72ID3Yj7vJHgL1au2rg20I7Cn1QndbndtbNc9PboI3IsVP+0350OustrzKnXmN0/Th 7/rPjblxrZS0iVVSSMxUknbvygvOeq0OJQRG7USXXrsl0iL+2YEn6sgMf/KnRL1C6gW2 7xoqyJ3I4awfFqLsGEXtcyfaFjNmLkyhsfj64NIfpf4eg0TQG5hWlbz4nbJgTQ8oeKUm Bl7Q== 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=0bzCcEeHXEwR7c+WQ7EMhHPHTFa6pRbMCfQNYRgGQ50=; b=mSRWNJunUPCehBuHubbn0bjip8xjGX9S/h38jnIN+OSJBF+A+0KDfI4AoGYHkx3FMt Nu7gu2tOwLU/C0NeNL+m7PepAKeE/h1dxVnfepcgauZ9hvbnXJ5Msm6tWTST4bg3P+1F kf/TrNw9uxGjjri4rk+fLBEYoqn4s5/4nlUBouysO3XP8wrMEGkqSj1FTkmnOusz/9FE 4+xST3Nq4Kj/6CpcriBkgD09r+jCiuHAypVvyb+sxi+psF18swLHRAfZGDI3LQ3qpfX4 +YjjbF1hUbc1ZADAvnRw+80bdbfrbQRn2SH5OPS8YI0K1SftETuTKSDWq35Zy+zVwGRy 1VXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TZRqiz+e; 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 v16si5250359pjr.73.2019.05.31.04.17.36; Fri, 31 May 2019 04:17:53 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TZRqiz+e; 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 S1727111AbfEaLPD (ORCPT + 99 others); Fri, 31 May 2019 07:15:03 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42694 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfEaLPC (ORCPT ); Fri, 31 May 2019 07:15:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0bzCcEeHXEwR7c+WQ7EMhHPHTFa6pRbMCfQNYRgGQ50=; b=TZRqiz+eB19FKOviEbwMF50eL tkVinge7hG7nufh2+jXjJimy3MX8tBcxRj3YQ//UpQYvtJgMfKOhWXOXbYLoPoseaA8GM16AkT9se Jngp47DXJ0z8Aw/MuS1HRC8U73Vd1LivUdfY5v/tC0ZNDKoBOdj6+6VODUmz8iT2gJDy2a+4tpMBx VO+5A3Gl8tI5ZU5dfFyOOeE7KYOq4wxlJF67H2SjwQSOphmha3VHx2Fo9JYu9EsuOvlTOySnke9tM z2Nkt7Oukx13QfyTJ/CxJdaCY4q6AKkM/OC82uZli8h02Sua/xANMZ4b54zPgJGxij2HRdkFUR5Ql hCLOaznLw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWfUl-0002gF-9Z; Fri, 31 May 2019 11:14:47 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BA181201D5AB1; Fri, 31 May 2019 13:14:45 +0200 (CEST) Date: Fri, 31 May 2019 13:14:45 +0200 From: Peter Zijlstra To: David Howells Cc: Jann Horn , Greg KH , Al Viro , raven@themaw.net, linux-fsdevel , Linux API , linux-block@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module , kernel list , Kees Cook , Kernel Hardening Subject: Re: [PATCH 1/7] General notification queue with user mmap()'able ring buffer Message-ID: <20190531111445.GO2677@hirez.programming.kicks-ass.net> References: <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> <20190528231218.GA28384@kroah.com> <31936.1559146000@warthog.procyon.org.uk> <16193.1559163763@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16193.1559163763@warthog.procyon.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 10:02:43PM +0100, David Howells wrote: > Jann Horn wrote: > > > Does this mean that refcount_read() isn't sufficient for what you want > > to do with tracing (because for some reason you actually need to know > > the values atomically at the time of increment/decrement)? > > Correct. There's a gap and if an interrupt or something occurs, it's > sufficiently big for the refcount trace to go weird. > > I've seen it in afs/rxrpc where the incoming network packets that are part of > the rxrpc call flow disrupt the refcounts noted in trace lines. Can you re-iterate the exact problem? I konw we talked about this in the past, but I seem to have misplaced those memories :/ FWIW I agree that kref is useless fluff, but I've long ago given up on that fight.