From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A51DC433FE for ; Wed, 26 Oct 2022 06:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbiJZGBt (ORCPT ); Wed, 26 Oct 2022 02:01:49 -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> 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