Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0599C433EF for ; Tue, 23 Nov 2021 16:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234314AbhKWQur (ORCPT ); Tue, 23 Nov 2021 11:50:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56710 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232465AbhKWQuq (ORCPT ); Tue, 23 Nov 2021 11:50:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637686058; 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=eGWhtGhPtpq/ZiEd6igWpm4/71FIAUKG5LmWLh1yu0w=; b=WCBSKo0WhpleKe4jx1Kzd4qc7B5S1SVwClYML0DP9mMz+lAPkgw2KDt/f4tREppO4Zf0/d MmbSIiTYtalzdN/cPwR85/f4Wml8XxZBKaR+MWCzwgZcn2MXZ1vnxpdvmiTCTz9AEKBcaH orHVJyZI+LkZKE88y+P1d5W+iujWrWA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-258-66xCcqg-MdGoCOG_LgKrhA-1; Tue, 23 Nov 2021 11:47:36 -0500 X-MC-Unique: 66xCcqg-MdGoCOG_LgKrhA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 500BA80668B; Tue, 23 Nov 2021 16:47:35 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id B473360C7F; Tue, 23 Nov 2021 16:47:33 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: To: Cyril Hrubis Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, ltp@lists.linux.it, libc-alpha@sourceware.org, linux-arch@vger.kernel.org, arnd@arndb.de Subject: Re: [PATCH] uapi: Make __{u,s}64 match {u,}int64_t in userspace MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1618288.1637686052.1@warthog.procyon.org.uk> Date: Tue, 23 Nov 2021 16:47:32 +0000 Message-ID: <1618289.1637686052@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cyril Hrubis wrote: > 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. Can you guarantee this won't break anything in userspace? Granted the types *ought* to be the same size, but anyone who's written code on the basis that these are "(unsigned) long long int" may suddenly get a bunch of warnings where they didn't before from the C compiler. Anyone using C++, say, may find their code no longer compiles because overloaded function matching no longer finds a correct match. Also, whilst your point about PRIu64 and PRId64 modifiers in printf() is a good one, it doesn't help someone whose compiler doesn't support that (I don't know if anyone's likely to encounter such these days). At the moment, I think a user can assume that %llu will work correctly both on 32-bit and 64-bit on all arches, but you're definitely breaking that assumption. David