Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2287492pxp; Mon, 21 Mar 2022 15:58:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEQS59cFsbx2ZE1TU45ECiDhjCgmj1I2bSgkQFfFfxMSNu47eNKntJvMLgt5KW1TRa1VWO X-Received: by 2002:a17:90b:38c2:b0:1bf:ad37:c320 with SMTP id nn2-20020a17090b38c200b001bfad37c320mr1526791pjb.148.1647903492402; Mon, 21 Mar 2022 15:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647903492; cv=none; d=google.com; s=arc-20160816; b=vG4biDWr7X0Ojnmo4PSol/vIrCPyeWdVBfM0Hcxclz5Jh3/LB/whvwrDerRWQqQ5+S UJjWusRg8rC+u5OicuTn1OGICGpdSAwGCEivKltZo3FkIKZJAVClzzNlG0gb6NyRAKNw psRrWEMp8yYcfSlSHdIdF9iE2IOo3MdTLma5hzzr8jp3hTtN0VfF/iCltM8z8hKlwF+i LgBQMweB9FZBEcoYnMkNnkuEwhtLQ3n7svbd0rFk0N3suSFkwvsAHDLTAGQjhdSxFU+a Q4i36aKoniHG0Wkv00SHgGPUqpGz1z/FF2URfNDyeH6IckYVBGjAj3naMONQH5j3/ngw Tn4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=TYElWt28OV4l4Pg/zIOMJ8LQZ2S7IKGmpM9ISCKQBDE=; b=NFcTdn7lQCS0yu1zq2t+XTi63zv6HMZMTJ6CJ32dM/6SomoMy1FXTsk8iJVqvNzeB6 QZV2fFsNsqXgvdiNV1+fxVM4PbZNnPSbSY4EEmkrwpdgR7hWZSyJSL+9tHC4PkLysCD7 ihMUkIh+BIHDMOot+jHHXSsQ0hN+FOxk0rJ4HetWVQGWFd/tn8P5WV6yuWTrOcgTDml+ CSA8UPeD5WSnH1yB0DB9QJRJrU/CaW87VcepG+5GZcNUnvnz7wYor8BSV7SkX58/8Lr0 U1TfrCREKChRsgT6u8XsnkKsk37QldegVJK7F6UQ+jPPg3EmP3kbadz2ywvUZaa/0wFq jutw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=npwWzu5N; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t190-20020a632dc7000000b003816043f045si14307717pgt.570.2022.03.21.15.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:58:12 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=npwWzu5N; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 13ED5420145; Mon, 21 Mar 2022 15:10:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240219AbiCUL1H (ORCPT + 99 others); Mon, 21 Mar 2022 07:27:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238787AbiCUL1F (ORCPT ); Mon, 21 Mar 2022 07:27:05 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EB728CDAE for ; Mon, 21 Mar 2022 04:25:40 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id w4so17402032edc.7 for ; Mon, 21 Mar 2022 04:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TYElWt28OV4l4Pg/zIOMJ8LQZ2S7IKGmpM9ISCKQBDE=; b=npwWzu5N48vknY6NHB2C7E6/+OFdUg3W1HDsAdrkUfdP158PeCwhT1Ozq/9abPseT3 NRFKApmGvHtfi5YlKBfRytE2oBE43iCM4HGC/Obj1VCn5pqBqehkBzu7VoKVUwqoHKEq nO9zBB6+7qgYt9XWHTA3t1JMBddciGsvhW0jA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TYElWt28OV4l4Pg/zIOMJ8LQZ2S7IKGmpM9ISCKQBDE=; b=ggkVlKjVSqLiEFuBcCsTec2LKQ4/1FEWpUbELxOyKlVzuzqeHNFbyShYWDDsp7UmM/ 7ONy8dMGXplOw1YOAdyS8Cz17tfQAo6f99uIJS98Mzdqh850t0LqwlyKyulbD64PP5wM dOo9TX1pj4scsDeme2xvA4fCXD15xaZwUH3dWAwF/ervnn5u197SKsX7tn7EHEIxLmsu bUbANVHlsC6/mbiFFK8Q5DwRHwsS/bv1sXzBnvBVFCmE99ECeryZiVaaW6eVfL/aC03n wdwfFrVS9znqE4oDeTtOlhfvemJGlOvePxA8QBEuPrpqmpA+JKli5EJemmXkzi/8tDoq sDqg== X-Gm-Message-State: AOAM531wbsuAyGZnoKC7tP7JRWjv0XFrqM51UH5EG1G1BwY+CIh5sq66 rn1jlhH7NPIHa5A63TfW0TRLCpvXOs35tIHCRAWk9w== X-Received: by 2002:aa7:df99:0:b0:419:2823:4c23 with SMTP id b25-20020aa7df99000000b0041928234c23mr9210600edy.341.1647861939043; Mon, 21 Mar 2022 04:25:39 -0700 (PDT) MIME-Version: 1.0 References: <20220318171405.2728855-1-cmllamas@google.com> In-Reply-To: From: Miklos Szeredi Date: Mon, 21 Mar 2022 12:25:27 +0100 Message-ID: Subject: Re: [PATCH] fuse: fix integer type usage in uapi header To: Greg Kroah-Hartman Cc: Carlos Llamas , Alessio Balsini , Masahiro Yamada , Arnd Bergmann , kernel-team , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, 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. Thanks, Miklos