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,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1773EC43216 for ; Thu, 5 Aug 2021 22:02:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB5936113C for ; Thu, 5 Aug 2021 22:02:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231380AbhHEWCR (ORCPT ); Thu, 5 Aug 2021 18:02:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231375AbhHEWCO (ORCPT ); Thu, 5 Aug 2021 18:02:14 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06E32C06179B for ; Thu, 5 Aug 2021 15:01:59 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id cf5so10474722edb.2 for ; Thu, 05 Aug 2021 15:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c3urkHLQm5QwJdZ9O5/+QqeYs/qIDb1LdTwMX8UuIJo=; b=Y9dxhU40Cp8veCcp+fcPVCm4ifcChrN1zCWT6snRwiYjugw4bnQknql6Al6HruhkGh hRr2EK3dfowDwcLy/91ol0zhq75r4GYw/0FGGfHCvI9pwgM/NBpebJBtEgcpxjZPzh7X 6Qb4mLJ2AkRFR7FJQcLLLzFC1VGLUVsRMVl3aLy6lBeo2Y7pxZfomIrU+VomHL3c87QG q3wIiaH3OeaFpPWo49uBcSya0/hSPyR98ZBBjPRupyhM1wN8h8eCnG23kWHKYe5oxTOx ekDzNhD/GOj4/cx6e4T7C6fCiv+h+myJcrv4/jTtK0HBwN5TieASVgvaRp9YnmbuiQXC 4KhA== 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=nDZc0F+Auj9+dLroVRFcHRhOvy4R0GtWZMVDCuA6ldkaJ+LvVfvWJ9VZ6IR4UJCXxL 4p1BUDoMahShjqEkeMPmz1e6fcx3GMtF1jeazw0gLcMgx/T7Lsf1sB8F+zDOVnRwHqDv HIVJeO6r1IEO1rR7EJvH3A080+peSfQXCzTaH5c5lXNU4awT2GyWJ0F6VS7S4RacXj2b z8Wm2+cSY+hslyYmVd0JzHuxWKueDy47hQMJKqkcqlyzyjBX8zxcOU32xO/TCUXHijyE 7rz/gJsxGlVSY50TeWZe6iRVmZCLSeNfs6fHXxZSQgU2qBWzEBgbsXKkZj+fWlqiJuSP tZhA== X-Gm-Message-State: AOAM531FikeXloJB/XmRP5shf+ooT90MXJ1Z4QtjHJifgOqK61BcHPug OsYD11nttyl8/2Aou4i3d/+RmPcR+59S+XkJvnQg 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 Cc: Linux-Audit Mailing List , LKML , linux-fsdevel@vger.kernel.org, Eric Paris , Steve Grubb , Alexander Viro , Eric Paris , x86@kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, Aleksa Sarai , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 F2F70C4338F for ; Thu, 5 Aug 2021 22:02:32 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 491436113C for ; Thu, 5 Aug 2021 22:02:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 491436113C 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=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GgjJk41H6z3d7J for ; Fri, 6 Aug 2021 08:02:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=paul-moore-com.20150623.gappssmtp.com header.i=@paul-moore-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=Y9dxhU40; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=paul-moore.com (client-ip=2a00:1450:4864:20::52c; helo=mail-ed1-x52c.google.com; envelope-from=paul@paul-moore.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=paul-moore-com.20150623.gappssmtp.com header.i=@paul-moore-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=Y9dxhU40; dkim-atps=neutral Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GgjJF2qTzz2yNf for ; Fri, 6 Aug 2021 08:02:04 +1000 (AEST) Received: by mail-ed1-x52c.google.com with SMTP id y7so10457775eda.5 for ; Thu, 05 Aug 2021 15:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c3urkHLQm5QwJdZ9O5/+QqeYs/qIDb1LdTwMX8UuIJo=; b=Y9dxhU40Cp8veCcp+fcPVCm4ifcChrN1zCWT6snRwiYjugw4bnQknql6Al6HruhkGh hRr2EK3dfowDwcLy/91ol0zhq75r4GYw/0FGGfHCvI9pwgM/NBpebJBtEgcpxjZPzh7X 6Qb4mLJ2AkRFR7FJQcLLLzFC1VGLUVsRMVl3aLy6lBeo2Y7pxZfomIrU+VomHL3c87QG q3wIiaH3OeaFpPWo49uBcSya0/hSPyR98ZBBjPRupyhM1wN8h8eCnG23kWHKYe5oxTOx ekDzNhD/GOj4/cx6e4T7C6fCiv+h+myJcrv4/jTtK0HBwN5TieASVgvaRp9YnmbuiQXC 4KhA== 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=a3EktE3TMjPXJ/jjnITNUzp47I+e3hdRPydksVezmy7vOcl3WrY1s/cucc5FmMzE++ eEC2OSUEvNA/NLqMtEmHN+HLAhVZiuCMAoez37phwhS+Y3jEIlDElloY3KDGDhxPp/PE 51PoXC9O/gPLfcF7z2+koF+JeLYRkittYf+E3kW/bM3z6FNde5OwulSyOItuJk2ys6U+ ROJJtVxVHnUnSSV3x25fi3asbe4OmJyze9jpCAVB+XDxi6qXLqqSaddu20JaYvhMkAaV bhVw+ATUJ0x3TlJbXs5hEt89hpl9lAvVPVU/aMBdCk6JkY1x9DGZ63hHeEcyGZ22pZEk EMBw== X-Gm-Message-State: AOAM530umlAeqBBqU3n7LQ0yeSANcRmOiKeuv0WoSFfWd+eS4IsUnxHq jEtjNWAZOQhKlGP3jVERHX9O0lvviOMnGsRYN60C 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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 , Steve Grubb , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Moore Date: Thu, 05 Aug 2021 22:01:47 +0000 Subject: Re: [PATCH v4 1/3] audit: replace magic audit syscall class numbers with macros Message-Id: List-Id: References: <2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com> In-Reply-To: <2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Richard Guy Briggs Cc: Linux-Audit Mailing List , LKML , linux-fsdevel@vger.kernel.org, Eric Paris , Steve Grubb , Alexander Viro , Eric Paris , x86@kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, Aleksa Sarai , Arnd Bergmann 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