From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error Date: Thu, 2 Mar 2017 14:07:20 +0100 Message-ID: References: <20170302004607.GE27132@altlinux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20170302004607.GE27132@altlinux.org> 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-subscribe: List-owner: List-post: List-archive: To: "Dmitry V. Levin" Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-xtensa@linux-xtensa.org, Heiko Carstens , David Howells , Max Filippov , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, Hans-Christian Egtvedt , linux-arch , linux-s390@vger.kernel.org, linux-am33-list@redhat.com, x86@kernel.org, Ingo Molnar , Haavard Skinnemoen , Fenghua Yu , Thomas Gleixner , Chris Zankel , Tony Luck , Linux Kernel Mailing List , Ralf Baechle List-Id: linux-arch.vger.kernel.org On Thu, Mar 2, 2017 at 1:46 AM, Dmitry V. Levin wrote: > Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace > compilation errors like this: > > /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t' > size_t shm_segsz; /* size of segment (bytes) */ > > x32 is the only architecture where sizeof(size_t) is less than > sizeof(__kernel_size_t), but as the kernel treats shm_segsz field as > __kernel_size_t anyway, UAPI should follow. Thanks to little-endiannes > of x32 and 64-bit alignment of the field following shm_segsz, this > change doesn't break ABI, and the difference doesn't manifest itself > easily. > > Signed-off-by: Dmitry V. Levin Acked-by: Arnd Bergmann From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f65.google.com ([209.85.218.65]:34428 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752422AbdCBNO6 (ORCPT ); Thu, 2 Mar 2017 08:14:58 -0500 MIME-Version: 1.0 In-Reply-To: <20170302004607.GE27132@altlinux.org> References: <20170302004607.GE27132@altlinux.org> From: Arnd Bergmann Date: Thu, 2 Mar 2017 14:07:20 +0100 Message-ID: Subject: Re: [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error Content-Type: text/plain; charset=UTF-8 Sender: linux-arch-owner@vger.kernel.org List-ID: To: "Dmitry V. Levin" Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-xtensa@linux-xtensa.org, Heiko Carstens , David Howells , Max Filippov , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, Hans-Christian Egtvedt , linux-arch , linux-s390@vger.kernel.org, linux-am33-list@redhat.com, x86@kernel.org, Ingo Molnar , Haavard Skinnemoen , Fenghua Yu , Thomas Gleixner , Chris Zankel , Tony Luck , Linux Kernel Mailing List , Ralf Baechle , linux-alpha@vger.kernel.org, Martin Schwidefsky , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Message-ID: <20170302130720.SBZpkOKWrYgyYcK4UiaUJOeF414bvFDHDD9QSvXTd_4@z> On Thu, Mar 2, 2017 at 1:46 AM, Dmitry V. Levin wrote: > Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace > compilation errors like this: > > /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t' > size_t shm_segsz; /* size of segment (bytes) */ > > x32 is the only architecture where sizeof(size_t) is less than > sizeof(__kernel_size_t), but as the kernel treats shm_segsz field as > __kernel_size_t anyway, UAPI should follow. Thanks to little-endiannes > of x32 and 64-bit alignment of the field following shm_segsz, this > change doesn't break ABI, and the difference doesn't manifest itself > easily. > > Signed-off-by: Dmitry V. Levin Acked-by: Arnd Bergmann