From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-f194.google.com ([209.85.219.194]:47002 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726427AbeIMERM (ORCPT ); Thu, 13 Sep 2018 00:17:12 -0400 Received: by mail-yb1-f194.google.com with SMTP id y20-v6so2480222ybi.13 for ; Wed, 12 Sep 2018 16:10:29 -0700 (PDT) Received: from mail-yw1-f42.google.com (mail-yw1-f42.google.com. [209.85.161.42]) by smtp.gmail.com with ESMTPSA id s63-v6sm794161ywd.63.2018.09.12.16.10.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 16:10:27 -0700 (PDT) Received: by mail-yw1-f42.google.com with SMTP id x67-v6so411305ywg.0 for ; Wed, 12 Sep 2018 16:10:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <39bcaa18-4c53-f386-5e89-8903a49a3256@schaufler-ca.com> References: <39bcaa18-4c53-f386-5e89-8903a49a3256@schaufler-ca.com> From: Kees Cook Date: Wed, 12 Sep 2018 16:10:25 -0700 Message-ID: Subject: Re: [PATCH 03/10] SELinux: Abstract use of cred security blob To: Casey Schaufler Cc: LSM , James Morris , LKLM , SE Linux , John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "linux-fsdevel@vger.kernel.org" , Alexey Dobriyan , "Schaufler, Casey" Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Sep 11, 2018 at 9:41 AM, Casey Schaufler wrote: > Don't use the cred->security pointer directly. > Provide a helper function that provides the security blob pointer. > > Signed-off-by: Casey Schaufler Like smack, this seems to be largely: s/$identifier->security/selinux_cred($identifier)/ s/current_security()/selinux_cred(current_cred())/ Is that right? The one __task_cred() use seemed to be fully contained under rcu read lock. Reviewed-by: Kees Cook -Kees -- Kees Cook Pixel Security