Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp204947ybl; Tue, 28 Jan 2020 01:32:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwB7Ou/bG7Hqil0wEXhDXLh4aq3TNFovNCiVwgHTYrD8hwiLCpkrb3Cuo4iz5JcvnybvCNN X-Received: by 2002:a9d:6005:: with SMTP id h5mr16768176otj.153.1580203924703; Tue, 28 Jan 2020 01:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580203924; cv=none; d=google.com; s=arc-20160816; b=uYl/ypSsjyK8gqABcB9v4uOeHQQTeZoPrX8Wh2Rt8o23VQRPb7bdeSYY3a2CBGURnL GlgpZO0NfeSdOnUSWpGeB7XGPH3iTmf52cM/P4SalFM3gZGDquIOPBQy4dF2D1eAZLC+ Bpe60tSshZa25/HGEa0+LAdxKjAqqMsT4QSHMOjLj0MWs1gW8oTaVNfWjj0sEgZiSjdD qUUjPUfsa7Ul4BLGHrkijX72TDOxzlzmv+C7Fcdgtc3hXP/fRU1gJg+IBG23ftKJ/CDZ stLIU3F1FTAfHijsL8Cwo4dD76pXpCOLF2bCmMM8YUmMhIF+Ea6Mrd6JWF0FxZQAbuBJ E/4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yh41YjQOL6v5qPkhPRLG/JO3Fw/88a695J6NKkJZrX0=; b=BPkL8OOv2jTJo8DELvxXdh2lbZOyMDIvyi6AW+nb8DzmgV34BLDgtXZ3pGSpjZ2DiH z77yPQViGzCHNUGKReX8Pl/Vl3+3BU9/ARfRmGIy/CYiw08xDLoLwSXOXpkS9C5lB9dD TsGJ89r5jmv+/eFWAWnyo2ONaAdGaOeMgTq3/Q2aBBa0cqgtFchn5yg1IeEbCKN7hT28 Xs2ibskcayPxh2TVMbzufIvZUM3n25nzIfm/OBDI49RGGkpwZDq3BmnjbeSksvniN/oo 70phTYcSzUguGtTQW7ooS3fIGTjrDWcDrEcwUPXMAUCM1iwTE6I2ulXAyi/SRbINqJd/ Qjkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VzGyPT+y; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si8344180otk.270.2020.01.28.01.31.50; Tue, 28 Jan 2020 01:32:04 -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=@google.com header.s=20161025 header.b=VzGyPT+y; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725920AbgA1Jas (ORCPT + 99 others); Tue, 28 Jan 2020 04:30:48 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:45760 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725271AbgA1Jas (ORCPT ); Tue, 28 Jan 2020 04:30:48 -0500 Received: by mail-ot1-f67.google.com with SMTP id 59so11329578otp.12 for ; Tue, 28 Jan 2020 01:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yh41YjQOL6v5qPkhPRLG/JO3Fw/88a695J6NKkJZrX0=; b=VzGyPT+yQnMZWoX1YeBN9u8Fx5p+Am8kWrm005R45IP8atXD3C+oTdtHxSOA5v9BRE 3Nig17W/n+ysFLzSZAFhSx3yjCeq+JLnmIcBu3dJ8nsNKx/4Q/bYUFTUbDjmze6metaP Hy3VRvHtnNsmHjt8W/xS4mDccKPlw8UL4hwQmxuQ9DzABpDaJE7b3DR9Jd1v58JmVsv0 MVNYjHw494rtK0iFkHcOGuIPm6dyRgOvqti7c5R/MbBVHMaBNSSwoscjG2dlDlnKGPgN vLy4PB4tKkgZ3053449rUXz2ZNMb53RTi2tkML4hNLrxnFwbpBW75aMMsRkM+v+X0Y+A 36mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yh41YjQOL6v5qPkhPRLG/JO3Fw/88a695J6NKkJZrX0=; b=RNIyhk18bYYvVRk2Cs6mf73yqZyuU5NzHvRBcj9AhmLNgjfFCGZ7OeOvia5I95dHRx kAYA0QnPrByW7lsLLu3wBiDh3bFWrHXtP4VGN7hUMOlPIdpuvA5YRNNz1P1nB8u5kRzM QaR4NDFBo8lhXEmF4ZV2r6cHuJg2crahkydi3+xbVRKNcS/ywZewPaSCd0rvvj++Wv0J 0f+yd8+7WkJSk/KPyYxH+ARYh2avrK+dEFi5qHMZ3WVImLoaDjPCc/UUIAuAabFzbgIB dRex/oTJ3ZkKRXyYQOkz6SAeytwJmhGfj8kCIIh3hJs+ixO5Oeeg6PFHexG98o3u4swA VA4g== X-Gm-Message-State: APjAAAUM5b4OHtoLbeX0FWWMiRdotR9C+nCXRX4IlPKR9dnlwus12lkK bSleQOsfgXkmRN6dA5JXDLKmFYqjvw2tD8/gza+cyQ== X-Received: by 2002:a05:6830:1d6e:: with SMTP id l14mr15362244oti.32.1580203847077; Tue, 28 Jan 2020 01:30:47 -0800 (PST) MIME-Version: 1.0 References: <20200128072740.21272-1-frextrite@gmail.com> In-Reply-To: <20200128072740.21272-1-frextrite@gmail.com> From: Jann Horn Date: Tue, 28 Jan 2020 10:30:19 +0100 Message-ID: Subject: Re: [PATCH] cred: Use RCU primitives to access RCU pointers To: Amol Grover Cc: David Howells , 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 28, 2020 at 8:28 AM Amol Grover 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? > hence use rcu_access_pointer to access them.