Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4343916pxu; Mon, 21 Dec 2020 10:02:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeJ4CoNr1zcsbkmXdV1vqMToVJQ2ODY/a4CLZmeUi9RNYP9kcD9wI7VyhgXrKNtovvh5M8 X-Received: by 2002:a17:906:a015:: with SMTP id p21mr7244509ejy.49.1608573740456; Mon, 21 Dec 2020 10:02:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608573740; cv=none; d=google.com; s=arc-20160816; b=XMCPqCX0ZUXm1Tw0Z5ODxNp2pou2f5qsc/xMvs4Pc54yECQ9S19w6TINukTDKn1l83 835I4CrdIHDdTZW8eCFVZCBRaM8uUyitMmmlFPAIT8xfghPp3k7QjGFFjgM5rLNl6JGB fiIVs4WgZyPZe9peD4eHox8xd7kTLyC3EcuZHp2CEa8xUVOSRb396uPXwKJK0qgR6fvC 3eI6axYuSQ6jPZtJQrmEJDsiUMzDe2ou5PFfwe1PS8DbaCYchGqm9fsJa91G5WFVaBY0 R0dbkYb5wd0XdyOWCVdsqC1lqw3b986pPUiWrHQbW6MLGpCKeoFNclNAPWzKNzXninxH fm2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PVTTSIZ+4qn+SwwDnLlevQMhsrEFZG01AfUJnVXzFpk=; b=Utm9ZSAxIoTj/GaNCEIYzYxc+7aQxozmc81Vr4T/5nF+k6bzmPX5wZzzRC7Wx/IFSi CbpYYGxt9L4A68uoN3lIBXgTzwwXtazRMYDJWrhcQperQ1t5bjWbGzUQENiNuPSBuOxG 7SUhxiaJsqyjsf3PowYyi48sX9Mu3AsoRAPxXr6CX1hW6Puy5UGoE/Wrw76aBsvNeMD4 Ya2gfY3PGFDsVMmVCUNJKk9ZyCDN7slVy8vH+u4HpdE4Y9Y35JByi0e/i5rYW9F6Lrm4 OxXVdUlV4cNff7TTYxkQm2xpetRMycXkAzZWUneZ3V4HRQior7qlJQs/8eUXKf3GmjHp zEGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TfCyOqA2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qu25si9238243ejb.146.2020.12.21.10.01.55; Mon, 21 Dec 2020 10:02:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TfCyOqA2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725910AbgLUR7D (ORCPT + 99 others); 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