Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp119503imm; Fri, 21 Sep 2018 19:51:07 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb4N0SV557S/tcQ+3x4ejry/lXUl4hfy0NKP6VmLoi1PjKcvfcDWl9sxXAyIEL5KcLI80B6 X-Received: by 2002:a62:cc41:: with SMTP id a62-v6mr501405pfg.131.1537584667230; Fri, 21 Sep 2018 19:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537584667; cv=none; d=google.com; s=arc-20160816; b=S6jv6TjAuCZRe611xia8ObmqO9PfgFnhOAj+vhsMQ5OQTvQHGjeLmG+nfB1N4WGNjN eyRhW4IpNtDFVoG1WafPdYbt65r/vBAowor9b1o3DDuWdBEkIOua+0WhlrCl2mejuIts QqdXEXEo8HHerMtqweRim5+4uFMHVirKBCVMqhJy6Q7JDVQHmn43ZC5pW3NFUShmtA0m DTIZ8iuIT25YTcPoU9TvbpCIMd0slc6Fr80mjFnf5aZTj6FJLunKOmXzXWLrQfeZeTqV EO/BNh5XqXZ2TtcHN7S6jitnN5M6d7Va6eBRHW0VF35034u5EuFH+Cu+Htm8y28X4mmM niLg== 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 :references:in-reply-to:mime-version:dkim-signature; bh=6JN7d/SMzu67DdMLPQmJGaOpRSTNfEGeZFFEvlRPld0=; b=IXLl3oVTIGUEfylREydWESSW3wGU0xerDvR+BrYu3aEBbuHFq+Yd3kX7kIYrhk/31k GQeEjm9cZeQyDLIxltzDFcq4NiUZEQqSbc9IewzktNrCoTLkrKBF1CqpNbZS2Qn3Eu+j 3iFX70hQd76UuhP+FRN/gi6Mm6EnWsvHzEWjt5ZzaWNchGGqiFTymQ9pV8UplQHVuBpd knHcZRWVWXUrqZqdk+ySYkeUmRAxAp+XnwPt0D8pd9plyQS1yqWFL59Z7Wnog/kuidAE V96U+JXhm2jj6hU44UCJCykpG8BncgyKuEfqXXjExyhvGhsfUjlrs8VnNcqH3DptZxCD 5RPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Ilb5hjfm; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i128-v6si30109275pfg.93.2018.09.21.19.50.51; Fri, 21 Sep 2018 19:51:07 -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=@chromium.org header.s=google header.b=Ilb5hjfm; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725982AbeIVIme (ORCPT + 99 others); Sat, 22 Sep 2018 04:42:34 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:43238 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725813AbeIVImd (ORCPT ); Sat, 22 Sep 2018 04:42:33 -0400 Received: by mail-yb1-f196.google.com with SMTP id w80-v6so6252469ybe.10 for ; Fri, 21 Sep 2018 19:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6JN7d/SMzu67DdMLPQmJGaOpRSTNfEGeZFFEvlRPld0=; b=Ilb5hjfmHl0jluT91r5MLDcZyf3GyiltbXXEcC1Id9/o4plH40KoMcu2aHIH0i1RRU gtUtKcScW1O/DFIOtJEOAef2cCyxRzDJxUeJzJnfJbvpRBEJtrlmbMgzKIRwZWNrnxVK x3coxJxhQm2Y4hEhbh9Jyi45jvICigFbGEquw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6JN7d/SMzu67DdMLPQmJGaOpRSTNfEGeZFFEvlRPld0=; b=YDMhD8xED/ijPllE/4OTzRtdG+guozJUCZS+QRX83itSD0oiQF8XZgaVyKSzLZ7UI6 ufPu+oph+hoJRv/EiQePlsKRgDu1F4JlJP3oJlyJb/jJARWqQy1BbdLW6FV23byMcOfm QNtX3oVtWPtSEKOoSUMoeQzdmo1G3TBRNLVUvck9Ob99BqhgUch/gF8uTQWQueiEkaK1 NI7raT14Btc/rMa4PGqZSQdVDCUoSlKloVCUcMIbwLYHlicSlZ6LcRZzZXKMt8oEF9TM SAmOPrJKmtYlsV9aIiG4wv3Pa26qGjpA3wdBN4gkuVgx/JjfS90rlNStIl0t7WCaVNMp fPzA== X-Gm-Message-State: ABuFfojSt4VNiFlBPQl1V2HfR1yENSDfxLg0R1GU8FccRtiNLgA52+Zp IdTXQAfbpPeGyVrh1vQhG/BovnTqhm8= X-Received: by 2002:a25:c201:: with SMTP id s1-v6mr198786ybf.251.1537584643142; Fri, 21 Sep 2018 19:50:43 -0700 (PDT) Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com. [209.85.219.173]) by smtp.gmail.com with ESMTPSA id b6-v6sm2671094ywe.71.2018.09.21.19.50.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 19:50:40 -0700 (PDT) Received: by mail-yb1-f173.google.com with SMTP id 5-v6so6261089ybf.3 for ; Fri, 21 Sep 2018 19:50:40 -0700 (PDT) X-Received: by 2002:a25:238d:: with SMTP id j135-v6mr200848ybj.137.1537584640036; Fri, 21 Sep 2018 19:50:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:5f04:0:0:0:0:0 with HTTP; Fri, 21 Sep 2018 19:50:39 -0700 (PDT) In-Reply-To: References: From: Kees Cook Date: Fri, 21 Sep 2018 19:50:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 08/19] Infrastructure management of the cred security blob To: Casey Schaufler Cc: LSM , James Morris , SE Linux , LKLM , John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "linux-fsdevel@vger.kernel.org" , Alexey Dobriyan , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , Salvatore Mesoraca 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 Fri, Sep 21, 2018 at 5:18 PM, Casey Schaufler wrote: > Move management of the cred security blob out of the > security modules and into the security infrastructre. > Instead of allocating and freeing space the security > modules tell the infrastructure how much space they > require. > > Signed-off-by: Casey Schaufler When combined with my series, this gets slightly simpler: - the double init call and the "finished" stuff goes away - debugging output is controlled by "lsm.debug" param instead of a CONFIG Regardless, for the overall logic, calculating the sizes, etc: Reviewed-by: Kees Cook -Kees -- Kees Cook Pixel Security