From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dmitry V. Levin" Subject: Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors Date: Thu, 2 Mar 2017 18:48:45 +0300 Message-ID: <20170302154845.GB3503@altlinux.org> References: <20170226010156.GA28831@altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: List-subscribe: List-owner: List-post: List-archive: To: Carlos O'Donell Cc: Arnd Bergmann , Russell King , Haavard Skinnemoen , Hans-Christian Egtvedt , Mikael Starvik , Jesper Nilsson , Yoshinori Sato , Tony Luck , Fenghua Yu , Geert Uytterhoeven , Ralf Baechle , David Howells , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 02, 2017 at 10:22:18AM -0500, Carlos O'Donell wrote: > On Wed, Mar 1, 2017 at 11:20 AM, Arnd Bergmann wrote: > > On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin wro= te: > >> Include (guarded by #ifndef __KERNEL__) to fix asm/signal.h > >> userspace compilation errors like this: > >> > >> /usr/include/asm/signal.h:126:2: error: unknown type name 'size_t' > >> size_t ss_size; > >> > >> As no uapi header provides a definition of size_t, inclusion > >> of seems to be the most conservative fix available. [...] > > I'm not sure if this is the best fix. We generally should not include o= ne > > standard header from another standard header. Would it be possible > > to use __kernel_size_t instead of size_t? >=20 > In glibc we handle this with special use of __need_size_t with GCC's > provided stddef.h. >=20 > For example glibc's signal.h does this: >=20 > # define __need_size_t > # include Just to make it clear, do you suggest this approach for asm/signal.h as wel= l? [...] > Changing the fundamental type causes the issues you see in patch v2 > where sizeof(size_t) < sizeof(__kernel_size_t). >=20 > It will only lead to problem substituting the wrong type. I don't see any appetite for creating more ABIs like x32 with sizeof(size_t) < sizeof(__kernel_size_t), so v2 approach is not going to be any different from v1 in maintenance. --=20 ldv --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYuD7dAAoJEAVFT+BVnCUIun8QAIu2KR6DO6sDdAmLkPIEycqY ZpD4t47B0iHa7P8alfr3RIhu36O4Py9o/VByWQTxs/BTGOcUnQWczMjQr7shKtHW 47qjSZTv23e17hae1Z6WOuFPn3uFU4EBun66kkuUqdZ4sFx40x/ODjXohG6GUxxd clVZ694NPDFWCU00LZlowh+JIkoxeL0PpdiLkCJzFC/i0/CuKXU5pmWH+5z5/UlL tNusg5EVA6bPi+toK/IWe/s/dUMIat1GLdqh9Qx0D5BfvNHHE9fK4DlcnEorISZt fUs4TokqUP84mhzsoNQPVVdCyFeQiusc4YYNMO8T52G4ghgFJoJ627uA69pRdEzN FVetUUPwFIZ/Z2NU8rfjJLXr0oWhelm+UnGITslKHFEr9lXnvEbE2odfExZo+O18 XFIvc+g3hZ9s5DOU8Oe37TgpiDlaUbBVFtj0CuHWVNJsx9iDzZS5n8NKEABjaaej npWjXcOYAW4mMpQCOb3pMmij0ALU0Pd4iKU3a9utISonwPzoyAhTZcEud7EOCK+h JrFlLSBp3pRX5gno+6sb0BkhgyXTpdqcmuqmLH4kYp2PesfJs54hzNK/WMXGNT4i waAbG6eD4BKNBX1d3VjfmfoKUnr1MxGu3Z/kHRabE11pRTuTug7Vv8cvk6Mr6EuJ oqIAlHG3dRVMHy3ZauCa =5bs6 -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC--