Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2181539pxp; Mon, 21 Mar 2022 13:13:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHUGw6CLvMW9bVeb2H3BFyNFAJKDHvC1d0DiPvOPPmiVHHS1uRBOg5CL3tpaNixUFF/Yj1 X-Received: by 2002:a05:6402:27d2:b0:419:1a3d:442b with SMTP id c18-20020a05640227d200b004191a3d442bmr15004735ede.409.1647893633475; Mon, 21 Mar 2022 13:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647893633; cv=none; d=google.com; s=arc-20160816; b=EJnLoNmHjJv9R19t3x/Za4Z/Y1gV/KhpqEe2agOyFU4TWk4EiiE0qFwCV7zSyyzuaW A1OZuNPnVoumOR334A1UTmM/r89dcqlt8mERI/vIq7t3tkEbiuqpYoqkMgeBOiiYwmzI znrnwy53mDHH8Kd1/pLo1/fJhQYjudcmWQXBZ6//0USh4RDZkosoTkPwyvdt0rn01IaV OEknYBipNVwGVeR4VqI1pPQcAroX5Co/tMvFb0CDOkb0KNPSTCfQwKjzwGkQn70c20nc UNw16/zDFXzkH+4/r+YEyNX/38oahVJhD9OjKgLeenXIjvvdQwsDl5vqyMyOJm04irVS Ykmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=B1RVeR4X/9FN/R2kEyfuuE9xt4X8NupHbL3BwjVng8o=; b=tATFeXpn71A8XkPiN5DPPA2JzP+qE2rKT7PGNxYcDbMognH3hFulYTvjlTStQnazh/ YU1cR5ZqAhKIJTGyE6FdqtzIGTCK7Yh7jxcBoF8nbBbWXszLE1Dw9elKrwruVRpPgd7w rtFofrBJDMyK8q0ugtpwB2f+Nq5iQ9t0LrGp//xlkuLVatedMyTu8/99j0DZZAA37vDg VUkPy8sa/+Qt4ke/p5M57JgwvM61i5PdklMn+jPQM0gCFeTNn04RSYzTjrqNG9RNyu8l V5YmoJJNi4e2P1SOgbl7OGdxwqcnFdAIl0axYLpOm5ScTO34CD6M6lPFBnI+6XVTNslr ClPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wie7nCEs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a50870c000000b00418c2b5bec9si9932361edb.427.2022.03.21.13.13.28; Mon, 21 Mar 2022 13:13:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wie7nCEs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347314AbiCUM3i (ORCPT + 99 others); Mon, 21 Mar 2022 08:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347307AbiCUM3c (ORCPT ); Mon, 21 Mar 2022 08:29:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F8E2B3; Mon, 21 Mar 2022 05:28:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2BB0FB81367; Mon, 21 Mar 2022 12:28:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56B3CC340E8; Mon, 21 Mar 2022 12:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647865683; bh=0GgEVLZEduZDLqniMFRxYsbQL46moysVsgQVneO8NkY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wie7nCEssTqxXqI5wBnZnWyrWYWuyca9GZ/7td8VFJSIxLxNXthlS7tf7MSD8bnAU obpH2JvimckATJoMTmLIzVYcSbVFz6EhaJRlIba5pQ3wJ7ssoHOUvpBQZ7DWgE5LPV IZ2j6TIML1mikP2MA+rNOSBBs5PJWX6WR1zx4Vlo= Date: Mon, 21 Mar 2022 13:28:00 +0100 From: Greg Kroah-Hartman To: Miklos Szeredi Cc: Carlos Llamas , Alessio Balsini , Masahiro Yamada , Arnd Bergmann , kernel-team , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fuse: fix integer type usage in uapi header Message-ID: References: <20220318171405.2728855-1-cmllamas@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 21, 2022 at 12:25:27PM +0100, Miklos Szeredi wrote: > On Mon, 21 Mar 2022 at 11:01, Greg Kroah-Hartman > wrote: > > > > On Mon, Mar 21, 2022 at 10:36:20AM +0100, Miklos Szeredi wrote: > > > On Mon, 21 Mar 2022 at 09:50, Greg Kroah-Hartman > > > wrote: > > > > > > > > On Mon, Mar 21, 2022 at 09:40:56AM +0100, Miklos Szeredi wrote: > > > > > On Mon, 21 Mar 2022 at 03:07, Carlos Llamas wrote: > > > > > > > > > > > > On Fri, Mar 18, 2022 at 08:24:55PM +0100, Miklos Szeredi wrote: > > > > > > > On Fri, 18 Mar 2022 at 18:14, Carlos Llamas wrote: > > > > > > > > > > > > > > > > Kernel uapi headers are supposed to use __[us]{8,16,32,64} defined by > > > > > > > > instead of 'uint32_t' and similar. This patch changes > > > > > > > > all the definitions in this header to use the correct type. Previous > > > > > > > > discussion of this topic can be found here: > > > > > > > > > > > > > > > > https://lkml.org/lkml/2019/6/5/18 > > > > > > > > > > > > > > This is effectively a revert of these two commits: > > > > > > > > > > > > > > 4c82456eeb4d ("fuse: fix type definitions in uapi header") > > > > > > > 7e98d53086d1 ("Synchronize fuse header with one used in library") > > > > > > > > > > > > > > And so we've gone full circle and back to having to modify the header > > > > > > > to be usable in the cross platform library... > > > > > > > > > > > > > > And also made lots of churn for what reason exactly? > > > > > > > > > > > > There are currently only two uapi headers making use of C99 types and > > > > > > one is . This approach results in different typedefs being > > > > > > selected when compiling for userspace vs the kernel. > > > > > > > > > > Why is this a problem if the size of the resulting types is the same? > > > > > > > > uint* are not "valid" variable types to cross the user/kernel boundary. > > > > They are part of the userspace variable type namespace, not the kernel > > > > variable type namespace. Linus wrong a long post about this somewhere > > > > in the past, I'm sure someone can dig it up... > > > > > > Looking forward to the details. I cannot imagine why this would matter... > > > > Here's the huge thread on the issue: > > https://lore.kernel.org/all/19865.1101395592@redhat.com/ > > and specifically here's Linus's answer: > > https://lore.kernel.org/all/Pine.LNX.4.58.0411281710490.22796@ppc970.osdl.org/ > > > > The whole thread is actually relevant for this .h file as well. Some > > things never change :) > > "- the kernel should not depend on, or pollute user-space naming. > YOU MUST NOT USE "uint32_t" when that may not be defined, and > user-space rules for when it is defined are arcane and totally > arbitrary." > > The "pollutes user space naming" argument is bogus for fuse, since > application are using the library interface, which doesn't pull in the > kernel headers but redefines everything that needs to be shared. BTW > this seems to be the pattern for libc interfaces as well, though I > haven't looked closely. > > On the other hand, if we change the types back to __u32 etc, then that > will mess with the history. I think the disadvantages outweigh the > advantages, so unless some stronger argument comes up it's NACK from > me. As this .h file is only 1 of 3 .h files using these variable types, I think you are wrong and should go along with the rest of the kernel api style. greg k-h