lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 03 Mar 2023 19:41:02 +0100
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Casey Schaufler" <casey@...aufler-ca.com>,
        "Paul Moore" <paul@...l-moore.com>,
        linux-security-module@...r.kernel.org
Cc:     jmorris@...ei.org, "Kees Cook" <keescook@...omium.org>,
        john.johansen@...onical.com,
        "Tetsuo Handa" <penguin-kernel@...ove.sakura.ne.jp>,
        stephen.smalley.work@...il.com, linux-kernel@...r.kernel.org,
        linux-api@...r.kernel.org,
        Mickaël Salaün <mic@...ikod.net>
Subject: Re: [PATCH v6 04/11] LSM: syscalls for current process attributes

On Wed, Feb 22, 2023, at 21:08, Casey Schaufler wrote:

> +/**
> + * sys_lsm_set_self_attr - Set current task's security module attribute
> + * @ctx: the LSM contexts
> + * @size: size of @ctx
> + * @flags: which attribute to set
> + *
> + * Sets the calling task's LSM context. On success this function
> + * returns 0. If the attribute specified cannot be set a negative
> + * value indicating the reason for the error is returned.
> + */
> +SYSCALL_DEFINE3(lsm_set_self_attr, struct lsm_ctx __user *, ctx, 
> size_t __user,
> +		size, u64, flags)
> +{
> +	return security_setselfattr(flags, ctx, size);
> +}
> +
> +SYSCALL_DEFINE3(lsm_get_self_attr, struct lsm_ctx __user *, ctx,
> +		size_t __user *, size, u64, flags)
> +{
> +	return security_getselfattr(flags, ctx, size);
> +}

As with the other patch I commented on, I think it's better to use a
32-bit 'flags' argument here, to make this work for compat tasks.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ