Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp233144rwi; Tue, 25 Oct 2022 23:34:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5miM6TFMb9Hk2Xtpk5p/VKQw+hIg0N352OfFy+fsM13NowDjrOT70irii9zRXafT8m52k7 X-Received: by 2002:a63:dc54:0:b0:44c:ce26:fa35 with SMTP id f20-20020a63dc54000000b0044cce26fa35mr37115763pgj.374.1666766075275; Tue, 25 Oct 2022 23:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666766075; cv=none; d=google.com; s=arc-20160816; b=DeaKIVpzOzKlKqn5cSJMgG51fMAuJp9wHDbB1LFjSMi8m8Cx9tAZ6ITBzEU5RQUL5P kM2it7aLmuch2NMD/NYj/pljWVtlRq6bR+Z48NLLkTQEXPVhD/Pwk9gfIE4qRYv+Lsar qqgfV/XIvj43ljtilKOqxPUQNYNsvtgZETIWKkS++MmgI3IAI4zVn39M4fvTY76JtLq/ eLAZuLgpddFFqWhjsF2nTW6XPWOBNfF5w1YF9Vhy83SeciKoigs/yTFK0S6r0JJARRyt ilJS6VYA0dmfQ0+bi5ZpcUW+OvMA6VtEB8h2MTdMOG7qFAx0UVfBaBZyrxnXXl+90k20 pc0w== 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=JWvvF5hdmyGHA/ez00RRdgr9mNwJbz56t0a0EYhylnU=; b=PcIoRUpmHLJUYWzKnwjAz20j+fjyFrFiBUFZky9E0jUfdp9wvDNPB47kiusp60jKlc l66D2Yil/ZPNE0cpPOkPdpLN3KD9DIaAyvVbl2Gr+gwkyeWWa/xBqXFpQkw41BziUWq/ IRItdUaJqeTqE86orDKUn5VYsbmdbAPFfYPH7FFuvNP5acXzCUSJUJM5OeaD0BxxHl4N /zLBJFj3exKHtH+VoZBBebHDwJjh/c79SESFW7MUSuYU7nnW+y6HJyTfZUfWZhBZ8lhz RusfrOlRFD5L5ZCLpQkqmUc5hIG5/KI3Re3P6NMyYWRPsI9bBM1+iNiTLaSobBO98z2H vewg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NG6Q8jiF; 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 y16-20020a63e250000000b0046b014d12d8si5443823pgj.492.2022.10.25.23.34.23; Tue, 25 Oct 2022 23:34:35 -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=NG6Q8jiF; 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 S232832AbiJZGBr (ORCPT + 99 others); Wed, 26 Oct 2022 02:01:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233127AbiJZGBO (ORCPT ); Wed, 26 Oct 2022 02:01:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67F2F5A885; Tue, 25 Oct 2022 23:01:09 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 0456461C3C; Wed, 26 Oct 2022 06:01:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3391C433D6; Wed, 26 Oct 2022 06:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666764068; bh=++gVpUQZ8nzv4m4Hebok3BwXhcBs2ETMOZ0VuYDM1LE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NG6Q8jiFIHK0VDkBoI7TAtoPJvnBRot68vT4wzExbhXw7f5apcCwUGyvCFn3i6eRv SUi+zSRLs6hEjxdkO+LYtvWRgEW4JDt9EK6ClUNdb9mirVYy754tIV2Cca+b3T4OPh 0sSDmbLoy43fai5Nv1qsJKqK9qSFCV8kgkQ9iu8w= Date: Wed, 26 Oct 2022 08:02:01 +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 7/8] LSM: Create lsm_module_list system call Message-ID: References: <20221025184519.13231-1-casey@schaufler-ca.com> <20221025184519.13231-8-casey@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221025184519.13231-8-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:18AM -0700, Casey Schaufler wrote: > Create a system call to report the list of Linux Security Modules > that are active on the system. The list is provided as an array > of LSM ID numbers. > > The calling application can use this list determine what LSM > specific actions it might take. That might include chosing an > output format, determining required privilege or bypassing > security module specific behavior. > > Signed-off-by: Casey Schaufler > --- > include/linux/syscalls.h | 1 + > kernel/sys_ni.c | 1 + > security/lsm_syscalls.c | 38 ++++++++++++++++++++++++++++++++++++++ > 3 files changed, 40 insertions(+) > > diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h > index 2d9033e9e5a0..02bb82142e24 100644 > --- a/include/linux/syscalls.h > +++ b/include/linux/syscalls.h > @@ -1058,6 +1058,7 @@ asmlinkage long sys_set_mempolicy_home_node(unsigned long start, unsigned long l > unsigned long home_node, > unsigned long flags); > asmlinkage long sys_lsm_self_attr(struct lsm_ctx *ctx, size_t *size, int flags); > +asmlinkage long sys_lsm_module_list(unsigned int *ids, size_t *size, int flags); Instead of "unsigned int", how about "u64" to make it portable properly? thanks, greg k-h