Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2544384pja; Thu, 26 Mar 2020 17:32:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsLKGkO0wXlc/bWEyPxtgN4xUTEogwV9npdHekE8BF40P4lqMe/aZ6mTUQuPxMvfzUkF9mU X-Received: by 2002:aca:af97:: with SMTP id y145mr2225100oie.24.1585269168983; Thu, 26 Mar 2020 17:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585269168; cv=none; d=google.com; s=arc-20160816; b=filNLqbLp7RGoSHGdQ+BjY2p2WS/dLRcHpSssQUean8zb1DXUPtflC0Qpiv153wJyM qCH3ro290FVubdK+bFhgVn6PG/eyymE5u7ZYOJemEzEtv8/9d6B2D4InSWcC3chW5Qp6 29DBq2KSYVSrjUx/HDCvwnYZ0PQ0zjI4flu7EiFugO4xOdN4cKuK9fkT2ZqunjpXrLMi Gm/ZiFSzdF4vAP57YMglAilhYjyZRh03H1mublJH+FG95HIXALygnHNqTHip3SOndsrW HrnlGIBWN8zZu4sS7qjyAZGI5hdXvrJc9C1cEKerL670GdUoGAT1Ds3vvmtIAJOJwUzw 92HQ== 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=dVyQrY0zqSiU2MhyoH0LC+RRR9l2DYSrDOOxslm6Fh4=; b=e/lSWgV6VZuZnjt/H8vKsHqjUX/9lo3+1eU48ZouYjYih2O2AJNX2hF8mgLmDBp236 4SmqDVxK5BGvFifMmM+iG16A6fbUQzoMV7UuF1XzMs849KhukasIoIkkUjxALW+Qxgy4 M6/9NJyApGNCOkWoHKAOQgX0QU0ob/kjKG4dzeE8BLUcYkQZnXtFr6sORt7IDo61uzG5 ruikmjnvMcKOSkF+8SD4iTtuaalEJuEjA7sU3G7KxTbmzV26IoNOfcWoCSvC7ZLFGu16 8C4CosjIyndsJ5JlLtPYgnuHGSzmOhsrXg3CMb2ZC5U1eKbb0hA4KW8s0zL52yYklCQk Q7tA== 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 v128si1751581oig.68.2020.03.26.17.32.36; Thu, 26 Mar 2020 17:32:48 -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 S1727682AbgC0AcP (ORCPT + 99 others); Thu, 26 Mar 2020 20:32:15 -0400 Received: from namei.org ([65.99.196.166]:43900 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbgC0AcP (ORCPT ); Thu, 26 Mar 2020 20:32:15 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 02R0VcXQ018220; Fri, 27 Mar 2020 00:31:38 GMT Date: Fri, 27 Mar 2020 11:31:38 +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 , Thomas Garnier , Alexei Starovoitov , Daniel Borkmann , Kees Cook , Paul Turner , Jann Horn , Florent Revest , Brendan Jackman , Greg Kroah-Hartman Subject: Re: [PATCH bpf-next v7 7/8] bpf: lsm: Add selftests for BPF_PROG_TYPE_LSM In-Reply-To: <20200326142823.26277-8-kpsingh@chromium.org> Message-ID: References: <20200326142823.26277-1-kpsingh@chromium.org> <20200326142823.26277-8-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 > > * Load/attach a BPF program that hooks to file_mprotect (int) > and bprm_committed_creds (void). > * Perform an action that triggers the hook. > * Verify if the audit event was received using the shared global > variables for the process executed. > * Verify if the mprotect returns a -EPERM. > > Signed-off-by: KP Singh > Reviewed-by: Brendan Jackman > Reviewed-by: Florent Revest > Reviewed-by: Thomas Garnier Cool stuff! Reviewed-by: James Morris -- James Morris