From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751462AbdBXWgc (ORCPT ); Fri, 24 Feb 2017 17:36:32 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:42642 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbdBXWg1 (ORCPT ); Fri, 24 Feb 2017 17:36:27 -0500 Date: Sat, 25 Feb 2017 01:35:51 +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: <20170224223551.GA12533@altlinux.org> References: <58af65cf.uNXK5zzvUJ4F6QpG%akpm@linux-foundation.org> <20170224143533.GA6820@avx2> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <20170224143533.GA6820@avx2> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 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; >=20 > > --- a/include/uapi/linux/sysctl.h~uapi-fix-linux-sysctlh-userspace-comp= ilation-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. 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. --=20 ldv --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYsLVHAAoJEAVFT+BVnCUI+lUQAPm2U/D9dPmqJ45ripet74or ODCD0pkuq3NvIP3QaI62V6XkxffRhvWNfOQZ2O0snZtL323joOHH1lZTBYoOHWIZ 3AxVBanSshWzbxrQDEyfB9IdUqHxRHhaa9bexO+UcWo4e1dFur+Uj8e5N4MdoEZ2 fIzfTkbW1kNiq2rVHHyLmQeZ22ENVPMMhWFPtnA5OVXivZFztuj+Uxpz2dIHkhdL CgrRnVMBJgX+JTtZZFlemfmkaVbPOZHBhiPdEB6PkDsDWbKKbQylCsXTHkHc3Cuk m5+6qpz1PK2r9bJI95p2LR5kV6pL2cf3IZjlqEX3e+gMP+iq37COcqcJqM4xzn+c IWdGS9kUeDtgb8X2P3Md+Qx4k5eR8+NKrd2qiJN72uny7vM9tIOGChUR0nKyb3iO 5jNC5vgDSRLoku/Djev783c71cw6KzD4dvZ9pNyxn/IqDWMWtb/HOCoaSRAn0JGb YEQh4+rjA4iqBzbBqNuKBZjcsjhN5wV8Wf3qzzv7v7OPC01hUMHwlbz6Z00u40Aa 6Mkth3oAhtx0oQhlcAPiV3zPitIrAX2sr640a8R8toluTDV/9HgrfiHAGHJ3fdb6 g/IZe2OLqX5PsWqpWaQ1WIgy1g7KFu49rA8YKG7+ZgSoT1YjvoNbW6W2tiL2HcaB rWzXpdMsN2Lh/eSc4KCo =1I2z -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI--