Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp202154rwi; Tue, 25 Oct 2022 23:03:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5CbRTgsrE7ipgLDIneyO/LktyBBr1i6YY2I7GQU8u6iWkbKEwIcs6tJHHivbNqAOUWsPBM X-Received: by 2002:a17:902:d0d3:b0:186:9869:adb5 with SMTP id n19-20020a170902d0d300b001869869adb5mr18365630pln.105.1666764209342; Tue, 25 Oct 2022 23:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666764209; cv=none; d=google.com; s=arc-20160816; b=rizo8kO8xyyERLN37fHpS5cNHjyVOZUlDTiO2RiCCAZRFDPPIHtQ0JoiqJNPDqAmXH 91o4wgJj0IYX994zPl9fhRKg4SAKS6cGmqAVmsF8e9lcv/w8vqZk6xcEOpqtuAxzV0W+ EPthyO1Sm6yyADJ8XZn0lSPM49BTOaIfNcFBVoo+PU3ESTSEyIEEpcXMwLvJCBn13Slj 84J3Fhyrl7Y8rzrcDeHcVKADvNBjJDVZ/zPhk7/xReZUJbxjDOmqUp5fpIe3XaD3t/yp CiFMb66FiSbyu+HKDOc+C5Td4495+G7KJqOZWOIldJG0xI+MsFnZpTMGpThHIysQF249 z0oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZWUUZ+W2gNIJF12tklVmMNRhc2qn+IR8XyKRL+YL7H0=; b=IFSCOWxtyNKnpdrKWRBT53EpLtNgVgr/7Ul8rs3iu6pG+ublltZJ6J1L3QlTpbRAmO /R8TVf0oJVXJDJf1lDCRWW9oVMuQuG8wHfZQty009ZpTmxcl61fnf3TgQy5z4JdVzppo UVSOI91Vm8ZZrXBZwdAuBugjiUlWrL17jpzu4qpUwZYiC4BIUIYmwwkNJyX1ADVOA34l mRz+sSoGOsGuvhREP4XKdiLBT7H7TM7GakWK/uNDVxax1V8PM2B+k0WMjNMZTx+g3LDx DF6wSNHu+qGaRiJfq6yOcI8v88rKyq4zUA9wRSi3unOow/Wt1ACIs/5L8n6rwpfx2FTF lE/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x1Pxrhrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a170903228700b00186bb39ff55si6289538plh.427.2022.10.25.23.03.13; Tue, 25 Oct 2022 23:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x1Pxrhrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233062AbiJZGAg (ORCPT + 99 others); Wed, 26 Oct 2022 02:00:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233049AbiJZGAR (ORCPT ); Wed, 26 Oct 2022 02:00:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D2C6B56DE; Tue, 25 Oct 2022 23:00:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0164FB81F42; Wed, 26 Oct 2022 06:00:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D205C433D6; Wed, 26 Oct 2022 06:00:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666764003; bh=V7hGlTMiOpQOdktPhd0dorsnF1D2hXM+7RTnQYhztnM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x1Pxrhrq2RZvcFCJm44OUhCFiINAV/WNdw9P5IARe8zg3uK4Y9jYzwQWTbcI+PQ6A HWFSBlaE+k+CMYkK8aMekjhOmmHgfXvzTnCZRJjfZbWphT3AZQrwsAvDohql3npSco O/+V4wG9oEiSAQMyRkhMk0ELo7bwGFziKlDbtkoU= Date: Wed, 26 Oct 2022 08:00:56 +0200 From: Greg KH To: Casey Schaufler Cc: casey.schaufler@intel.com, paul@paul-moore.com, linux-security-module@vger.kernel.org, jmorris@namei.org, keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, stephen.smalley.work@gmail.com, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, mic@digikod.net Subject: Re: [PATCH v1 4/8] LSM: Maintain a table of LSM attribute data Message-ID: References: <20221025184519.13231-1-casey@schaufler-ca.com> <20221025184519.13231-5-casey@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221025184519.13231-5-casey@schaufler-ca.com> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 25, 2022 at 11:45:15AM -0700, Casey Schaufler wrote: > As LSMs are registered add their lsm_id pointers to a table. > This will be used later for attribute reporting. > > Signed-off-by: Casey Schaufler > --- > include/linux/security.h | 17 +++++++++++++++++ > security/security.c | 18 ++++++++++++++++++ > 2 files changed, 35 insertions(+) > > diff --git a/include/linux/security.h b/include/linux/security.h > index ca1b7109c0db..e1678594d983 100644 > --- a/include/linux/security.h > +++ b/include/linux/security.h > @@ -138,6 +138,23 @@ enum lockdown_reason { > > extern const char *const lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1]; > > +#define LSMID_ENTRIES ( \ > + 1 + /* capabilities */ \ No #define for capabilities? > + (IS_ENABLED(CONFIG_SECURITY_SELINUX) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_SMACK) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_TOMOYO) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_IMA) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_APPARMOR) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_YAMA) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_LOADPIN) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_SAFESETID) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_LOCKDOWN) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_BPF_LSM) ? 1 : 0) + \ > + (IS_ENABLED(CONFIG_SECURITY_LANDLOCK) ? 1 : 0)) > + > +extern int lsm_id; u64? thanks, greg k-h