Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3679891pxy; Tue, 4 May 2021 07:41:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnhwqBCnU1wLGDraXQTiB2c7/BQml6RmlCFsIC6wiFavul7R7yBxQnkdEFOK6kMnqICfBP X-Received: by 2002:a17:906:c04b:: with SMTP id bm11mr22036361ejb.263.1620139313214; Tue, 04 May 2021 07:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620139313; cv=none; d=google.com; s=arc-20160816; b=NxgCnY3odIJNJXzIeXk9HZ4VrPoEFu8NzzI8aJ/7pOYwgw1+lT/b4FOszKc3rwgdF4 mGHZ4YWDMdPqhnlIlSIP7Q/noAdNTqqJX0pcL9buohELQcbRwNrIvP6RB+Avm476+Lkf drnYQTW0OvxZI+KAkuiD3kcYWpTF7ALXWFYodXqTa5Jam/aZDMOslEfV5dSuUCtgVTac akPTL+mUcSy2zSqZ5msDRM2agKfwLLPfal/P7MWjUmq3WUC2Rrwlotq3nQ9n5rsM14hu CT4c62O8tqH1DIhYE+cxrHZNX8vQqRvCcGkuTwCu2+8rdxdmRSLKpNUCro6pzDLab5bP ucww== 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=wRApW1K7pvk3hFB6OegExv3crO58ZXEPQipN0aX5SFc=; b=Cb6eyj5rikClXINOkOue1ZCty+Wjf1kVoI/4OAK6UaEJaYmVarQnjNxAuOWgVhRrLQ I1b3RCcY9SC20FHRn5kLBGOXsWbKJJDCKsrMe5b81NlvDXuYt/U3NZnGbYW4yPQ2OuFA +Yfq97giHtPeFGM3szQEk2vvqAHsE5qUCbVtb/rvU7x9bDypj40ZTC+VqcG+xRQF9GDB WVdjvJkJL1zy0+AFOlt22stxFknHm93m3r9fzrNOweiFb6gqtzZhtd/D7sFDaL83XLCV m1l8qrsu9dNgOPoJPFu5K45rOgG0L5vYU7jj9ve2tHdkz/OPbc/YpiKamtR+bxGlG7li qyPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cBDeDGOY; 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 t26si5985393edf.425.2021.05.04.07.41.28; Tue, 04 May 2021 07:41:53 -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=cBDeDGOY; 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 S231600AbhEDOZ2 (ORCPT + 99 others); Tue, 4 May 2021 10:25:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:50368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbhEDOZ1 (ORCPT ); Tue, 4 May 2021 10:25:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD51A61139; Tue, 4 May 2021 14:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620138271; bh=ycWmHLZjK6dBz/CdYVAAPEioACpMjp23uaaK/mz8nGo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cBDeDGOY6Rypqd5DRRCWrXFYPTAYIIst+QK6QDTL1xeA2S+E5erqgD0gsn6+dNkur P1bSlDSSUZUzKPGHcfeoPAegcg7ftfbfb4qITPdceAO+fUIqxe6bauwmOPD2B2OX/g pH3atu5DylpNJclmPEZUlXnsKngAxbgkUnrObGGU= Date: Tue, 4 May 2021 16:24:29 +0200 From: Greg KH To: Alexei Starovoitov Cc: Alejandro Colomar , "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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 07:12:01AM -0700, Alexei Starovoitov wrote: > On Tue, May 4, 2021 at 4:05 AM Alejandro Colomar wrote: > > > > Some manual pages are already using C99 syntax for integral > > types 'uint32_t', but some aren't. There are some using kernel > > syntax '__u32'. Fix those. > > > > Some pages also document attributes, using GNU syntax > > '__attribute__((xxx))'. Update those to use the shorter and more > > portable C11 keywords such as 'alignas()' when possible, and C2x > > syntax '[[gnu::xxx]]' elsewhere, which hasn't been standardized > > yet, but is already implemented in GCC, and available through > > either --std=c2x or any of the --std=gnu... options. > > > > The standard isn't very clear on how to use alignas() or > > [[]]-style attributes, so the following link is useful in the case > > of 'alignas()' and '[[gnu::aligned()]]': > > > > > > Signed-off-by: Alejandro Colomar > > Cc: LKML > > Cc: glibc > > Cc: GCC > > Cc: Alexei Starovoitov > > Cc: bpf > > Cc: David Laight > > Cc: Zack Weinberg > > Cc: Joseph Myers > > --- > > man2/bpf.2 | 49 ++++++++++++++++++++++++------------------------- > > 1 file changed, 24 insertions(+), 25 deletions(-) > > > > diff --git a/man2/bpf.2 b/man2/bpf.2 > > index 6e1ffa198..04b8fbcef 100644 > > --- a/man2/bpf.2 > > +++ b/man2/bpf.2 > > @@ -186,41 +186,40 @@ commands: > > .PP > > .in +4n > > .EX > > -union bpf_attr { > > +union [[gnu::aligned(8)]] bpf_attr { > > struct { /* Used by BPF_MAP_CREATE */ > > - __u32 map_type; > > - __u32 key_size; /* size of key in bytes */ > > - __u32 value_size; /* size of value in bytes */ > > - __u32 max_entries; /* maximum number of entries > > - in a map */ > > + uint32_t map_type; > > + uint32_t key_size; /* size of key in bytes */ > > + uint32_t value_size; /* size of value in bytes */ > > + uint32_t max_entries; /* maximum number of entries > > + in a map */ > > For the same reasons as explained earlier: > Nacked-by: Alexei Starovoitov I agree, the two are not the same type at all, this change should not be accepted. thanks, greg k-h