From patchwork Thu Mar 16 17:01:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 70913 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp599587wrt; Thu, 16 Mar 2023 10:11:35 -0700 (PDT) X-Google-Smtp-Source: AK7set89/1DbhlgW/DrAg/qLvE0TFko+eCJYAes5icuWFCaHLk2DMorKLajlmEShCmnaE2Tptaym X-Received: by 2002:a05:6870:460b:b0:177:81bb:1b30 with SMTP id z11-20020a056870460b00b0017781bb1b30mr10858177oao.31.1678986695255; Thu, 16 Mar 2023 10:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678986695; cv=none; d=google.com; s=arc-20160816; b=CU534ama+I+XOTRkydGXpRGc4m1gmvxcV9w4mrDwm/dCl/qGp91SAwEGSKD74oeEsc SwIlQeoWxfjAnlVM/NQcyE2CAPcvwGwyIxTNwIVM53n2yddQqSuoOlsn3RbkOHYYzINI 42hFXhBytxHyewAO0DJgR+Kz1fXtIxFK6a5czBQFmR57qUO/Coclx/eIXEPNv2iJgIyM IiBC89S7McXVlfz4inN4mvNT7b7qTuo82mLh/3oL/CGMan0L4j98wCJf+x/kNnQ0T2pe 7pz2iw4CK0TZboRVccFUuDnC8eNNI766OCL2aNUy70FIQQfLzOuy4Vafe2/K84HfPuRG Q9Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YxgdoJl9JFdXIAplITWigBJ0j4Dle7CAGo1O6E3/s08=; b=n/4D+3kZu7kcbNfy4w5Hx7mUyUtvT2nNDDVXQOQ/TOawcgT7d/fgVfzcbPMf6bVhHs IfCDq8wmRlj26P+cIboZ4XuWc0SHejg5v2PYPTfNxp6XNgb6fQq3HXox24u0AIm7cgZY Eqk1uznJhs/t4V68yj9Q54jVawvwY4j+n790J3hPBpX83D2xetZTrDsjRHPsMihn0NIg jjVPUXTaTrL5Z4iuoCLPF1p3QX6uBdMrLK3PxjVnqI9qOiN6ObNL305KjQUgL4UwCgRP IsI06Vedim/JVE9AfW7RNVd8+5qdst/ehuKCklImJvL49y2JVNrQQsdorjQ4t3VzS4FW vD2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iqjfspND; 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 ex11-20020a056808298b00b00383d3b2a8fcsi7848034oib.16.2023.03.16.10.11.18; Thu, 16 Mar 2023 10:11:35 -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=iqjfspND; 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 S230413AbjCPRDV (ORCPT + 99 others); Thu, 16 Mar 2023 13:03:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231231AbjCPRDL (ORCPT ); Thu, 16 Mar 2023 13:03:11 -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 17CFCE6FFF; Thu, 16 Mar 2023 10:02:52 -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 927D6620B5; Thu, 16 Mar 2023 17:02:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B142AC4339E; Thu, 16 Mar 2023 17:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678986168; bh=2rdENgg7fzhoKYPinTYmZkVwba8MoExnAAxutCEQK3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iqjfspNDqGz3klTZPT2+BpffWd9f4W6SLqgKqRFii0Qw4uBg0XdMAi+nls+GHm3dP t3EdFLYjAWxF/k0NhZwvPKEpRPiSt/sBefMLuZVCBpQQ/phZzHSKTTxgVN5tQN7nS0 +bF0J6oeBdA9BMVGZF72vgksl6td2ylD9b340n7jBfC2iB/AUqxhi1sYyMQb/MS7mB 6FTBsJwAG11kA6/pox2tkaZx1afavULyHXdBh9QmzYTCvrqBJjZtouKIfhTzrvlQ5I 4GsgMcdAxFBgxi3hL3OZ5O9QstrOLNsRV4iCd7w5//E6F0GNwJ7LHtIWx5ndQiJ9iA T+NEcJP1lLfdg== From: Jiri Olsa To: Alexei Starovoitov , Andrii Nakryiko , Hao Luo , Andrew Morton , Alexander Viro , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Matthew Wilcox Cc: bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Daniel Borkmann , Namhyung Kim , Dave Chinner Subject: [PATCHv3 bpf-next 4/9] bpf: Switch BUILD_ID_SIZE_MAX to enum Date: Thu, 16 Mar 2023 18:01:44 +0100 Message-Id: <20230316170149.4106586-5-jolsa@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316170149.4106586-1-jolsa@kernel.org> References: <20230316170149.4106586-1-jolsa@kernel.org> MIME-Version: 1.0 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 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?1760545152945451487?= X-GMAIL-MSGID: =?utf-8?q?1760545152945451487?= Switching BUILD_ID_SIZE_MAX to enum, so we expose it to BPF programs through vmlinux.h. Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Acked-by: Andrii Nakryiko --- include/linux/buildid.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/buildid.h b/include/linux/buildid.h index b8b2e00420d6..316971c634fe 100644 --- a/include/linux/buildid.h +++ b/include/linux/buildid.h @@ -5,7 +5,9 @@ #include #include -#define BUILD_ID_SIZE_MAX 20 +enum { + BUILD_ID_SIZE_MAX = 20 +}; struct build_id { u32 sz;