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=-20.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 247CAC433E6 for ; Mon, 21 Dec 2020 17:57:45 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A67AE22B51 for ; Mon, 21 Dec 2020 17:57:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A67AE22B51 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=containers-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2615786C20; Mon, 21 Dec 2020 17:57:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZYqT7rx-kwJb; Mon, 21 Dec 2020 17:57:42 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id D170586846; Mon, 21 Dec 2020 17:57:42 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C25A6C1825; Mon, 21 Dec 2020 17:57:42 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id C8766C0893 for ; Mon, 21 Dec 2020 17:57:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B4BC4227A3 for ; Mon, 21 Dec 2020 17:57:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kC8LM8s0CPc8 for ; Mon, 21 Dec 2020 17:57:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by silver.osuosl.org (Postfix) with ESMTPS id 58623226FC for ; Mon, 21 Dec 2020 17:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608573456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PVTTSIZ+4qn+SwwDnLlevQMhsrEFZG01AfUJnVXzFpk=; b=TfCyOqA2SivMCkf/I8XjXMp04bmPvcqtphEmVkjjIgkMM5On4nKiiJfYRxXpqI/PMTiT98 wA3SGD7rLTorwtISPgYTLzu/JCexWRbsFY7scx5b36VYW80YC5LcMORzxiapoDbuXCDNqU 1djA5r9+2SQ4VT1J4vRs4GUncPHXqkY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-64-Hmj-eDYzNaCOHIZWZAk8lw-1; Mon, 21 Dec 2020 12:57:32 -0500 X-MC-Unique: Hmj-eDYzNaCOHIZWZAk8lw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8B338030A5; Mon, 21 Dec 2020 17:57:29 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.10.110.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B53BD1E5; Mon, 21 Dec 2020 17:57:15 +0000 (UTC) Date: Mon, 21 Dec 2020 12:57:12 -0500 From: Richard Guy Briggs To: Paul Moore Subject: Re: [PATCH ghak90 v10 01/11] audit: collect audit task parameters Message-ID: <20201221175712.GI1762914@madcap2.tricolour.ca> References: <982b9adffbd32264a853fe7f4f06f0d0a882c11d.1608225886.git.rgb@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Cc: Jens Axboe , Neil Horman , Linux API , Linux Containers List , LKML , David Howells , Linux-Audit Mailing List , Netfilter Devel List , "Eric W. Biederman" , Simo Sorce , Linux NetDev Upstream Mailing List , Linux FSdevel , Eric Paris , mpatel@redhat.com X-BeenThere: containers@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux Containers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: containers-bounces@lists.linux-foundation.org Sender: "Containers" On 2020-12-21 12:14, Paul Moore wrote: > On Mon, Dec 21, 2020 at 11:57 AM Richard Guy Briggs wrote: > > > > The audit-related parameters in struct task_struct should ideally be > > collected together and accessed through a standard audit API and the audit > > structures made opaque to other kernel subsystems. > > > > Collect the existing loginuid, sessionid and audit_context together in a > > new opaque struct audit_task_info called "audit" in struct task_struct. > > > > Use kmem_cache to manage this pool of memory. > > Un-inline audit_free() to be able to always recover that memory. > > > > Please see the upstream github issues > > https://github.com/linux-audit/audit-kernel/issues/81 > > https://github.com/linux-audit/audit-kernel/issues/90 > > > > Signed-off-by: Richard Guy Briggs > > Acked-by: Neil Horman > > Reviewed-by: Ondrej Mosnacek > > Did Neil and Ondrej really ACK/Review the changes that you made here > in v10 or are you just carrying over the ACK/Review? I'm hopeful it > is the former, because I'm going to be a little upset if it is the > latter. It is the latter, sorry. So, this needs to be reposted without their ACK/Review lines. > > --- > > fs/io-wq.c | 8 +-- > > fs/io_uring.c | 16 ++--- > > include/linux/audit.h | 49 +++++--------- > > include/linux/sched.h | 7 +- > > init/init_task.c | 3 +- > > init/main.c | 2 + > > kernel/audit.c | 154 +++++++++++++++++++++++++++++++++++++++++- > > kernel/audit.h | 7 ++ > > kernel/auditsc.c | 24 ++++--- > > kernel/fork.c | 1 - > > 10 files changed, 205 insertions(+), 66 deletions(-) > > -- > paul moore > www.paul-moore.com > - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635 _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/containers 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=-22.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 C9486C433E0 for ; Mon, 21 Dec 2020 17:59:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 98B5820786 for ; Mon, 21 Dec 2020 17:59:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725957AbgLUR7D (ORCPT ); Mon, 21 Dec 2020 12:59:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21659 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbgLUR7D (ORCPT ); Mon, 21 Dec 2020 12:59:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608573456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PVTTSIZ+4qn+SwwDnLlevQMhsrEFZG01AfUJnVXzFpk=; b=TfCyOqA2SivMCkf/I8XjXMp04bmPvcqtphEmVkjjIgkMM5On4nKiiJfYRxXpqI/PMTiT98 wA3SGD7rLTorwtISPgYTLzu/JCexWRbsFY7scx5b36VYW80YC5LcMORzxiapoDbuXCDNqU 1djA5r9+2SQ4VT1J4vRs4GUncPHXqkY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-64-Hmj-eDYzNaCOHIZWZAk8lw-1; Mon, 21 Dec 2020 12:57:32 -0500 X-MC-Unique: Hmj-eDYzNaCOHIZWZAk8lw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8B338030A5; Mon, 21 Dec 2020 17:57:29 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.10.110.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B53BD1E5; Mon, 21 Dec 2020 17:57:15 +0000 (UTC) Date: Mon, 21 Dec 2020 12:57:12 -0500 From: Richard Guy Briggs To: Paul Moore Cc: Linux Containers List , Linux API , Linux-Audit Mailing List , Linux FSdevel , LKML , Linux NetDev Upstream Mailing List , Netfilter Devel List , Jens Axboe , Neil Horman , David Howells , "Eric W. Biederman" , Simo Sorce , Eric Paris , Christian Brauner , mpatel@redhat.com, Serge Hallyn Subject: Re: [PATCH ghak90 v10 01/11] audit: collect audit task parameters Message-ID: <20201221175712.GI1762914@madcap2.tricolour.ca> References: <982b9adffbd32264a853fe7f4f06f0d0a882c11d.1608225886.git.rgb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-12-21 12:14, Paul Moore wrote: > On Mon, Dec 21, 2020 at 11:57 AM Richard Guy Briggs wrote: > > > > The audit-related parameters in struct task_struct should ideally be > > collected together and accessed through a standard audit API and the audit > > structures made opaque to other kernel subsystems. > > > > Collect the existing loginuid, sessionid and audit_context together in a > > new opaque struct audit_task_info called "audit" in struct task_struct. > > > > Use kmem_cache to manage this pool of memory. > > Un-inline audit_free() to be able to always recover that memory. > > > > Please see the upstream github issues > > https://github.com/linux-audit/audit-kernel/issues/81 > > https://github.com/linux-audit/audit-kernel/issues/90 > > > > Signed-off-by: Richard Guy Briggs > > Acked-by: Neil Horman > > Reviewed-by: Ondrej Mosnacek > > Did Neil and Ondrej really ACK/Review the changes that you made here > in v10 or are you just carrying over the ACK/Review? I'm hopeful it > is the former, because I'm going to be a little upset if it is the > latter. It is the latter, sorry. So, this needs to be reposted without their ACK/Review lines. > > --- > > fs/io-wq.c | 8 +-- > > fs/io_uring.c | 16 ++--- > > include/linux/audit.h | 49 +++++--------- > > include/linux/sched.h | 7 +- > > init/init_task.c | 3 +- > > init/main.c | 2 + > > kernel/audit.c | 154 +++++++++++++++++++++++++++++++++++++++++- > > kernel/audit.h | 7 ++ > > kernel/auditsc.c | 24 ++++--- > > kernel/fork.c | 1 - > > 10 files changed, 205 insertions(+), 66 deletions(-) > > -- > paul moore > www.paul-moore.com > - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635 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=-22.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 AB2FBC433E0 for ; Mon, 21 Dec 2020 17:57:43 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4126F22B51 for ; Mon, 21 Dec 2020 17:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4126F22B51 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=linux-audit-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608573461; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KRigJqEpOvTIJHhF5c3LWZ5rJ5mKYHkO/xWRUulcSbk=; b=cIX/x/INtJAYnlkerTxDAk0GpQ4/1DIHB32yfyO28LdZGxUfmjgHfYcRM/5drW7ZSvrdbN qWOnii8eYqv1qOnHSt7I6pJFRoRo3FDoVQB5H/jx6zaxfDqRwJpU/ECLcokKybLs6zq5Dx LAw+iWmW5U+mgqXa7Ot+YCkFL7qoTWw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-VaWvurtTPb2vF2kSwMwB7Q-1; Mon, 21 Dec 2020 12:57:39 -0500 X-MC-Unique: VaWvurtTPb2vF2kSwMwB7Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 062171572F; Mon, 21 Dec 2020 17:57:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 526A55C1D1; Mon, 21 Dec 2020 17:57:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 23C65180954D; Mon, 21 Dec 2020 17:57:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BLHvTUk025249 for ; Mon, 21 Dec 2020 12:57:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id E731D6064B; Mon, 21 Dec 2020 17:57:29 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.10.110.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B53BD1E5; Mon, 21 Dec 2020 17:57:15 +0000 (UTC) Date: Mon, 21 Dec 2020 12:57:12 -0500 From: Richard Guy Briggs To: Paul Moore Subject: Re: [PATCH ghak90 v10 01/11] audit: collect audit task parameters Message-ID: <20201221175712.GI1762914@madcap2.tricolour.ca> References: <982b9adffbd32264a853fe7f4f06f0d0a882c11d.1608225886.git.rgb@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: linux-audit@redhat.com Cc: Jens Axboe , Neil Horman , Linux API , Linux Containers List , LKML , David Howells , Linux-Audit Mailing List , Netfilter Devel List , "Eric W. Biederman" , Simo Sorce , Linux NetDev Upstream Mailing List , Linux FSdevel , Eric Paris , Christian Brauner , mpatel@redhat.com, Serge Hallyn X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 2020-12-21 12:14, Paul Moore wrote: > On Mon, Dec 21, 2020 at 11:57 AM Richard Guy Briggs wrote: > > > > The audit-related parameters in struct task_struct should ideally be > > collected together and accessed through a standard audit API and the audit > > structures made opaque to other kernel subsystems. > > > > Collect the existing loginuid, sessionid and audit_context together in a > > new opaque struct audit_task_info called "audit" in struct task_struct. > > > > Use kmem_cache to manage this pool of memory. > > Un-inline audit_free() to be able to always recover that memory. > > > > Please see the upstream github issues > > https://github.com/linux-audit/audit-kernel/issues/81 > > https://github.com/linux-audit/audit-kernel/issues/90 > > > > Signed-off-by: Richard Guy Briggs > > Acked-by: Neil Horman > > Reviewed-by: Ondrej Mosnacek > > Did Neil and Ondrej really ACK/Review the changes that you made here > in v10 or are you just carrying over the ACK/Review? I'm hopeful it > is the former, because I'm going to be a little upset if it is the > latter. It is the latter, sorry. So, this needs to be reposted without their ACK/Review lines. > > --- > > fs/io-wq.c | 8 +-- > > fs/io_uring.c | 16 ++--- > > include/linux/audit.h | 49 +++++--------- > > include/linux/sched.h | 7 +- > > init/init_task.c | 3 +- > > init/main.c | 2 + > > kernel/audit.c | 154 +++++++++++++++++++++++++++++++++++++++++- > > kernel/audit.h | 7 ++ > > kernel/auditsc.c | 24 ++++--- > > kernel/fork.c | 1 - > > 10 files changed, 205 insertions(+), 66 deletions(-) > > -- > paul moore > www.paul-moore.com > - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635 -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit