From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48AB1C43331 for ; Fri, 27 Mar 2020 00:29:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A1FC20663 for ; Fri, 27 Mar 2020 00:29:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbgC0A3H (ORCPT ); Thu, 26 Mar 2020 20:29:07 -0400 Received: from namei.org ([65.99.196.166]:43840 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbgC0A3H (ORCPT ); Thu, 26 Mar 2020 20:29:07 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 02R0SZpQ018015; Fri, 27 Mar 2020 00:28:35 GMT Date: Fri, 27 Mar 2020 11:28:35 +1100 (AEDT) From: James Morris To: KP Singh cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-security-module@vger.kernel.org, Brendan Jackman , Florent Revest , Kees Cook , Casey Schaufler , Alexei Starovoitov , Daniel Borkmann , Paul Turner , Jann Horn , Florent Revest , Brendan Jackman , Greg Kroah-Hartman Subject: Re: [PATCH bpf-next v7 2/8] security: Refactor declaration of LSM hooks In-Reply-To: <20200326142823.26277-3-kpsingh@chromium.org> Message-ID: References: <20200326142823.26277-1-kpsingh@chromium.org> <20200326142823.26277-3-kpsingh@chromium.org> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Thu, 26 Mar 2020, KP Singh wrote: > From: KP Singh > > The information about the different types of LSM hooks is scattered > in two locations i.e. union security_list_options and > struct security_hook_heads. Rather than duplicating this information > even further for BPF_PROG_TYPE_LSM, define all the hooks with the > LSM_HOOK macro in lsm_hook_defs.h which is then used to generate all > the data structures required by the LSM framework. > > The LSM hooks are defined as: > > LSM_HOOK(, , , args...) > > with acccessible in security.c as: > > LSM_RET_DEFAULT() > > Signed-off-by: KP Singh > Reviewed-by: Brendan Jackman > Reviewed-by: Florent Revest > Reviewed-by: Kees Cook > Reviewed-by: Casey Schaufler Acked-by: James Morris -- James Morris