Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1154057ybl; Wed, 8 Jan 2020 12:00:10 -0800 (PST) X-Google-Smtp-Source: APXvYqyMs6e5hachfeK0O9aVp4zCdJzy0qUisasagMpH/cYv1K7ElNfjN1qO+52c8AA+VXHK/if6 X-Received: by 2002:a05:6830:147:: with SMTP id j7mr5563196otp.44.1578513609994; Wed, 08 Jan 2020 12:00:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578513609; cv=none; d=google.com; s=arc-20160816; b=AHS4ORVYpShAz3s3MCBulT0aMmgu3aoX59JnjWNT3PRIA0py0G9TQqmU+UXJ+PBbS1 UFdMGnNWDVyrHPN2pLAG1pELwNvWajlXUL+tx+atz8iblN1u9mPdr5TDTsNjOGY3qFY1 53Bz8UNVnoRJnNuvhyS8ZQIb2B6df5AUGwyghRhjkQmNaoJfyu/31FC+AOyqfNX/geGA dJUEwtpP45dVQYQ1sBRmtBf9TZEEcfmMsvlyb7K9oYK7H0WiG2NJz94k0niEmpFsiqQY dhyY9wo3Yc/Ch+2P2pn5bxU9sRwMI5sC2nIkRJ3LJR+PgFtjBgifBDpg7vbrhBhpMp7Y uqhg== 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=p5rCm22IduvoAkUY3FmQc3l8yqiuc3qz53GXyYD1lUU=; b=XpdIS8fMOtwqa9KKSadx2KTg1xqP3mXOmzFhuj34CmsGt5In1NOTxoheQtBMU5TnKu 0eB2aO1Lo66x+t/Cewgr1RpQpuYs6mbLBzRwS1XYI/0YTDwwO2FDC/L+bmSgwACYPBJc 6n84gqMUKPRbXlNFarn2bueuetVs70NXMHhCpgI6BGOFpRBDeoxhnbejIMkraiNCu3Wv tVbV33yvve5kQjY2YWOj1PHAyllR2jvphHFfdbtw72IcVf+Y0MtTiBPONlzJTQ4iqYnO 0J0hu+PaLpyxyTWZ4R+K7g8fyv32ZuvtsT+o8kR9pI9ijChxUv8h0taMQ6J2m56HtVCO 6IPA== 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 j5si2128281oii.114.2020.01.08.11.59.57; Wed, 08 Jan 2020 12:00:09 -0800 (PST) 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 S1730216AbgAHSZb (ORCPT + 99 others); Wed, 8 Jan 2020 13:25:31 -0500 Received: from namei.org ([65.99.196.166]:56160 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727169AbgAHSZa (ORCPT ); Wed, 8 Jan 2020 13:25:30 -0500 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 008IP1Vu027011; Wed, 8 Jan 2020 18:25:01 GMT Date: Thu, 9 Jan 2020 05:25:01 +1100 (AEDT) From: James Morris To: KP Singh cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-security-module@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Kees Cook , Thomas Garnier , Michael Halcrow , Paul Turner , Brendan Gregg , Jann Horn , Matthew Garrett , Christian Brauner , =?ISO-8859-15?Q?Micka=EBl_Sala=FCn?= , Florent Revest , Brendan Jackman , Martin KaFai Lau , Song Liu , Yonghong Song , "Serge E. Hallyn" , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Nicolas Ferre , Stanislav Fomichev , Quentin Monnet , Andrey Ignatov , Joe Stringer Subject: Re: [PATCH bpf-next v1 12/13] bpf: lsm: Add selftests for BPF_PROG_TYPE_LSM In-Reply-To: <20191220154208.15895-13-kpsingh@chromium.org> Message-ID: References: <20191220154208.15895-1-kpsingh@chromium.org> <20191220154208.15895-13-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 Fri, 20 Dec 2019, KP Singh wrote: > From: KP Singh > > * Load a BPF program that audits mprotect calls > * Attach the program to the "file_mprotect" LSM hook > * Verify if the program is actually loading by reading > securityfs > * Initialize the perf events buffer and poll for audit events > * Do an mprotect on some memory allocated on the heap > * Verify if the audit event was received > > Signed-off-by: KP Singh Good to see! Reviewed-by: James Morris -- James Morris