From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753377AbdCAQ11 (ORCPT ); Wed, 1 Mar 2017 11:27:27 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:34385 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752658AbdCAQ07 (ORCPT ); Wed, 1 Mar 2017 11:26:59 -0500 MIME-Version: 1.0 In-Reply-To: <20170226010156.GA28831@altlinux.org> References: <20170226010156.GA28831@altlinux.org> From: Arnd Bergmann Date: Wed, 1 Mar 2017 17:20:50 +0100 X-Google-Sender-Auth: mQhZmx3s1HeDQmSgqeZm6KoZNKU Message-ID: Subject: Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors To: "Dmitry V. Levin" Cc: 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 , "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Chris Zankel , Max Filippov , linux-arch , linux-alpha@vger.kernel.org, Linux ARM , linux-cris-kernel@axis.com, uclinux-h8-devel@lists.sourceforge.jp, linux-ia64@vger.kernel.org, linux-m68k@vger.kernel.org, linux-mips@linux-mips.org, linux-am33-list@redhat.com, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin wrote: > 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. > > On the kernel side size_t is typedef'ed to __kernel_size_t, so > an alternative fix would be to change the type of sigaltstack.ss_size > from size_t to __kernel_size_t for all architectures except those where > sizeof(size_t) < sizeof(__kernel_size_t), namely, x32 and mips n32. > > On x32 and mips n32, however, #include seems to be the most > straightforward way to obtain the definition for sigaltstack.ss_size's > type. > > Signed-off-by: Dmitry V. Levin I'm not sure if this is the best fix. We generally should not include one standard header from another standard header. Would it be possible to use __kernel_size_t instead of size_t? Arnd