All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Casey Schaufler <casey@schaufler-ca.com>,
	casey.schaufler@intel.com, paul@paul-moore.com,
	linux-security-module@vger.kernel.org
Cc: 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
Subject: Re: [PATCH v5 4/8] LSM: lsm_get_self_attr syscall for LSM self attributes
Date: Tue, 14 Feb 2023 18:41:07 +0100	[thread overview]
Message-ID: <3977d478-cb41-832b-7b5e-73dd247f267d@digikod.net> (raw)
In-Reply-To: <20230109180717.58855-5-casey@schaufler-ca.com>


On 09/01/2023 19:07, Casey Schaufler wrote:
> Create a system call lsm_get_self_attr() to provide the security
> module maintained attributes of the current process. Historically
> these attributes have been exposed to user space via entries in
> procfs under /proc/self/attr.
> 
> Attributes are provided as a collection of lsm_ctx structures
> which are placed into a user supplied buffer. Each structure
> identifys the size of the attribute, and the attribute value.
> The format of the attribute value is defined by the security
> module, but will always be \0 terminated. The ctx_len value
> will always be strlen(ctx)+1.
> 
>          ---------------------------
>          | __u32 id                |
>          ---------------------------
>          | __u64 flags             |
>          ---------------------------
>          | __kernel_size_t ctx_len |
>          ---------------------------
>          | __u8 ctx[ctx_len]       |
>          ---------------------------
>          | __u32 id                |
>          ---------------------------
>          | __u64 flags             |
>          ---------------------------
>          | __kernel_size_t ctx_len |
>          ---------------------------
>          | __u8 ctx[ctx_len]       |
>          ---------------------------
> 
> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
> ---
>   Documentation/userspace-api/lsm.rst |   9 ++
>   include/linux/syscalls.h            |   3 +
>   include/uapi/linux/lsm.h            |  21 ++++
>   kernel/sys_ni.c                     |   3 +
>   security/Makefile                   |   1 +
>   security/lsm_syscalls.c             | 182 ++++++++++++++++++++++++++++
>   6 files changed, 219 insertions(+)
>   create mode 100644 security/lsm_syscalls.c

For new files (e.g. lsm_syscalls.c), it would be nice to auto-format 
them with clang-format. It helps maintenance by keeping a consistent 
style across commits, which should also help backports, and it avoids 
nitpicking on style issues.

  parent reply	other threads:[~2023-02-14 17:49 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230109180717.58855-1-casey.ref@schaufler-ca.com>
2023-01-09 18:07 ` [PATCH v5 0/8] LSM: Three basic syscalls Casey Schaufler
2023-01-09 18:07   ` [PATCH v5 1/8] LSM: Identify modules by more than name Casey Schaufler
2023-01-11 21:00     ` Paul Moore
2023-01-12  0:05       ` Casey Schaufler
2023-01-12 20:30         ` Paul Moore
2023-01-09 18:07   ` [PATCH v5 2/8] LSM: Maintain a table of LSM attribute data Casey Schaufler
2023-01-11  1:58     ` kernel test robot
2023-01-11 21:01     ` Paul Moore
2023-01-12  0:36       ` Casey Schaufler
2023-01-12 20:26         ` Paul Moore
2023-01-09 18:07   ` [PATCH v5 3/8] proc: Use lsmids instead of lsm names for attrs Casey Schaufler
2023-01-11 21:01     ` Paul Moore
2023-01-12  0:37       ` Casey Schaufler
2023-01-09 18:07   ` [PATCH v5 4/8] LSM: lsm_get_self_attr syscall for LSM self attributes Casey Schaufler
2023-01-11 21:07     ` Paul Moore
2023-01-12  1:37       ` Casey Schaufler
2023-01-12 21:37         ` Paul Moore
2023-01-12 14:40     ` Arnd Bergmann
2023-01-12 21:39       ` Paul Moore
2023-02-14 16:48         ` Mickaël Salaün
2023-02-02  4:53     ` Serge Hallyn (shallyn)
2023-02-14 17:41     ` Mickaël Salaün [this message]
2023-02-14 18:06       ` Casey Schaufler
2023-01-09 18:07   ` [PATCH v5 5/8] LSM: Create lsm_module_list system call Casey Schaufler
2023-01-11  0:50     ` kernel test robot
2023-01-11 21:07     ` Paul Moore
2023-01-12  1:39       ` Casey Schaufler
2023-01-12 21:43         ` Paul Moore
2023-01-09 18:07   ` [PATCH v5 6/8] LSM: lsm_set_self_attr syscall for LSM self attributes Casey Schaufler
2023-01-09 18:07   ` [PATCH v5 7/8] LSM: wireup Linux Security Module syscalls Casey Schaufler
2023-01-13  9:31     ` Geert Uytterhoeven
2023-01-09 18:07   ` [PATCH v5 8/8] LSM: selftests for " Casey Schaufler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3977d478-cb41-832b-7b5e-73dd247f267d@digikod.net \
    --to=mic@digikod.net \
    --cc=casey.schaufler@intel.com \
    --cc=casey@schaufler-ca.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=stephen.smalley.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.