All of lore.kernel.org
 help / color / mirror / Atom feed
From: Djalal Harouni <tixxdz@gmail.com>
To: Kees Cook <keescook@chromium.org>,
	Alexey Gladkov <gladkov.alexey@gmail.com>,
	Andy Lutomirski <luto@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com,
	linux-security-module@vger.kernel.org, linux-api@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	me@tobin.cc, Oleg Nesterov <oleg@redhat.com>,
	Jeff Layton <jlayton@poochiereds.net>,
	Ingo Molnar <mingo@kernel.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	ebiederm@xmission.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Daniel Micay <danielmicay@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	bfields@fieldses.org, Stephen Rothwell <sfr@canb.auug.org.au>,
	solar@openwall.com, Djalal Harouni <tixxdz@gmail.com>
Subject: [PATCH RFC v3 5/7] proc: move hidepid definitions to proc files
Date: Thu,  9 Nov 2017 17:14:04 +0100	[thread overview]
Message-ID: <1510244046-3256-6-git-send-email-tixxdz@gmail.com> (raw)
In-Reply-To: <1510244046-3256-1-git-send-email-tixxdz@gmail.com>

This moves the 'hidepid' definitions to proc files. The 'hidepid' is a
proc mount option, not really a per pid namespace value. It was there
since it was used inside PID namespaces, however now we have improved
proc logic and reduce the complexity and ties with PID namespaces lets
move this last bit to where it really belongs.

Cc: Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
---
 include/linux/pid_namespace.h | 6 ------
 include/linux/proc_fs.h       | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index 786ea04..66f47f1 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -15,12 +15,6 @@
 
 struct fs_pin;
 
-enum { /* definitions for pid_namespace's hide_pid field */
-	HIDEPID_OFF	  = 0,
-	HIDEPID_NO_ACCESS = 1,
-	HIDEPID_INVISIBLE = 2,
-};
-
 struct pid_namespace {
 	struct kref kref;
 	struct idr idr;
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 408b51d..c123e5ec 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -12,6 +12,12 @@
 struct proc_dir_entry;
 struct pid_namespace;
 
+enum { /* definitions for 'hidepid' mount option */
+	HIDEPID_OFF	  = 0,
+	HIDEPID_NO_ACCESS = 1,
+	HIDEPID_INVISIBLE = 2,
+};
+
 struct proc_fs_info {
 	struct pid_namespace *pid_ns;
 	struct dentry *proc_self; /* For /proc/self/ */
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: tixxdz@gmail.com (Djalal Harouni)
To: linux-security-module@vger.kernel.org
Subject: [PATCH RFC v3 5/7] proc: move hidepid definitions to proc files
Date: Thu,  9 Nov 2017 17:14:04 +0100	[thread overview]
Message-ID: <1510244046-3256-6-git-send-email-tixxdz@gmail.com> (raw)
In-Reply-To: <1510244046-3256-1-git-send-email-tixxdz@gmail.com>

This moves the 'hidepid' definitions to proc files. The 'hidepid' is a
proc mount option, not really a per pid namespace value. It was there
since it was used inside PID namespaces, however now we have improved
proc logic and reduce the complexity and ties with PID namespaces lets
move this last bit to where it really belongs.

Cc: Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
---
 include/linux/pid_namespace.h | 6 ------
 include/linux/proc_fs.h       | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index 786ea04..66f47f1 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -15,12 +15,6 @@
 
 struct fs_pin;
 
-enum { /* definitions for pid_namespace's hide_pid field */
-	HIDEPID_OFF	  = 0,
-	HIDEPID_NO_ACCESS = 1,
-	HIDEPID_INVISIBLE = 2,
-};
-
 struct pid_namespace {
 	struct kref kref;
 	struct idr idr;
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 408b51d..c123e5ec 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -12,6 +12,12 @@
 struct proc_dir_entry;
 struct pid_namespace;
 
+enum { /* definitions for 'hidepid' mount option */
+	HIDEPID_OFF	  = 0,
+	HIDEPID_NO_ACCESS = 1,
+	HIDEPID_INVISIBLE = 2,
+};
+
 struct proc_fs_info {
 	struct pid_namespace *pid_ns;
 	struct dentry *proc_self; /* For /proc/self/ */
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Djalal Harouni <tixxdz@gmail.com>
To: Kees Cook <keescook@chromium.org>,
	Alexey Gladkov <gladkov.alexey@gmail.com>,
	Andy Lutomirski <luto@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com,
	linux-security-module@vger.kernel.org, linux-api@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	me@tobin.cc, Oleg Nesterov <oleg@redhat.com>,
	Jeff Layton <jlayton@poochiereds.net>,
	Ingo Molnar <mingo@kernel.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	ebiederm@xmission.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Daniel Micay <danielmicay@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	bfields@fieldses.org, Stephen Rothwell <sfr@canb.auug.org.au>,
	solar@openwall.com, Djalal Harouni <tixxdz@gmail.com>
Subject: [kernel-hardening] [PATCH RFC v3 5/7] proc: move hidepid definitions to proc files
Date: Thu,  9 Nov 2017 17:14:04 +0100	[thread overview]
Message-ID: <1510244046-3256-6-git-send-email-tixxdz@gmail.com> (raw)
In-Reply-To: <1510244046-3256-1-git-send-email-tixxdz@gmail.com>

This moves the 'hidepid' definitions to proc files. The 'hidepid' is a
proc mount option, not really a per pid namespace value. It was there
since it was used inside PID namespaces, however now we have improved
proc logic and reduce the complexity and ties with PID namespaces lets
move this last bit to where it really belongs.

Cc: Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
---
 include/linux/pid_namespace.h | 6 ------
 include/linux/proc_fs.h       | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index 786ea04..66f47f1 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -15,12 +15,6 @@
 
 struct fs_pin;
 
-enum { /* definitions for pid_namespace's hide_pid field */
-	HIDEPID_OFF	  = 0,
-	HIDEPID_NO_ACCESS = 1,
-	HIDEPID_INVISIBLE = 2,
-};
-
 struct pid_namespace {
 	struct kref kref;
 	struct idr idr;
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 408b51d..c123e5ec 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -12,6 +12,12 @@
 struct proc_dir_entry;
 struct pid_namespace;
 
+enum { /* definitions for 'hidepid' mount option */
+	HIDEPID_OFF	  = 0,
+	HIDEPID_NO_ACCESS = 1,
+	HIDEPID_INVISIBLE = 2,
+};
+
 struct proc_fs_info {
 	struct pid_namespace *pid_ns;
 	struct dentry *proc_self; /* For /proc/self/ */
-- 
2.7.4

  parent reply	other threads:[~2017-11-09 16:15 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 16:13 [PATCH RFC v3 0/7] proc: modernize proc to support multiple private instances Djalal Harouni
2017-11-09 16:13 ` [kernel-hardening] " Djalal Harouni
2017-11-09 16:13 ` Djalal Harouni
2017-11-09 16:14 ` [PATCH RFC v3 1/7] proc: add proc_fs_info struct to store proc information Djalal Harouni
2017-11-09 16:14   ` [kernel-hardening] " Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni
2017-11-10 10:26   ` Alexey Dobriyan
2017-11-10 10:26     ` [kernel-hardening] " Alexey Dobriyan
2017-11-10 10:26     ` Alexey Dobriyan
2017-11-10 10:26     ` Alexey Dobriyan
2017-11-10 10:32     ` Djalal Harouni
2017-11-10 10:32       ` [kernel-hardening] " Djalal Harouni
2017-11-10 10:32       ` Djalal Harouni
2017-11-10 10:32       ` Djalal Harouni
2017-11-09 16:14 ` [PATCH RFC v3 2/7] proc: move /proc/{self|thread-self} dentries to proc_fs_info Djalal Harouni
2017-11-09 16:14   ` [kernel-hardening] " Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni
2017-11-10 10:31   ` Alexey Dobriyan
2017-11-10 10:31     ` [kernel-hardening] " Alexey Dobriyan
2017-11-10 10:31     ` Alexey Dobriyan
2017-11-10 10:31     ` Alexey Dobriyan
2017-11-10 10:45     ` Djalal Harouni
2017-11-10 10:45       ` [kernel-hardening] " Djalal Harouni
2017-11-10 10:45       ` Djalal Harouni
2017-11-10 10:45       ` Djalal Harouni
2017-11-09 16:14 ` [PATCH RFC v3 3/7] proc: add helpers to set and get proc hidepid and gid mount options Djalal Harouni
2017-11-09 16:14   ` [kernel-hardening] " Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni
2017-11-10 10:36   ` Alexey Dobriyan
2017-11-10 10:36     ` [kernel-hardening] " Alexey Dobriyan
2017-11-10 10:36     ` Alexey Dobriyan
2017-11-10 10:36     ` Alexey Dobriyan
2017-11-10 10:41     ` Djalal Harouni
2017-11-10 10:41       ` [kernel-hardening] " Djalal Harouni
2017-11-10 10:41       ` Djalal Harouni
2017-11-10 10:41       ` Djalal Harouni
2017-11-09 16:14 ` [PATCH RFC v3 4/7] proc: support mounting private procfs instances inside same pid namespace Djalal Harouni
2017-11-09 16:14   ` [kernel-hardening] " Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni
2017-11-10  2:53   ` James Morris
2017-11-10  2:53     ` [kernel-hardening] " James Morris
2017-11-10  2:53     ` James Morris
2017-11-10  2:53     ` James Morris
2017-11-10 10:33     ` Djalal Harouni
2017-11-10 10:33       ` [kernel-hardening] " Djalal Harouni
2017-11-10 10:33       ` Djalal Harouni
2017-11-10 10:33       ` Djalal Harouni
2017-11-09 16:14 ` Djalal Harouni [this message]
2017-11-09 16:14   ` [kernel-hardening] [PATCH RFC v3 5/7] proc: move hidepid definitions to proc files Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni
2017-11-09 16:14 ` [PATCH RFC v3 6/7] proc: support new 'pids=all|ptraceable' mount option Djalal Harouni
2017-11-09 16:14   ` [kernel-hardening] " Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni
2017-11-10  2:38   ` Andy Lutomirski
2017-11-10  2:38     ` [kernel-hardening] " Andy Lutomirski
2017-11-10  2:38     ` Andy Lutomirski
2017-11-10  2:38     ` Andy Lutomirski
2017-11-10  2:38     ` Andy Lutomirski
2017-11-10 10:38     ` Djalal Harouni
2017-11-10 10:38       ` [kernel-hardening] " Djalal Harouni
2017-11-10 10:38       ` Djalal Harouni
2017-11-10 10:38       ` Djalal Harouni
2017-11-10 10:38       ` Djalal Harouni
2017-11-10  2:56   ` James Morris
2017-11-10  2:56     ` [kernel-hardening] " James Morris
2017-11-10  2:56     ` James Morris
2017-11-10  2:56     ` James Morris
2017-11-09 16:14 ` [PATCH RFC v3 7/7] proc: flush dcache entries from all procfs instances Djalal Harouni
2017-11-09 16:14   ` [kernel-hardening] " Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni
2017-11-09 16:14   ` Djalal Harouni

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=1510244046-3256-6-git-send-email-tixxdz@gmail.com \
    --to=tixxdz@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=corbet@lwn.net \
    --cc=danielmicay@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=gladkov.alexey@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jlayton@poochiereds.net \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=me@tobin.cc \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=sfr@canb.auug.org.au \
    --cc=solar@openwall.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.