From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753104AbbJOS7v (ORCPT ); Thu, 15 Oct 2015 14:59:51 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:52753 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664AbbJOS7t (ORCPT ); Thu, 15 Oct 2015 14:59:49 -0400 From: Arnd Bergmann To: Miklos Szeredi Cc: Mikko Rapeli , Kernel Mailing List , fuse-devel , Linux API Subject: Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace Date: Thu, 15 Oct 2015 20:59:30 +0200 Message-ID: <9560422.ZpOrhsmRxt@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1444888618-4506-1-git-send-email-mikko.rapeli@iki.fi> <20151015174154.GZ6104@lakka.kapsi.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:muJUl4A/6L6/ORfg8cW+vTfDi7T970cRiEZpbOwf/NKlA1n+aoT lSRBoQnfkrTjbPyYyGLBkHxBqcj2tAGacSSnK1ZAYQ6oeQTSZS921xFmXuwNuL34gIvluIH dSqswUP7WIxpUjp5eFqtw6C4T2NtkyTngUE/pUuYY3w3R5twaXTff52w7AZG2iYV1yTRCkM SKXte70weZHwc8Wm0/1SQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:BHP9go0V4mU=:52FJhDjYWU6KglLvft8cP0 6rTmirto6JrrpYoiRtQDFx3TvqqoUfmiEtsIYtdhS0JrLhSysvZkwyGt8Ff1RbgeWJrLQsTZ5 IYRQ9QYOUlT9ZGQjMYIluWO6vX114nlIqXM6NgOWtsju2dRwFPzE4trPNvcooGraldAgTGpJy X4d0JXrNpBvANauoJL4z1ifqFF3H/kKlnt8y4rHvljnFJC8jH4VU5Bwql9LKoSujeQSWJeyXR L/gkJznAWs+p1rcR5ByVF0IsqPqB7WRilyld7/cwyN2Fhft7lFCk7ITjcra6qprLxEYeDiGXu 7He2cH9BuzJolIPgK6Ea2ePEjtgPjuIDXy4PYF4mQXHfJlSZx7mcWk++rMjtY5UJq2SGWR7Xf 9MVNUCqhq0qDirNSJcf/kKMwPqjUqzVVyR23Ta0Q8pYmi2X5hgPnAAJplnSHmuP7EHt1taQSm mWAlUMFJGLs/e4okguFzeHaNba7zxSqwY6KlMRmJgVFBGbjN0hvT2rr0F3P8MEOwRAJ4AHa0Z dNTwdNGha7xEd8ST0273ir892lUlU0LUz0pxq4/uESB9CCWve23pYGRiAeou7HcvGOdlCLifm Cx1SkDFNaJKDdU9iNqpz1eafjrEwVTM6qN/lthidO5Kc4svAHaCwl/DvfjrNAfaev41Cd6a9g 6TRLSc/FhfvqXIlzc9p/PQF4EMx4Js0fmbgSZM1PdEDFDLNU45UB/+mjRL+oEAcMLKJYtqv6w zTxXyyEN2KOQgBbr Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 15 October 2015 20:32:45 Miklos Szeredi wrote: > > In my other patches I got review comments that kernel headers should not > > use and also Documentation/CodingStyle section 5 says: > > > > (e) Types safe for use in userspace. > > > > In certain structures which are visible to userspace, we cannot > > require C99 types and cannot use the 'u32' form above. Thus, we > > use __u32 and similar types in all structures which are shared > > with userspace. > > Ok, if you cannot require C99, then the __uXX types are the way to go. > But for the fuse API we *can* use C99 types, nothing preventing us > from doing it. What the sentence above means is that you should not rely on the user including before including a kernel header, and that kernel headers are not allowed to include themselves, because that would break any pre-C99 user space that defines types with the same names in their own headers and that relies on that header not to be included implicitly. It's possible that it has never been a problem for the fuse headers, but it has been a problem for other headers in the past and what Mikko is trying to achieve is to ensure that none of the kernel headers do this so we can make it an error in 'make headers_install'. Arnd