Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3750815pxy; Tue, 4 May 2021 09:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi42hmnVdmxSvh3NBxX/3kLkfXozEdRSD54KuD5jMqih35w/VoEkhnptgQt9reUsKjHIP0 X-Received: by 2002:a17:907:161f:: with SMTP id hb31mr23155911ejc.514.1620144487884; Tue, 04 May 2021 09:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620144487; cv=none; d=google.com; s=arc-20160816; b=Y/55P1YPNL4ilOhvpwATNg4jVVdejci95kFbN2omKrisQYoI+ESP/EkiVG0QxsPexR BGXT7It5MfkzAuVu1zug/bvEf7emQUzKvTm/0z4F1vsVD0twq+4ck9TqZluE5U5y92Fs 2uf/4TPDnQ1hdpi9WTQpD17SiLqVXNRrDm+u3QuwnShOPgj0d+ht1aSFdUT8TgYRrkBZ HV1wlmolpTMb8ARCPZHexdMl/MKZSYm30xMwdZZhPFLwM3lJYC02HtPWPQ4T25SNm26W z1xJjttjAfEySUN7Tup+kmpFJKFeAM3rRz4aA1UCkzPi/FQIjybMLuCOHjYjltRS96mo 65HA== 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=Hauum2rnyWkWttuuAQehidPi0O9+cjsWBLz4PhD8k0Y=; b=PE6e089eyZLCRP75wYDeEp3Kk+lPiA68auIXKStqiMC3uUNhxRxUqmbTqZcFfp5NW0 DhU/u13i4mY2Aj4GSvgKRyOG/MsRCZkEk+dNDn7zgAbcknXTaBbAsHkBrgiyb6lON7zu SDoszoVXbPvEOiWRSjWEAgepwrLbNQvFBdf/Pu39Qjk8AWJG1p2xjab+cY9i9bIaaoqH wE077vTG9Apk1Vrl3CVSGoIGHPV8VrO3sWqItVzKovE33wmW4nAzUoS1D4qLLKIpt9UV 9V5BaSzjEkapOYfERjpM25TmbHYO9k6qeLlmDxl80+u9yGN8jb5a+EQ9awKY1FYDxrLJ uPbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="0/l0e3XV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si2977687ejq.733.2021.05.04.09.07.43; Tue, 04 May 2021 09:08:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="0/l0e3XV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231643AbhEDQH0 (ORCPT + 99 others); Tue, 4 May 2021 12:07:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:54576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbhEDQHZ (ORCPT ); Tue, 4 May 2021 12:07:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB4E2611AC; Tue, 4 May 2021 16:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620144389; bh=0w+6C5wwK3LnQowLff2lTzTaIJ5/k8OLw4g4htaeX20=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0/l0e3XVcgVaTjJYnSzIw9otGJky9YANGvZYfeyo4Bsbopca3CvjATNoPKOqI7reb 5CjiLNeiBiu7PtaIxNEZrumzFSFsiINN43Zc8ouzykUjVs8P4K1vYaB7qu5TXByOeT WaUp4HAAIQDPQbk7XjqXoVkmTcBSPDEhgO59QTVY= Date: Tue, 4 May 2021 18:06:26 +0200 From: Greg KH To: "Alejandro Colomar (man-pages)" Cc: Alexei Starovoitov , "Michael Kerrisk (man-pages)" , linux-man , LKML , glibc , GCC , bpf , David Laight , Zack Weinberg , Joseph Myers Subject: Re: [RFC v2] bpf.2: Use standard types and attributes Message-ID: References: <20210423230609.13519-1-alx.manpages@gmail.com> <20210504110519.16097-1-alx.manpages@gmail.com> <69fb22e0-84bd-47fb-35b5-537a7d39c692@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <69fb22e0-84bd-47fb-35b5-537a7d39c692@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 05:53:29PM +0200, Alejandro Colomar (man-pages) wrote: > Hi Greg and Alexei, > > > On Tue, May 04, 2021 at 07:12:01AM -0700, Alexei Starovoitov wrote: > > > For the same reasons as explained earlier: > > > Nacked-by: Alexei Starovoitov > > Okay, I'll add that. > > > On 5/4/21 4:24 PM, Greg KH wrote:> I agree, the two are not the same type at > all, this change should not be > > accepted. > > I get that in the kernel you don't use the standard fixed-width types (with > some exceptions), probably not to mess with code that relies on > not being included (I hope there's not much code that relies on this in > 2021, but who knows). > > But, there is zero difference between these types, from the point of view of > the compiler. There's 100% compatibility between those types, and you're > able to mix'n'match them. See some example below. > > Could you please explain why the documentation, which supposedly only > documents the API and not the internal implementation, should not use > standard naming conventions? The standard is much easier to read for > userspace programmers, which might ignore why the kernel does some things in > some specific ways. > > BTW, just to clarify, bpf.2 is just a small sample to get reviews; the > original intention was to replace __uNN by uintNN_t in all of the manual > pages. There's a very old post from Linus where he describes the difference between things like __u32 and uint32_t. They are not the same, they live in different namespaces, and worlds, and can not always be swapped out for each other on all arches. Dig it up if you are curious, but for user/kernel apis you HAVE to use the __uNN and can not use uintNN_t variants, so don't try to mix/match them, it's good to just follow the kernel standard please. So consider this my: Nacked-by: Greg Kroah-Hartman as well. thanks, greg k-h