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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 03 Mar 2023 19:32:18 +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 05/11] LSM: Create lsm_module_list system call

On Wed, Feb 22, 2023, at 21:08, Casey Schaufler wrote:
> @@ -1062,6 +1062,7 @@ asmlinkage long 
> sys_set_mempolicy_home_node(unsigned long start, unsigned long l
>  asmlinkage long sys_lsm_get_self_attr(struct lsm_ctx *ctx, size_t 
> *size,
>  				      __u64 flags);
>  asmlinkage long sys_lsm_set_self_attr(struct lsm_ctx *ctx, __u64 
> flags);
> +asmlinkage long sys_lsm_module_list(u64 *ids, size_t *size, int flags);
...
> + */
> +SYSCALL_DEFINE3(lsm_module_list,
> +		u64 __user *, ids,
> +		size_t __user *, size,
> +		u64, flags)
> +{

I see that the prototype does not match the definition here,
which really should raise a compiler error, but I suspect that
broke at some point.

Since none of the flags bits are actually used here, can we
please make this a 32-bit field as in the prototype rather
than the 64-bit one in the argument list?

Passing 64-bit arguments through 32-bit registers would make
the calling conventions incompatible with compat mode tasks
on 64-bit kernels.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ