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: 13178091 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BF90C7618B for ; Thu, 16 Mar 2023 17:02:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A51D6900005; Thu, 16 Mar 2023 13:02:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A29C9900002; Thu, 16 Mar 2023 13:02:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8CC5E900005; Thu, 16 Mar 2023 13:02:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 78D38900002 for ; Thu, 16 Mar 2023 13:02:51 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 3455741356 for ; Thu, 16 Mar 2023 17:02:51 +0000 (UTC) X-FDA: 80575380942.13.CFAA53F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id 6D46316003D for ; Thu, 16 Mar 2023 17:02:49 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iqjfspND; spf=pass (imf08.hostedemail.com: domain of jolsa@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jolsa@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678986169; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YxgdoJl9JFdXIAplITWigBJ0j4Dle7CAGo1O6E3/s08=; b=GVsUQRvAkdK2uEWiPPCSdxihQ3IJrX0oCJL7+NATcsO4qHjcKiPfTP4yng5XzrtigyekqY FFg9Aw73mvkjHQQSx2ihbU9QdnF81vSXSFH7qKJJUB6jOMItVAcOI//mwPQ2oXL4ERUvlW rb7bFFUrGXZKy2RLfqXwRcW4aUOG0AM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iqjfspND; spf=pass (imf08.hostedemail.com: domain of jolsa@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jolsa@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678986169; a=rsa-sha256; cv=none; b=M5pPdaCkphGs8kEgqxqwuZVvOvY/855uKqIlO04knDVp2eWxx8ND5ZD8zAQhGNNXvXgZCG mdY1AG6b7fuohq//tCdf2wGaE1eLMLed5zYB08jF45dZtJTW/JwyDPAG6Yvjz8bFOBHBkL 7yyL7eqHZDS1XNThz26GVUshyrDF88A= 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 8EAB8620AC; 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-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 6D46316003D X-Stat-Signature: xnmq77udkqqnh1pngox1eicdpo8xypfr X-Rspam-User: X-HE-Tag: 1678986169-50396 X-HE-Meta: U2FsdGVkX19lGIIAy+UnF8AqqVe+SRQnPfcWLqGQ5PRyaoz/Gu2pl3cXc+u0ZiZ76h2AxFhNSxhE7BBipGk4BlIE/ZljEMCvnoCKHUg6S9Lcp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q50jw8NdfyJBEN/myIo6HfJYQRoVVyOu8cb45FPL5ylb7Gc47BOuqMX5Xb6kU3LT5FmHHEe9mZkWLhj6WVdeUxJ0jm+izYdseJnksvlRWa3k50Xt4Owv5CU7R0PuhrdxP8xD4zJtr5Ga47vtwYkAwUoLkzciXxw9nHyN6EweQXiaBHBVVny418RqM7SD0wfp0Rzn9wUbow7B/cgGKAYEnhBdfoeddmJMTuqMarINnFefIKxl2LV1ZSGAztKz2jWeUt1hd/damvL9/r2rPLNMSyzPcon7jBds4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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;