Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3706730iog; Tue, 21 Jun 2022 04:25:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vUS6rPMChhC6O2PcQvjQWP/Epjow3JjWtZ+S+S0uFuJ+8+rxZ76S56J9dj1b6jcKJegOXc X-Received: by 2002:a05:6402:5191:b0:42f:b303:ed61 with SMTP id q17-20020a056402519100b0042fb303ed61mr34539070edd.233.1655810732131; Tue, 21 Jun 2022 04:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655810732; cv=none; d=google.com; s=arc-20160816; b=b5Ygol0WNclH6k8VRsWVqnFWaNG5pcScMSTPtRxWfouh5e2xnSEiwFlkUhQ00TbWEA Fu6d7CwXwaDarijYL9dOtlyHzzDPNWE9OEkzy1THSOOBmOWvVwDzw3j3X6HPjt7UtCIQ G0SH2sTurSETi8rl389/vnH+xoT7HHsKv8HKCDjY55uCjgyrYA8Xl9jhGu1U89S13PzD LfFcwfT0OwbZLbR4YyH6z9FBrtTGFofzPaP+20Ljqb4NMqZZraY9zpx1L0Q6L4VMmgt4 dbELX4I4NQQlrE5d2JlHx6aPPsHU2enPO7F9aYlLW7t8K+u8nUGo6b9cMzyfrAAMkF6l mK0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=Hy6KOcY0sRAojRWcsjR0aWULa6jJaSKcS71iuLiH50w=; b=NCol+ej5nJiEN/Mcwmy6RysrhdRpr2S7xMSFjsj67WXNYqo6OQOmchod03iv+npf2Y x4TtLtq6n8UXyYz44Oz14LXSkZg6cCeKk7LX5pGkYWTZTZKyVTmkqml9AO5ojY7RyFma gzl49S6Ir1g/LFsRhYZvqSWo5DuK2YezvUi+PfWVqPQFcf7Wrq0JuUQJ4unBxGqvFMKS Aqetkiym1v0KY0wsFCEfPRHBaaDokn6jS5OWnOVlRZfehcRiPaeSI2y4FNaVtXuKsIzN /b57a0scSsNRWMwMEVCfhKK9035rmCMZN4taxfDX9GSu0+VNH8/dEZceoUW1V2TtyDf2 Sd0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="im/EvafP"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eo4-20020a056402530400b004357a67ae47si6553755edb.58.2022.06.21.04.24.58; Tue, 21 Jun 2022 04:25:32 -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=@redhat.com header.s=mimecast20190719 header.b="im/EvafP"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348935AbiFUK6q (ORCPT + 99 others); Tue, 21 Jun 2022 06:58:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348884AbiFUK6p (ORCPT ); Tue, 21 Jun 2022 06:58:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 84F8B29808 for ; Tue, 21 Jun 2022 03:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655809123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hy6KOcY0sRAojRWcsjR0aWULa6jJaSKcS71iuLiH50w=; b=im/EvafP9zmEPDOqJXpuKEK7R6Aq4CvVqx/c6yX0CFRq2ZmoFRyX4GR6kQadFC1GcoyqP3 xO4xeRNQphmTy1Mz9OFx2zn2InIWMtuPklSiUGGE9cwRyol8r1TBOn+fw2tKS6cg0prQF1 L9FtTEr68aooKGdxl3+yYKNUvl3/uKY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-207-WzjmQB9zNRa7eiyrfXXRvQ-1; Tue, 21 Jun 2022 06:58:27 -0400 X-MC-Unique: WzjmQB9zNRa7eiyrfXXRvQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8F69299E773; Tue, 21 Jun 2022 10:58:26 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.87]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F239C2166B26; Tue, 21 Jun 2022 10:58:24 +0000 (UTC) From: Florian Weimer To: Cyril Hrubis Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, libc-alpha@sourceware.org, arnd@arndb.de, linux-api@vger.kernel.org, dhowells@redhat.com, David.Laight@aculab.com, zack@owlfolio.org, ltp@lists.linux.it Subject: Re: [LTP] [PATCH v2] uapi: Make __{u, s}64 match {u, }int64_t in userspace References: <20220621090951.29911-1-metan@ucw.cz> Date: Tue, 21 Jun 2022 12:58:23 +0200 In-Reply-To: <20220621090951.29911-1-metan@ucw.cz> (Cyril Hrubis's message of "Tue, 21 Jun 2022 11:09:51 +0200") Message-ID: <877d5a1dww.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 * Cyril Hrubis: > From: Cyril Hrubis > > This changes the __u64 and __s64 in userspace on 64bit platforms from > long long (unsigned) int to just long (unsigned) int in order to match > the uint64_t and int64_t size in userspace. > > This allows us to use the kernel structure definitions in userspace. > > For example we can use PRIu64 and PRId64 modifiers in printf() to print > structure membere. Morever with this there would be no need to redefine > these structures in an libc implementations as it is done now. > > Consider for example the newly added statx() syscall. If we use the > header from uapi we will get warnings when attempting to print it's > members as: > > printf("%" PRIu64 "\n", stx.stx_size); > > We get: > > warning: format '%lu' expects argument of type 'long unsigned int', > but argument 5 has type '__u64' {aka 'long long unsigned int'} > > Signed-off-by: Cyril Hrubis Could you add some motivation for the C++ condition to the commit message? Thanks, Florian