Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1456076ybi; Fri, 12 Jul 2019 16:38:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI5/9YVQF6KhMAYGE5P73koznCaIWBt0LrxaEWEblKGzFWWJ9AJS7NZAOBlqS6A/S7wG1C X-Received: by 2002:a17:90a:f488:: with SMTP id bx8mr15040447pjb.91.1562974716775; Fri, 12 Jul 2019 16:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562974716; cv=none; d=google.com; s=arc-20160816; b=uKmpCqZB7QSzpXY5giYQm6ur68ueb56uPiBh5VvseEXd1ASJjHXuXPcmPdqYQJBpY2 f4CTrbqjFCBXdiUU/7N7KeqaScrt+W1YiiFG4EY5eNTArdE3eKvjCH/77mAVbX0ZMw2y cfcPfQnRxckYU0ReQjB0oawj9XvQ0tEA5W06lpJkQwNCNep/3pPuQ8002gm8CP9MVgKw JupOi7qTcEq/H85aZcrUYjfJJhdBOdPcLEkyBnH9Aj8habTiTL+csM+Jly7qWW0NTNMP fn38GMq0OHUhf7j+qh028ETkeMgxaxlA34l8I+aWqEJvcSxT4chAhEANcvJof1cZreOV yt6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=BzVnowWmZKaU2AvNWtcRY3w51Qkf1HDA4esK2SVsbOw=; b=X5u4ktL8zoq30QzyGnoWz3gbP2cc6bRXwTrEf/cFtNlQMVNGBu7J/7EvSRMYmD05I8 OuW7T00JDHG+Y0Bvbu5B2fc0/pgyKymrv0Yef43O23vYc/49Pbf+JB3f5gQdulcE2ChJ N5Wml2+TSgUsMDf9Gp+qFh3BGR/++8OmhQTFVWUUPxx9m3EL7I/vZfMiFGrg5KHk8/U0 tX2j8u4Xeo0vmWUcXfD/yuWTnXid4eIeVqS8qyDzUjiW/bwABx7qEn1L9pxjO60P8wwh UY4KTR3/Ws00EXxkZmJNcFtSEjeC88w29958p7ohmOBGzgVehgwFdZcO6sxfee39tCtb roMQ== ARC-Authentication-Results: i=1; mx.google.com; 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 w1si9185022pll.257.2019.07.12.16.38.21; Fri, 12 Jul 2019 16:38:36 -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; 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 S1728524AbfGLXhY (ORCPT + 99 others); Fri, 12 Jul 2019 19:37:24 -0400 Received: from namei.org ([65.99.196.166]:34978 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727708AbfGLXhY (ORCPT ); Fri, 12 Jul 2019 19:37:24 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x6CNZroi024242; Fri, 12 Jul 2019 23:35:53 GMT Date: Sat, 13 Jul 2019 09:35:53 +1000 (AEST) From: James Morris To: Salvatore Mesoraca cc: linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, linux-mm@kvack.org, linux-security-module@vger.kernel.org, Alexander Viro , Brad Spengler , Casey Schaufler , Christoph Hellwig , Jann Horn , Kees Cook , PaX Team , "Serge E. Hallyn" , Thomas Gleixner Subject: Re: [PATCH v5 03/12] S.A.R.A.: cred blob management In-Reply-To: <1562410493-8661-4-git-send-email-s.mesoraca16@gmail.com> Message-ID: References: <1562410493-8661-1-git-send-email-s.mesoraca16@gmail.com> <1562410493-8661-4-git-send-email-s.mesoraca16@gmail.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 6 Jul 2019, Salvatore Mesoraca wrote: > Creation of the S.A.R.A. cred blob management "API". > In order to allow S.A.R.A. to be stackable with other LSMs, it doesn't use > the "security" field of struct cred, instead it uses an ad hoc field named > security_sara. > This solution is probably not acceptable for upstream, so this part will > be modified as soon as the LSM stackable cred blob management will be > available. This description is out of date wrt cred blob sharing. > + if (sara_data_init()) { > + pr_crit("impossible to initialize creds.\n"); > + goto error; > + } > + > +int __init sara_data_init(void) > +{ > + security_add_hooks(data_hooks, ARRAY_SIZE(data_hooks), "sara"); > + return 0; > +} This can't fail so make it return void and simplify the caller. -- James Morris