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] [day] [month] [year] [list]
Date:   Mon, 27 Feb 2017 22:48:06 +0300
From:   "Dmitry V. Levin" <ldv@...linux.org>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     akpm@...ux-foundation.org, ebiederm@...ssion.com,
        linux-kernel@...r.kernel.org
Subject: Re: + uapi-fix-linux-sysctlh-userspace-compilation-errors.patch added to -mm tree

On Sat, Feb 25, 2017 at 01:35:51AM +0300, Dmitry V. Levin wrote:
> On Fri, Feb 24, 2017 at 05:35:33PM +0300, Alexey Dobriyan wrote:
> > On Thu, Feb 23, 2017 at 02:44:31PM -0800, akpm@...ux-foundation.org wrote:
> > > /usr/include/linux/sysctl.h:38:2: error: unknown type name 'size_t'
> > >   size_t *oldlenp;
> > > /usr/include/linux/sysctl.h:40:2: error: unknown type name 'size_t'
> > >   size_t newlen;
> > 
> > > --- a/include/uapi/linux/sysctl.h~uapi-fix-linux-sysctlh-userspace-compilation-errors
> > > +++ a/include/uapi/linux/sysctl.h
> > > @@ -26,6 +26,10 @@
> > >  #include <linux/types.h>
> > >  #include <linux/compiler.h>
> > >  
> > > +#ifndef __KERNEL__
> > > +#include <stddef.h>		/* For size_t. */
> > > +#endif
> > 
> > There is __kernel_size_t for cases like this.
> 
> No, __kernel_size_t is not for cases like this because size_t differs
> from __kernel_size_t on x32 and mips n32.
> 
> Fortunately, there is no sysctl syscall entry on x32, but on mips m32
> it is there with number 6152, implemented using compat_sys_sysctl.
> The latter operates with argument of type struct compat_sysctl_args*
> where newlen is of type compat_size_t.
> 
> If you change it from size_t to __kernel_size_t, you'll break mips n32.

Apparently, my statement that sizeof(size_t) < sizeof(__kernel_size_t)
on mips n32 is not correct, so x32 is the only architecture of this kind.

This means that size_t can be replaced with __kernel_size_t in this
particular case.  Does anybody want that change instead of my original
proposal?


-- 
ldv

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ