[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2ddce6bacb60e38b0c384fa4e0b82e6ea2ef88af.1487974517.git.bosrsf04@gmail.com>
Date: Fri, 24 Feb 2017 19:21:51 -0500
From: bosrsf04@...il.com
To: Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...nel.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Andy Lutomirski <luto@...nel.org>,
Nicolas Pitre <nicolas.pitre@...aro.org>,
Petr Mladek <pmladek@...e.com>, Helge Deller <deller@....de>,
Rik van Riel <riel@...hat.com>,
Thomas Garnier <thgarnie@...gle.com>,
Parav Pandit <pandit.parav@...il.com>,
"seokhoon . yoon" <iamyooon@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...el.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: josh@...htriplett.org, brkkurek192@...il.com, conorcurry@...il.com,
fanofbond138@...il.com, Brian Ashworth <bosrsf04@...il.com>
Subject: [PATCH 3/3] fs: Allows for the pivot_root syscall to be omitted
From: Brian Ashworth <bosrsf04@...il.com>
The pivot_root syscall is not needed on systems that do not use
any intermediate filesystem. Allowing for pivot_root to be
ommitted from the kernel will aid in the tinification efforts.
Without CONFIG_PIVOT_ROOT_SYSCALL set
add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-614 (-614)
function old new delta
sys_pivot_root 614 - -614
Total: Before=1899577, After=1898963, chg -0.03%
Signed-off-by: Brian Ashworth <bosrsf04@...il.com>
---
fs/Makefile | 4 +++-
init/Kconfig | 10 ++++++++++
kernel/sys_ni.c | 1 +
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/fs/Makefile b/fs/Makefile
index 34cb58c4127d..1a35bc90b0d5 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -11,7 +11,7 @@ obj-y := open.o read_write.o file_table.o super.o \
attr.o bad_inode.o file.o filesystems.o namespace.o \
seq_file.o xattr.o libfs.o fs-writeback.o \
pnode.o splice.o sync.o utimes.o \
- stack.o fs_struct.o statfs.o fs_pin.o nsfs.o pivot_root.o
+ stack.o fs_struct.o statfs.o fs_pin.o nsfs.o
ifeq ($(CONFIG_BLOCK),y)
obj-y += buffer.o block_dev.o direct-io.o mpage.o
@@ -19,6 +19,8 @@ else
obj-y += no-block.o
endif
+obj-$(CONFIG_PIVOT_ROOT_SYSCALL) += pivot_root.o
+
obj-$(CONFIG_PROC_FS) += proc_namespace.o
obj-y += notify/
diff --git a/init/Kconfig b/init/Kconfig
index 4dd8bd232a1d..33ed0282765f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1462,6 +1462,16 @@ config SYSCTL_SYSCALL
If unsure say N here.
+config PIVOT_ROOT_SYSCALL
+ bool "Pivot_root syscall support" if EXPERT
+ default y
+ help
+ pivot_root is a system call that allows the root to be moved and
+ replaced by another root. This is needed for intermediate file
+ systems such as initrd.
+
+ If unsure say Y here.
+
config POSIX_TIMERS
bool "Posix Clocks & timers" if EXPERT
default y
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 8acef8576ce9..7bd207571f87 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -178,6 +178,7 @@ cond_syscall(sys_setfsgid);
cond_syscall(sys_capget);
cond_syscall(sys_capset);
cond_syscall(sys_copy_file_range);
+cond_syscall(sys_pivot_root);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
--
2.11.1
Powered by blists - more mailing lists