netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: guro@fb.com
Cc: netdev@vger.kernel.org, tj@kernel.org, ast@kernel.org,
	daniel@iogearbox.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/4] device_cgroup: prepare code for bpf-based device controller
Date: Thu, 02 Nov 2017 16:28:07 +0900 (KST)	[thread overview]
Message-ID: <20171102.162807.1192486380016895082.davem@davemloft.net> (raw)
In-Reply-To: <20171101152037.3288-2-guro@fb.com>

From: Roman Gushchin <guro@fb.com>
Date: Wed, 1 Nov 2017 11:20:34 -0400

> diff --git a/include/linux/device_cgroup.h b/include/linux/device_cgroup.h
> index 8b64221b432b..25f1dc7673db 100644
> --- a/include/linux/device_cgroup.h
> +++ b/include/linux/device_cgroup.h
> @@ -1,16 +1,69 @@
>  #include <linux/fs.h>
>  
> +#define ACC_MKNOD 1
> +#define ACC_READ  2
> +#define ACC_WRITE 4
> +#define ACC_MASK (ACC_MKNOD | ACC_READ | ACC_WRITE)
> +
> +#define DEV_BLOCK 1
> +#define DEV_CHAR  2
> +#define DEV_ALL   4  /* this represents all devices */

When these macros existed solely inside of security/device_cgroup.c,
such naming was probably fine.

But once you move them into a global header file, we have to take
global namespace issues into consideration.

I would therefore like to ask that you give some kind of appropriate
prefix to the names of these macros, in order to make them more global
namespace friendly.

Thank you.

  reply	other threads:[~2017-11-02  7:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 15:20 [PATCH net-next 0/4] eBPF-based device cgroup controller Roman Gushchin
2017-11-01 15:20 ` [PATCH net-next 1/4] device_cgroup: prepare code for bpf-based device controller Roman Gushchin
2017-11-02  7:28   ` David Miller [this message]
2017-11-01 15:20 ` [PATCH net-next 2/4] bpf, cgroup: implement eBPF-based device controller for cgroup v2 Roman Gushchin
2017-11-01 15:20 ` [PATCH net-next 3/4] bpf: move cgroup_helpers from samples/bpf/ to tools/testing/selftesting/bpf/ Roman Gushchin
2017-11-01 15:20 ` [PATCH net-next 4/4] selftests/bpf: add a test for device cgroup controller Roman Gushchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171102.162807.1192486380016895082.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=guro@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).