From patchwork Tue Jun 21 01:28:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KP Singh X-Patchwork-Id: 12888633 X-Patchwork-Delegate: bpf@iogearbox.net 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A116BC43334 for ; Tue, 21 Jun 2022 01:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240589AbiFUB2b (ORCPT ); Mon, 20 Jun 2022 21:28:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242778AbiFUB2Y (ORCPT ); Mon, 20 Jun 2022 21:28:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 629191929B for ; Mon, 20 Jun 2022 18:28:24 -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 ams.source.kernel.org (Postfix) with ESMTPS id 18703B811EC for ; Tue, 21 Jun 2022 01:28:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F971C341C4; Tue, 21 Jun 2022 01:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655774901; bh=CbobNexbSTRL4hb1DX7jZ8y8Bnbyzx+ASnJ+WrY38Ko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T11K8BnWYo8+1G92f9KAlcTd1u4z9tmrZNvh2ZtQjkijWG2fBVYEZEuLYtTKn82nX nxC6TJOc6FzzUxNPAQHC8rAbU+8T8tDFiX1SWDSfTUTfGF1f1sGWMBapZ6N7Uk5ocy 7V40y/wXGBxhRI9YJAHEUGqmSHNsdamIPP9+x/GX7MzQ7PuQ4LXdU8aSkqTGVXrq/r DKWdZBAk1debCOhSaasTRAtbo23cpVRt7mAsdqpbN5JalijYr8PVhacR7j0NMlsgIj iwCMfKwELIUpfdD2UkF6ZpX2J6mUHSvp2S56KG+N69CqxN8K1J9HyRZxsheFmya/ee lp/xqZCUEQpmg== From: KP Singh To: bpf@vger.kernel.org Cc: KP Singh , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Benjamin Tissoires , Yosry Ahmed Subject: [PATCH v2 bpf-next 3/5] bpf: Allow kfuncs to be used in LSM programs Date: Tue, 21 Jun 2022 01:28:09 +0000 Message-Id: <20220621012811.2683313-4-kpsingh@kernel.org> X-Mailer: git-send-email 2.37.0.rc0.104.g0611611a94-goog In-Reply-To: <20220621012811.2683313-1-kpsingh@kernel.org> References: <20220621012811.2683313-1-kpsingh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net In preparation for the addition of bpf_getxattr kfunc. Signed-off-by: KP Singh --- kernel/bpf/btf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 02d7951591ae..541cf4635aa1 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -7264,6 +7264,7 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type) case BPF_PROG_TYPE_STRUCT_OPS: return BTF_KFUNC_HOOK_STRUCT_OPS; case BPF_PROG_TYPE_TRACING: + case BPF_PROG_TYPE_LSM: return BTF_KFUNC_HOOK_TRACING; case BPF_PROG_TYPE_SYSCALL: return BTF_KFUNC_HOOK_SYSCALL;