From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752936AbdHJQTe (ORCPT ); Thu, 10 Aug 2017 12:19:34 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:48004 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752060AbdHJQTc (ORCPT ); Thu, 10 Aug 2017 12:19:32 -0400 Date: Thu, 10 Aug 2017 10:19:12 -0600 From: Jason Gunthorpe To: "Dmitry V. Levin" Cc: Moni Shoua , Mikko Rapeli , Linux Kernel Mailinglist , linux-api@vger.kernel.org, Sean Hefty , Hal Rosenstock , linux-rdma , Doug Ledford Subject: Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h Message-ID: <20170810161912.GA2491@obsidianresearch.com> References: <20170806164428.2273-1-mikko.rapeli@iki.fi> <20170806164428.2273-31-mikko.rapeli@iki.fi> <20170808231306.GH29372@obsidianresearch.com> <20170809155241.GB15586@obsidianresearch.com> <20170810024747.GA30198@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170810024747.GA30198@altlinux.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 10, 2017 at 05:47:48AM +0300, Dmitry V. Levin wrote: > On Wed, Aug 09, 2017 at 09:52:41AM -0600, Jason Gunthorpe wrote: > > On Wed, Aug 09, 2017 at 04:48:08PM +0300, Moni Shoua wrote: > > > > > > > > I'm not sure this is a good idea, linux/in.h should not be included in > > > > userspace users of this file, 'sockaddr_in' needs to come from glibc's > > > > 'netinet/in.h' instead.. > > > > > Is it wrong to include include/uapi/linux/in.h from userspace? > > > > Generally speaking userspace should always use the glibc version of > > the headers and not headers from under linux/ > > Sorry? Isn't the main idea of UAPI in providing the Linux interface for > userspace, unlike glibc headers that provide other more or less standard > interfaces like GNU, POSIX, etc? The issue is when glibc and linux provide the same standards based API (eg in.h) - then the uapi version of in.h is really only for consumption by glibc and other very special cases. Forcing apps that need to access the rdma uapi that is not implemented in glibc to deal with that mess is what is problematic. The uapi system has a number of issues like this :| If you make it so I cannot include rdma_user_rxe.h and netinet/in.h, (for instance) in the same file then you broke user space use of the header and things are worse off.. Jason