Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp892439ybl; Fri, 31 Jan 2020 09:51:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwbP9vEket5JT+4iL/OEhpFv8Pp0EGPYPk7foEyhvyK8bc8gWl8iSIYuOivp2shSqq+WSGZ X-Received: by 2002:a05:6830:20c4:: with SMTP id z4mr8816879otq.260.1580493097630; Fri, 31 Jan 2020 09:51:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580493097; cv=none; d=google.com; s=arc-20160816; b=XYHpeB5Z0KUN9g5Ieq06m/4ebofl070cESrephrZmvccZBnPgR6PoWNd0cvSCew38m Vz0AWBeXc0xyx/MqA+b0h5HYDV8+OtmpU/h00dSeO1vc94pNPqZE6WtwOh9qaJcKO22n 46sOPDj40i1oEx82MApNePmdn9XDyR6mzluz+cnurmtNPc+xDQGTeddFffFL7FCbhtFY eScOGSZvF5UjS4MwxAKwfaF/KP1lLq7LdpVepyBrAO7LizbEVGSrfJnm9DPv/xpnxrH9 4QAlagfZwLA8i2jo6v0oA+4X3aA8FyklAodJwHSTz0iwKc6P+g/m5riw6LQltoo7QMbI L7CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :dkim-signature; bh=V3SBkZ4i5QlwjrNLSuKkhNiYeBGoDcITcsKQCtUjA6A=; b=0rzKLm1upiWwwO20vDIl7eMyUKpwg0ZFIsURHBktAnO1rJYhUpseO/rV3sSqBm9N+B PmcTvVkzf1eBF8H4uOrhWRa48FM68VyQ7UQYGe0LclvgP56B57Y+scgGJixxHT4O1uHP 7/uqv9/g3ZhgViCYniMJmuNo8R4RMXWXN0IUJQL8/3p3rCBddm9JozKdXHeeqkMtI2YZ HvDiz/fTgvG9FtEw4ffs1yx4XogB+ABegr5H/EZwQQMLjFmn+7Ge215H4uaEQDOUZf+L o1vEUd/+O5FHFh8sGaZtQmsUOZelonmBoagXev73/XbBvOnPYHJLQNPcZC9/G7Ub59vK QUEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bX5/8f/O"; 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=pass (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 t3si4852800oig.25.2020.01.31.09.51.23; Fri, 31 Jan 2020 09:51:37 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bX5/8f/O"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727226AbgAaRuB (ORCPT + 99 others); Fri, 31 Jan 2020 12:50:01 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:43864 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726969AbgAaRuB (ORCPT ); Fri, 31 Jan 2020 12:50:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580493000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V3SBkZ4i5QlwjrNLSuKkhNiYeBGoDcITcsKQCtUjA6A=; b=bX5/8f/OCXeY3rqyA7m7VH0hedTEKfSQjQxS3YmkWPgrQYslqXzo1QLw5Wq7qoZ6c+yCmv Ycyo88+TcLxHmiqox1aOk6pWzCfGJcNjSiW4SY+i4nDICkVtK4lZExxHHiwtfr6QoWXtMP rv74qQR6M/ctqLzey3Dp22TTHvOCbck= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-229-U-Jyth6VO06hI2fdG66p-A-1; Fri, 31 Jan 2020 12:49:56 -0500 X-MC-Unique: U-Jyth6VO06hI2fdG66p-A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B4A0D107ACC5; Fri, 31 Jan 2020 17:49:54 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-218.rdu2.redhat.com [10.10.120.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC0A97FB60; Fri, 31 Jan 2020 17:49:49 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20200128072740.21272-1-frextrite@gmail.com> To: Jann Horn Cc: dhowells@redhat.com, Amol Grover , Shakeel Butt , James Morris , Oleg Nesterov , Kees Cook , Thomas Gleixner , kernel list , linux-kernel-mentees@lists.linuxfoundation.org, Joel Fernandes , Madhuparna Bhowmik , "Paul E . McKenney" Subject: Re: [PATCH] cred: Use RCU primitives to access RCU pointers MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <267884.1580492989.1@warthog.procyon.org.uk> Date: Fri, 31 Jan 2020 17:49:49 +0000 Message-ID: <267885.1580492989@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jann Horn wrote: > > task_struct.cred and task_struct.real_cred are annotated by __rcu, > > task_struct.cred doesn't actually have RCU semantics though, see > commit d7852fbd0f0423937fa287a598bfde188bb68c22. For task_struct.cred, > it would probably be more correct to remove the __rcu annotation? You're right, I think, there shouldn't be any need for __rcu on task_struct::cred since it shouldn't be accessed on any task except current. I've a feeling that there was something at the time, proc perhaps, but I don't remember. David