From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbdB0TsP (ORCPT ); Mon, 27 Feb 2017 14:48:15 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:51998 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbdB0TsO (ORCPT ); Mon, 27 Feb 2017 14:48:14 -0500 Date: Mon, 27 Feb 2017 22:48:06 +0300 From: "Dmitry V. Levin" To: Alexey Dobriyan Cc: akpm@linux-foundation.org, ebiederm@xmission.com, linux-kernel@vger.kernel.org Subject: Re: + uapi-fix-linux-sysctlh-userspace-compilation-errors.patch added to -mm tree Message-ID: <20170227194806.GA23868@altlinux.org> References: <58af65cf.uNXK5zzvUJ4F6QpG%akpm@linux-foundation.org> <20170224143533.GA6820@avx2> <20170224223551.GA12533@altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: <20170224223551.GA12533@altlinux.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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@linux-foundation.org wro= te: > > > /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; > >=20 > > > --- a/include/uapi/linux/sysctl.h~uapi-fix-linux-sysctlh-userspace-co= mpilation-errors > > > +++ a/include/uapi/linux/sysctl.h > > > @@ -26,6 +26,10 @@ > > > #include > > > #include > > > =20 > > > +#ifndef __KERNEL__ > > > +#include /* For size_t. */ > > > +#endif > >=20 > > There is __kernel_size_t for cases like this. >=20 > No, __kernel_size_t is not for cases like this because size_t differs > from __kernel_size_t on x32 and mips n32. >=20 > 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. >=20 > 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? --=20 ldv --Qxx1br4bt0+wmkIi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYtIJ1AAoJEAVFT+BVnCUIUjwQAOMgmILSD1pWhMtIUY2WMds9 N2gDv7eukmhBqk0smx9JNgRmBWfYNsqUkZusrpR5WyghxHXW0ZzEYAb4DHAvs7He XwMrLdApUoVXpixukrp7iVDqJRJGw9oPwtl77NctZsVx95d+Ki3vKRHCBDzCJeiD 1OXKoYw7ARktXOU0odoRYD49bI/1JOxRRPIPJ1H2OeKZ4UyHQhGGWQmEfDR6T+Ws vLoKW+jK6ZFHgq/D0H6CaSK3U1qHGUVGXF/G3ExdQcYs/W8miXME17zN5AluLY5p An11xiorq3CdhIQdv5Hbim+FI6uLKR8QbDKzZIVsMs8DWJqIV8WpkxqYx+FKAS4/ mR7Kgp/IZCGjVO5sd1kmPbb4hI1jFmO7Wf1PYAFlpp2mAo9/72tM4TQDSqmJbDjp 4MC2djGVhUcsF2fAJ8CbucpMhz1lw8byuVsjXE4VpEe6vr7DCNDpMAqEXI74Q5GO 2OBOn+ODfHqGR1bJ0Jj0jiLdkMGSwbR/p0qjFNUoMne8T+/Jv8BaodIFkHjubY34 IO3nxaKvTSa41N7XTUwWYnFzrIsWHCWrtiKKoljZkzz72qUMd+FUZ+eizZX045CT +nJEaZLrQdLK6Ms6RQt9HwLLDRE0b4Do7jo/JXbPVfW2AdZ2jWsXA/lGOagAzTxA 3Sy1cZ4i0jozt8uC6qpY =dDQS -----END PGP SIGNATURE----- --Qxx1br4bt0+wmkIi--