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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FACEC433EF for ; Fri, 1 Oct 2021 20:34:39 +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-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8569F61AA4 for ; Fri, 1 Oct 2021 20:34:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8569F61AA4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=redhat.com 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-405-Ff4btEVJMeWK6vbLGo3XUg-1; Fri, 01 Oct 2021 16:34:36 -0400 X-MC-Unique: Ff4btEVJMeWK6vbLGo3XUg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35EE71835AC2; Fri, 1 Oct 2021 20:34:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A6F725F4EE; Fri, 1 Oct 2021 20:34:30 +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 2EBAD4E58F; Fri, 1 Oct 2021 20:34:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 191KYRBh015607 for ; Fri, 1 Oct 2021 16:34:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 675A51186341; Fri, 1 Oct 2021 20:34:27 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EF06117C2CB for ; Fri, 1 Oct 2021 20:34:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8160C106655D for ; Fri, 1 Oct 2021 20:34:24 +0000 (UTC) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-502-0adKXiccN8OPwZxxxVPF9g-1; Fri, 01 Oct 2021 16:34:20 -0400 X-MC-Unique: 0adKXiccN8OPwZxxxVPF9g-1 Received: by mail-ed1-f44.google.com with SMTP id v18so38056853edc.11 for ; Fri, 01 Oct 2021 13:34:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kSP+WdRepS5KkpPng+0w4NP8/2VHi8b8uOTGd2zaiqQ=; b=L/x/h2ijyLqdnUK7SI1B97a5sbfQ1m+a5PG/W2VabDyuVh0EDxPjpKdAS6VV1CEkjB VHAUVw1y4y723kOE5BsnWRC4YAmgM5Zv4/icSlB1u/TUFKKwNqfAbcCZUIYwCHpHcakt tx25XE3imRHaD2FF/6pd9cvg4bg0rjuiganxOvPVyBL54xZBmlBY0nUHCHoqmxisnELf UVN5Am1blu/Atv+maEkNmZvy1THM38F+IEqpG42vpLEi2pPHnCpzhyyL6o/4ZyFzKpZY wlL/Y8PoK1evN6wEtIYPL5ESerH8boCOwPGxZn5vcS2kCnO59AdwqxwxaOCvQyWIRLQB VjNQ== X-Gm-Message-State: AOAM5304ElcVZAcWHn7jeMU+Bbfeb8C5SJYh+bPMXXorSkogXS0PpGU5 +xlJ4aG4iFySwx0SMfiW1/mDYY2D66X+a6TXdDsB+VR8Cw== X-Google-Smtp-Source: ABdhPJxC0EQtQagoEHByLjjkm+t+GCxgH/TA3VGGlBrpYrTPi3t1fC6SM4PYPMXY0CeknaSHTt3S5hIbviYB2TOtMXI= X-Received: by 2002:a50:e1cd:: with SMTP id m13mr73439edl.93.1633120459544; Fri, 01 Oct 2021 13:34:19 -0700 (PDT) MIME-Version: 1.0 References: <2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com> <20211001195306.GC3977594@madcap2.tricolour.ca> In-Reply-To: <20211001195306.GC3977594@madcap2.tricolour.ca> From: Paul Moore Date: Fri, 1 Oct 2021 16:34:08 -0400 Message-ID: Subject: Re: [PATCH v4 1/3] audit: replace magic audit syscall class numbers with macros To: Richard Guy Briggs X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: linux-audit@redhat.com Cc: Linux-Audit Mailing List 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.15 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, Oct 1, 2021 at 3:53 PM Richard Guy Briggs wrote: > On 2021-09-30 16:38, Paul Moore wrote: > > On Thu, Aug 5, 2021 at 6:01 PM Paul Moore wrote: > > > On Wed, May 19, 2021 at 4:01 PM Richard Guy Briggs wrote: > > > > Replace audit syscall class magic numbers with macros. > > > > > > > > This required putting the macros into new header file > > > > include/linux/auditsc_classmacros.h since the syscall macros were > > > > included for both 64 bit and 32 bit in any compat code, causing > > > > redefinition warnings. > > > > > > > > Signed-off-by: Richard Guy Briggs > > > > Link: https://lore.kernel.org/r/2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com > > > > --- > > > > MAINTAINERS | 1 + > > > > arch/alpha/kernel/audit.c | 8 ++++---- > > > > arch/ia64/kernel/audit.c | 8 ++++---- > > > > arch/parisc/kernel/audit.c | 8 ++++---- > > > > arch/parisc/kernel/compat_audit.c | 9 +++++---- > > > > arch/powerpc/kernel/audit.c | 10 +++++----- > > > > arch/powerpc/kernel/compat_audit.c | 11 ++++++----- > > > > arch/s390/kernel/audit.c | 10 +++++----- > > > > arch/s390/kernel/compat_audit.c | 11 ++++++----- > > > > arch/sparc/kernel/audit.c | 10 +++++----- > > > > arch/sparc/kernel/compat_audit.c | 11 ++++++----- > > > > arch/x86/ia32/audit.c | 11 ++++++----- > > > > arch/x86/kernel/audit_64.c | 8 ++++---- > > > > include/linux/audit.h | 1 + > > > > include/linux/auditsc_classmacros.h | 23 +++++++++++++++++++++++ > > > > kernel/auditsc.c | 12 ++++++------ > > > > lib/audit.c | 10 +++++----- > > > > lib/compat_audit.c | 11 ++++++----- > > > > 18 files changed, 102 insertions(+), 71 deletions(-) > > > > create mode 100644 include/linux/auditsc_classmacros.h > > > > > > ... > > > > > > > diff --git a/include/linux/auditsc_classmacros.h b/include/linux/auditsc_classmacros.h > > > > new file mode 100644 > > > > index 000000000000..18757d270961 > > > > --- /dev/null > > > > +++ b/include/linux/auditsc_classmacros.h > > > > @@ -0,0 +1,23 @@ > > > > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > > > > +/* auditsc_classmacros.h -- Auditing support syscall macros > > > > + * > > > > + * Copyright 2021 Red Hat Inc., Durham, North Carolina. > > > > + * All Rights Reserved. > > > > + * > > > > + * Author: Richard Guy Briggs > > > > + */ > > > > +#ifndef _LINUX_AUDITSCM_H_ > > > > +#define _LINUX_AUDITSCM_H_ > > > > + > > > > +enum auditsc_class_t { > > > > + AUDITSC_NATIVE = 0, > > > > + AUDITSC_COMPAT, > > > > + AUDITSC_OPEN, > > > > + AUDITSC_OPENAT, > > > > + AUDITSC_SOCKETCALL, > > > > + AUDITSC_EXECVE, > > > > + > > > > + AUDITSC_NVALS /* count */ > > > > +}; > > > > + > > > > +#endif > > > > > > My apologies Richard, for some reason I had it in my mind that this > > > series was waiting on you to answer a question and/or respin; however, > > > now that I'm clearing my patch queues looking for any stragglers I see > > > that isn't the case. Looking over the patchset I think it looks okay > > > to me, my only concern is that "auditsc_classmacros.h" is an awfully > > > specific header file name and could prove to be annoying if we want to > > > add to it in the future. What do you think about something like > > > "audit_arch.h" instead? > > > > > > If that change is okay with you I can go ahead and do the rename while > > > I'm merging the patches, I'll consider it penance for letting this > > > patchset sit for so long :/ > > > > [NOTE: trimmed the To/CC line as it is excessive for a ping like this] > > > > Going through the patch queue and I see this never got a response, or > > rather none that hit my inbox. Richard? > > Hmmm, sorry about that, delay my fault this time. I don't have a strong > opinion about it, but prefer the original, or auditsc_arch.h at least. Okay, so long as you are okay with the header rename I'll go ahead and take care of that, although probably not today as merging cross-subsystem changes late on a Friday seems like a problem waiting to happen. I'll send another note when it is in audit/next. -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit