Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2541763pja; Thu, 26 Mar 2020 17:29:43 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsJqrd8FnCH24WRo+YN7V6Nx9h/wVRJIyBr+2DrCzXmoyP31caG1i7NqX7biaWR8yEj4Rtc X-Received: by 2002:a9d:2207:: with SMTP id o7mr7597133ota.254.1585268983163; Thu, 26 Mar 2020 17:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585268983; cv=none; d=google.com; s=arc-20160816; b=0YgLOBLAtF6i6ZaM8KuIr3Hl2ctf5GVdUghTCVKUJeR3vptbIDFSPvVTLhAWFPMjJY YreONi/0GtTbQQ0UUJWp4VbJeziI+cM/Z6F8/ICtJsTJYxxH9tTYyxrq1rjVz7HR5try uur525iZP8AYNdTv3AGNPUhckF0ypWWfHSn71wbPCDipx5X2D179u+YCrhiMe3cDdH+6 Xq+sUnj+JQwfYC+yCAx1YBOKMouRWppFCu8oSG67WJmRmYuKjGeu4B8uVqslz4VTtIxD kp+SampseZJ+q40UGPDOJbIhviRSU6EKL2jytGbptcrUsey9YF799LLH4NYV/MkghRv9 KwFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=df8LlG6lTiVxxLyEQup+KxrOZ1za0RiE5Guw2Wgp+j8=; b=TlF6KCyC3j7zjDdeLrsaw7H07tQfK9aeAm5FuF/lTMj4PHeRQOL9GjALOBqLsNlT2t dhPQlC8mrgRPRCHJ6UnZfONyPAsmdhUW2eQ/V8VmFeb/WXdGC0MP7OW0Tre6zMjpsP5N buItDVhHHDyGsMhIyRJr9m3e8UuwBfpB/lh4+OupOIr8bhecxGYXmQbvGJbLNeAnTWTe grTYbo34GARw18GW0vKINdUQn/Are0rXE4VKiVt0/osBD3aPxAgRRXF/wJRmBY8krJi2 U0tFIebgNskKyKwEplBEO7tJE8tL4R9WP4D83QpAyarqYoGRXhZjGNG3jEl3XtgcO+hy VHxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si1767909otk.238.2020.03.26.17.29.30; Thu, 26 Mar 2020 17:29:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727560AbgC0A3H (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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