From: "Dmitry V. Levin" <ldv@altlinux.org>
To: "Carlos O'Donell" <carlos@systemhalted.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Haavard Skinnemoen <hskinnemoen@gmail.com>,
Hans-Christian Egtvedt <egtvedt@samfundet.no>,
Mikael Starvik <starvik@axis.com>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Ralf Baechle <ralf@linux-mips.org>,
David Howells <dhowells@redhat.com>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Helge Deller <deller@gmx.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"David S. Miller" <davem@davemloft.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Chris Zankel <chris@zankel.net>,
Max Filippov <jcmvbkbc@gmail.com>,
linux-arch <linux-arch@vger.kernel.org>,
"linux-alpha@vger.kernel.org" <linux-alpha@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
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-mips@linux-mips.org>,
linux-am33-list@redhat.com,
linux-parisc <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-xtensa@linux-xtensa.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors
Date: Thu, 2 Mar 2017 18:48:45 +0300 [thread overview]
Message-ID: <20170302154845.GB3503@altlinux.org> (raw)
In-Reply-To: <CAE2sS1h9QNV+31GMSv8aahJYOb9hFtFp5Aj-yVOfg7cjBHr_kg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]
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 <arnd@arndb.de> wrote:
> > On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> >> Include <stddef.h> (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 <stddef.h> seems to be the most conservative fix available.
[...]
> > 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?
>
> In glibc we handle this with special use of __need_size_t with GCC's
> provided stddef.h.
>
> For example glibc's signal.h does this:
>
> # define __need_size_t
> # include <stddef.h>
Just to make it clear, do you suggest this approach for asm/signal.h as well?
[...]
> Changing the fundamental type causes the issues you see in patch v2
> where sizeof(size_t) < sizeof(__kernel_size_t).
>
> 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.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2017-03-02 16:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-26 1:01 [PATCH] uapi: fix asm/signal.h userspace compilation errors Dmitry V. Levin
2017-03-01 16:20 ` Arnd Bergmann
2017-03-02 0:18 ` [PATCH v2] x86/uapi: fix asm/signal.h userspace compilation error Dmitry V. Levin
2017-03-02 0:26 ` hpa
2017-03-02 0:33 ` Dmitry V. Levin
2017-03-03 0:59 ` [PATCH 1/2] uapi: introduce __kernel_uapi_size_t Dmitry V. Levin
2017-03-03 0:59 ` [PATCH v3 2/2] x86/uapi: fix asm/signal.h userspace compilation error Dmitry V. Levin
2021-12-28 15:54 ` [PATCH v3] uapi: fix asm/signal.h userspace compilation errors Dmitry V. Levin
2017-03-02 0:20 ` [PATCH v2] " Dmitry V. Levin
2017-03-02 15:22 ` [PATCH] " Carlos O'Donell
2017-03-02 15:48 ` Dmitry V. Levin [this message]
2017-03-04 1:23 ` Carlos O'Donell
2017-03-06 15:10 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170302154845.GB3503@altlinux.org \
--to=ldv@altlinux.org \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=carlos@systemhalted.org \
--cc=chris@zankel.net \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=dhowells@redhat.com \
--cc=egtvedt@samfundet.no \
--cc=fenghua.yu@intel.com \
--cc=geert@linux-m68k.org \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=hskinnemoen@gmail.com \
--cc=jcmvbkbc@gmail.com \
--cc=jejb@parisc-linux.org \
--cc=jesper.nilsson@axis.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-am33-list@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-cris-kernel@axis.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=schwidefsky@de.ibm.com \
--cc=sparclinux@vger.kernel.org \
--cc=starvik@axis.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=x86@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).