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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 CDF76C4338F for ; Thu, 5 Aug 2021 22:05:59 +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 249B860462 for ; Thu, 5 Aug 2021 22:05:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 249B860462 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.com Authentication-Results: mail.kernel.org; spf=tempfail 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-525-zSWvfa5qO_2MwdbEapmZtg-1; Thu, 05 Aug 2021 18:05:56 -0400 X-MC-Unique: zSWvfa5qO_2MwdbEapmZtg-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 3645793920; Thu, 5 Aug 2021 22:05:52 +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 644AB5C1C5; Thu, 5 Aug 2021 22:05:51 +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 EE2684BB7C; Thu, 5 Aug 2021 22:05:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 175M24bM003544 for ; Thu, 5 Aug 2021 18:02:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 763622028680; Thu, 5 Aug 2021 22:02:04 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 705F42028676 for ; Thu, 5 Aug 2021 22:02:01 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 CBA66800883 for ; Thu, 5 Aug 2021 22:02:01 +0000 (UTC) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-485-OiuwhcqXOjy7IuK1EzgHfw-1; Thu, 05 Aug 2021 18:01:59 -0400 X-MC-Unique: OiuwhcqXOjy7IuK1EzgHfw-1 Received: by mail-ed1-f47.google.com with SMTP id x90so10429522ede.8 for ; Thu, 05 Aug 2021 15:01:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c3urkHLQm5QwJdZ9O5/+QqeYs/qIDb1LdTwMX8UuIJo=; b=KuLEgYgl/HlgPdB0N0Bgl8Ou/EF7m01vS3Q36KAsP9CJskRywfjduV+CbTi/ieXGsG zMaHo3ifSvnttZjyhYE2P8miv9KaGOEcW0cmTkF5qYumgfBXrENuuf1eKNGO1fLnqhvm U3oJHs9lnpGadAStBTbA388U2DPXcgLHYoJG/GMW73RZLAFCLf6dBSfJvdyIZIVcZzeg bsqIRw7w9b4O+PkyUgPtwjksjeTfT2+XtWnStagRX2lqHSEO56/AR/eTkC1nE3sQqjpb 8N7RbRpYApyym4EXOhECqj17f0kJEWcDBW6SJK1cca5QD+waVPMhvg7FZLogCahFQ859 JMkQ== X-Gm-Message-State: AOAM532Z337QV0AJaNWQNu5PAFWboQsszOkYZtdFy3bGTM5ApCmH1yME MSXpQPeDMbZ8bqtYMRkRRzDTA7wYgHGIbHMJfpdk X-Google-Smtp-Source: ABdhPJyUIiWYAz6aUFc6MPvieEo2GUkchlv7WYU/OChfOMJj/dkrDY3GEEK87ConDlVxbwRyeX2EW3ZWABWXQS8VcSk= X-Received: by 2002:a05:6402:b83:: with SMTP id cf3mr9240826edb.12.1628200918472; Thu, 05 Aug 2021 15:01:58 -0700 (PDT) MIME-Version: 1.0 References: <2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com> In-Reply-To: <2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com> From: Paul Moore Date: Thu, 5 Aug 2021 18:01:47 -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.6 X-loop: linux-audit@redhat.com Cc: linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, Arnd Bergmann , x86@kernel.org, LKML , Eric Paris , sparclinux@vger.kernel.org, Aleksa Sarai , Linux-Audit Mailing List , Alexander Viro , linux-alpha@vger.kernel.org, linux-fsdevel@vger.kernel.org, Eric Paris , linuxppc-dev@lists.ozlabs.org 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 :/ -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit