From patchwork Fri May 26 18:49:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 99623 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp701996vqr; Fri, 26 May 2023 12:24:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44YkQD8vBfQHMiL/OT4KK4J7rRoX4AMhY2o3oGAANYILnO2fios2yjAD19FvwLR1NQyXcL X-Received: by 2002:a17:902:d4ca:b0:1ac:6c46:8c80 with SMTP id o10-20020a170902d4ca00b001ac6c468c80mr4353799plg.53.1685129067170; Fri, 26 May 2023 12:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685129067; cv=none; d=google.com; s=arc-20160816; b=qZ1r6tOXoZxuTZDpxHm/4jgTVNlW1gYPTYt0MizKi/x0tDbgmKvRdpiTw8jqEpvo4X vqHoIJFNhMpnN+KlRp9/gnp9CyQyQLsDghC/dvR5YGl+1slxLgk5g+kB490w2QthLQHR eNwP1nTX7aE+SgqiwCKXRCbK7JvBCYV8W+GeeKb/bgHBXx17MB0UKgAL9qxc7zjJCjC6 pnuT5iiUqyeq6Uyht5ie5A1aldPN8JFFXUjqCghoJ40Ok2t8vTpFRaz5MgmqtX8oquvC CS81dgjbunEcgOJot3bw54MX5S+lTP5ULqYWyKQLsZ7KMjKYvCKqHf2qh4R0LF1sYQrU kYeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=ght4mEZPPB9DcLk1x782iP+FWrhzt2Fs8c9wfRzwHeU=; b=h2aXQZmJgw2sQP4HtgVivXHCMifSNbvzUKuvxryis8A/+PJB83v+ogCC/ZMhVkkoui 9LpXt/9l9S3wRcWIVj2pQpo47SzOVKdB5Zpajk/Siw8JmbXedsRCx+TAos9HcYzHxjIT QlYPi8sBz67ZFTtjLIt+NGCeUau8rPW10CWdqPp55O1THDEskhzmfWAzCw9o8tL6eixN sssib50DVNPoPLTqOiA9DDPZYWUmZ0q8Zukfd/3d36RtR37bt19luPFc6rE71Bc02ZM1 9TrIgAdpFPbPMHePDVtr0Ku1xBfbtU6dT5jlmDrgJhvHgAbJ8//ohFO+ABF7fFwWCWJG OipQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sfn85BE4; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a17090301ca00b001ac815f653asi4912473plh.348.2023.05.26.12.24.13; Fri, 26 May 2023 12:24:27 -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=@kernel.org header.s=k20201202 header.b=Sfn85BE4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237305AbjEZSt3 (ORCPT + 99 others); Fri, 26 May 2023 14:49:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbjEZSt1 (ORCPT ); Fri, 26 May 2023 14:49:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 359AAAD for ; Fri, 26 May 2023 11:49:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BEE2060FB1 for ; Fri, 26 May 2023 18:49:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E42C433D2; Fri, 26 May 2023 18:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685126965; bh=tkpHxCySJ3FJBX5kaoTY+4iXxZ0QxSXXGTPhb5xqyh4=; h=Date:From:To:Cc:Subject:From; b=Sfn85BE4oBFWa9dRoooLwSG4syrrhrPf/PLeE6sq56DDXpxOPDH7lCkuNxofxx297 Krn9/7zwMTpwyRcterSwfo4huf7iNkaXRJ+Eyu5Ijb1OOGDJ2aoWEcXfNLLO2am1S/ +DTAUm5lYwb3c1tEagg/QzX4VD/S8PRqrIg9+Pr+M4n7LSeSpkcBIJ88/qO/R4bOxT c4d+LUJdI/9+dgEA4Nkd5WzwXB8xUe0bsFgNceqd8k5sYeVTJDhTmPRK8saNo92E05 g0nIfikvgTLvu1LbybcDNR8xKRP6F95/RtSStePDH+ErYwzD/EpSjVkRBHPjbbeNN7 YBClZxpR+isvA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 48010403B5; Fri, 26 May 2023 15:49:22 -0300 (-03) Date: Fri, 26 May 2023 15:49:22 -0300 From: Arnaldo Carvalho de Melo To: linux-kernel@vger.kernel.org Cc: Adrian Hunter , Ian Rogers , Jiri Olsa , Namhyung Kim , Nicolas Dichtel , Paolo Abeni Subject: [PATCH 1/1 fyi] tools headers UAPI: Sync the linux/in.h with the kernel sources Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766985897000725520?= X-GMAIL-MSGID: =?utf-8?q?1766985897000725520?= tldr; Just FYI, I'm carrying this on the perf tools tree. - Arnaldo Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. --- Picking the changes from: 3632679d9e4f879f ("ipv{4,6}/raw: fix output xfrm lookup wrt protocol") That includes a define (IP_PROTOCOL) that isn't being used in generating any id -> string table used by 'perf trace'. Addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Nicolas Dichtel Cc: Paolo Abeni Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/uapi/linux/in.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/uapi/linux/in.h b/tools/include/uapi/linux/in.h index 4b7f2df66b995ba8..e682ab628dfa66bc 100644 --- a/tools/include/uapi/linux/in.h +++ b/tools/include/uapi/linux/in.h @@ -163,6 +163,7 @@ struct in_addr { #define IP_MULTICAST_ALL 49 #define IP_UNICAST_IF 50 #define IP_LOCAL_PORT_RANGE 51 +#define IP_PROTOCOL 52 #define MCAST_EXCLUDE 0 #define MCAST_INCLUDE 1